Package com.pulumi.automation
Class WorkspaceStackState
- java.lang.Object
-
- com.pulumi.automation.WorkspaceStackState
-
public final class WorkspaceStackState extends java.lang.Object
Class for manipulating stack state for a givenWorkspaceStack
.
-
-
Constructor Summary
Constructors Constructor Description WorkspaceStackState(WorkspaceStack workspaceStack)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(java.lang.String urn)
This command deletes a resource from a stack's state, as long as it is safe to do so.void
delete(java.lang.String urn, boolean force)
This command deletes a resource from a stack's state, as long as it is safe to do so.void
unprotect(java.lang.String urn)
Unprotect a resource in a stack's state.void
unprotectAll()
Unprotect all resources in a stack's state.
-
-
-
Constructor Detail
-
WorkspaceStackState
public WorkspaceStackState(WorkspaceStack workspaceStack)
-
-
Method Detail
-
delete
public void delete(java.lang.String urn) throws AutomationException
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 the force flag.- Parameters:
urn
- The Pulumi URN of the resource to be deleted- Throws:
AutomationException
-
delete
public void delete(java.lang.String urn, boolean force) throws AutomationException
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 the force flag.- Parameters:
urn
- The Pulumi URN of the resource to be deletedforce
- A boolean indicating whether the deletion should be forced- Throws:
AutomationException
-
unprotect
public void unprotect(java.lang.String urn) throws AutomationException
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.- Parameters:
urn
- The Pulumi URN to be unprotected- Throws:
AutomationException
-
unprotectAll
public void unprotectAll() throws AutomationException
Unprotect all resources in a stack's state.- Throws:
AutomationException
-
-