:doc:`CloudWatch <../../cloudwatch>` / Client / list_tags_for_resource

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



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

  

  Displays the tags associated with a CloudWatch resource. Currently, alarms and Contributor Insights rules support tagging.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListTagsForResource>`_  


  **Request Syntax**
  ::

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

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

     

    The ARN format of an alarm is ``arn:aws:cloudwatch:Region:account-id:alarm:alarm-name``

     

    The ARN format of a Contributor Insights rule is ``arn:aws:cloudwatch:Region:account-id:insight-rule/insight-rule-name``

     

    For more information about ARN format, see `Resource Types Defined by Amazon CloudWatch <https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies>`__ in the *Amazon Web Services General Reference*.

    

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

    
    ::

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

    

    - *(dict) --* 
      

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

        The list of tag keys and values associated with the resource you specified.

        
        

        - *(dict) --* 

          A key-value pair associated with a CloudWatch resource.

          
          

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

            A string that you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.

            
          

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

            The value for the specified tag key.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`CloudWatch.Client.exceptions.InvalidParameterValueException`

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

  
  *   :py:class:`CloudWatch.Client.exceptions.InternalServiceFault`

  