apitype

package
v2.2.2-0...-17ad7ea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

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:

  1. DO NOT take anything away
  2. DO NOT change processing rules
  3. DO NOT make optional things required
  4. 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

View Source
const DefaultPolicyGroup = "default-policy-group"

DefaultPolicyGroup is the name of the default Policy Group for organizations.

View Source
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

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

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

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

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 request to the update completion endpoint of the service API.

type ConfigValue

type ConfigValue struct {
	// When Object is false: String is either the plaintext value (for non-secrets) or the base64-encoded ciphertext
	// (for secrets). When Object is true: String is a JSON encoded object. If both Object and Secret are true, then the
	// object contains at least one secure value. Secure values in an object are encoded as `{"secure":"ciphertext"}`
	// where ciphertext is the base64-encoded ciphertext.
	String string `json:"string"`
	// Secret is true if this value is a secret and false otherwise.
	Secret bool `json:"secret"`
	// Object is true if this value is a JSON encoded object.
	Object bool `json:"object"`
}

ConfigValue describes a single (possibly secret) configuration value.

type CreatePolicyPackRequest

type CreatePolicyPackRequest struct {
	// Name is a unique URL-safe identifier (at the org level) for the package.
	// If the name has already been used by the organization, then the request will
	// create a new version of the Policy Pack (incremented by one). This is supplied
	// by the CLI.
	Name string `json:"name"`

	// A pretty name for the Policy Pack that is supplied by the package.
	DisplayName string `json:"displayName"`

	// VersionTag is the semantic version of the Policy Pack. One a version is published, it
	// cannot never be republished. Older clients will not have a version tag.
	VersionTag string `json:"versionTag,omitempty"`

	// The Policies outline the specific Policies in the package, and are derived
	// from the package by the CLI.
	Policies []Policy `json:"policies"`
}

CreatePolicyPackRequest defines the request body for creating a new Policy Pack for an organization. The request contains the metadata related to the Policy Pack.

type CreatePolicyPackResponse

type CreatePolicyPackResponse struct {
	Version   int    `json:"version"`
	UploadURI string `json:"uploadURI"`
}

CreatePolicyPackResponse is the response from creating a Policy Pack. It returns a URI to upload the Policy Pack zip file to.

type CreateStackRequest

type CreateStackRequest struct {
	// The rest of the StackIdentifier (e.g. organization, 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

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

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

type DeploymentV3 struct {
	// Manifest contains metadata about this deployment.
	Manifest ManifestV1 `json:"manifest" yaml:"manifest"`
	// SecretsProviders is a placeholder for secret provider configuration.
	SecretsProviders *SecretsProvidersV1 `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

type DiagnosticEvent struct {
	URN     string `json:"urn,omitempty"`
	Prefix  string `json:"prefix,omitempty"`
	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,omitempty"`
	Ephemeral bool   `json:"ephemeral,omitempty"`
}

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 DiffKind

type DiffKind string

DiffKind describes the kind of a particular property diff.

const (
	// DiffAdd indicates that the property was added.
	DiffAdd DiffKind = "add"
	// DiffAddReplace indicates that the property was added and requires that the resource be replaced.
	DiffAddReplace DiffKind = "add-replace"
	// DiffDelete indicates that the property was deleted.
	DiffDelete DiffKind = "delete"
	// DiffDeleteReplace indicates that the property was deleted and requires that the resource be replaced.
	DiffDeleteReplace DiffKind = "delete-replace"
	// DiffUpdate indicates that the property was updated.
	DiffUpdate DiffKind = "update"
	// DiffUpdateReplace indicates that the property was updated and requires that the resource be replaced.
	DiffUpdateReplace DiffKind = "update-replace"
)

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 EnforcementLevel

type EnforcementLevel string

EnforcementLevel indicates how a policy should be enforced

const (
	// Advisory is an enforcement level where the resource is still created, but a
	// message is displayed to the user for informational / warning purposes.
	Advisory EnforcementLevel = "advisory"

	// Mandatory is an enforcement level that prevents a resource from being created.
	Mandatory EnforcementLevel = "mandatory"

	// Disabled is an enforcement level that disables the policy from being enforced.
	Disabled EnforcementLevel = "disabled"
)

func (EnforcementLevel) IsValid

func (el EnforcementLevel) IsValid() bool

IsValid returns true if the EnforcementLevel is a valid value.

type EngineEvent

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"`
	PolicyEvent      *PolicyEvent       `json:"policyEvent,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 EngineEventBatch

type EngineEventBatch struct {
	Events []EngineEvent `json:"events"`
}

EngineEventBatch is a group of engine events.

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

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 GetPolicyPackConfigSchemaResponse

type GetPolicyPackConfigSchemaResponse struct {
	// The JSON schema for each Policy's configuration.
	ConfigSchema map[string]PolicyConfigSchema `json:"configSchema,omitempty"`
}

GetPolicyPackConfigSchemaResponse is the response that includes the JSON schemas of Policies within a particular Policy Pack.

type GetPolicyPackResponse

type GetPolicyPackResponse struct {
	Name        string   `json:"name"`
	DisplayName string   `json:"displayName"`
	Version     int      `json:"version"`
	VersionTag  string   `json:"versionTag"`
	Policies    []Policy `json:"policies"`
	Applied     bool     `json:"applied"`
}

GetPolicyPackResponse is the response to get a specific Policy Pack's metadata and policies.

type GetStackPolicyPacksResponse

type GetStackPolicyPacksResponse struct {
	// RequiredPolicies is a list of required Policy Packs to run during the update.
	RequiredPolicies []RequiredPolicy `json:"requiredPolicies,omitempty"`
}

GetStackPolicyPacksResponse is the response to getting the applicable Policy Packs for a particular stack. This allows the CLI to download the packs prior to starting an update.

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 JSONSchemaType

type JSONSchemaType string

JSONSchemaType in an enum of allowed data types for a schema.

const (
	// Object is a dictionary.
	Object JSONSchemaType = "object"
)

type ListPolicyGroupsResponse

type ListPolicyGroupsResponse struct {
	PolicyGroups []PolicyGroupSummary `json:"policyGroups"`
}

ListPolicyGroupsResponse lists a summary of the organization's Policy Groups.

type ListPolicyPacksResponse

type ListPolicyPacksResponse struct {
	PolicyPacks []PolicyPackWithVersions `json:"policyPacks"`
}

ListPolicyPacksResponse is the response to list an organization's Policy Packs.

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 indicates no change was made.
	OpSame OpType = "same"
	// OpCreate indicates a new resource was created.
	OpCreate OpType = "create"
	// OpUpdate indicates an existing resource was updated.
	OpUpdate OpType = "update"
	// OpDelete indicates an existing resource was deleted.
	OpDelete OpType = "delete"
	// OpReplace indicates an existing resource was replaced with a new one.
	OpReplace OpType = "replace"
	// OpCreateReplacement indicates a new resource was created for a replacement.
	OpCreateReplacement OpType = "create-replacement"
	// OpDeleteReplaced indicates an existing resource was deleted after replacement.
	OpDeleteReplaced OpType = "delete-replaced"
)

type OperationStatus

type OperationStatus struct {
	Kind    UpdateKind `json:"kind"`
	Author  string     `json:"author"`
	Started int64      `json:"started"`
}

OperationStatus describes the state of an operation being performed on a Pulumi stack.

type OperationType

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

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

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 Policy

type Policy struct {
	// Unique URL-safe name for the policy.  This is unique to a specific version
	// of a Policy Pack.
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`

	// Description is used to provide more context about the purpose of the policy.
	Description      string           `json:"description"`
	EnforcementLevel EnforcementLevel `json:"enforcementLevel"`

	// Message is the message that will be displayed to end users when they violate
	// this policy.
	Message string `json:"message"`

	// The JSON schema for the Policy's configuration.
	ConfigSchema *PolicyConfigSchema `json:"configSchema,omitempty"`
}

Policy defines the metadata for an individual Policy within a Policy Pack.

type PolicyConfigSchema

type PolicyConfigSchema struct {
	// Config property name to JSON Schema map.
	Properties map[string]*json.RawMessage `json:"properties,omitempty"`
	// Required config properties.
	Required []string `json:"required,omitempty"`

	// Type defines the data type allowed for the schema.
	Type JSONSchemaType `json:"type"`
}

PolicyConfigSchema defines the JSON schema of a particular Policy's configuration.

type PolicyEvent

type PolicyEvent struct {
	ResourceURN          string `json:"resourceUrn,omitempty"`
	Message              string `json:"message"`
	Color                string `json:"color"`
	PolicyName           string `json:"policyName"`
	PolicyPackName       string `json:"policyPackName"`
	PolicyPackVersion    string `json:"policyPackVersion"`
	PolicyPackVersionTag string `json:"policyPackVersionTag"`

	// EnforcementLevel is one of "warning" or "mandatory".
	EnforcementLevel string `json:"enforcementLevel"`
}

