:doc:`CloudFormation <../../cloudformation>` / Client / update_termination_protection

*****************************
update_termination_protection
*****************************



.. py:method:: 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 `Protect a CloudFormation stack from being deleted <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html>`__ in the *CloudFormation User Guide*.

   

  For `nested stacks <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html>`__, termination protection is set on the root stack and can't be changed directly on the nested stack.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/UpdateTerminationProtection>`_  


  **Request Syntax**
  ::

    response = client.update_termination_protection(
        EnableTerminationProtection=True|False,
        StackName='string'
    )
    
  :type EnableTerminationProtection: boolean
  :param EnableTerminationProtection: **[REQUIRED]** 

    Whether to enable termination protection on the specified stack.

    

  
  :type StackName: string
  :param StackName: **[REQUIRED]** 

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

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'StackId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **StackId** *(string) --* 

        The unique ID of the stack.

        
  