Glacier / Client / list_tags_for_vault

list_tags_for_vault#

Glacier.Client.list_tags_for_vault(**kwargs)#

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 S3 Glacier Resources.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_vault(
    vaultName='string'
)
Parameters:
  • accountId (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 S3 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.

    Note: this parameter is set to “-” bydefault if no value is not specified.

  • vaultName (string) –

    [REQUIRED]

    The name of the vault.

Return type:

dict

Returns:

Response Syntax

{
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) –

    Contains the Amazon S3 Glacier response to your request.

    • Tags (dict) –

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

      • (string) –

        • (string) –

Exceptions

  • Glacier.Client.exceptions.InvalidParameterValueException

  • Glacier.Client.exceptions.MissingParameterValueException

  • Glacier.Client.exceptions.ResourceNotFoundException

  • Glacier.Client.exceptions.ServiceUnavailableException

Examples

The example lists all the tags attached to the vault examplevault.

response = client.list_tags_for_vault(
    accountId='-',
    vaultName='examplevault',
)

print(response)

Expected Output:

{
    'Tags': {
        'date': 'july2015',
        'id': '1234',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}