Class DeleteStackRequest

java.lang.Object
com.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.cloudformation.model.DeleteStackRequest
All Implemented Interfaces:
ReadLimitInfo, Serializable, Cloneable

public class DeleteStackRequest extends AmazonWebServiceRequest implements Serializable, Cloneable

The input for DeleteStack action.

See Also:
  • Constructor Details

    • DeleteStackRequest

      public DeleteStackRequest()
  • Method Details

    • setStackName

      public void setStackName(String stackName)

      The name or the unique stack ID that is associated with the stack.

      Parameters:
      stackName - The name or the unique stack ID that is associated with the stack.
    • getStackName

      public String getStackName()

      The name or the unique stack ID that is associated with the stack.

      Returns:
      The name or the unique stack ID that is associated with the stack.
    • withStackName

      public DeleteStackRequest withStackName(String stackName)

      The name or the unique stack ID that is associated with the stack.

      Parameters:
      stackName - The name or the unique stack ID that is associated with the stack.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getRetainResources

      public List<String> getRetainResources()

      For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not delete the retained resources.

      Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you want to delete the stack.

      Returns:
      For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not delete the retained resources.

      Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you want to delete the stack.

    • setRetainResources

      public void setRetainResources(Collection<String> retainResources)

      For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not delete the retained resources.

      Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you want to delete the stack.

      Parameters:
      retainResources - For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not delete the retained resources.

      Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you want to delete the stack.

    • withRetainResources

      public DeleteStackRequest withRetainResources(String... retainResources)

      For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not delete the retained resources.

      Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you want to delete the stack.

      NOTE: This method appends the values to the existing list (if any). Use setRetainResources(java.util.Collection) or withRetainResources(java.util.Collection) if you want to override the existing values.

      Parameters:
      retainResources - For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not delete the retained resources.

      Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you want to delete the stack.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withRetainResources

      public DeleteStackRequest withRetainResources(Collection<String> retainResources)

      For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not delete the retained resources.

      Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you want to delete the stack.

      Parameters:
      retainResources - For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not delete the retained resources.

      Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you want to delete the stack.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public DeleteStackRequest clone()
      Description copied from class: AmazonWebServiceRequest
      Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.
      Overrides:
      clone in class AmazonWebServiceRequest
      See Also: