Class ResourceChange

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

public class ResourceChange extends Object implements Serializable, Cloneable

The ResourceChange structure describes the resource and the action that AWS CloudFormation will perform on it if you execute this change set.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
     
    The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).
    For the Modify action, a list of ResourceChangeDetail structures that describes the changes that AWS CloudFormation will make to the resource.
    The resource's logical ID, which is defined in the stack's template.
    The resource's physical ID (resource name).
    For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one.
    The type of AWS CloudFormation resource, such as AWS::S3::Bucket.
    For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.
    int
     
    void
    The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).
    void
    setAction(String action)
    The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).
    void
    For the Modify action, a list of ResourceChangeDetail structures that describes the changes that AWS CloudFormation will make to the resource.
    void
    setLogicalResourceId(String logicalResourceId)
    The resource's logical ID, which is defined in the stack's template.
    void
    setPhysicalResourceId(String physicalResourceId)
    The resource's physical ID (resource name).
    void
    For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one.
    void
    setReplacement(String replacement)
    For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one.
    void
    setResourceType(String resourceType)
    The type of AWS CloudFormation resource, such as AWS::S3::Bucket.
    void
    For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.
    Returns a string representation of this object; useful for testing and debugging.
    The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).
    The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).
    For the Modify action, a list of ResourceChangeDetail structures that describes the changes that AWS CloudFormation will make to the resource.
    For the Modify action, a list of ResourceChangeDetail structures that describes the changes that AWS CloudFormation will make to the resource.
    withLogicalResourceId(String logicalResourceId)
    The resource's logical ID, which is defined in the stack's template.
    withPhysicalResourceId(String physicalResourceId)
    The resource's physical ID (resource name).
    For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one.
    withReplacement(String replacement)
    For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one.
    withResourceType(String resourceType)
    The type of AWS CloudFormation resource, such as AWS::S3::Bucket.
    For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.
    withScope(String... scope)
    For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.
    For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ResourceChange

      public ResourceChange()
  • Method Details

    • setAction

      public void setAction(String action)

      The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).

      Parameters:
      action - The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).
      See Also:
    • getAction

      public String getAction()

      The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).

      Returns:
      The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).
      See Also:
    • withAction

      public ResourceChange withAction(String action)

      The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).

      Parameters:
      action - The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setAction

      public void setAction(ChangeAction action)

      The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).

      Parameters:
      action - The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).
      See Also:
    • withAction

      public ResourceChange withAction(ChangeAction action)

      The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).

      Parameters:
      action - The action that AWS CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), or Remove (deletes a resource).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setLogicalResourceId

      public void setLogicalResourceId(String logicalResourceId)

      The resource's logical ID, which is defined in the stack's template.

      Parameters:
      logicalResourceId - The resource's logical ID, which is defined in the stack's template.
    • getLogicalResourceId

      public String getLogicalResourceId()

      The resource's logical ID, which is defined in the stack's template.

      Returns:
      The resource's logical ID, which is defined in the stack's template.
    • withLogicalResourceId

      public ResourceChange withLogicalResourceId(String logicalResourceId)

      The resource's logical ID, which is defined in the stack's template.

      Parameters:
      logicalResourceId - The resource's logical ID, which is defined in the stack's template.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setPhysicalResourceId

      public void setPhysicalResourceId(String physicalResourceId)

      The resource's physical ID (resource name). Resources that you are adding don't have physical IDs because they haven't been created.

      Parameters:
      physicalResourceId - The resource's physical ID (resource name). Resources that you are adding don't have physical IDs because they haven't been created.
    • getPhysicalResourceId

      public String getPhysicalResourceId()

      The resource's physical ID (resource name). Resources that you are adding don't have physical IDs because they haven't been created.

      Returns:
      The resource's physical ID (resource name). Resources that you are adding don't have physical IDs because they haven't been created.
    • withPhysicalResourceId

      public ResourceChange withPhysicalResourceId(String physicalResourceId)

      The resource's physical ID (resource name). Resources that you are adding don't have physical IDs because they haven't been created.

      Parameters:
      physicalResourceId - The resource's physical ID (resource name). Resources that you are adding don't have physical IDs because they haven't been created.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setResourceType

      public void setResourceType(String resourceType)

      The type of AWS CloudFormation resource, such as AWS::S3::Bucket.

      Parameters:
      resourceType - The type of AWS CloudFormation resource, such as AWS::S3::Bucket.
    • getResourceType

      public String getResourceType()

      The type of AWS CloudFormation resource, such as AWS::S3::Bucket.

      Returns:
      The type of AWS CloudFormation resource, such as AWS::S3::Bucket.
    • withResourceType

      public ResourceChange withResourceType(String resourceType)

      The type of AWS CloudFormation resource, such as AWS::S3::Bucket.

      Parameters:
      resourceType - The type of AWS CloudFormation resource, such as AWS::S3::Bucket.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setReplacement

      public void setReplacement(String replacement)

      For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one. This value depends on the value of the RequiresRecreation property in the ResourceTargetDefinition structure. For example, if the RequiresRecreation field is Always and the Evaluation field is Static, Replacement is True. If the RequiresRecreation field is Always and the Evaluation field is Dynamic, Replacement is Conditionally.

      If you have multiple changes with different RequiresRecreation values, the Replacement value depends on the change with the most impact. A RequiresRecreation value of Always has the most impact, followed by Conditionally, and then Never.

      Parameters:
      replacement - For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one. This value depends on the value of the RequiresRecreation property in the ResourceTargetDefinition structure. For example, if the RequiresRecreation field is Always and the Evaluation field is Static, Replacement is True. If the RequiresRecreation field is Always and the Evaluation field is Dynamic, Replacement is Conditionally.

      If you have multiple changes with different RequiresRecreation values, the Replacement value depends on the change with the most impact. A RequiresRecreation value of Always has the most impact, followed by Conditionally, and then Never.

      See Also:
    • getReplacement

      public String getReplacement()

      For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one. This value depends on the value of the RequiresRecreation property in the ResourceTargetDefinition structure. For example, if the RequiresRecreation field is Always and the Evaluation field is Static, Replacement is True. If the RequiresRecreation field is Always and the Evaluation field is Dynamic, Replacement is Conditionally.

      If you have multiple changes with different RequiresRecreation values, the Replacement value depends on the change with the most impact. A RequiresRecreation value of Always has the most impact, followed by Conditionally, and then Never.

      Returns:
      For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one. This value depends on the value of the RequiresRecreation property in the ResourceTargetDefinition structure. For example, if the RequiresRecreation field is Always and the Evaluation field is Static, Replacement is True. If the RequiresRecreation field is Always and the Evaluation field is Dynamic, Replacement is Conditionally.

      If you have multiple changes with different RequiresRecreation values, the Replacement value depends on the change with the most impact. A RequiresRecreation value of Always has the most impact, followed by Conditionally, and then Never.

      See Also:
    • withReplacement

      public ResourceChange withReplacement(String replacement)

      For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one. This value depends on the value of the RequiresRecreation property in the ResourceTargetDefinition structure. For example, if the RequiresRecreation field is Always and the Evaluation field is Static, Replacement is True. If the RequiresRecreation field is Always and the Evaluation field is Dynamic, Replacement is Conditionally.

      If you have multiple changes with different RequiresRecreation values, the Replacement value depends on the change with the most impact. A RequiresRecreation value of Always has the most impact, followed by Conditionally, and then Never.

      Parameters:
      replacement - For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one. This value depends on the value of the RequiresRecreation property in the ResourceTargetDefinition structure. For example, if the RequiresRecreation field is Always and the Evaluation field is Static, Replacement is True. If the RequiresRecreation field is Always and the Evaluation field is Dynamic, Replacement is Conditionally.

      If you have multiple changes with different RequiresRecreation values, the Replacement value depends on the change with the most impact. A RequiresRecreation value of Always has the most impact, followed by Conditionally, and then Never.

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

      public void setReplacement(Replacement replacement)

      For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one. This value depends on the value of the RequiresRecreation property in the ResourceTargetDefinition structure. For example, if the RequiresRecreation field is Always and the Evaluation field is Static, Replacement is True. If the RequiresRecreation field is Always and the Evaluation field is Dynamic, Replacement is Conditionally.

      If you have multiple changes with different RequiresRecreation values, the Replacement value depends on the change with the most impact. A RequiresRecreation value of Always has the most impact, followed by Conditionally, and then Never.

      Parameters:
      replacement - For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one. This value depends on the value of the RequiresRecreation property in the ResourceTargetDefinition structure. For example, if the RequiresRecreation field is Always and the Evaluation field is Static, Replacement is True. If the RequiresRecreation field is Always and the Evaluation field is Dynamic, Replacement is Conditionally.

      If you have multiple changes with different RequiresRecreation values, the Replacement value depends on the change with the most impact. A RequiresRecreation value of Always has the most impact, followed by Conditionally, and then Never.

      See Also:
    • withReplacement

      public ResourceChange withReplacement(Replacement replacement)

      For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one. This value depends on the value of the RequiresRecreation property in the ResourceTargetDefinition structure. For example, if the RequiresRecreation field is Always and the Evaluation field is Static, Replacement is True. If the RequiresRecreation field is Always and the Evaluation field is Dynamic, Replacement is Conditionally.

      If you have multiple changes with different RequiresRecreation values, the Replacement value depends on the change with the most impact. A RequiresRecreation value of Always has the most impact, followed by Conditionally, and then Never.

      Parameters:
      replacement - For the Modify action, indicates whether AWS CloudFormation will replace the resource by creating a new one and deleting the old one. This value depends on the value of the RequiresRecreation property in the ResourceTargetDefinition structure. For example, if the RequiresRecreation field is Always and the Evaluation field is Static, Replacement is True. If the RequiresRecreation field is Always and the Evaluation field is Dynamic, Replacement is Conditionally.

      If you have multiple changes with different RequiresRecreation values, the Replacement value depends on the change with the most impact. A RequiresRecreation value of Always has the most impact, followed by Conditionally, and then Never.

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

      public List<String> getScope()

      For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.

      Returns:
      For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.
      See Also:
    • setScope

      public void setScope(Collection<String> scope)

      For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.

      Parameters:
      scope - For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.
      See Also:
    • withScope

      public ResourceChange withScope(String... scope)

      For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.

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

      Parameters:
      scope - For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • withScope

      public ResourceChange withScope(Collection<String> scope)

      For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.

      Parameters:
      scope - For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • withScope

      public ResourceChange withScope(ResourceAttribute... scope)

      For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.

      Parameters:
      scope - For the Modify action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's Metadata, Properties, or Tags.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • getDetails

      public List<ResourceChangeDetail> getDetails()

      For the Modify action, a list of ResourceChangeDetail structures that describes the changes that AWS CloudFormation will make to the resource.

      Returns:
      For the Modify action, a list of ResourceChangeDetail structures that describes the changes that AWS CloudFormation will make to the resource.
    • setDetails

      public void setDetails(Collection<ResourceChangeDetail> details)

      For the Modify action, a list of ResourceChangeDetail structures that describes the changes that AWS CloudFormation will make to the resource.

      Parameters:
      details - For the Modify action, a list of ResourceChangeDetail structures that describes the changes that AWS CloudFormation will make to the resource.
    • withDetails

      public ResourceChange withDetails(ResourceChangeDetail... details)

      For the Modify action, a list of ResourceChangeDetail structures that describes the changes that AWS CloudFormation will make to the resource.

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

      Parameters:
      details - For the Modify action, a list of ResourceChangeDetail structures that describes the changes that AWS CloudFormation will make to the resource.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withDetails

      public ResourceChange withDetails(Collection<ResourceChangeDetail> details)

      For the Modify action, a list of ResourceChangeDetail structures that describes the changes that AWS CloudFormation will make to the resource.

      Parameters:
      details - For the Modify action, a list of ResourceChangeDetail structures that describes the changes that AWS CloudFormation will make to the resource.
      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 ResourceChange clone()
      Overrides:
      clone in class Object