Redshift / Paginator / DescribeTags

DescribeTags#

class Redshift.Paginator.DescribeTags#
paginator = client.get_paginator('describe_tags')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from Redshift.Client.describe_tags().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    ResourceName='string',
    ResourceType='string',
    TagKeys=[
        'string',
    ],
    TagValues=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • ResourceName (string) – The Amazon Resource Name (ARN) for which you want to describe the tag or tags. For example, arn:aws:redshift:us-east-2:123456789:cluster:t1.

  • ResourceType (string) –

    The type of resource with which you want to view tags. Valid resource types are:

    • Cluster

    • CIDR/IP

    • EC2 security group

    • Snapshot

    • Cluster security group

    • Subnet group

    • HSM connection

    • HSM certificate

    • Parameter group

    • Snapshot copy grant

    • Integration (zero-ETL integration or S3 event integration)

    Note

    To describe the tags associated with an integration, don’t specify ResourceType, instead specify the ResourceName of the integration.

    For more information about Amazon Redshift resource types and constructing ARNs, go to Specifying Policy Elements: Actions, Effects, Resources, and Principals in the Amazon Redshift Cluster Management Guide.

  • TagKeys (list) –

    A tag key or keys for which you want to return all matching resources that are associated with the specified key or keys. For example, suppose that you have resources tagged with keys called owner and environment. If you specify both of these tag keys in the request, Amazon Redshift returns a response with all resources that have either or both of these tag keys associated with them.

    • (string) –

  • TagValues (list) –

    A tag value or values for which you want to return all matching resources that are associated with the specified value or values. For example, suppose that you have resources tagged with values called admin and test. If you specify both of these tag values in the request, Amazon Redshift returns a response with all resources that have either or both of these tag values associated with them.

    • (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.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

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

Return type:

dict

Returns:

Response Syntax

{
    'TaggedResources': [
        {
            'Tag': {
                'Key': 'string',
                'Value': 'string'
            },
            'ResourceName': 'string',
            'ResourceType': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • TaggedResources (list) –

      A list of tags with their associated resources.

      • (dict) –

        A tag and its associated resource.

        • Tag (dict) –

          The tag for the resource.

          • Key (string) –

            The key, or name, for the resource tag.

          • Value (string) –

            The value for the resource tag.

        • ResourceName (string) –

          The Amazon Resource Name (ARN) with which the tag is associated, for example: arn:aws:redshift:us-east-2:123456789:cluster:t1.

        • ResourceType (string) –

          The type of resource with which the tag is associated. Valid resource types are:

          • Cluster

          • CIDR/IP

          • EC2 security group

          • Snapshot

          • Cluster security group

          • Subnet group

          • HSM connection

          • HSM certificate

          • Parameter group

          For more information about Amazon Redshift resource types and constructing ARNs, go to Constructing an Amazon Redshift Amazon Resource Name (ARN) in the Amazon Redshift Cluster Management Guide.

    • NextToken (string) –

      A token to resume pagination.