retention_configurations
Creates, updates, deletes, gets or lists a retention_configurations resource.
Overview
| Name | retention_configurations |
| Type | Resource |
| Id | aws.config.retention_configurations |
Fields
The following fields are returned by SELECT queries:
- describe_retention_configurations
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the retention configuration object. (pattern: <code>[\w-]+</code>) |
retention_period_in_days | integer | Number of days Config stores your historical information. Currently, only applicable to the configuration item history. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_retention_configurations | select | region | 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. | |
put_retention_configuration | replace | region, RetentionPeriodInDays | 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. | |
delete_retention_configuration | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_retention_configurations
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
- put_retention_configuration
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
- delete_retention_configuration
Deletes the retention configuration.
DELETE FROM aws.config.retention_configurations
WHERE region = '{{ region }}' --required
;