PolicyEvent is emitted whenever there is Policy violation.

type PolicyGroupSummary

type PolicyGroupSummary struct {
	Name                  string `json:"name"`
	IsOrgDefault          bool   `json:"isOrgDefault"`
	NumStacks             int    `json:"numStacks"`
	NumEnabledPolicyPacks int    `json:"numEnabledPolicyPacks"`
}

PolicyGroupSummary details the name, applicable stacks and the applied Policy Packs for an organization's Policy Group.

type PolicyPackMetadata

type PolicyPackMetadata struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	Version     int    `json:"version"`
	VersionTag  string `json:"versionTag"`

	// The configuration that is to be passed to the Policy Pack. This
	// map ties Policies with their configuration.
	Config map[string]*json.RawMessage `json:"config,omitempty"`
}

PolicyPackMetadata is the metadata of a Policy Pack.

type PolicyPackWithVersions

type PolicyPackWithVersions struct {
	Name        string   `json:"name"`
	DisplayName string   `json:"displayName"`
	Versions    []int    `json:"versions"`
	VersionTags []string `json:"versionTags"`
}

PolicyPackWithVersions details the specifics of a Policy Pack and all its available versions.

type PreludeEvent

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 PropertyDiff

type PropertyDiff struct {
	// Kind is the kind of difference.
	Kind DiffKind `json:"diffKind"`
	// InputDiff is true if this is a difference between old and new inputs rather than old state and new inputs.
	InputDiff bool `json:"inputDiff"`
}

PropertyDiff describes the difference between a single property's old and new values.

type PulumiStackReference

type PulumiStackReference struct {
	Name           string `json:"name"`
	RoutingProject string `json:"routingProject"`
}

PulumiStackReference contains the StackName and ProjectName of the stack.

type RenewUpdateLeaseRequest

type RenewUpdateLeaseRequest struct {
	// The current, valid lease token.
	// DEPRECATED as of Pulumi API version 5+. Pulumi API will expect the update token
	// in the Authorization header instead of this property. This property will be removed
	// when the minimum supported API version on the service is raised to 5.
	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

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 RequiredPolicy

type RequiredPolicy struct {

	// The name (unique and URL-safe) of the required Policy Pack.
	Name string `json:"name"`

	// The version of the required Policy Pack.
	Version int `json:"version"`

	// The version tag of the required Policy Pack.
	VersionTag string `json:"versionTag"`

	// The pretty name of the required Policy Pack.
	DisplayName string `json:"displayName"`

	// Where the Policy Pack can be downloaded from.
	PackLocation string `json:"packLocation,omitempty"`

	// The configuration that is to be passed to the Policy Pack. This is map a of policies
	// mapped to their configuration. Each individual configuration must comply with the
	// JSON schema for each Policy within the Policy Pack.
	Config map[string]*json.RawMessage `json:"config,omitempty"`
}

RequiredPolicy is the information regarding a particular Policy that is required by an organization.

type ResOpFailedEvent

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

type ResOutputsEvent struct {
	Metadata StepEventMetadata `json:"metadata"`
	Planning bool              `json:"planning,omitempty"`
}

ResOutputsEvent is emitted when a resource is finished being provisioned.

type ResourcePreEvent

type ResourcePreEvent struct {
	Metadata StepEventMetadata `json:"metadata"`
	Planning bool              `json:"planning,omitempty"`
}

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

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:

  1. The deprecated `Defaults` field is removed because it is not used anywhere,
  2. 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.
  3. 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:

  1. Dropping the `Defaults` field (it should be empty anyway)
  2. 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.
  3. Setting the "Provider" field to the empty string, because V1 deployments don't have first-class providers.

type ResourceV3

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"`
	// AdditionalSecretOutputs is a list of outputs that were explicitly marked as secret when the resource was created.
	AdditionalSecretOutputs []resource.PropertyKey `json:"additionalSecretOutputs,omitempty" yaml:"additionalSecretOutputs,omitempty"`
	// Aliases is a list of previous URNs that this resource may have had in previous deployments
	Aliases []resource.URN `json:"aliases,omitempty" yaml:"aliases,omitempty"`
	// CustomTimeouts is a configuration block that can be used to control timeouts of CRUD operations
	CustomTimeouts *resource.CustomTimeouts `json:"customTimeouts,omitempty" yaml:"customTimeouts,omitempty"`
	// ImportID is the import input used for imported resources.
	ImportID resource.ID `json:"importID,omitempty" yaml:"importID,omitempty"`
}

