:doc:`CloudWatchObservabilityAccessManager <../../oam>` / Client / list_tags_for_resource

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



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

  

  Displays the tags associated with a resource. Both sinks and links support tagging.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/ListTagsForResource>`_  


  **Request Syntax**
  ::

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

    The ARN of the resource that you want to view tags for.

     

    The ARN format of a sink is ``arn:aws:oam:Region:account-id:sink/sink-id``

     

    The ARN format of a link is ``arn:aws:oam:Region:account-id:link/link-id``

     

    For more information about ARN format, see `CloudWatch Logs resources and operations <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html>`__.

     

    .. warning::

       

      Unlike tagging permissions in other Amazon Web Services services, to retrieve the list of tags for links or sinks you must have the ``oam:RequestTag`` permission. The ``aws:ReguestTag`` permission does not allow you to tag and untag links and sinks.

      

    

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

    
    ::

      {
          'Tags': {
              'string': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Tags** *(dict) --* 

        The list of tags associated with the requested resource.>

        
        

        - *(string) --* 
          

          - *(string) --* 
    
  
  
  **Exceptions**
  
  *   :py:class:`CloudWatchObservabilityAccessManager.Client.exceptions.ValidationException`

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

  