apitype

package
v3.101.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 12 Imported by: 31

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).

Index

Constants

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

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

View Source
const DeploymentSchemaID = "https://github.com/pulumi/pulumi/blob/master/sdk/go/common/apitype/deployments.json"

DeploymentSchemaID is the $id for the deployment schema.

View Source
const (
	// DeploymentSchemaVersionCurrent is the current version of the `Deployment` schema.
	// Any deployments newer than this version will be rejected.
	DeploymentSchemaVersionCurrent = 3
)
View Source
const PropertyValueSchemaID = "https://github.com/pulumi/pulumi/blob/master/sdk/go/common/apitype/property-values.json"

PropertyValueSchemaID is the $id for the property value schema.

View Source
const ResourceSchemaID = "https://github.com/pulumi/pulumi/blob/master/sdk/go/common/apitype/resources.json"

ResourceSchemaID is the $id for the deployment schema.

Variables

This section is empty.

Functions

func DeploymentSchema added in v3.13.0

func DeploymentSchema() string

DeploymentSchema returns a JSON schema that can be used to validate serialized deployments (i.e. `UntypedDeployment` objects).

func PropertyValueSchema added in v3.13.0

func PropertyValueSchema() string

PropertyValueSchema returns a JSON schema that can be used to validate serialized property values.

func ResourceSchema added in v3.13.0

func ResourceSchema() string

ResourceSchema returns a JSON schema that can be used to validate serialized resource values (e.g. `ResourceV3`).

Types

type APICapability added in v3.47.0

type APICapability string

An APICapability is the name of a capability or feature that a service backend may or may not support.

const (
	// Deprecated. Use DeltaCheckpointUploadsV2.
	DeltaCheckpointUploads APICapability = "delta-checkpoint-uploads"

	// DeltaCheckpointUploads is the feature that enables the CLI to upload checkpoints
	// via the PatchUpdateCheckpointDeltaRequest API to save on network bytes.
	DeltaCheckpointUploadsV2 APICapability = "delta-checkpoint-uploads-v2"
)

type APICapabilityConfig added in v3.47.0

type APICapabilityConfig struct {
	Capability    APICapability   `json:"capability"`
	Version       int             `json:"version,omitempty"`
	Configuration json.RawMessage `json:"configuration,omitempty"`
}

APICapabilityConfig captures a service backend capability and any associated configuration that may be required for integration.

type Aggregation added in v3.79.0

type Aggregation struct {
	Others  *int64              `json:"others,omitempty" yaml:"others,omitempty"`
	Results []AggregationBucket `json:"results,omitempty" yaml:"results,omitempty"`
}

Aggregation collects the top 5 aggregated values for the requested dimension.

type AggregationBucket added in v3.79.0

type AggregationBucket struct {
	Name  *string `json:"name,omitempty" yaml:"name,omitempty"`
	Count *int64  `json:"count,omitempty" yaml:"count,omitempty"`
}

AggregationBucket is an example value for the requested aggregation, with a count of how many resources share that value.

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 BasicAuth added in v3.44.3

type BasicAuth struct {
	UserName SecretValue `json:"userName"`
	Password SecretValue `json:"password"`
}

BasicAuth configures git authentication through basic auth — i.e. username and password. Both UserName and Password are required.

type BulkDecryptValueRequest added in v3.21.0

type BulkDecryptValueRequest struct {
	Ciphertexts [][]byte `json:"ciphertexts"`
}

BulkDecryptValueRequest defines the request body for bulk decrypting secret values.

type BulkDecryptValueResponse added in v3.21.0

type BulkDecryptValueResponse struct {
	Plaintexts map[string][]byte `json:"plaintexts"`
}

BulkDecryptValueResponse defines the response body for bulk decrypted secret values. The key in the map is the base64 encoding of the ciphertext.

type CLIVersionResponse

