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).
Index ¶
- Constants
- type AppendUpdateLogEntryRequest
- type CLIVersionResponse
- type CheckpointV1
- type CheckpointV2
- type CompleteUpdateRequest
- type ConfigValue
- type CreateStackRequest
- type CreateStackResponseByID
- type CreateStackResponseByName
- type CreateUpdateConfig
- type CreateUpdateRequest
- type CreateUpdateResponse
- type DecryptValueRequest
- type DecryptValueResponse
- type DeploymentV1
- type DeploymentV2
- type EncryptValueRequest
- type EncryptValueResponse
- type ErrorResponse
- type ErrorType
- type ExportStackResponse
- type GetApplyUpdateResultsResponse
- type GetHistoryResponse
- type GetPreviewUpdateResultsResponse
- type GetStackLogsResponse
- type GetStackResponse
- type GetUpdateResponse
- type ImportStackRequest
- type ImportStackResponse
- type ListStacksResponse
- type LogEntry
- type LogsResult
- type ManifestV1
- type OpType
- type OperationType
- type OperationV1
- type PatchUpdateCheckpointRequest
- type PluginInfoV1
- type RenewUpdateLeaseRequest
- type RenewUpdateLeaseResponse
- type RequestError
- type ResourceV1
- type ResourceV2
- type Stack
- type StackSummary
- type StackTagName
- type StartUpdateRequest
- type StartUpdateResponse
- type UntypedDeployment
- type UpdateApplyRequest
- 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 = 2 )
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.
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 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 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 { // If empty means use the default cloud. CloudName string `json:"cloudName"` // 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 CreateStackResponseByID ¶
type CreateStackResponseByID struct { // ID is the unique identifier for the newly-created stack. ID string `json:"id"` }
CreateStackResponseByID describes the data returned by the `POST /stacks` endpoint of the PPC API.
type CreateStackResponseByName ¶
type CreateStackResponseByName struct { // The name of the cloud used if the default was sent. CloudName string `json:"cloudName"` }
CreateStackResponseByName 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 CreateUpdateRequest ¶
type CreateUpdateRequest struct { // Stack is the unqique ID for the stack that this update targets. Stack string `json:"stack"` // Import indicates whether or not this update's resources are given by a checkpoint to import rather than // an actual Pulumi program. If this field is `true`, the client must upload the checkpoint file to the // URL returned in the response. Config should be empty, as it will be copied from the base update. Program // should also be empty, as it will not be used. IsCheckpointImport bool `json:"import,omitempty"` // StackAlias is the friendly name for the update's stack that will be exposed to the update's Pulumi // program. StackAlias string `json:"stackAlias,omitempty"` // Config records the configuration values for an update. Must be nil if IsCheckpointImport is true. Config *CreateUpdateConfig `json:"config,omitempty"` // Program records the program metadata for an update. Must be nil if IsCheckpointImport is true. Program *UpdateProgram `json:"program,omitempty"` }
CreateUpdateRequest describe the data provided as the body of a request to the `POST /updates` endpoint of the PPC API.
type CreateUpdateResponse ¶
type CreateUpdateResponse struct { // ID is the unique identifier of the newly-created update. ID string `json:"id"` // Stack is the unique identifier of the stack targeted by the update. Stack string `json:"stack"` // BaseUpdate is the unique identifier of the update that was active in the stack indicated above at the // time at which this update was created. BaseUpdate string `json:"baseUpdate"` // UploadURL is a URL that the client must use to upload the contents of the program associated with this // update. The client should upload the program by sending a `PUT` request to this URL with the contents of // the program as a ZIP file in the request body. The `PUT` request must also set the `Content-Length` // header. UploadURL string `json:"uploadURL"` }
CreateUpdateResponse describes the data returned by a request to the `POST /updates` endpoint of the PPC API.
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 never versions of the Resource API type.
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 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 GetApplyUpdateResultsResponse ¶
type GetApplyUpdateResultsResponse UpdateResults
GetApplyUpdateResultsResponse describes the data returned by the `GET /updates/{updateID}/apply` endpoint of the PPC API.
type GetHistoryResponse ¶
type GetHistoryResponse struct {
Updates []UpdateInfo `json:"updates"`
}
GetHistoryResponse is the response from the Pulumi Service when requesting a stack's history.
type GetPreviewUpdateResultsResponse ¶
type GetPreviewUpdateResultsResponse UpdateResults
GetPreviewUpdateResultsResponse describes the data returned by the `GET /updates/{updateID}/preview` endpoint of the PPC API.
type GetStackLogsResponse ¶
type GetStackLogsResponse struct { // LogEntries records the sequence of log entries generated by the stack's resources. LogEntries []LogEntry `json:"logEntries"` }
GetStackLogsResponse describes the data returned by the `GET /stack/{stackID}/logs` endpoint of the PPC API.
type GetStackResponse ¶
type GetStackResponse struct { // ID is the unique identifier for a stack in the context of its PPC. ID string `json:"id"` // ActiveUpdate is the unique identifier for the stack's active update. This may be empty if no update has // been applied. ActiveUpdate string `json:"activeUpdate"` // UnknownState indicates whether or not the contents of the resources array contained in the response is // known to accurately represent the cloud resources managed by this stack. A stack that is in an unknown // state cannot be updated. // TODO: [pulumi/pulumi-ppc#29]: make this state recoverable. This could be as simple as import/export. UnknownState bool `json:"unknownState"` // Version indicates the schema of the Resources, Manifest, and Deployment fields below. Version int `json:"version"` // Resources provides the list of cloud resources managed by this stack. Resources []ResourceV1 `json:"resources"` // Manifest is the Manifest from the last rendered checkpoint. Manifest ManifestV1 `json:"manifest"` // Deployment provides a view of the stack as an opaque Pulumi deployment. Deployment json.RawMessage `json:"deployment,omitempty"` }
GetStackResponse describes the data returned by the `/GET /stack/{stackID}` endpoint of the PPC API. If the `deployment` query parameter is set to `true`, `Deployment` will be set and `Resources will be empty.
type GetUpdateResponse ¶
type GetUpdateResponse struct { CreateUpdateResponse // State indicates which state the update is in. State string `json:"state"` // StackAlias is the friendly name for the update's stack that will be exposed to the update's Pulumi // program. StackAlias string `json:"stackAlias,omitempty"` // Config records the configuration values for an update. Config map[string]string `json:"config"` // Program records the program metadata for an update. Program UpdateProgram `json:"program"` }
GetUpdateResponse describes the data retuerned by a request to the `GET /updates/{updateID}` endpoint of the PPC API.
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 contains a list of summaries for each stack that currently exists in the PPC. Stacks []StackSummary `json:"stacks"` }
ListStacksResponse describes the data returned by the `GET /stacks` endpoint of the PPC API.
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 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 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 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" 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"` // 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 Stack ¶
type Stack struct { CloudName string `json:"cloudName"` OrgName string `json:"orgName"` RepoName string `json:"repoName"` ProjectName string `json:"projName"` 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 StackSummary ¶
type StackSummary struct { // ID is the unique identifier for a stack in the context of its PPC. ID string `json:"id"` // ActiveUpdate is the unique identifier for the stack's active update. This may be empty if no update has // been applied. ActiveUpdate string `json:"activeUpdate"` // ResourceCount is the number of resources associated with this stack. Note that this is currently unimplemented. ResourceCount int `json:"resourceCount"` }
StackSummary presents an overview of a particular stack without enumerating its current resource set.
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). 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" )
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 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 UpdateApplyRequest ¶
type UpdateApplyRequest struct { // Should we tell the engine to emit information about the configuration during this update. ShowConfig bool `json:"showConfig,omitempty"` // Should we tell the engine to emit information about resources that have not changed during this update. ShowSames bool `json:"showSames,omitempty"` // Should we tell the engine to emit information about replacement steps during this update. ShowReplacementSteps bool `json:"showReplacementSteps,omitempty"` // Should we tell the engine to emit summary information during this update. Summary bool `json:"summary,omitempty"` }
UpdateApplyRequest describes the data provided as the body of a request to the `POST /updates/{updateID}/apply` and `POST /updates/{updateID}/preview` endpoints of the PPC API.
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"` // UploadURL is a URL the client can use to upload their program's contents into. Ignored for destroys. UploadURL string `json:"uploadURL"` }
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.