:doc:`Redshift <../../redshift>` / Paginator / DescribeTags

************
DescribeTags
************



.. py:class:: Redshift.Paginator.DescribeTags

  ::

    
    paginator = client.get_paginator('describe_tags')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`Redshift.Client.describe_tags`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeTags>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          ResourceName='string',
          ResourceType='string',
          TagKeys=[
              'string',
          ],
          TagValues=[
              'string',
          ],
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type ResourceName: string
    :param ResourceName: 

      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``.

      

    
    :type ResourceType: string
    :param ResourceType: 

      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 <https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-overview.html#redshift-iam-access-control-specify-actions>`__ in the Amazon Redshift Cluster Management Guide.

      

    
    :type TagKeys: list
    :param TagKeys: 

      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) --* 

      
  
    :type TagValues: list
    :param TagValues: 

      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) --* 

      
  
    :type PaginationConfig: dict
    :param PaginationConfig: 

      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.

        

      
    
    
    :rtype: 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) <https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-overview.html#redshift-iam-access-control-specify-actions>`__ in the Amazon Redshift Cluster Management Guide.

              
        
      
        

        - **NextToken** *(string) --* 

          A token to resume pagination.

          
    