lifecycle_policies
Creates, updates, deletes, gets or lists a lifecycle_policies resource.
Overview
| Name | lifecycle_policies |
| Type | Resource |
| Id | aws.mediastore.lifecycle_policies |
Fields
The following fields are returned by SELECT queries:
- get_lifecycle_policy
| Name | Datatype | Description |
|---|---|---|
lifecycle_policy | string | The object lifecycle policy that is assigned to the container. (pattern: <code>[\u0009\u000A\u000D\u0020-\u00FF]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_lifecycle_policy | select | region | Retrieves the object lifecycle policy that is assigned to a container. | |
put_lifecycle_policy | replace | region, ContainerName, LifecyclePolicy | Writes an object lifecycle policy to a container. If the container already has an object lifecycle policy, the service replaces the existing policy with the new policy. It takes up to 20 minutes for the change to take effect. For information about how to construct an object lifecycle policy, see Components of an Object Lifecycle Policy. | |
delete_lifecycle_policy | delete | region | Removes an object lifecycle policy from a container. It takes up to 20 minutes for the change to take effect. |
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
- get_lifecycle_policy
Retrieves the object lifecycle policy that is assigned to a container.
SELECT
lifecycle_policy
FROM aws.mediastore.lifecycle_policies
WHERE region = '{{ region }}' -- required
;
REPLACE examples
- put_lifecycle_policy
Writes an object lifecycle policy to a container. If the container already has an object lifecycle policy, the service replaces the existing policy with the new policy. It takes up to 20 minutes for the change to take effect. For information about how to construct an object lifecycle policy, see Components of an Object Lifecycle Policy.
REPLACE aws.mediastore.lifecycle_policies
SET
ContainerName = '{{ ContainerName }}',
LifecyclePolicy = '{{ LifecyclePolicy }}'
WHERE
region = '{{ region }}' --required
AND ContainerName = '{{ ContainerName }}' --required
AND LifecyclePolicy = '{{ LifecyclePolicy }}' --required;
DELETE examples
- delete_lifecycle_policy
Removes an object lifecycle policy from a container. It takes up to 20 minutes for the change to take effect.
DELETE FROM aws.mediastore.lifecycle_policies
WHERE region = '{{ region }}' --required
;