list_tags_for_resource

ECR.Client.list_tags_for_resource(**kwargs)

List the tags for an Amazon ECR resource.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    resourceArn='string'
)
Parameters
resourceArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) that identifies the resource for which to list the tags. Currently, the only supported resource is an Amazon ECR repository.

Return type
dict
Returns
Response Syntax
{
    'tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • tags (list) --

      The tags for the resource.

      • (dict) --

        The metadata to apply to a resource to help you categorize and organize them. Each tag consists of a key and a value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

        • Key (string) --

          One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.

        • Value (string) --

          A value acts as a descriptor within a tag category (key).

Exceptions

  • ECR.Client.exceptions.InvalidParameterException
  • ECR.Client.exceptions.RepositoryNotFoundException
  • ECR.Client.exceptions.ServerException