:doc:`Inspector <../../inspector>` / Client / list_tags_for_resource

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



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

  

  Lists all tags associated with an assessment template.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/ListTagsForResource>`_  


  **Request Syntax**
  ::

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

    The ARN that specifies the assessment template whose tags you want to list.

    

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

    
    ::

      {
          'tags': [
              {
                  'key': 'string',
                  'value': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        A collection of key and value pairs.

        
        

        - *(dict) --* 

          A key and value pair. This data type is used as a request parameter in the  SetTagsForResource action and a response element in the  ListTagsForResource action.

          
          

          - **key** *(string) --* 

            A tag key.

            
          

          - **value** *(string) --* 

            A value assigned to a tag key.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`Inspector.Client.exceptions.InternalException`

  
  *   :py:class:`Inspector.Client.exceptions.InvalidInputException`

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

  
  *   :py:class:`Inspector.Client.exceptions.NoSuchEntityException`

  

  **Examples**

  Lists all tags associated with an assessment template.
  ::

    response = client.list_tags_for_resource(
        resourceArn='arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-gcwFliYu',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'tags': [
            {
                'key': 'Name',
                'value': 'Example',
            },
        ],
        'ResponseMetadata': {
            '...': '...',
        },
    }

  