ResourceV3 is the third version of the Resource API type. It absorbs a few breaking changes:

  1. 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.
  2. 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:

  1. Populating the map from input property names to dependencies by assuming that every dependency listed in `Dependencies` affects every input property.

type SecretV1

type SecretV1 struct {
	Sig        string `json:"4dabf18193072939515e22adb298388d" yaml:"4dabf18193072939515e22adb298388d"`
	Ciphertext string `json:"ciphertext,omitempty" yaml:"ciphertext,omitempty"`
	Plaintext  string `json:"plaintext,omitempty" yaml:"plaintext,omitempty"`
}

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 SecretsProvidersV1

type SecretsProvidersV1 struct {
	Type  string          `json:"type"`
	State json.RawMessage `json:"state,omitempty"`
}

type Stack

type Stack struct {
	OrgName     string       `json:"orgName"`
	ProjectName string       `json:"projectName"`
	StackName   tokens.QName `json:"stackName"`
	// CurrentOperation provides information about a stack operation in-progress, as applicable.
	CurrentOperation *OperationStatus        `json:"currentOperation,omitempty"`
	ActiveUpdate     string                  `json:"activeUpdate"`
	Tags             map[StackTagName]string `json:"tags,omitempty"`

	Version int `json:"version"`
}

Stack describes a Stack running on a Pulumi Cloud.

type StackRenameRequest

type StackRenameRequest struct {
	NewName    string `json:"newName"`
	NewProject string `json:"newProject"`
}

StackRenameRequest is the shape of the request to change an existing stack's name. If either NewName or NewProject is the empty string, the current project/name will be preserved. (But at least one should be set.)

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 start time 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

type StdoutEngineEvent struct {
	Message string `json:"message"`
	Color   string `json:"color"`
}

StdoutEngineEvent is emitted whenever a generic message is written, for example warnings from the pulumi CLI itself. Less common that DiagnosticEvent

type StepEventMetadata

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"`

	// 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,omitempty"`
	// The diff for this step as a list of property paths and difference types.
	DetailedDiff map[string]PropertyDiff `json:"detailedDiff,omitempty"`
	// Logical is set if the step is a logical operation in the program.
	Logical bool `json:"logical,omitempty"`
	// 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

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,omitempty"`
	// Delete is true when the resource is pending deletion due to a replacement.
	Delete bool `json:"delete,omitempty"`
	// 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,omitempty"`
	// 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,omitempty"`
}

StepEventStateMetadata is the more detailed state information for a resource as it relates to a step(s) being performed.

type SummaryEvent

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"`
	// PolicyPacks run during update. Maps PolicyPackName -> version.
	// Note: When this field was initially added, we forgot to add the JSON tag
	// and are now locked into to using PascalCase for this field to maintain backwards
	// compatibility. For older clients this will map to the version, while for newer ones
	// it will be the version tag prepended with "v".
	PolicyPacks map[string]string `json:"PolicyPacks"`
}

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"
	// RenameUpdate is an update that changes the stack name or project name of a Pulumi program.
	RenameUpdate UpdateKind = "rename"
	// 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 {
	LocalPolicyPackPaths []string            `json:"localPolicyPackPaths"`
	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 UpdatePolicyGroupRequest

type UpdatePolicyGroupRequest struct {
	NewName *string `json:"newName,omitempty"`

	AddStack    *PulumiStackReference `json:"addStack,omitempty"`
	RemoveStack *PulumiStackReference `json:"removeStack,omitempty"`

	AddPolicyPack    *PolicyPackMetadata `json:"addPolicyPack,omitempty"`
	RemovePolicyPack *PolicyPackMetadata `json:"removePolicyPack,omitempty"`
}

UpdatePolicyGroupRequest modifies a Policy Group.

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"`

	// RequiredPolicies is a list of required Policy Packs to run during the update.
	RequiredPolicies []RequiredPolicy `json:"requiredPolicies,omitempty"`
}

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.

Directories

Path Synopsis
Package migrate is responsible for converting to and from the various API type versions that are in use in Pulumi.
Package migrate is responsible for converting to and from the various API type versions that are in use in Pulumi.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL