Class WorkspaceStackState
Module class for manipulating stack state for a given WorkspaceStack.
Inherited Members
Namespace: Pulumi.Automation
Assembly: Pulumi.Automation.dll
Syntax
public sealed class WorkspaceStackState
Methods
View SourceDeleteAsync(string, bool, CancellationToken)
This command deletes a resource from a stack’s state, as long as it is safe to do so. The resource is specified by its Pulumi URN.
Resources can’t be deleted if there exist other resources that depend on it or are parented to it. Protected resources will not be deleted unless it is specifically requested using theforce
flag.
Declaration
public Task DeleteAsync(string urn, bool force = false, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | urn | The Pulumi URN of the resource to be deleted. |
bool | force | A boolean indicating whether the deletion should be forced. |
CancellationToken | cancellationToken | A cancellation token. |
Returns
Type | Description |
---|---|
Task |
UnprotectAllAsync(CancellationToken)
Unprotect all resources in a stack's state. This command clears the ‘protect’ bit on all resources in the stack, allowing those resources to be deleted.
Declaration
public Task UnprotectAllAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | A cancellation token. |
Returns
Type | Description |
---|---|
Task |
UnprotectAsync(string, CancellationToken)
Unprotect a resource in a stack's state.
This command clears the ‘protect’ bit on the provided resource urn
, allowing the resource to be deleted.
Declaration
public Task UnprotectAsync(string urn, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | urn | The Pulumi URN to be unprotected. |
CancellationToken | cancellationToken | A cancellation token. |
Returns
Type | Description |
---|---|
Task |