ConfigService / Client / put_retention_configuration

put_retention_configuration#

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

Request Syntax

response = client.put_retention_configuration(
    RetentionPeriodInDays=123
)
Parameters:

RetentionPeriodInDays (integer) –

[REQUIRED]

Number of days Config stores your historical information.

Note

Currently, only applicable to the configuration item history.

Return type:

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

  • ConfigService.Client.exceptions.InvalidParameterValueException

  • ConfigService.Client.exceptions.MaxNumberOfRetentionConfigurationsExceededException