type CLIVersionResponse struct {
	LatestVersion        string `json:"latestVersion"`
	OldestWithoutWarning string `json:"oldestWithoutWarning"`
	LatestDevVersion     string `json:"latestDevVersion"`
}

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 CapabilitiesResponse added in v3.47.0

type CapabilitiesResponse struct {
	Capabilities []APICapabilityConfig `json:"capabilities"`
}

CapabilitiesResponse defines all feature sets that are available in the service backend and are therefore available for the CLI to integrate against.

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 CreateDeploymentRequest added in v3.44.3

type CreateDeploymentRequest struct {
	// Executor defines options that the executor is going to use to run the job.
	Executor *ExecutorContext `json:"executorContext"`

	// Source defines how the source code to the Pulumi program will be gathered.
	Source *SourceContext `json:"sourceContext,omitempty"`

	// Operation defines the options that the executor will use to run the Pulumi commands.
	Operation *OperationContext `json:"operationContext"`
}

CreateDeploymentRequest defines the request payload that is expected when creating a new deployment.

type CreateDeploymentResponse added in v3.44.3

type CreateDeploymentResponse struct {
	// ID represents the generated Deployment ID.
	ID string `json:"id"`
	// ConsoleURL is the Console URL for the deployment.
	ConsoleURL string `json:"consoleUrl"`
}

