Skip to main content

lifecycle_policies

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

Overview

Namelifecycle_policies
TypeResource
Idaws.mediastore.lifecycle_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
lifecycle_policystringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_lifecycle_policyselectregionRetrieves the object lifecycle policy that is assigned to a container.
put_lifecycle_policyreplaceregion, ContainerName, LifecyclePolicyWrites 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_policydeleteregionRemoves 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.

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

SELECT examples

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

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

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
;