tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.glacier.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_vault
| Name | Datatype | Description |
|---|---|---|
tags | object | The tags attached to the vault. Each tag is composed of a key and a value. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_tags_for_vault | select | account_id, vault_name, region | This operation lists all the tags attached to a vault. The operation returns an empty map if there are no tags. For more information about tags, see Tagging Amazon Glacier Resources. | |
add_tags_to_vault | update | account_id, vault_name, region | This operation adds the specified tags to a vault. Each tag is composed of a key and a value. Each vault can have up to 10 tags. If your request would cause the tag limit for the vault to be exceeded, the operation throws the LimitExceededException error. If a tag already exists on the vault under a specified key, the existing key value will be overwritten. For more information about tags, see Tagging Amazon Glacier Resources. | |
remove_tags_from_vault | exec | account_id, vault_name, region | This operation removes one or more tags from the set of tags attached to a vault. For more information about tags, see Tagging Amazon Glacier Resources. This operation is idempotent. The operation will be successful, even if there are no tags attached to the vault. |
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 of the account that owns the vault. 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 use an account ID, do not include any hyphens ('-') in the ID. |
region | string | AWS region (default: us-east-1) |
vault_name | string | The name of the vault. |
SELECT examples
- list_tags_for_vault
This operation lists all the tags attached to a vault. The operation returns an empty map if there are no tags. For more information about tags, see Tagging Amazon Glacier Resources.
SELECT
tags
FROM aws.glacier.tags
WHERE account_id = '{{ account_id }}' -- required
AND vault_name = '{{ vault_name }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- add_tags_to_vault
This operation adds the specified tags to a vault. Each tag is composed of a key and a value. Each vault can have up to 10 tags. If your request would cause the tag limit for the vault to be exceeded, the operation throws the LimitExceededException error. If a tag already exists on the vault under a specified key, the existing key value will be overwritten. For more information about tags, see Tagging Amazon Glacier Resources.
UPDATE aws.glacier.tags
SET
Tags = '{{ Tags }}'
WHERE
account_id = '{{ account_id }}' --required
AND vault_name = '{{ vault_name }}' --required
AND region = '{{ region }}' --required;
Lifecycle Methods
- remove_tags_from_vault
This operation removes one or more tags from the set of tags attached to a vault. For more information about tags, see Tagging Amazon Glacier Resources. This operation is idempotent. The operation will be successful, even if there are no tags attached to the vault.
EXEC aws.glacier.tags.remove_tags_from_vault
@account_id='{{ account_id }}' --required,
@vault_name='{{ vault_name }}' --required,
@region='{{ region }}' --required
@@json=
'{
"TagKeys": "{{ TagKeys }}"
}'
;