Package com.pulumi.automation
Class WorkspaceStackState
- java.lang.Object
-
- com.pulumi.automation.WorkspaceStackState
-
public final class WorkspaceStackState extends java.lang.ObjectClass 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 voiddelete(java.lang.String urn)This command deletes a resource from a stack's state, as long as it is safe to do so.voiddelete(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.voidunprotect(java.lang.String urn)Unprotect a resource in a stack's state.voidunprotectAll()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 AutomationExceptionThis 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 AutomationExceptionThis 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 AutomationExceptionUnprotect 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 AutomationExceptionUnprotect all resources in a stack's state.- Throws:
AutomationException
-
-