:doc:`OpenSearchServiceServerless <../../opensearchserverless>` / Client / list_tags_for_resource

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



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

  

  Returns the tags for an OpenSearch Serverless resource. For more information, see `Tagging Amazon OpenSearch Serverless collections <https://docs.aws.amazon.com/opensearch-service/latest/developerguide/tag-collection.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/opensearchserverless-2021-11-01/ListTagsForResource>`_  


  **Request Syntax**
  ::

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

    The Amazon Resource Name (ARN) of the resource. The resource must be active (not in the ``DELETING`` state), and must be owned by the account ID included in the request.

    

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

    
    ::

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

    

    - *(dict) --* 
      

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

        The tags associated with the resource.

        
        

        - *(dict) --* 

          A map of key-value pairs associated to an OpenSearch Serverless resource.

          
          

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

            The key to use in the tag.

            
          

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

            The value of the tag.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`OpenSearchServiceServerless.Client.exceptions.InternalServerException`

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

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

  