EFS / Client / list_tags_for_resource

list_tags_for_resource#

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

Request Syntax

response = client.list_tags_for_resource(
    ResourceId='string',
    MaxResults=123,
    NextToken='string'
)
Parameters:
  • ResourceId (string) –

    [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.

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

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

Return type:

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

  • EFS.Client.exceptions.BadRequest

  • EFS.Client.exceptions.InternalServerError

  • EFS.Client.exceptions.FileSystemNotFound

  • EFS.Client.exceptions.AccessPointNotFound