:doc:`PI <../../pi>` / Client / list_tags_for_resource

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



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

  

  Retrieves all the metadata tags associated with Amazon RDS Performance Insights resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/ListTagsForResource>`_  


  **Request Syntax**
  ::

    response = client.list_tags_for_resource(
        ServiceType='RDS'|'DOCDB',
        ResourceARN='string'
    )
    
  :type ServiceType: string
  :param ServiceType: **[REQUIRED]** 

    List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid value is ``RDS``.

    

  
  :type ResourceARN: string
  :param ResourceARN: **[REQUIRED]** 

    Lists all the tags for the Amazon RDS Performance Insights resource. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see `Constructing an RDS Amazon Resource Name (ARN) <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.html#USER_Tagging.ARN.Constructing>`__.

    

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

    
    ::

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

    

    - *(dict) --* 
      

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

        The metadata assigned to an Amazon RDS resource consisting of a key-value pair.

        
        

        - *(dict) --* 

          Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

          
          

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

            A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with ``aws:`` or ``rds:``. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: ``"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"``).

            
          

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

            A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with ``aws:`` or ``rds:``. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$").

            
      
    
  
  **Exceptions**
  
  *   :py:class:`PI.Client.exceptions.InvalidArgumentException`

  
  *   :py:class:`PI.Client.exceptions.InternalServiceError`

  
  *   :py:class:`PI.Client.exceptions.NotAuthorizedException`

  