list_tags_for_resource

CodePipeline.Client.list_tags_for_resource(**kwargs)

Gets the set of key-value pairs (metadata) that are used to manage the resource.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    resourceArn='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • resourceArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource to get tags for.

  • nextToken (string) -- The token that was returned from the previous API call, which would be used to return the next page of the list. The ListTagsforResource call lists all available tags in one call and does not use pagination.
  • maxResults (integer) -- The maximum number of results to return in a single call.
Return type

dict

Returns

Response Syntax

{
    'tags': [
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • tags (list) --

      The tags for the resource.

      • (dict) --

        A tag is a key-value pair that is used to manage the resource.

        • key (string) --

          The tag's key.

        • value (string) --

          The tag's value.

    • nextToken (string) --

      If the amount of returned information is significantly large, an identifier is also returned and can be used in a subsequent API call to return the next page of the list. The ListTagsforResource call lists all available tags in one call and does not use pagination.

Exceptions

  • CodePipeline.Client.exceptions.ValidationException
  • CodePipeline.Client.exceptions.ResourceNotFoundException
  • CodePipeline.Client.exceptions.InvalidNextTokenException
  • CodePipeline.Client.exceptions.InvalidArnException