:doc:`StorageGateway <../../storagegateway>` / Client / list_tags_for_resource

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



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

  

  Lists the tags that have been added to the specified resource. This operation is supported in storage gateways of all types.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTagsForResource>`_  


  **Request Syntax**
  ::

    response = client.list_tags_for_resource(
        ResourceARN='string',
        Marker='string',
        Limit=123
    )
    
  :type ResourceARN: string
  :param ResourceARN: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the resource for which you want to list tags.

    

  
  :type Marker: string
  :param Marker: 

    An opaque string that indicates the position at which to begin returning the list of tags.

    

  
  :type Limit: integer
  :param Limit: 

    Specifies that the list of tags returned be limited to the specified number of items.

    

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

    
    ::

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

    

    - *(dict) --* 

      ListTagsForResourceOutput

      
      

      - **ResourceARN** *(string) --* 

        The Amazon Resource Name (ARN) of the resource for which you want to list tags.

        
      

      - **Marker** *(string) --* 

        An opaque string that indicates the position at which to stop returning the list of tags.

        
      

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

        An array that contains the tags for the specified resource.

        
        

        - *(dict) --* 

          A key-value pair that helps you manage, filter, and search for your resource. Allowed characters: letters, white space, and numbers, representable in UTF-8, and the following characters: + - = . _ : /.

          
          

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

            Tag key. The key can't start with aws:.

            
          

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

            Value of the tag key.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`StorageGateway.Client.exceptions.InvalidGatewayRequestException`

  
  *   :py:class:`StorageGateway.Client.exceptions.InternalServerError`

  

  **Examples**

  Lists the tags that have been added to the specified resource.
  ::

    response = client.list_tags_for_resource(
        Limit=1,
        Marker='1',
        ResourceARN='arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'Marker': '1',
        'ResourceARN': 'arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B',
        'Tags': [
            {
                'Key': 'Dev Gatgeway Region',
                'Value': 'East Coast',
            },
        ],
        'ResponseMetadata': {
            '...': '...',
        },
    }

  