Skip to content

CloudFormation  >  Operations  >  rollback_stack

rollback_stack

Operation

rollback_stack async

rollback_stack(input: RollbackStackInput, plugins: list[Plugin] | None = None) -> RollbackStackOutput

When specifying RollbackStack, you preserve the state of previously provisioned resources when an operation fails. You can check the status of the stack through the DescribeStacks operation.

Rolls back the specified stack to the last known stable state from CREATE_FAILED or UPDATE_FAILED stack statuses.

This operation will delete a stack if it doesn't contain a last known stable state. A last known stable state includes any status in a *_COMPLETE. This includes the following stack statuses.

  • CREATE_COMPLETE

  • UPDATE_COMPLETE

  • UPDATE_ROLLBACK_COMPLETE

  • IMPORT_COMPLETE

  • IMPORT_ROLLBACK_COMPLETE

Parameters:

Name Type Description Default
input RollbackStackInput

An instance of RollbackStackInput.

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
RollbackStackOutput

An instance of RollbackStackOutput.

Input

RollbackStackInput dataclass

Bases: _SerdeShape

Dataclass for RollbackStackInput structure.

Attributes

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

A unique identifier for this RollbackStack request.

deployment_config class-attribute instance-attribute
deployment_config: DeploymentConfig | None = ...

The deployment configuration for this stack operation, including the deployment mode.

retain_except_on_create class-attribute instance-attribute
retain_except_on_create: bool | None = ...

When set to true, newly created resources are deleted when the operation rolls back. This includes newly created resources marked with a deletion policy of Retain.

Default: false

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

The Amazon Resource Name (ARN) of an IAM role that CloudFormation assumes to rollback the stack.

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

The name that's associated with the stack.

Output

RollbackStackOutput dataclass

Bases: _SerdeShape

Dataclass for RollbackStackOutput structure.

Attributes

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

A unique identifier for this rollback operation that can be used to track the operation's progress and events.

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.

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

Unique identifier of the stack.