:doc:`IoT <../../iot>` / Client / list_tags_for_resource

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



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

  

  Lists the tags (metadata) you have assigned to the resource.

   

  Requires permission to access the `ListTagsForResource <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/ListTagsForResource>`_  


  **Request Syntax**
  ::

    response = client.list_tags_for_resource(
        resourceArn='string',
        nextToken='string'
    )
    
  :type resourceArn: string
  :param resourceArn: **[REQUIRED]** 

    The ARN of the resource.

    

  
  :type nextToken: string
  :param nextToken: 

    To retrieve the next set of results, the ``nextToken`` value from a previous response; otherwise **null** to receive the first set of results.

    

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

    
    ::

      {
          'tags': [
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **tags** *(list) --* 

        The list of tags assigned to the resource.

        
        

        - *(dict) --* 

          A set of key/value pairs that are used to manage the resource.

          
          

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

            The tag's key.

            
          

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

            The tag's value.

            
      
    
      

      - **nextToken** *(string) --* 

        The token to use to get the next set of results, or **null** if there are no additional results.

        
  
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoT.Client.exceptions.InternalFailureException`

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

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

  