CloudFormation / Client / update_termination_protection

update_termination_protection#

CloudFormation.Client.update_termination_protection(**kwargs)#

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 Protecting a Stack From Being Deleted in the CloudFormation User Guide.

For nested stacks, termination protection is set on the root stack and can’t be changed directly on the nested stack.

See also: AWS API Documentation

Request Syntax

response = client.update_termination_protection(
    EnableTerminationProtection=True|False,
    StackName='string'
)
Parameters:
  • EnableTerminationProtection (boolean) –

    [REQUIRED]

    Whether to enable termination protection on the specified stack.

  • StackName (string) –

    [REQUIRED]

    The name or unique ID of the stack for which you want to set termination protection.

Return type:

dict

Returns:

Response Syntax

{
    'StackId': 'string'
}

Response Structure

  • (dict) –

    • StackId (string) –

      The unique ID of the stack.