:doc:`EFS <../../efs>` / Client / list_tags_for_resource

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



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

  

  Lists all tags for a top-level EFS resource. You must provide the ID of the resource that you want to retrieve the tags for.

   

  This operation requires permissions for the ``elasticfilesystem:DescribeAccessPoints`` action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ListTagsForResource>`_  


  **Request Syntax**
  ::

    response = client.list_tags_for_resource(
        ResourceId='string',
        MaxResults=123,
        NextToken='string'
    )
    
  :type ResourceId: string
  :param ResourceId: **[REQUIRED]** 

    Specifies the EFS resource you want to retrieve tags for. You can retrieve tags for EFS file systems and access points using this API endpoint.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    (Optional) Specifies the maximum number of tag objects to return in the response. The default value is 100.

    

  
  :type NextToken: string
  :param NextToken: 

    (Optional) You can use ``NextToken`` in a subsequent request to fetch the next page of access point descriptions if the response payload was paginated.

    

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

    
    ::

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

    

    - *(dict) --* 
      

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

        An array of the tags for the specified EFS resource.

        
        

        - *(dict) --* 

          A tag is a key-value pair. Allowed characters are letters, white space, and numbers that can be represented in UTF-8, and the following characters: `` + - = . _ : /``.

          
          

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

            The tag key (String). The key can't start with ``aws:``.

            
          

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

            The value of the tag key.

            
      
    
      

      - **NextToken** *(string) --* 

        ``NextToken`` is present if the response payload is paginated. You can use ``NextToken`` in a subsequent request to fetch the next page of access point descriptions.

        
  
  **Exceptions**
  
  *   :py:class:`EFS.Client.exceptions.BadRequest`

  
  *   :py:class:`EFS.Client.exceptions.InternalServerError`

  
  *   :py:class:`EFS.Client.exceptions.FileSystemNotFound`

  
  *   :py:class:`EFS.Client.exceptions.AccessPointNotFound`

  