Documentation ¶
Overview ¶
Package apitype contains the full set of "exchange types" that are serialized and sent across separately versionable boundaries, including service APIs, plugins, and file formats. As a result, we must consider the versioning impacts for each change we make to types within this package. In general, this means the following:
- DO NOT take anything away
- DO NOT change processing rules
- DO NOT make optional things required
- DO make anything new be optional
In the event that this is not possible, a breaking change is implied. The preferred approach is to never make breaking changes. If that isn't possible, the next best approach is to support both the old and new formats side-by-side (for instance, by using a union type for the property in question).
nolint: lll
Index ¶
- Constants
- type AppendUpdateLogEntryRequest
- type CLIVersionResponse
- type CancelEvent
- type CheckpointV1
- type CheckpointV2
- type CheckpointV3
- type CompleteUpdateRequest
- type ConfigValue
- type CreateStackRequest
- type CreateStackResponse
- type CreateUpdateConfig
- type DecryptValueRequest
- type DecryptValueResponse
- type DeploymentV1
- type DeploymentV2
- type DeploymentV3
- type DiagnosticEvent
- type EncryptValueRequest
- type EncryptValueResponse
- type EngineEvent
- type ErrorResponse
- type ErrorType
- type ExportStackResponse
- type GetHistoryResponse
- type ImportStackRequest
- type ImportStackResponse
- type ListStacksResponse
- type LogEntry
- type LogsResult
- type ManifestV1
- type OpType
- type OperationType
- type OperationV1
- type OperationV2
- type PatchUpdateCheckpointRequest
- type PluginInfoV1
- type PreludeEvent
- type RenewUpdateLeaseRequest
- type RenewUpdateLeaseResponse
- type RequestError
- type ResOpFailedEvent
- type ResOutputsEvent
- type ResourcePreEvent
- type ResourceV1
- type ResourceV2
- type ResourceV3
- type SecretV1
- type Stack
- type StackRenameRequest
- type StackSummary
- type StackTagName
- type StartUpdateRequest
- type StartUpdateResponse
- type StdoutEngineEvent
- type StepEventMetadata
- type StepEventStateMetadata
- type SummaryEvent
- type UntypedDeployment
- type UpdateEvent
- type UpdateEventKind
- type UpdateInfo
- type UpdateKind
- type UpdateMetadata
- type UpdateOptions
- type UpdateProgram
- type UpdateProgramRequest
- type UpdateProgramResponse
- type UpdateResult
- type UpdateResults
- type UpdateStatus
- type VersionedCheckpoint
Constants ¶
const ( // DeploymentSchemaVersionCurrent is the current version of the `Deployment` schema. // Any deployments newer than this version will be rejected. DeploymentSchemaVersionCurrent = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppendUpdateLogEntryRequest ¶
type AppendUpdateLogEntryRequest struct { Kind string `json:"kind"` Fields map[string]interface{} `json:"fields"` }
AppendUpdateLogEntryRequest defines the body of a request to the append update log entry endpoint of the service API. No longer sent from the CLI, but the type definition is still required for backwards compat with older clients.
type CLIVersionResponse ¶ added in v0.15.0
type CLIVersionResponse struct { LatestVersion string `json:"latestVersion"` OldestWithoutWarning string `json:"oldestWithoutWarning"` }
CLIVersionResponse is the response from the server with information about CLI versions.
type CancelEvent ¶ added in v0.16.4
type CancelEvent struct{}
CancelEvent is emitted when the user initiates a cancellation of the update in progress, or the update successfully completes.
type CheckpointV1 ¶
type CheckpointV1 struct { // Stack is the stack to update. Stack tokens.QName `json:"stack" yaml:"stack"` // Config contains a bag of optional configuration keys/values. Config config.Map `json:"config,omitempty" yaml:"config,omitempty"` // Latest is the latest/current deployment (if an update has occurred). Latest *DeploymentV1 `json:"latest,omitempty" yaml:"latest,omitempty"` }
CheckpointV1 is a serialized deployment target plus a record of the latest deployment.
type CheckpointV2 ¶ added in v0.14.3
type CheckpointV2 struct { // Stack is the stack to update. Stack tokens.QName `json:"stack" yaml:"stack"` // Config contains a bag of optional configuration keys/values. Config config.Map `json:"config,omitempty" yaml:"config,omitempty"` // Latest is the latest/current deployment (if an update has occurred). Latest *DeploymentV2 `json:"latest,omitempty" yaml:"latest,omitempty"` }
CheckpointV2 is the second version of the Checkpoint. It contains a newer version of the latest deployment.
type CheckpointV3 ¶ added in v0.16.12
type CheckpointV3 struct { // Stack is the stack to update. Stack tokens.QName `json:"stack" yaml:"stack"` // Config contains a bag of optional configuration keys/values. Config config.Map `json:"config,omitempty" yaml:"config,omitempty"` // Latest is the latest/current deployment (if an update has occurred). Latest *DeploymentV3 `json:"latest,omitempty" yaml:"latest,omitempty"` }
CheckpointV3 is the third version of the Checkpoint. It contains a newer version of the latest deployment.
type CompleteUpdateRequest ¶
type CompleteUpdateRequest struct {
Status UpdateStatus `json:"status"`
}
CompleteUpdateRequest defines the body of a reqeust to the update completion endpoint of the service API.
type ConfigValue ¶
type ConfigValue struct { // String is either the plaintext value (for non-secrets) or the base64-encoded ciphertext (for secrets). String string `json:"string"` // Secret is true if this value is a secret and false otherwise. Secret bool `json:"secret"` }
ConfigValue describes a single (possibly secret) configuration value.
type CreateStackRequest ¶
type CreateStackRequest struct { // The rest of the StackIdentifier (repo, project) is in the URL. StackName string `json:"stackName"` // An optional set of tags to apply to the stack. Tags map[StackTagName]string `json:"tags,omitEmpty"` }
CreateStackRequest defines the request body for creating a new Stack
type CreateStackResponse ¶ added in v0.16.4
type CreateStackResponse struct{}
CreateStackResponse is the response from a create Stack request.
type CreateUpdateConfig ¶
type CreateUpdateConfig struct { // Contents contains the configuration values for an update as a set of key-value pairs. Contents map[string]ConfigValue `json:"contents"` }
CreateUpdateConfig describes the configuration data for an request to `POST /updates`.
type DecryptValueRequest ¶
type DecryptValueRequest struct { // The value to decrypt. Ciphertext []byte `json:"ciphertext"` }
DecryptValueRequest defines the request body for decrypting a value.
type DecryptValueResponse ¶
type DecryptValueResponse struct { // The decrypted value. Plaintext []byte `json:"plaintext"` }
DecryptValueResponse defines the response body for a decrypted value.
type DeploymentV1 ¶
type DeploymentV1 struct { // Manifest contains metadata about this deployment. Manifest ManifestV1 `json:"manifest" yaml:"manifest"` // Resources contains all resources that are currently part of this stack after this deployment has finished. Resources []ResourceV1 `json:"resources,omitempty" yaml:"resources,omitempty"` }
DeploymentV1 represents a deployment that has actually occurred. It is similar to the engine's snapshot structure, except that it flattens and rearranges a few data structures for serializability.
type DeploymentV2 ¶ added in v0.14.3
type DeploymentV2 struct { // Manifest contains metadata about this deployment. Manifest ManifestV1 `json:"manifest" yaml:"manifest"` // Resources contains all resources that are currently part of this stack after this deployment has finished. Resources []ResourceV2 `json:"resources,omitempty" yaml:"resources,omitempty"` // PendingOperations are all operations that were known by the engine to be currently executing. PendingOperations []OperationV1 `json:"pending_operations,omitempty" yaml:"pending_operations,omitempty"` }
DeploymentV2 is the second version of the Deployment. It contains newer versions of the Resource API type.
type DeploymentV3 ¶ added in v0.16.12
type DeploymentV3 struct { // Manifest contains metadata about this deployment. Manifest ManifestV1 `json:"manifest" yaml:"manifest"` // SecretsProviders is a placeholder for secret provider configuration. SecretsProviders interface{} `json:"secrets_providers,omitempty" yaml:"secrets_providers,omitempty"` // Resources contains all resources that are currently part of this stack after this deployment has finished. Resources []ResourceV3 `json:"resources,omitempty" yaml:"resources,omitempty"` // PendingOperations are all operations that were known by the engine to be currently executing. PendingOperations []OperationV2 `json:"pending_operations,omitempty" yaml:"pending_operations,omitempty"` }
DeploymentV3 is the third version of the Deployment. It contains newer versions of the Resource and Operation API types and a placeholder for a stack's secrets configuration.
type DiagnosticEvent ¶ added in v0.16.4
type DiagnosticEvent struct { URN string `json:"urn"` Prefix string `json:"prefix"` Message string `json:"message"` Color string `json:"color"` // Severity is one of "info", "info#err", "warning", or "error". Severity string `json:"severity"` StreamID int `json:"streamID"` Ephemeral bool `json:"ephemeral"` }
DiagnosticEvent is emitted whenever a diagnostic message is provided, for example errors from a cloud resource provider while trying to create or update a resource.
type EncryptValueRequest ¶
type EncryptValueRequest struct { // The value to encrypt. Plaintext []byte `json:"plaintext"` }
EncryptValueRequest defines the request body for encrypting a value.
type EncryptValueResponse ¶
type EncryptValueResponse struct { // The encrypted value. Ciphertext []byte `json:"ciphertext"` }
EncryptValueResponse defines the response body for an encrypted value.
type EngineEvent ¶ added in v0.16.4
type EngineEvent struct { // Sequence is a unique, and monotonically increasing number for each engine event sent to the // Pulumi Service. Since events may be sent concurrently, and/or delayed via network routing, // the sequence number is to ensure events can be placed into a total ordering. // // - No two events can have the same sequence number. // - Events with a lower sequence number must have been emitted before those with a higher // sequence number. Sequence int `json:"sequence"` // Timestamp is a Unix timestamp (seconds) of when the event was emitted. Timestamp int `json:"timestamp"` CancelEvent *CancelEvent `json:"cancelEvent,omitempty"` StdoutEvent *StdoutEngineEvent `json:"stdoutEvent,omitempty"` DiagnosticEvent *DiagnosticEvent `json:"diagnosticEvent,omitempty"` PreludeEvent *PreludeEvent `json:"preludeEvent,omitempty"` SummaryEvent *SummaryEvent `json:"summaryEvent,omitempty"` ResourcePreEvent *ResourcePreEvent `json:"resourcePreEvent,omitempty"` ResOutputsEvent *ResOutputsEvent `json:"resOutputsEvent,omitempty"` ResOpFailedEvent *ResOpFailedEvent `json:"resOpFailedEvent,omitempty"` }
EngineEvent describes a Pulumi engine event, such as a change to a resource or diagnostic message. EngineEvent is a discriminated union of all possible event types, and exactly one field will be non-nil.
type ErrorResponse ¶
type ErrorResponse struct { // Code is the HTTP status code for the error response. Code int `json:"code"` // Message is the user-facing message describing the error. Message string `json:"message"` // DocumentationURL is an optional URL the user can to go learn more about the error. DocumentationURL *string `json:"documentationUrl,omitempty"` // Errors optionally include more specific data about why the request failed. Errors []RequestError `json:"errors,omitempty"` }
ErrorResponse is returned from the API when an actual response body is not appropriate. i.e. in all error situations.
func (ErrorResponse) Error ¶
func (err ErrorResponse) Error() string
Error implements the Error interface.
type ErrorType ¶ added in v0.15.0
type ErrorType string
ErrorType is an enum for various types of common errors that occur.
const ( // NotFoundErrorType is used when a resource or resource field was not found. // For example, updating a Stack that doesn't exist. NotFoundErrorType ErrorType = "not_found" // RequiredErrorType is used when a resource or resource field is missing and is required. // For example, creating a Stack without a project name. RequiredErrorType ErrorType = "required" // InvalidErrorType is used when the a resource or field was passed with an invalid value or state. // For example, creating a Stack with an invalid name. InvalidErrorType ErrorType = "invalid" // AlreadyExistsErrorType is used if the resource or field already exists (and must be unique). // For example, creating two Stacks with the same name. AlreadyExistsErrorType ErrorType = "already_exists" // CustomErrorType is used to describe any ErrorType not found in this file, and must be paired with // a custom error message. CustomErrorType ErrorType = "custom" )
type ExportStackResponse ¶
type ExportStackResponse UntypedDeployment
ExportStackResponse defines the response body for exporting a Stack.
type GetHistoryResponse ¶
type GetHistoryResponse struct {
Updates []UpdateInfo `json:"updates"`
}
GetHistoryResponse is the response from the Pulumi Service when requesting a stack's history.
type ImportStackRequest ¶
type ImportStackRequest UntypedDeployment
ImportStackRequest defines the request body for importing a Stack.
type ImportStackResponse ¶
type ImportStackResponse struct {
UpdateID string `json:"updateId"`
}
ImportStackResponse defines the response body for importing a Stack.
type ListStacksResponse ¶
type ListStacksResponse struct {
Stacks []StackSummary `json:"stacks"`
}
ListStacksResponse returns a set of stack summaries. This call is designed to be inexpensive.
type LogEntry ¶
type LogEntry struct { ID string `json:"id"` Timestamp int64 `json:"timestamp"` Message string `json:"message"` }
LogEntry is the individual entries in a JSON response to a Logs operation.
type LogsResult ¶
type LogsResult struct {
Logs []LogEntry `json:"logs"`
}
LogsResult is the JSON shape of responses to a Logs operation.
type ManifestV1 ¶
type ManifestV1 struct { // Time of the update. Time time.Time `json:"time" yaml:"time"` // Magic number, used to identify integrity of the checkpoint. Magic string `json:"magic" yaml:"magic"` // Version of the Pulumi engine used to render the checkpoint. Version string `json:"version" yaml:"version"` // Plugins contains the binary version info of plug-ins used. Plugins []PluginInfoV1 `json:"plugins,omitempty" yaml:"plugins,omitempty"` }
ManifestV1 captures meta-information about this checkpoint file, such as versions of binaries, etc.
type OpType ¶
type OpType string
OpType describes the type of operation performed to a resource managed by Pulumi.
Should generally mirror deploy.StepOp, but we clone it in this package to add flexibility in case there is a breaking change in the backend-type.
const ( // OpSame indiciates no change was made. OpSame OpType = "same" // OpCreate indiciates a new resource was created. OpCreate OpType = "create" // OpUpdate indicates an existing resource was updated. OpUpdate OpType = "update" // OpDelete indiciates an existing resource was deleted. OpDelete OpType = "delete" // OpReplace indicates an existing resource was replaced with a new one. OpReplace OpType = "replace" // OpCreateReplacement indiciates a new resource was created for a replacement. OpCreateReplacement OpType = "create-replacement" // OpDeleteReplaced indiciates an existing resource was deleted after replacement. OpDeleteReplaced OpType = "delete-replaced" )
type OperationType ¶ added in v0.15.0
type OperationType string
OperationType is the type of an operation initiated by the engine. Its value indicates the type of operation that the engine initiated.
const ( // OperationTypeCreating is the state of resources that are being created. OperationTypeCreating OperationType = "creating" // OperationTypeUpdating is the state of resources that are being updated. OperationTypeUpdating OperationType = "updating" // OperationTypeDeleting is the state of resources that are being deleted. OperationTypeDeleting OperationType = "deleting" // OperationTypeReading is the state of resources that are being read. OperationTypeReading OperationType = "reading" )
type OperationV1 ¶ added in v0.15.0
type OperationV1 struct { // Resource is the state that the engine used to initiate this operation. Resource ResourceV2 `json:"resource" yaml:"resource"` // Status is a string representation of the operation that the engine is performing. Type OperationType `json:"type" yaml:"type"` }
OperationV1 represents an operation that the engine is performing. It consists of a Resource, which is the state that the engine used to initiate the operation, and a Status, which is a string representation of the operation that the engine initiated.
type OperationV2 ¶ added in v0.16.12
type OperationV2 struct { // Resource is the state that the engine used to initiate this operation. Resource ResourceV3 `json:"resource" yaml:"resource"` // Status is a string representation of the operation that the engine is performing. Type OperationType `json:"type" yaml:"type"` }
OperationV2 represents an operation that the engine is performing. It consists of a Resource, which is the state that the engine used to initiate the operation, and a Status, which is a string representation of the operation that the engine initiated.
type PatchUpdateCheckpointRequest ¶
type PatchUpdateCheckpointRequest struct { IsInvalid bool `json:"isInvalid"` Version int `json:"version"` Deployment json.RawMessage `json:"deployment,omitempty"` }
PatchUpdateCheckpointRequest defines the body of a request to the patch update checkpoint endpoint of the service API. The `Deployment` field is expected to contain a serialized `Deployment` value, the schema of which is indicated by the `Version` field.
type PluginInfoV1 ¶
type PluginInfoV1 struct { Name string `json:"name" yaml:"name"` Path string `json:"path" yaml:"path"` Type workspace.PluginKind `json:"type" yaml:"type"` Version string `json:"version" yaml:"version"` }
PluginInfoV1 captures the version and information about a plugin.
type PreludeEvent ¶ added in v0.16.4
type PreludeEvent struct { // Config contains the keys and values for the update. // Encrypted configuration values may be blinded. Config map[string]string `json:"config"` }
PreludeEvent is emitted at the start of an update.
type RenewUpdateLeaseRequest ¶
type RenewUpdateLeaseRequest struct { // The current, valid lease token. Token string `json:"token"` // The duration for which to renew the lease in seconds (maximum 300). Duration int `json:"duration"` }
RenewUpdateLeaseRequest defines the body of a request to the update lease renewal endpoint of the service API.
type RenewUpdateLeaseResponse ¶
type RenewUpdateLeaseResponse struct { // The renewed token. Token string `json:"token"` }
RenewUpdateLeaseResponse defines the data returned by the update lease renewal endpoint of the service API.
type RequestError ¶ added in v0.15.0
type RequestError struct { // Resource is the user-friendly description of the resource, e.g. "stack" or "tag". Resource string `json:"resource"` // Attribute describes the property of the resource (if applicable) that is problematic, e.g. // "name" or "length". Attribute *string `json:"attribute,omitempty"` // ErrorType is the type of error the attribute's value caused. ErrorType ErrorType `json:"errorType"` // CustomMessage is the error message to display with CustomErrorType. CustomMessage *string `json:"customMessage,omitempty"` }
RequestError describes a request error in more detail, such the specific validation error(s) that caused the request to fail and links to the relevant documentation.
type ResOpFailedEvent ¶ added in v0.16.4
type ResOpFailedEvent struct { Metadata StepEventMetadata `json:"metadata"` Status int `json:"status"` Steps int `json:"steps"` }
ResOpFailedEvent is emitted when a resource operation fails. Typically a DiagnosticEvent is emitted before this event, indiciating what the root cause of the error.
type ResOutputsEvent ¶ added in v0.16.4
type ResOutputsEvent struct { Metadata StepEventMetadata `json:"metadata"` Planning bool `json:"planning"` }
ResOutputsEvent is emitted when a resource is finished being provisioned.
type ResourcePreEvent ¶ added in v0.16.4
type ResourcePreEvent struct { Metadata StepEventMetadata `json:"metadata"` Planning bool `json:"planning"` }
ResourcePreEvent is emitted before a resource is modified.
type ResourceV1 ¶
type ResourceV1 struct { // URN uniquely identifying this resource. URN resource.URN `json:"urn" yaml:"urn"` // Custom is true when it is managed by a plugin. Custom bool `json:"custom" yaml:"custom"` // Delete is true when the resource should be deleted during the next update. Delete bool `json:"delete,omitempty" yaml:"delete,omitempty"` // ID is the provider-assigned resource, if any, for custom resources. ID resource.ID `json:"id,omitempty" yaml:"id,omitempty"` // Type is the resource's full type token. Type tokens.Type `json:"type" yaml:"type"` // Inputs are the input properties supplied to the provider. Inputs map[string]interface{} `json:"inputs,omitempty" yaml:"inputs,omitempty"` // Defaults contains the default values supplied by the provider (DEPRECATED, see #637). Defaults map[string]interface{} `json:"defaults,omitempty" yaml:"defaults,omitempty"` // Outputs are the output properties returned by the provider after provisioning. Outputs map[string]interface{} `json:"outputs,omitempty" yaml:"outputs,omitempty"` // Parent is an optional parent URN if this resource is a child of it. Parent resource.URN `json:"parent,omitempty" yaml:"parent,omitempty"` // Protect is set to true when this resource is "protected" and may not be deleted. Protect bool `json:"protect,omitempty" yaml:"protect,omitempty"` // Dependencies contains the dependency edges to other resources that this depends on. Dependencies []resource.URN `json:"dependencies" yaml:"dependencies,omitempty"` // InitErrors is the set of errors encountered in the process of initializing resource (i.e., // during create or update). InitErrors []string `json:"initErrors" yaml:"initErrors,omitempty"` }
ResourceV1 describes a Cloud resource constructed by Pulumi.
type ResourceV2 ¶ added in v0.14.3
type ResourceV2 struct { // URN uniquely identifying this resource. URN resource.URN `json:"urn" yaml:"urn"` // Custom is true when it is managed by a plugin. Custom bool `json:"custom" yaml:"custom"` // Delete is true when the resource should be deleted during the next update. Delete bool `json:"delete,omitempty" yaml:"delete,omitempty"` // ID is the provider-assigned resource, if any, for custom resources. ID resource.ID `json:"id,omitempty" yaml:"id,omitempty"` // Type is the resource's full type token. Type tokens.Type `json:"type" yaml:"type"` // Inputs are the input properties supplied to the provider. Inputs map[string]interface{} `json:"inputs,omitempty" yaml:"inputs,omitempty"` // Outputs are the output properties returned by the provider after provisioning. Outputs map[string]interface{} `json:"outputs,omitempty" yaml:"outputs,omitempty"` // Parent is an optional parent URN if this resource is a child of it. Parent resource.URN `json:"parent,omitempty" yaml:"parent,omitempty"` // Protect is set to true when this resource is "protected" and may not be deleted. Protect bool `json:"protect,omitempty" yaml:"protect,omitempty"` // External is set to true when the lifecycle of this resource is not managed by Pulumi. External bool `json:"external,omitempty" yaml:"external,omitempty"` // Dependencies contains the dependency edges to other resources that this depends on. Dependencies []resource.URN `json:"dependencies,omitempty" yaml:"dependencies,omitempty"` // InitErrors is the set of errors encountered in the process of initializing resource (i.e., // during create or update). InitErrors []string `json:"initErrors,omitempty" yaml:"initErrors,omitempty"` // Provider is a reference to the provider that is associated with this resource. Provider string `json:"provider,omitempty" yaml:"provider,omitempty"` }
ResourceV2 is the second version of the Resource API type. It absorbs a few breaking changes:
- The deprecated `Defaults` field is removed because it is not used anywhere,
- It adds an additional bool field, "External", which reflects whether or not this resource exists because of a call to `ReadResource`. This is motivated by a need to store resources that Pulumi does not own in the deployment.
- It adds an additional string field, "Provider", that is a reference to a first-class provider associated with this resource.
Migrating from ResourceV1 to ResourceV2 involves:
- Dropping the `Defaults` field (it should be empty anyway)
- Setting the `External` field to "false", since a ResourceV1 existing for a resource implies that it is owned by Pulumi. Note that since this is the default value for booleans in Go, no explicit assignment needs to be made.
- Setting the "Provider" field to the empty string, because V1 deployments don't have first-class providers.
type ResourceV3 ¶ added in v0.16.12
type ResourceV3 struct { // URN uniquely identifying this resource. URN resource.URN `json:"urn" yaml:"urn"` // Custom is true when it is managed by a plugin. Custom bool `json:"custom" yaml:"custom"` // Delete is true when the resource should be deleted during the next update. Delete bool `json:"delete,omitempty" yaml:"delete,omitempty"` // ID is the provider-assigned resource, if any, for custom resources. ID resource.ID `json:"id,omitempty" yaml:"id,omitempty"` // Type is the resource's full type token. Type tokens.Type `json:"type" yaml:"type"` // Inputs are the input properties supplied to the provider. Inputs map[string]interface{} `json:"inputs,omitempty" yaml:"inputs,omitempty"` // Outputs are the output properties returned by the provider after provisioning. Outputs map[string]interface{} `json:"outputs,omitempty" yaml:"outputs,omitempty"` // Parent is an optional parent URN if this resource is a child of it. Parent resource.URN `json:"parent,omitempty" yaml:"parent,omitempty"` // Protect is set to true when this resource is "protected" and may not be deleted. Protect bool `json:"protect,omitempty" yaml:"protect,omitempty"` // External is set to true when the lifecycle of this resource is not managed by Pulumi. External bool `json:"external,omitempty" yaml:"external,omitempty"` // Dependencies contains the dependency edges to other resources that this depends on. Dependencies []resource.URN `json:"dependencies,omitempty" yaml:"dependencies,omitempty"` // InitErrors is the set of errors encountered in the process of initializing resource (i.e., // during create or update). InitErrors []string `json:"initErrors,omitempty" yaml:"initErrors,omitempty"` // Provider is a reference to the provider that is associated with this resource. Provider string `json:"provider,omitempty" yaml:"provider,omitempty"` // PropertyDependencies maps from an input property name to the set of resources that property depends on. PropertyDependencies map[resource.PropertyKey][]resource.URN `json:"propertyDependencies,omitempty" yaml:"property_dependencies,omitempty"` // PendingReplacement is used to track delete-before-replace resources that have been deleted but not yet // recreated. PendingReplacement bool `json:"pendingReplacement,omitempty" yaml:"pendingReplacement,omitempty"` }
ResourceV3 is the third version of the Resource API type. It absorbs a few breaking changes:
- It adds a map from input property names to the dependencies that affect that input property. This is used to improve the precision of delete-before-create operations.
- It adds a new boolean field, `PendingReplacement`, that marks resources that have been deleted as part of a delete-before-create operation but have not yet been recreated.
Migrating from ResourceV2 to ResourceV3 involves:
- Populating the map from input property names to dependencies by assuming that every dependency listed in `Dependencies` affects every input property.
type SecretV1 ¶ added in v0.16.12
type SecretV1 struct { Sig string `json:"4dabf18193072939515e22adb298388d" yaml:"4dabf18193072939515e22adb298388d"` Ciphertext string `json:"ciphertext" yaml:"ciphertext"` }
SecretV1 captures the information that a particular value is secret and must be decrypted before use.
NOTE: nothing produces these values yet. This type is merely a placeholder for future use.
type Stack ¶
type Stack struct { CloudName string `json:"cloudName"` OrgName string `json:"orgName"` RepoName string `json:"repoName"` ProjectName string `json:"projectName"` StackName tokens.QName `json:"stackName"` ActiveUpdate string `json:"activeUpdate"` Resources []ResourceV1 `json:"resources,omitempty"` Tags map[StackTagName]string `json:"tags,omitempty"` Version int `json:"version"` }
Stack describes a Stack running on a Pulumi Cloud.
type StackRenameRequest ¶ added in v0.17.2
type StackRenameRequest struct {
NewName string `json:"newName"`
}
StackRenameRequest is the shape of the request to change an existing stack's name.
type StackSummary ¶
type StackSummary struct { // OrgName is the organization name the stack is found in. OrgName string `json:"orgName"` // ProjectName is the name of the project the stack is associated with. ProjectName string `json:"projectName"` // StackName is the name of the stack. StackName string `json:"stackName"` // LastUpdate is a Unix timestamp of the stack's last update, as applicable. LastUpdate *int64 `json:"lastUpdate,omitempty"` // ResourceCount is the number of resources associated with this stack, as applicable. ResourceCount *int `json:"resourceCount,omitempty"` }
StackSummary describes the state of a stack, without including its specific resources, etc.
type StackTagName ¶
type StackTagName = string
StackTagName is the key for the tags bag in stack. This is just a string, but we use a type alias to provide a richer description of how the string is used in our apitype definitions.
const ( // ProjectNameTag is a tag that represents the name of a project (coresponds to the `name` property of Pulumi.yaml). ProjectNameTag StackTagName = "pulumi:project" // ProjectRuntimeTag is a tag that represents the runtime of a project (the `runtime` property of Pulumi.yaml). ProjectRuntimeTag StackTagName = "pulumi:runtime" // ProjectDescriptionTag is a tag that represents the description of a project (Pulumi.yaml's `description`). ProjectDescriptionTag StackTagName = "pulumi:description" // GitHubOwnerNameTag is a tag that represents the name of the owner on GitHub that this stack // may be associated with (inferred by the CLI based on git remote info). // TODO [pulumi/pulumi-service#2306] Once the UI is updated, we would no longer need the GitHub specific keys. GitHubOwnerNameTag StackTagName = "gitHub:owner" // GitHubRepositoryNameTag is a tag that represents the name of a repository on GitHub that this stack // may be associated with (inferred by the CLI based on git remote info). GitHubRepositoryNameTag StackTagName = "gitHub:repo" // VCSOwnerNameTag is a tag that represents the name of the owner on the cloud VCS that this stack // may be associated with (inferred by the CLI based on git remote info). VCSOwnerNameTag StackTagName = "vcs:owner" // VCSRepositoryNameTag is a tag that represents the name of a repository on the cloud VCS that this stack // may be associated with (inferred by the CLI based on git remote info). VCSRepositoryNameTag StackTagName = "vcs:repo" // VCSRepositoryKindTag is a tag that represents the kind of the cloud VCS that this stack // may be associated with (inferred by the CLI based on the git remote info). VCSRepositoryKindTag StackTagName = "vcs:kind" )
type StartUpdateRequest ¶
type StartUpdateRequest struct { // Tags contains an updated set of Tags for the stack. If non-nil, will replace the current // set of tags associated with the stack. Tags map[StackTagName]string `json:"tags,omitempty"` }
StartUpdateRequest requests that an update starts getting applied to a stack.
type StartUpdateResponse ¶
type StartUpdateResponse struct { // Version is the version of the program once the update is complete. // (Will be the current, unchanged value for previews.) Version int `json:"version"` // Token is the lease token (if any) to be used to authorize operations on this update. Token string `json:"token,omitempty"` }
StartUpdateResponse is the result of the command to start an update.
type StdoutEngineEvent ¶ added in v0.16.4
StdoutEngineEvent is emitted whenever a generic message is written, for example warnings from the pulumi CLI itself. Less common that DiagnosticEvent
type StepEventMetadata ¶ added in v0.16.4
type StepEventMetadata struct { // Op is the operation being performed, a deploy.StepOp. Op string `json:"op"` URN string `json:"urn"` Type string `json:"type"` // Old is the state of the resource before performing the step. Old *StepEventStateMetadata `json:"old"` // New is the state of the resource after performing the step. New *StepEventStateMetadata `json:"new"` // Res is the current state of the resource as known. (e.g. equal to old or new depending on // circumstance.) Res *StepEventStateMetadata `json:"res"` // Keys causing a replacement (only applicable for "create" and "replace" Ops). Keys []string `json:"keys,omitempty"` // Keys that changed with this step. Diffs []string `json:"diffs"` // Logical is set if the step is a logical operation in the program. Logical bool `json:"logical"` // Provider actually performing the step. Provider string `json:"provider"` }
StepEventMetadata describes a "step" within the Pulumi engine, which is any concrete action to migrate a set of cloud resources from one state to another.
type StepEventStateMetadata ¶ added in v0.16.4
type StepEventStateMetadata struct { Type string `json:"type"` URN string `json:"urn"` // Custom indicates if the resource is managed by a plugin. Custom bool `json:"custom"` // Delete is true when the resource is pending deletion due to a replacement. Delete bool `json:"delete"` // ID is the resource's unique ID, assigned by the resource provider (or blank if none/uncreated). ID string `json:"id"` // Parent is an optional parent URN that this resource belongs to. Parent string `json:"parent"` // Protect is true to "protect" this resource (protected resources cannot be deleted). Protect bool `json:"protect"` // Inputs contains the resource's input properties (as specified by the program). Secrets have // filtered out, and large assets have been replaced by hashes as applicable. Inputs map[string]interface{} `json:"inputs"` // Outputs contains the resource's complete output state (as returned by the resource provider). Outputs map[string]interface{} `json:"outputs"` // Provider is the resource's provider reference Provider string `json:"provider"` // InitErrors is the set of errors encountered in the process of initializing resource. InitErrors []string `json:"initErrors"` }
StepEventStateMetadata is the more detailed state information for a resource as it relates to a step(s) being performed.
type SummaryEvent ¶ added in v0.16.4
type SummaryEvent struct { // MaybeCorrupt is set if one or more of the resources is in an invalid state. MaybeCorrupt bool `json:"maybeCorrupt"` // Duration is the number of seconds the update was executing. DurationSeconds int `json:"durationSeconds"` // ResourceChanges contains the count for resource change by type. The keys are deploy.StepOp, // which is not exported in this package. ResourceChanges map[string]int `json:"resourceChanges"` }
SummaryEvent is emitted at the end of an update, with a summary of the changes made.
type UntypedDeployment ¶
type UntypedDeployment struct { // Version indicates the schema of the encoded deployment. Version int `json:"version,omitempty"` // The opaque Pulumi deployment. This is conceptually of type `Deployment`, but we use `json.Message` to // permit round-tripping of stack contents when an older client is talking to a newer server. If we unmarshaled // the contents, and then remarshaled them, we could end up losing important information. Deployment json.RawMessage `json:"deployment,omitempty"` }
UntypedDeployment contains an inner, untyped deployment structure.
type UpdateEvent ¶
type UpdateEvent struct { Index string `json:"index"` Kind UpdateEventKind `json:"kind"` Fields map[string]interface{} `json:"fields"` }
UpdateEvent describes an event that happened on the Pulumi Cloud while processing an update.
type UpdateEventKind ¶
type UpdateEventKind string
UpdateEventKind is an enum for the type of update events.
const ( // StdoutEvent is used to mark the event being emitted to STDOUT. StdoutEvent UpdateEventKind = "stdout" // StderrEvent is used to mark the event being emitted to STDERR. StderrEvent UpdateEventKind = "stderr" )
type UpdateInfo ¶
type UpdateInfo struct { // Information known before an update is started. Kind UpdateKind `json:"kind"` StartTime int64 `json:"startTime"` Message string `json:"message"` Environment map[string]string `json:"environment"` Config map[string]ConfigValue `json:"config"` // Information obtained from an update completing. Result UpdateResult `json:"result"` EndTime int64 `json:"endTime"` Version int `json:"version"` Deployment json.RawMessage `json:"deployment,omitempty"` ResourceChanges map[OpType]int `json:"resourceChanges,omitempty"` }
UpdateInfo describes a previous update.
Should generally mirror backend.UpdateInfo, but we clone it in this package to add flexibility in case there is a breaking change in the backend-type.
type UpdateKind ¶
type UpdateKind string
UpdateKind is an enum for the type of update performed.
Should generally mirror backend.UpdateKind, but we clone it in this package to add flexibility in case there is a breaking change in the backend-type.
const ( // UpdateUpdate is the prototypical Pulumi program update. UpdateUpdate UpdateKind = "update" // PreviewUpdate is a preview of an update, without impacting resources. PreviewUpdate UpdateKind = "preview" // RefreshUpdate is an update that came from a refresh operation. RefreshUpdate UpdateKind = "refresh" // DestroyUpdate is an update which removes all resources. DestroyUpdate UpdateKind = "destroy" // ImportUpdate is an update that entails importing a raw checkpoint file. ImportUpdate UpdateKind = "import" )
type UpdateMetadata ¶
type UpdateMetadata struct { // Message is an optional message associated with the update. Message string `json:"message"` // Environment contains optional data from the deploying environment. e.g. the current // source code control commit information. Environment map[string]string `json:"environment"` }
UpdateMetadata describes optional metadata about an update.
Should generally mirror backend.UpdateMetadata, but we clone it in this package to add flexibility in case there is a breaking change in the backend-type.
type UpdateOptions ¶
type UpdateOptions struct { Analyzers []string `json:"analyzers"` Color colors.Colorization `json:"color"` DryRun bool `json:"dryRun"` Parallel int `json:"parallel"` ShowConfig bool `json:"showConfig"` ShowReplacementSteps bool `json:"showReplacementSteps"` ShowSames bool `json:"showNames"` Summary bool `json:"summary"` Debug bool `json:"debug"` }
UpdateOptions is the set of operations for configuring the output of an update.
Should generally mirror engine.UpdateOptions, but we clone it in this package to add flexibility in case there is a breaking change in the engine-type.
type UpdateProgram ¶
type UpdateProgram struct { // Name is the name of the program. Name string `json:"name"` // Runtime is the language runtime used to execute the program. Runtime string `json:"runtime"` // Main is an optional redirect for the main program location. (e.g. a subfolder under Pulumi.yaml // containing package.json.) Main string `json:"main"` // Analyzers is the set of analyzers to run when this program is executed. Analyzers []string `json:"analyzers"` // Destroy indicates whether or not this program is the nil program (i.e. the program that generates no resources). Destroy bool `json:"destroy"` // Refresh is true if this is a refresh-style update, which simply takes state from the current cloud resources. Refresh bool `json:"refresh"` }
UpdateProgram describes the metadata associated with an update's Pulumi program. Note that this does not include the contents of the program itself.
type UpdateProgramRequest ¶
type UpdateProgramRequest struct { // Properties from the Project file. Subset of pack.Package. Name string `json:"name"` Runtime string `json:"runtime"` Main string `json:"main"` Description string `json:"description"` Options UpdateOptions `json:"options"` // Configuration values. Config map[string]ConfigValue `json:"config"` Metadata UpdateMetadata `json:"metadata"` }
UpdateProgramRequest is the request type for updating (aka deploying) a Pulumi program.
type UpdateProgramResponse ¶
type UpdateProgramResponse struct { // UpdateID is the opaque identifier of the requested update. This value is needed to begin an update, as // well as poll for its progress. UpdateID string `json:"updateID"` }
UpdateProgramResponse is the result of an update program request.
type UpdateResult ¶
type UpdateResult string
UpdateResult is an enum for the result of the update.
Should generally mirror backend.UpdateResult, but we clone it in this package to add flexibility in case there is a breaking change in the backend-type.
const ( // NotStartedResult is for updates that have not started. NotStartedResult UpdateResult = "not-started" // InProgressResult is for updates that have not yet completed. InProgressResult UpdateResult = "in-progress" // SucceededResult is for updates that completed successfully. SucceededResult UpdateResult = "succeeded" // FailedResult is for updates that have failed. FailedResult UpdateResult = "failed" )
type UpdateResults ¶
type UpdateResults struct { Status UpdateStatus `json:"status"` Events []UpdateEvent `json:"events"` // ContinuationToken is an opaque value used to indiciate the end of the returned update // results. Pass it in the next request to obtain subsequent update events. // // The same continuation token may be returned if no new update events are available, but the // update is still in-progress. // // A value of nil means that no new updates will be available. Everything has been returned to // the client and the update has completed. ContinuationToken *string `json:"continuationToken,omitempty"` }
UpdateResults returns a series of events and the current status of an update. The events can be filtered. See API call for more details.
type UpdateStatus ¶
type UpdateStatus string
UpdateStatus is an enum describing the current state during the lifecycle of an update.
const ( // StatusNotStarted is returned when the Update has been created but not applied. StatusNotStarted UpdateStatus = "not started" // StatusRequested is returned when the Update application has been requested but not started. StatusRequested UpdateStatus = "requested" // StatusRunning is returned when the Update is in progress. StatusRunning UpdateStatus = "running" // StatusFailed is returned when the update has failed. StatusFailed UpdateStatus = "failed" // StatusSucceeded is returned when the update has succeeded. StatusSucceeded UpdateStatus = "succeeded" )
const ( // UpdateStatusSucceeded indicates that an update completed successfully. UpdateStatusSucceeded UpdateStatus = "succeeded" // UpdateStatusFailed indicates that an update completed with one or more failures. UpdateStatusFailed UpdateStatus = "failed" // UpdateStatusCancelled indicates that an update completed due to cancellation. UpdateStatusCancelled UpdateStatus = "cancelled" )
type VersionedCheckpoint ¶
type VersionedCheckpoint struct { Version int `json:"version"` Checkpoint json.RawMessage `json:"checkpoint"` }
VersionedCheckpoint is a version number plus a json document. The version number describes what version of the Checkpoint structure the Checkpoint member's json document can decode into.