Skip to content

ResourceChange

Source code in docs_src/capo_cloudformation/types/resource_change.py
class ResourceChange(TypedDict, closed=True):
    policy_action: NotRequired["capo_cloudformation.types.policy_action.PolicyAction"]
    """<p>The action that will be taken on the physical resource when the change set is executed.</p> <ul> <li> <p> <code>Delete</code> The resource will be deleted.</p> </li> <li> <p> <code>Retain</code> The resource will be retained.</p> </li> <li> <p> <code>Snapshot</code> The resource will have a snapshot taken.</p> </li> <li> <p> <code>ReplaceAndDelete</code> The resource will be replaced and then deleted.</p> </li> <li> <p> <code>ReplaceAndRetain</code> The resource will be replaced and then retained.</p> </li> <li> <p> <code>ReplaceAndSnapshot</code> The resource will be replaced and then have a snapshot taken.</p> </li> </ul>"""
    action: NotRequired["capo_cloudformation.types.change_action.ChangeAction"]
    """<p>The action that CloudFormation takes on the resource, such as <code>Add</code> (adds a new resource), <code>Modify</code> (changes a resource), <code>Remove</code> (deletes a resource), <code>Import</code> (imports a resource), <code>Dynamic</code> (exact action for the resource can't be determined), or <code>SyncWithActual</code> (resource will not be changed, only CloudFormation metadata will change).</p>"""
    logical_resource_id: NotRequired[
        "capo_cloudformation.types.logical_resource_id.LogicalResourceId"
    ]
    """<p>The resource's logical ID, which is defined in the stack's template.</p>"""
    physical_resource_id: NotRequired[
        "capo_cloudformation.types.physical_resource_id.PhysicalResourceId"
    ]
    """<p>The resource's physical ID (resource name). Resources that you are adding don't have physical IDs because they haven't been created.</p>"""
    resource_type: NotRequired["capo_cloudformation.types.resource_type.ResourceType"]
    """<p>The type of CloudFormation resource, such as <code>AWS::S3::Bucket</code>.</p>"""
    replacement: NotRequired["capo_cloudformation.types.replacement.Replacement"]
    """<p>For the <code>Modify</code> action, indicates whether CloudFormation will replace the resource by creating a new one and deleting the old one. This value depends on the value of the <code>RequiresRecreation</code> property in the <code>ResourceTargetDefinition</code> structure. For example, if the <code>RequiresRecreation</code> field is <code>Always</code> and the <code>Evaluation</code> field is <code>Static</code>, <code>Replacement</code> is <code>True</code>. If the <code>RequiresRecreation</code> field is <code>Always</code> and the <code>Evaluation</code> field is <code>Dynamic</code>, <code>Replacement</code> is <code>Conditional</code>.</p> <p>If you have multiple changes with different <code>RequiresRecreation</code> values, the <code>Replacement</code> value depends on the change with the most impact. A <code>RequiresRecreation</code> value of <code>Always</code> has the most impact, followed by <code>Conditional</code>, and then <code>Never</code>.</p>"""
    scope: NotRequired["capo_cloudformation.types.scope.Scope"]
    """<p>For the <code>Modify</code> action, indicates which resource attribute is triggering this update, such as a change in the resource attribute's <code>Metadata</code>, <code>Properties</code>, or <code>Tags</code>.</p>"""
    resource_drift_status: NotRequired[
        "capo_cloudformation.types.stack_resource_drift_status.StackResourceDriftStatus"
    ]
    """<p>The drift status of the resource. Valid values:</p> <ul> <li> <p> <code>IN_SYNC</code> – The resource matches its template definition.</p> </li> <li> <p> <code>MODIFIED</code> – Resource properties were modified outside CloudFormation.</p> </li> <li> <p> <code>DELETED</code> – The resource was deleted outside CloudFormation.</p> </li> <li> <p> <code>NOT_CHECKED</code> – CloudFormation doesn’t currently return this value.</p> </li> <li> <p> <code>UNKNOWN</code> – Drift status could not be determined.</p> </li> <li> <p> <code>UNSUPPORTED</code> – Resource type does not support actual state comparison.</p> </li> </ul> <p>Only present for drift-aware change sets.</p>"""
    resource_drift_ignored_attributes: NotRequired[
        "capo_cloudformation.types.resource_drift_ignored_attributes.ResourceDriftIgnoredAttributes"
    ]
    """<p>List of resource attributes for which drift was ignored.</p>"""
    details: NotRequired[
        "capo_cloudformation.types.resource_change_details.ResourceChangeDetails"
    ]
    """<p>For the <code>Modify</code> action, a list of <code>ResourceChangeDetail</code> structures that describes the changes that CloudFormation will make to the resource.</p>"""
    change_set_id: NotRequired["capo_cloudformation.types.change_set_id.ChangeSetId"]
    """<p>The change set ID of the nested change set.</p>"""
    module_info: NotRequired["capo_cloudformation.types.module_info.ModuleInfo"]
    """<p>Contains information about the module from which the resource was created, if the resource was created from a module included in the stack template.</p>"""
    before_context: NotRequired[
        "capo_cloudformation.types.before_context.BeforeContext"
    ]
    """<p>An encoded JSON string that contains the context of the resource before the change is executed.</p>"""
    after_context: NotRequired["capo_cloudformation.types.after_context.AfterContext"]
    """<p>An encoded JSON string that contains the context of the resource after the change is executed.</p>"""
    previous_deployment_context: NotRequired[
        "capo_cloudformation.types.previous_deployment_context.PreviousDeploymentContext"
    ]
    """<p>Information about the resource's state from the previous CloudFormation deployment.</p>"""

