UpdateTerminationProtection
Updates termination protection for the specified stack. If a user attempts to delete a stack with termination protection enabled, the operation fails and the stack remains unchanged. For more information, see Protect a CloudFormation stack from being deleted in the Amazon CloudFormation User Guide.
For nested stacks, termination protection is set on the root stack and can't be changed directly on the nested stack.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
- EnableTerminationProtection
-
Whether to enable termination protection on the specified stack.
Type: Boolean
Required: Yes
- StackName
-
The name or unique ID of the stack for which you want to set termination protection.
Type: String
Length Constraints: Minimum length of 1.
Pattern:
([a-zA-Z][-a-zA-Z0-9]*)|(arn:\b(aws|aws-us-gov|aws-cn)\b:[-a-zA-Z0-9:/._+]*)
Required: Yes
Response Elements
The following element is returned by the service.
- StackId
-
The unique ID of the stack.
Type: String
Errors
For information about the errors that are common to all actions, see Common Errors.
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: