Documentation ¶
Index ¶
- type Client
- func (pc *Client) AppendUpdateLogEntry(ctx context.Context, update UpdateIdentifier, kind string, ...) error
- func (pc *Client) CancelUpdate(ctx context.Context, update UpdateIdentifier) error
- func (pc *Client) CompleteUpdate(ctx context.Context, update UpdateIdentifier, status apitype.UpdateStatus, ...) error
- func (pc *Client) CreateStack(ctx context.Context, stackID StackIdentifier, cloudName string, ...) (apitype.Stack, error)
- func (pc *Client) CreateUpdate(ctx context.Context, kind UpdateKind, stack StackIdentifier, ...) (UpdateIdentifier, error)
- func (pc *Client) DecryptValue(ctx context.Context, stack StackIdentifier, ciphertext []byte) ([]byte, error)
- func (pc *Client) DeleteStack(ctx context.Context, stack StackIdentifier, force bool) (bool, error)
- func (pc *Client) DownloadPlugin(ctx context.Context, info workspace.PluginInfo, os, arch string) (io.ReadCloser, int64, error)
- func (pc *Client) DownloadTemplate(ctx context.Context, name string) (io.ReadCloser, int64, error)
- func (pc *Client) EncryptValue(ctx context.Context, stack StackIdentifier, plaintext []byte) ([]byte, error)
- func (pc *Client) ExportStackDeployment(ctx context.Context, stack StackIdentifier) (apitype.UntypedDeployment, error)
- func (pc *Client) GetLatestConfiguration(ctx context.Context, stackID StackIdentifier) (config.Map, error)
- func (pc *Client) GetPulumiAccountName(ctx context.Context) (string, error)
- func (pc *Client) GetStack(ctx context.Context, stackID StackIdentifier) (apitype.Stack, error)
- func (pc *Client) GetStackLogs(ctx context.Context, stack StackIdentifier, logQuery operations.LogQuery) ([]operations.LogEntry, error)
- func (pc *Client) GetStackUpdates(ctx context.Context, stack StackIdentifier) ([]apitype.UpdateInfo, error)
- func (pc *Client) GetUpdateEvents(ctx context.Context, update UpdateIdentifier, continuationToken *string) (apitype.UpdateResults, error)
- func (pc *Client) ImportStackDeployment(ctx context.Context, stack StackIdentifier, ...) (UpdateIdentifier, error)
- func (pc *Client) InvalidateUpdateCheckpoint(ctx context.Context, update UpdateIdentifier, token string) error
- func (pc *Client) ListStacks(ctx context.Context, projectFilter *tokens.PackageName) ([]apitype.Stack, error)
- func (pc *Client) ListTemplates(ctx context.Context) ([]workspace.Template, error)
- func (pc *Client) PatchUpdateCheckpoint(ctx context.Context, update UpdateIdentifier, deployment *apitype.DeploymentV1, ...) error
- func (pc *Client) RenewUpdateLease(ctx context.Context, update UpdateIdentifier, token string, ...) (string, error)
- func (pc *Client) StartUpdate(ctx context.Context, update UpdateIdentifier, ...) (int, string, error)
- type StackIdentifier
- type UpdateIdentifier
- type UpdateKind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a slim wrapper around the Pulumi HTTP/REST API.
func (*Client) AppendUpdateLogEntry ¶
func (pc *Client) AppendUpdateLogEntry(ctx context.Context, update UpdateIdentifier, kind string, fields map[string]interface{}, token string) error
AppendUpdateLogEntry appends the given entry to the indicated update's logs.
func (*Client) CancelUpdate ¶
func (pc *Client) CancelUpdate(ctx context.Context, update UpdateIdentifier) error
CancelUpdate cancels the indicated update.
func (*Client) CompleteUpdate ¶
func (pc *Client) CompleteUpdate(ctx context.Context, update UpdateIdentifier, status apitype.UpdateStatus, token string) error
CompleteUpdate completes the indicated update with the given status.
func (*Client) CreateStack ¶
func (pc *Client) CreateStack( ctx context.Context, stackID StackIdentifier, cloudName string, tags map[apitype.StackTagName]string) (apitype.Stack, error)
CreateStack creates a stack with the given cloud and stack name in the scope of the indicated project.
func (*Client) CreateUpdate ¶
func (pc *Client) CreateUpdate( ctx context.Context, kind UpdateKind, stack StackIdentifier, pkg *workspace.Project, cfg config.Map, main string, m apitype.UpdateMetadata, opts engine.UpdateOptions, dryRun bool, getContents func() (io.ReadCloser, int64, error)) (UpdateIdentifier, error)
CreateUpdate creates a new update for the indicated stack with the given kind and assorted options. If the update requires that the Pulumi program is uploaded, the provided getContents callback will be invoked to fetch the contents of the Pulumi program.
func (*Client) DecryptValue ¶
func (pc *Client) DecryptValue(ctx context.Context, stack StackIdentifier, ciphertext []byte) ([]byte, error)
DecryptValue decrypts a ciphertext value in the context of the indicated stack.
func (*Client) DeleteStack ¶
DeleteStack deletes the indicated stack. If force is true, the stack is deleted even if it contains resources.
func (*Client) DownloadPlugin ¶
func (pc *Client) DownloadPlugin(ctx context.Context, info workspace.PluginInfo, os, arch string) (io.ReadCloser, int64, error)
DownloadPlugin downloads the indicated plugin from the Pulumi API.
func (*Client) DownloadTemplate ¶
DownloadTemplate downloads the indicated template from the Pulumi API.
func (*Client) EncryptValue ¶
func (pc *Client) EncryptValue(ctx context.Context, stack StackIdentifier, plaintext []byte) ([]byte, error)
EncryptValue encrypts a plaintext value in the context of the indicated stack.
func (*Client) ExportStackDeployment ¶
func (pc *Client) ExportStackDeployment(ctx context.Context, stack StackIdentifier) (apitype.UntypedDeployment, error)
ExportStackDeployment exports the indicated stack's deployment as a raw JSON message.
func (*Client) GetLatestConfiguration ¶
func (pc *Client) GetLatestConfiguration(ctx context.Context, stackID StackIdentifier) (config.Map, error)
GetLatestConfiguration returns the configuration for the latest deployment of a given stack.
func (*Client) GetPulumiAccountName ¶
GetPulumiAccountName returns the user implied by the API token associated with this client.
func (*Client) GetStackLogs ¶
func (pc *Client) GetStackLogs(ctx context.Context, stack StackIdentifier, logQuery operations.LogQuery) ([]operations.LogEntry, error)
GetStackLogs retrieves the log entries for the indicated stack that match the given query.
func (*Client) GetStackUpdates ¶
func (pc *Client) GetStackUpdates(ctx context.Context, stack StackIdentifier) ([]apitype.UpdateInfo, error)
GetStackUpdates returns all updates to the indicated stack.
func (*Client) GetUpdateEvents ¶
func (pc *Client) GetUpdateEvents(ctx context.Context, update UpdateIdentifier, continuationToken *string) (apitype.UpdateResults, error)
GetUpdateEvents returns all events, taking an optional continuation token from a previous call.
func (*Client) ImportStackDeployment ¶
func (pc *Client) ImportStackDeployment(ctx context.Context, stack StackIdentifier, deployment *apitype.UntypedDeployment) (UpdateIdentifier, error)
ImportStackDeployment imports a new deployment into the indicated stack.
func (*Client) InvalidateUpdateCheckpoint ¶
func (pc *Client) InvalidateUpdateCheckpoint(ctx context.Context, update UpdateIdentifier, token string) error
InvalidateUpdateCheckpoint invalidates the checkpoint for the indicated update.
func (*Client) ListStacks ¶
func (pc *Client) ListStacks(ctx context.Context, projectFilter *tokens.PackageName) ([]apitype.Stack, error)
ListStacks lists all stacks for the indicated project.
func (*Client) ListTemplates ¶
ListTemplates lists all templates of which the Pulumi API knows.
func (*Client) PatchUpdateCheckpoint ¶
func (pc *Client) PatchUpdateCheckpoint(ctx context.Context, update UpdateIdentifier, deployment *apitype.DeploymentV1, token string) error
PatchUpdateCheckpoint patches the checkpoint for the indicated update with the given contents.
func (*Client) RenewUpdateLease ¶
func (pc *Client) RenewUpdateLease(ctx context.Context, update UpdateIdentifier, token string, duration time.Duration) (string, error)
RenewUpdateLease renews the indicated update lease for the given duration.
func (*Client) StartUpdate ¶
func (pc *Client) StartUpdate(ctx context.Context, update UpdateIdentifier, tags map[apitype.StackTagName]string) (int, string, error)
StartUpdate starts the indicated update. It returns the new version of the update's target stack and the token used to authenticate operations on the update if any. Replaces the stack's tags with the updated set.
type StackIdentifier ¶
StackIdentifier is the set of data needed to identify a Pulumi Cloud stack.
type UpdateIdentifier ¶
type UpdateIdentifier struct { StackIdentifier UpdateKind UpdateKind UpdateID string }
UpdateIdentifier is the set of data needed to identify an update to a Pulumi Cloud stack.
type UpdateKind ¶
type UpdateKind string
UpdateKind is an enum for describing the kinds of updates we support.
const ( UpdateKindUpdate UpdateKind = "update" UpdateKindPreview UpdateKind = "preview" UpdateKindRefresh UpdateKind = "refresh" UpdateKindDestroy UpdateKind = "destroy" UpdateKindImport UpdateKind = "import" )