action instance-attribute

action: NotRequired[ChangeAction]

The action that CloudFormation takes on the resource, such as Add (adds a new resource), Modify (changes a resource), Remove (deletes a resource), Import (imports a resource), Dynamic (exact action for the resource can't be determined), or SyncWithActual (resource will not be changed, only CloudFormation metadata will change).

after_context instance-attribute

after_context: NotRequired[AfterContext]

An encoded JSON string that contains the context of the resource after the change is executed.

before_context instance-attribute

before_context: NotRequired[BeforeContext]

An encoded JSON string that contains the context of the resource before the change is executed.

change_set_id instance-attribute

change_set_id: NotRequired[ChangeSetId]

The change set ID of the nested change set.

details instance-attribute

details: NotRequired[ResourceChangeDetails]

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

logical_resource_id instance-attribute

logical_resource_id: NotRequired[LogicalResourceId]

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

module_info instance-attribute

module_info: NotRequired[ModuleInfo]

Contains information about the module from which the resource was created, if the resource was created from a module included in the stack template.

physical_resource_id instance-attribute

physical_resource_id: NotRequired[PhysicalResourceId]

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

policy_action instance-attribute

policy_action: NotRequired[PolicyAction]

The action that will be taken on the physical resource when the change set is executed.

  • Delete The resource will be deleted.

  • Retain The resource will be retained.

  • Snapshot The resource will have a snapshot taken.

  • ReplaceAndDelete The resource will be replaced and then deleted.

  • ReplaceAndRetain The resource will be replaced and then retained.

  • ReplaceAndSnapshot The resource will be replaced and then have a snapshot taken.

previous_deployment_context instance-attribute

previous_deployment_context: NotRequired[PreviousDeploymentContext]

Information about the resource's state from the previous CloudFormation deployment.

replacement instance-attribute

replacement: NotRequired[Replacement]

For the Modify action, indicates whether 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 Conditional.

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 Conditional, and then Never.

resource_drift_ignored_attributes instance-attribute

resource_drift_ignored_attributes: NotRequired[ResourceDriftIgnoredAttributes]

List of resource attributes for which drift was ignored.

resource_drift_status instance-attribute

resource_drift_status: NotRequired[StackResourceDriftStatus]

The drift status of the resource. Valid values:

  • IN_SYNC – The resource matches its template definition.

  • MODIFIED – Resource properties were modified outside CloudFormation.

  • DELETED – The resource was deleted outside CloudFormation.

  • NOT_CHECKED – CloudFormation doesn’t currently return this value.

  • UNKNOWN – Drift status could not be determined.

  • UNSUPPORTED – Resource type does not support actual state comparison.

Only present for drift-aware change sets.

resource_type instance-attribute

resource_type: NotRequired[ResourceType]

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

scope instance-attribute

scope: NotRequired[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.