CloudTrail / Paginator / ListTags

ListTags#

class CloudTrail.Paginator.ListTags#
paginator = client.get_paginator('list_tags')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from CloudTrail.Client.list_tags().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    ResourceIdList=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • ResourceIdList (list) –

    [REQUIRED]

    Specifies a list of trail, event data store, dashboard, or channel ARNs whose tags will be listed. The list has a limit of 20 ARNs.

    Example trail ARN format: arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

    Example event data store ARN format: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE

    Example dashboard ARN format: arn:aws:cloudtrail:us-east-1:123456789012:dashboard/exampleDash

    Example channel ARN format: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890

    • (string) –

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'ResourceTagList': [
        {
            'ResourceId': 'string',
            'TagsList': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) –

    Returns the objects or data listed below if successful. Otherwise, returns an error.

    • ResourceTagList (list) –

      A list of resource tags.

      • (dict) –

        A resource tag.

        • ResourceId (string) –

          Specifies the ARN of the resource.

        • TagsList (list) –

          A list of tags.

          • (dict) –

            A custom key-value pair associated with a resource such as a CloudTrail trail, event data store, dashboard, or channel.

            • Key (string) –

              The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.

            • Value (string) –

              The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.