:doc:`ConfigService <../../config>` / Client / put_retention_configuration

***************************
put_retention_configuration
***************************



.. py:method:: ConfigService.Client.put_retention_configuration(**kwargs)

  

  Creates and updates the retention configuration with details about retention period (number of days) that Config stores your historical information. The API creates the ``RetentionConfiguration`` object and names the object as **default**. When you have a ``RetentionConfiguration`` object named **default**, calling the API modifies the default object.

   

  .. note::

    

    Currently, Config supports only one retention configuration per region in your account.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutRetentionConfiguration>`_  


  **Request Syntax**
  ::

    response = client.put_retention_configuration(
        RetentionPeriodInDays=123
    )
    
  :type RetentionPeriodInDays: integer
  :param RetentionPeriodInDays: **[REQUIRED]** 

    Number of days Config stores your historical information.

     

    .. note::

      

      Currently, only applicable to the configuration item history.

      

    

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

    
    ::

      {
          'RetentionConfiguration': {
              'Name': 'string',
              'RetentionPeriodInDays': 123
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **RetentionConfiguration** *(dict) --* 

        Returns a retention configuration object.

        
        

        - **Name** *(string) --* 

          The name of the retention configuration object.

          
        

        - **RetentionPeriodInDays** *(integer) --* 

          Number of days Config stores your historical information.

           

          .. note::

            

            Currently, only applicable to the configuration item history.

            

          
    
  
  **Exceptions**
  
  *   :py:class:`ConfigService.Client.exceptions.InvalidParameterValueException`

  
  *   :py:class:`ConfigService.Client.exceptions.MaxNumberOfRetentionConfigurationsExceededException`

  