:doc:`CloudFront <../../cloudfront>` / Client / list_tags_for_resource

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



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

  

  List tags for a CloudFront resource. For more information, see `Tagging a distribution <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/tagging.html>`__ in the *Amazon CloudFront Developer Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListTagsForResource>`_  


  **Request Syntax**
  ::

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

    An ARN of a CloudFront resource.

    

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

    
    ::

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

    

    - *(dict) --* 

      The returned result of the corresponding request.

      
      

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

        A complex type that contains zero or more ``Tag`` elements.

        
        

        - **Items** *(list) --* 

          A complex type that contains ``Tag`` elements.

          
          

          - *(dict) --* 

            A complex type that contains ``Tag`` key and ``Tag`` value.

            
            

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

              A string that contains ``Tag`` key.

               

              The string length should be between 1 and 128 characters. Valid characters include ``a-z``, ``A-Z``, ``0-9``, space, and the special characters ``_ - . : / = + @``.

              
            

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

              A string that contains an optional ``Tag`` value.

               

              The string length should be between 0 and 256 characters. Valid characters include ``a-z``, ``A-Z``, ``0-9``, space, and the special characters ``_ - . : / = + @``.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`CloudFront.Client.exceptions.AccessDenied`

  
  *   :py:class:`CloudFront.Client.exceptions.InvalidTagging`

  
  *   :py:class:`CloudFront.Client.exceptions.InvalidArgument`

  
  *   :py:class:`CloudFront.Client.exceptions.NoSuchResource`

  