Skip to main content

retention_configurations

Creates, updates, deletes, gets or lists a retention_configurations resource.

Overview

Nameretention_configurations
TypeResource
Idaws.config.retention_configurations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the retention configuration object. (pattern: <code>[\w-]+</code>)
retention_period_in_daysintegerNumber of days Config stores your historical information. Currently, only applicable to the configuration item history.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_retention_configurationsselectregionReturns the details of one or more retention configurations. If the retention configuration name is not specified, this operation returns the details for all the retention configurations for that account. Currently, Config supports only one retention configuration per region in your account.
put_retention_configurationreplaceregion, RetentionPeriodInDaysCreates 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. Currently, Config supports only one retention configuration per region in your account.
delete_retention_configurationdeleteregionDeletes the retention configuration.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns the details of one or more retention configurations. If the retention configuration name is not specified, this operation returns the details for all the retention configurations for that account. Currently, Config supports only one retention configuration per region in your account.

SELECT
name,
retention_period_in_days
FROM aws.config.retention_configurations
WHERE region = '{{ region }}' -- required
;

REPLACE examples

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. Currently, Config supports only one retention configuration per region in your account.

REPLACE aws.config.retention_configurations
SET
RetentionPeriodInDays = {{ RetentionPeriodInDays }}
WHERE
region = '{{ region }}' --required
AND RetentionPeriodInDays = '{{ RetentionPeriodInDays }}' --required
RETURNING
retention_configuration;

DELETE examples

Deletes the retention configuration.

DELETE FROM aws.config.retention_configurations
WHERE region = '{{ region }}' --required
;