Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.glacier.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
tagsobjectThe tags attached to the vault. Each tag is composed of a key and a value.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_vaultselectaccount_id, vault_name, regionThis 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_vaultupdateaccount_id, vault_name, regionThis 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_vaultexecaccount_id, vault_name, regionThis 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.

NameDatatypeDescription
account_idstringThe 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.
regionstringAWS region (default: us-east-1)
vault_namestringThe name of the vault.

SELECT examples

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

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

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 }}"
}'
;