Skip to content

CloudFormation  >  Operations  >  cancel_update_stack

cancel_update_stack

Operation

cancel_update_stack async

cancel_update_stack(input: CancelUpdateStackInput, plugins: list[Plugin] | None = None) -> CancelUpdateStackOutput

Cancels an update on the specified stack. If the call completes successfully, the stack rolls back the update and reverts to the previous stack configuration.

Note

You can cancel only stacks that are in the UPDATE_IN_PROGRESS state.

Parameters:

Name Type Description Default
input CancelUpdateStackInput

An instance of CancelUpdateStackInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CancelUpdateStackOutput

An instance of CancelUpdateStackOutput.

Input

CancelUpdateStackInput dataclass

Bases: _SerdeShape

The input for the CancelUpdateStack action.

Attributes

client_request_token class-attribute instance-attribute
client_request_token: str | None = ...

A unique identifier for this CancelUpdateStack request. Specify this token if you plan to retry requests so that CloudFormation knows that you're not attempting to cancel an update on a stack with the same name. You might retry CancelUpdateStack requests to ensure that CloudFormation successfully received them.

stack_name class-attribute instance-attribute
stack_name: str | None = ...
Note

If you don't pass a parameter to StackName, the API returns a response that describes all resources in the account.

The IAM policy below can be added to IAM policies when you want to limit resource-level permissions and avoid returning a response when no parameter is sent in the request:

{ "Version": "2012-10-17", "Statement": [{ "Effect": "Deny", "Action": "cloudformation:DescribeStacks", "NotResource": "arn:aws:cloudformation:*:*:stack/*/*" }] }

The name or the unique stack ID that's associated with the stack.

Output

CancelUpdateStackOutput dataclass

Bases: _SerdeShape

Dataclass for CancelUpdateStackOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.