:doc:`EMR <../../emr>` / Client / put_auto_termination_policy

***************************
put_auto_termination_policy
***************************



.. py:method:: EMR.Client.put_auto_termination_policy(**kwargs)

  

  .. note::

    

    Auto-termination is supported in Amazon EMR releases 5.30.0 and 6.1.0 and later. For more information, see `Using an auto-termination policy <https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-auto-termination-policy.html>`__.

    

   

  Creates or updates an auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see `Control cluster termination <https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutAutoTerminationPolicy>`_  


  **Request Syntax**
  ::

    response = client.put_auto_termination_policy(
        ClusterId='string',
        AutoTerminationPolicy={
            'IdleTimeout': 123
        }
    )
    
  :type ClusterId: string
  :param ClusterId: **[REQUIRED]** 

    Specifies the ID of the Amazon EMR cluster to which the auto-termination policy will be attached.

    

  
  :type AutoTerminationPolicy: dict
  :param AutoTerminationPolicy: 

    Specifies the auto-termination policy to attach to the cluster.

    

  
    - **IdleTimeout** *(integer) --* 

      Specifies the amount of idle time in seconds after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

      

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  