CreateDeploymentResponse defines the response given when a new Deployment is created.

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"`
	// RequiredHeaders represents headers that the CLI must set in order
	// for the upload to succeed.
	RequiredHeaders map[string]string `json:"requiredHeaders,omitempty"`
}

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

	// An optional set of teams to assign to the stack.
	Teams []string `json:"teams,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 DeltaCheckpointUploadsConfigV1 added in v3.47.0

type DeltaCheckpointUploadsConfigV1 struct {
	CheckpointCutoffSizeBytes int `json:"checkpointCutoffSizeBytes"`
}

Deprecated. Use DeltaCheckpointUploadsConfigV2.

type DeltaCheckpointUploadsConfigV2 added in v3.51.1

type DeltaCheckpointUploadsConfigV2 struct {
	// CheckpointCutoffSizeBytes defines the size of a checkpoint file, in bytes,
	// at which the CLI should cutover to using delta checkpoint uploads.
	CheckpointCutoffSizeBytes int `json:"checkpointCutoffSizeBytes"`
}

type DeploymentLogLine added in v3.44.3

type DeploymentLogLine struct {
	Header    string    `json:"header,omitempty"`
	Timestamp time.Time `json:"timestamp,omitempty"`
	Line      string    `json:"line,omitempty"`
}

type DeploymentLogs added in v3.44.3

type DeploymentLogs struct {
	Lines     []DeploymentLogLine `json:"lines,omitempty"`
	NextToken string              `json:"nextToken,omitempty"`
}

type DeploymentPlanV1 added in v3.24.0

type DeploymentPlanV1 struct {

	// Manifest contains metadata about this plan.
	Manifest ManifestV1 `json:"manifest" yaml:"manifest"`
	// The configuration in use during the plan.
	Config config.Map `json:"config,omitempty"`

	// The set of resource plans.
	ResourcePlans map[resource.URN]ResourcePlanV1 `json:"resourcePlans,omitempty"`
}

DeploymentPlanV1 is the serializable version of a deployment plan.

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"

	// Remediate is an enforcement level that fixes policy issues instead of issuing diagnostics.
	Remediate EnforcementLevel = "remediate"

	// 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"`
	PolicyRemediationEvent *PolicyRemediationEvent `json:"policyRemediationEvent,omitempty"`
	PolicyLoadEvent        *PolicyLoadEvent        `json:"policyLoadEvent,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 EnvironmentDiagnostic added in v3.88.0

type EnvironmentDiagnostic struct {
	Range   *esc.Range `json:"range,omitempty"`
	Summary string     `json:"summary,omitempty"`
	Detail  string     `json:"detail,omitempty"`
}

type EnvironmentDiagnostics added in v3.95.0

type EnvironmentDiagnostics []EnvironmentDiagnostic

func (EnvironmentDiagnostics) Error added in v3.95.0

func (err EnvironmentDiagnostics) Error() string

Error implements the Error interface.

type EnvironmentDiagnosticsResponse added in v3.88.0

type EnvironmentDiagnosticsResponse struct {
	Diagnostics EnvironmentDiagnostics `json:"diagnostics,omitempty"`
}

func (EnvironmentDiagnosticsResponse) Error added in v3.88.0

Error implements the Error interface.

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 ExecutorContext added in v3.44.3

type ExecutorContext struct {
	// WorkingDirectory defines the path where the work should be done when executing.
	WorkingDirectory string `json:"workingDirectory"`

	// Defines the image that the pulumi operations should run in.
	ExecutorImage string `json:"executorImage,omitempty"`
}

type ExportStackResponse

type ExportStackResponse UntypedDeployment

ExportStackResponse defines the response body for exporting a Stack.

type GetDeploymentUpdatesUpdateInfo added in v3.44.3

type GetDeploymentUpdatesUpdateInfo struct {
	// UpdateID is the underlying Update's ID on the PPC.
	UpdateID string `json:"updateID"`

	// Version of the stack that this UpdateInfo describe.
	Version int `json:"version"`
	// LatestVersion of the stack in general. i.e. the latest when Version == LatestVersion.
	LatestVersion int `json:"latestVersion"`
}

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 GetUpdateEventsResponse added in v3.44.3

type GetUpdateEventsResponse struct {
	// Events are returned sorted by their internal sequence number (not exposed to the API).
	// So the last Event in the slice is the most recent event which was stored in the database.
	// (Should sort identical to timestamp, but may not if we support parallel writes.)
	Events []EngineEvent `json:"events"`

	// ContinuationToken is an opaque value the client can send to fetch more recent
	// events if the update is still in progress. Will be nil once all events have
	// been returned and the update is complete.
	ContinuationToken *string `json:"continuationToken"`
}

GetUpdateEventsResponse contains the engine events for an update.

type GitAuthConfig added in v3.44.3

type GitAuthConfig struct {
	PersonalAccessToken *SecretValue `json:"accessToken,omitempty"`
	SSHAuth             *SSHAuth     `json:"sshAuth,omitempty"`
	BasicAuth           *BasicAuth   `json:"basicAuth,omitempty"`
}

GitAuthConfig specifies git authentication configuration options. There are 3 different authentication options:

  • Personal access token
  • SSH private key (and its optional password)
  • Basic auth username and password

Only 1 authentication mode is valid.

type GoalV1 added in v3.24.0

type GoalV1 struct {
	// the type of resource.
	Type tokens.Type `json:"type"`
	// the name for the resource's URN.
	Name string `json:"name"`
	// true if this resource is custom, managed by a plugin.
	Custom bool `json:"custom"`
	// the resource properties that will be changed.
	InputDiff PlanDiffV1 `json:"inputDiff,omitempty"`
	// the resource outputs that will be changed.
	OutputDiff PlanDiffV1 `json:"outputDiff,omitempty"`
	// an optional parent URN for this resource.
	Parent resource.URN `json:"parent,omitempty"`
	// true to protect this resource from deletion.
	Protect bool `json:"protect"`
	// dependencies of this resource object.
	Dependencies []resource.URN `json:"dependencies,omitempty"`
	// the provider to use for this resource.
	Provider string `json:"provider,omitempty"`
	// the set of dependencies that affect each property.
	PropertyDependencies map[resource.PropertyKey][]resource.URN `json:"propertyDependencies,omitempty"`
	// true if this resource should be deleted prior to replacement.
	DeleteBeforeReplace *bool `json:"deleteBeforeReplace,omitempty"`
	// a list of property names to ignore during changes.
	IgnoreChanges []string `json:"ignoreChanges,omitempty"`
	// outputs that should always be treated as secrets.
	AdditionalSecretOutputs []resource.PropertyKey `json:"additionalSecretOutputs,omitempty"`
	// additional URNs that should be aliased to this resource.
	AliasURNs []resource.URN `json:"aliases,omitempty"`
	// structured alias objects to be assigned to this resource.
	Aliases []resource.Alias `json:"structuredAliases,omitempty"`
	// the expected ID of the resource, if any.
	ID resource.ID `json:"id,omitempty"`
	// an optional config object for resource options
	CustomTimeouts resource.CustomTimeouts `json:"customTimeouts,omitempty"`
}

GoalV1 is the serializable version of a resource goal state.

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

	// ContinuationToken is an opaque value used to mark the end of the all stacks. If non-nil,
	// pass it into a subsequent call in order to get the next batch of results.
	//
	// A value of nil means that all stacks have been returned.
	ContinuationToken *string `json:"continuationToken,omitempty"`
}

ListStacksResponse returns a set of stack summaries. This call is designed to be inexpensive.

type Log3rdPartyDecryptionEvent added in v3.20.0

type Log3rdPartyDecryptionEvent struct {
	SecretName  string `json:"secretName,omitempty"`
	CommandName string `json:"commandName,omitempty"`
}

Log3rdPartyDecryptionEvent defines the request body for logging a 3rd party secrets provider decryption event.

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 Message added in v3.65.0

type Message struct {
	// Severity is the severity of the message.
	Severity MessageSeverity `json:"severity,omitempty"`
	// Message is the message to display to the user.
	Message string `json:"message"`
}

Message is a message from the backend to be displayed to the user.

type MessageSeverity added in v3.65.0

type MessageSeverity string
const (
	MessageSeverityWarning MessageSeverity = "warning"
	MessageSeverityError   MessageSeverity = "error"
	MessageSeverityInfo    MessageSeverity = "info"
)

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"
	// OpRead indicates reading an existing resource.
	OpRead OpType = "read"
	// OpReadReplacement indicates reading an existing resource for a replacement.
	OpReadReplacement OpType = "read-replacement"
	// OpRefresh indicates refreshing an existing resource.
	OpRefresh OpType = "refresh" // refreshing an existing resource.
	// OpReadDiscard indicates removing a resource that was read.
	OpReadDiscard OpType = "discard"
	// OpDiscardReplaced indicates discarding a read resource that was replaced.
	OpDiscardReplaced OpType = "discard-replaced"
	// OpRemovePendingReplace indicates removing a pending replace resource.
	OpRemovePendingReplace OpType = "remove-pending-replace"
	// OpImport indicates importing an existing resource.
	OpImport OpType = "import"
	// OpImportReplacement indicates replacement of an existing resource with an imported resource.
	OpImportReplacement OpType = "import-replacement"
)

type OpenEnvironmentResponse added in v3.88.0

type OpenEnvironmentResponse struct {
	ID          string                  `json:"id"`
	Diagnostics []EnvironmentDiagnostic `json:"diagnostics,omitempty"`
}

type OperationContext added in v3.44.3

type OperationContext struct {
	// PreRunCommands is an optional list of arbitrary commands to run before Pulumi
	// is invoked.
	// ref: https://github.com/pulumi/pulumi/issues/9397
	PreRunCommands []string `json:"preRunCommands"`

	// Operation is what we plan on doing.
	Operation PulumiOperation `json:"operation"`

	// EnvironmentVariables contains environment variables to be applied during the execution.
	EnvironmentVariables map[string]SecretValue `json:"environmentVariables"`

	// Options is a bag of settings to specify or override default behavior
	Options *OperationContextOptions `json:"options,omitempty"`
}

OperationContext describes what to do.

type OperationContextOptions added in v3.50.0

type OperationContextOptions struct {
	// SkipInstallDependencies sets whether to skip the default dependency installation step. Defaults to false.
	SkipInstallDependencies bool `json:"skipInstallDependencies"`
}

OperationContextOptions is a bag of settings to specify or override default behavior in a deployment

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 PatchUpdateCheckpointDeltaRequest added in v3.40.3

type PatchUpdateCheckpointDeltaRequest struct {
	// Protocol version.
	Version int `json:"version"`

	// SHA256 hash of the result of aplying the DeploymentDelta to the previously saved deployment.
	CheckpointHash string `json:"checkpointHash"`

	// Idempotency key incremented by the client on every PATCH call within the same update.
	SequenceNumber int `json:"sequenceNumber"`

	// Textual diff that recovers the desired deployment JSON when applied to the previously saved deployment JSON.
	DeploymentDelta json.RawMessage `json:"deploymentDelta,omitempty"`
}

PatchUpdateCheckpointDeltaRequest defines the body of a request to the bandwidth-optimized version of the patch update checkpoint endpoint of the service API. It is semantically equivalent to the PatchUpdateCheckpointRequest, but instead of transferring the entire Deployment as a JSON blob, it encodes it as a textual diff against the last-saved deployment. This conserves bandwidth on large resources.

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 PatchUpdateVerbatimCheckpointRequest added in v3.42.0

type PatchUpdateVerbatimCheckpointRequest struct {
	Version           int             `json:"version"`
	UntypedDeployment json.RawMessage `json:"untypedDeployment,omitempty"`

	// Idempotency key incremented by the client on every PATCH call within the same update.
	SequenceNumber int `json:"sequenceNumber"`
}

PatchUpdateVerbatimCheckpointRequest defines the body of a request to a patch update checkpoint endpoint of the service API, where `UntypedDeloyment` is an `apitype.UntypedDeployment`. Whereas the PatchUpdateCheckpointRequest API is subject to the service reformatting how a checkpoint is persisted, PatchUpdateVerbatimCheckpointRequest enables the CLI to define the exact format. Designed to be compatible with the PatchUpdateCheckpointDeltaRequest API, where formatting is critical in calculating textual diffs.

type PlanDiffV1 added in v3.24.0

type PlanDiffV1 struct {
	// the resource properties that will be added.
	Adds map[string]interface{} `json:"adds,omitempty"`
	// the resource properties that will be deleted.
	Deletes []string `json:"deletes,omitempty"`
	// the resource properties that will be updated.
	Updates map[string]interface{} `json:"updates,omitempty"`
}

PlanDiffV1 is the serializable version of a plan diff.

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", "mandatory", "remediate", or "none".
	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 PolicyLoadEvent added in v3.94.2

type PolicyLoadEvent struct{}

PolicyLoadEvent is emitted when a policy starts loading

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 PolicyRemediationEvent added in v3.88.0

type PolicyRemediationEvent struct {
	ResourceURN          string                 `json:"resourceUrn,omitempty"`
	Color                string                 `json:"color"`
	PolicyName           string                 `json:"policyName"`
	PolicyPackName       string                 `json:"policyPackName"`
	PolicyPackVersion    string                 `json:"policyPackVersion"`
	PolicyPackVersionTag string                 `json:"policyPackVersionTag"`
	Before               map[string]interface{} `json:"before,omitempty"`
	After                map[string]interface{} `json:"after,omitempty"`
}

PolicyRemediationEvent is emitted whenever there is Policy transformation.

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 PulumiOperation added in v3.44.3

type PulumiOperation string

PulumiOperation describes what operation to perform on the stack as defined in the Job spec.

const (
	Update  PulumiOperation = "update"
	Preview PulumiOperation = "preview"
	Destroy PulumiOperation = "destroy"
	Refresh PulumiOperation = "refresh"
)

The possible operations we can deploy.

type PulumiQueryRequest added in v3.79.0

type PulumiQueryRequest struct {
	Query string `url:"query"`
}

func ParseQueryParams added in v3.79.0

func ParseQueryParams(rawParams []string) *PulumiQueryRequest

ParseQueryParams takes a list of parameters passed into the CLI Search commands (in the form of a Pulumi query) and returns a PulumiQueryRequest struct that can be used to make a request to the Pulumi API.

See https://www.pulumi.com/docs/pulumi-cloud/insights/search/#query-syntax for reference

type PulumiQueryResponse added in v3.79.0

type PulumiQueryResponse struct {
	Query string `json:"query"`
}

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

	// TokenExpiration is a UNIX timestamp by which the token will expire.
	TokenExpiration int64 `json:"tokenExpiration,omitempty"`
}

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, indicating 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 ResourcePlanV1 added in v3.24.0

type ResourcePlanV1 struct {
	// The goal state for the resource.
	Goal *GoalV1 `json:"goal,omitempty"`
	// The steps to be performed on the resource.
	Steps []OpType `json:"steps,omitempty"`
	// The proposed outputs for the resource, if any. Purely advisory.
	Outputs map[string]interface{} `json:"state"`
	// The random byte seed used for resource goal.
	Seed []byte `json:"seed,omitempty"`
}

ResourcePlanV1 is the serializable version of a resource plan.

type ResourcePreEvent

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

ResourcePreEvent is emitted before a resource is modified.

type ResourceResult added in v3.79.0

type ResourceResult struct {
	Created      *string          `json:"created,omitempty"`
	Custom       *bool            `json:"custom,omitempty"`
	Delete       *bool            `json:"delete,omitempty"`
	Dependencies []string         `json:"dependencies,omitempty"`
	ID           *string          `json:"id,omitempty"`
	Modified     *string          `json:"modified,omitempty"`
	Module       *string          `json:"module"`
	Name         *string          `json:"name,omitempty"`
	Package      *string          `json:"package"`
	ParentURN    *string          `json:"parent.urn"`
	Pending      *string          `json:"pending,omitempty"`
	Program      *string          `json:"project,omitempty"`
	Protected    *bool            `json:"protected,omitempty"`
	ProviderURN  *string          `json:"provider.urn"`
	Stack        *string          `json:"stack,omitempty"`
	Type         *string          `json:"type,omitempty"`
	URN          *string          `json:"urn,omitempty"`
	Teams        []string         `json:"teams,omitempty"`
	Properties   *json.RawMessage `json:"properties,omitempty"`
}

ResourceResult is the user-facing type for our indexed resources.

type ResourceSearchPagination added in v3.79.0

type ResourceSearchPagination struct {
	Previous *string `json:"previous,omitempty" yaml:"previous,omitempty"`
	Next     *string `json:"next,omitempty" yaml:"next,omitempty"`
	Cursor   *string `json:"cursor,omitempty" yaml:"cursor,omitempty"`
}

ResourceSearchPagination provides links for paging through results.

type ResourceSearchResponse added in v3.79.0

type ResourceSearchResponse struct {
	Total        *int64                    `json:"total,omitempty" yaml:"total,omitempty"`
	Resources    []ResourceResult          `json:"resources,omitempty" yaml:"resources,omitempty"`
	Aggregations map[string]Aggregation    `json:"aggregations,omitempty" yaml:"aggregations,omitempty"`
	Pagination   *ResourceSearchPagination `json:"pagination,omitempty" yaml:"pagination,omitempty"`
	URL          string
	Query        string `json:"query,omitempty" yaml:"query,omitempty"`
}

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"`
	// If set to True, the providers Delete method will not be called for this resource. Pulumi simply stops tracking the deleted resource.
	RetainOnDelete bool `json:"retainOnDelete,omitempty" yaml:"retainOnDelete,omitempty"`
	// If set, the providers Delete method will not be called for this resource
	// if specified resource is being deleted as well.
	DeletedWith resource.URN `json:"deletedWith,omitempty" yaml:"deletedWith,omitempty"`
	// Created tracks when the remote resource was first added to state by pulumi. Checkpoints prior to early 2023 do not include this.
	Created *time.Time `json:"created,omitempty" yaml:"created,omitempty"`
	// Modified tracks when the resource state was last altered. Checkpoints prior to early 2023 do not include this.
	Modified *time.Time `json:"modified,omitempty" yaml:"modified,omitempty"`
	// SourcePosition tracks the source location of this resource's registration
	SourcePosition string `json:"sourcePosition,omitempty" yaml:"sourcePosition,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 SSHAuth added in v3.44.3

type SSHAuth struct {
	SSHPrivateKey SecretValue  `json:"sshPrivateKey"`
	Password      *SecretValue `json:"password,omitempty"`
}

SSHAuth configures ssh-based auth for git authentication. SSHPrivateKey is required but password is optional.

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 SecretValue added in v3.44.3

type SecretValue struct {
	Value  string // Plaintext if Secret is false; ciphertext otherwise.
	Secret bool
}

A SecretValue describes a possibly-secret value.

func (SecretValue) MarshalJSON added in v3.44.3

func (v SecretValue) MarshalJSON() ([]byte, error)

func (SecretValue) MarshalYAML added in v3.44.3

func (v SecretValue) MarshalYAML() (interface{}, error)

func (*SecretValue) UnmarshalJSON added in v3.44.3

func (v *SecretValue) UnmarshalJSON(bytes []byte) error

func (*SecretValue) UnmarshalYAML added in v3.44.3

func (v *SecretValue) UnmarshalYAML(node *yaml.Node) error

type SecretsProvidersV1

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

type SourceContext added in v3.44.3

type SourceContext struct {
	Git *SourceContextGit `json:"git,omitempty"`
}

SourceContext describes some source code, and how to obtain it.

type SourceContextGit added in v3.44.3

type SourceContextGit struct {
	RepoURL string `json:"repoURL"`

	Branch string `json:"branch"`

	// (optional) RepoDir is the directory to work from in the project's source repository
	// where Pulumi.yaml is located. It is used in case Pulumi.yaml is not
	// in the project source root.
	RepoDir string `json:"repoDir,omitempty"`

	// (optional) Commit is the hash of the commit to deploy. If used, HEAD will be in detached mode. This
	// is mutually exclusive with the Branch setting. Either value needs to be specified.
	Commit string `json:"commit,omitempty"`

	// (optional) GitAuth allows configuring git authentication options
	// There are 3 different authentication options:
	//   * SSH private key (and its optional password)
	//   * Personal access token
	//   * Basic auth username and password
	// Only one authentication mode will be considered if more than one option is specified,
	// with ssh private key/password preferred first, then personal access token, and finally
	// basic auth credentials.
	GitAuth *GitAuthConfig `json:"gitAuth,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"
	// VCSRepositoryRootTag is a tag that represents the root directory of the repository on the cloud VCS that
	// this stack may be associated with (pulled from git by the CLI)
	VCSRepositoryRootTag StackTagName = "vcs:root"
)

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

	// TokenExpiration is a UNIX timestamp by which the token will expire.
	TokenExpiration int64 `json:"tokenExpiration,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.
	Op   OpType `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"`
	// RetainOnDelete is true if the resource is not physically deleted when it is logically deleted.
	RetainOnDelete bool `json:"retainOnDelete,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.
	ResourceChanges map[OpType]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"`
	ResourceCount   int             `json:"resourceCount,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"
	// StackImportUpdate is an update that entails importing a raw checkpoint file.
	StackImportUpdate UpdateKind = "import"
	// ResourceImportUpdate is an update that entails importing one or more resources.
	ResourceImportUpdate = "resource-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"`

	// Messages is a list of messages that should be displayed to the user.
	Messages []Message `json:"messages,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.

type VersionedDeploymentPlan added in v3.24.0

type VersionedDeploymentPlan struct {
	Version int             `json:"version"`
	Plan    json.RawMessage `json:"plan"`
}

VersionedDeploymentPlan is a version number plus a JSON document. The version number describes what version of the DeploymentPlan structure the DeploymentPlan 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