rollback_stack
¶
rollback_stack(
*,
config_overrides: Optional[CloudFormationClientConfig] = None,
stack_name: Optional[StackNameOrId] = None,
role_arn: Optional[RoleARN] = None,
client_request_token: Optional[ClientRequestToken] = None,
retain_except_on_create: Optional[RetainExceptOnCreate] = None,
deployment_config: Optional[DeploymentConfig] = 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:
-
stack_name(Optional[StackNameOrId], default:None) –The name that's associated with the stack.
-
role_arn(Optional[RoleARN], default:None) –The Amazon Resource Name (ARN) of an IAM role that CloudFormation assumes to rollback the stack.
-
client_request_token(Optional[ClientRequestToken], default:None) –A unique identifier for this
RollbackStackrequest. -
retain_except_on_create(Optional[RetainExceptOnCreate], default: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 ofRetain.Default:
false -
deployment_config(Optional[DeploymentConfig], default:None) –The deployment configuration for this stack operation, including the deployment mode.
Raises:
-
TokenAlreadyExistsException–A client request token already exists.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudformation/_services/cloud_formation.py
6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 | |