CloudFormation / Client / rollback_stack
rollback_stack#
- CloudFormation.Client.rollback_stack(**kwargs)#
- 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_FAILEDor- UPDATE_FAILEDstack 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
 - See also: AWS API Documentation - Request Syntax- response = client.rollback_stack( StackName='string', RoleARN='string', ClientRequestToken='string', RetainExceptOnCreate=True|False ) - Parameters:
- StackName (string) – - [REQUIRED] - The name that’s associated with the stack. 
- RoleARN (string) – The Amazon Resource Name (ARN) of an Identity and Access Management role that CloudFormation assumes to rollback the stack. 
- ClientRequestToken (string) – A unique identifier for this - RollbackStackrequest.
- RetainExceptOnCreate (boolean) – This deletion policy deletes newly created resources, but retains existing resources, when a stack operation is rolled back. This ensures new, empty, and unused resources are deleted, while critical resources and their data are retained. - RetainExceptOnCreatecan be specified for any resource that supports the DeletionPolicy attribute.
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'StackId': 'string' } - Response Structure- (dict) – - StackId (string) – - Unique identifier of the stack. 
 
 
 - Exceptions- CloudFormation.Client.exceptions.TokenAlreadyExistsException