data_retrieval_policies
Creates, updates, deletes, gets or lists a data_retrieval_policies resource.
Overview
| Name | data_retrieval_policies |
| Type | Resource |
| Id | aws.glacier.data_retrieval_policies |
Fields
The following fields are returned by SELECT queries:
- get_data_retrieval_policy
| Name | Datatype | Description |
|---|---|---|
rules | array | The policy rule. Although this is a list type, currently there must be only one rule, which contains a Strategy field and optionally a BytesPerHour field. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_data_retrieval_policy | select | account_id, region | This operation returns the current data retrieval policy for the account and region specified in the GET request. For more information about data retrieval policies, see Amazon Glacier Data Retrieval Policies. | |
set_data_retrieval_policy | update | account_id, region | This operation sets and then enacts a data retrieval policy in the region specified in the PUT request. You can set one policy per region for an AWS account. The policy is enacted within a few minutes of a successful PUT operation. The set policy operation does not affect retrieval jobs that were in progress before the policy was enacted. For more information about data retrieval policies, see Amazon Glacier Data Retrieval Policies. |
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 |
|---|---|---|
account_id | string | The AccountId value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single '-' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens ('-') in the ID. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_data_retrieval_policy
This operation returns the current data retrieval policy for the account and region specified in the GET request. For more information about data retrieval policies, see Amazon Glacier Data Retrieval Policies.
SELECT
rules
FROM aws.glacier.data_retrieval_policies
WHERE account_id = '{{ account_id }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- set_data_retrieval_policy
This operation sets and then enacts a data retrieval policy in the region specified in the PUT request. You can set one policy per region for an AWS account. The policy is enacted within a few minutes of a successful PUT operation. The set policy operation does not affect retrieval jobs that were in progress before the policy was enacted. For more information about data retrieval policies, see Amazon Glacier Data Retrieval Policies.
UPDATE aws.glacier.data_retrieval_policies
SET
Policy = '{{ Policy }}'
WHERE
account_id = '{{ account_id }}' --required
AND region = '{{ region }}' --required;