:doc:`PaymentCryptographyControlPlane <../../payment-cryptography>` / Client / list_tags_for_resource

**********************
list_tags_for_resource
**********************



.. py:method:: PaymentCryptographyControlPlane.Client.list_tags_for_resource(**kwargs)

  

  Lists the tags for an Amazon Web Services resource.

   

  This is a paginated operation, which means that each response might contain only a subset of all the tags. When the response contains only a subset of tags, it includes a ``NextToken`` value. Use this value in a subsequent ``ListTagsForResource`` request to get more tags. When you receive a response with no NextToken (or an empty or null value), that means there are no more tags to get.

   

  **Cross-account use:** This operation can't be used across different Amazon Web Services accounts.

   

  **Related operations:**

   

  
  * `TagResource <https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_TagResource.html>`__
   
  * `UntagResource <https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_UntagResource.html>`__
  

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/ListTagsForResource>`_  


  **Request Syntax**
  ::

    response = client.list_tags_for_resource(
        ResourceArn='string',
        NextToken='string',
        MaxResults=123
    )
    
  :type ResourceArn: string
  :param ResourceArn: **[REQUIRED]** 

    The ``KeyARN`` of the key whose tags you are getting.

    

  
  :type NextToken: string
  :param NextToken: 

    Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of ``NextToken`` from the truncated response you just received.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    Use this parameter to specify the maximum number of items to return. When this value is present, Amazon Web Services Payment Cryptography does not return more than the specified number of items, but it might return fewer.

     

    This value is optional. If you include a value, it must be between 1 and 100, inclusive. If you do not include a value, it defaults to 50.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Tags': [
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Tags** *(list) --* 

        The list of tags associated with a ``ResourceArn``. Each tag will list the key-value pair contained within that tag.

        
        

        - *(dict) --* 

          A structure that contains information about a tag.

          
          

          - **Key** *(string) --* 

            The key of the tag.

            
          

          - **Value** *(string) --* 

            The value of the tag.

            
      
    
      

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

        The token for the next set of results, or an empty or null value if there are no more results.

        
  
  **Exceptions**
  
  *   :py:class:`PaymentCryptographyControlPlane.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`PaymentCryptographyControlPlane.Client.exceptions.ValidationException`

  
  *   :py:class:`PaymentCryptographyControlPlane.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`PaymentCryptographyControlPlane.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`PaymentCryptographyControlPlane.Client.exceptions.ThrottlingException`

  
  *   :py:class:`PaymentCryptographyControlPlane.Client.exceptions.InternalServerException`

  