DataSync / Client / list_tags_for_resource

list_tags_for_resource#

DataSync.Client.list_tags_for_resource(**kwargs)#

Returns all the tags associated with an Amazon Web Services resource.

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

    Specifies the Amazon Resource Name (ARN) of the resource that you want tag information on.

  • MaxResults (integer) – Specifies how many results that you want in the response.

  • NextToken (string) – Specifies an opaque string that indicates the position to begin the next list of results in the response.

Return type:

dict

Returns:

Response Syntax

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

Response Structure

  • (dict) –

    ListTagsForResourceResponse

    • Tags (list) –

      An array of tags applied to the specified resource.

      • (dict) –

        A key-value pair representing a single tag that’s been applied to an Amazon Web Services resource.

        • Key (string) –

          The key for an Amazon Web Services resource tag.

        • Value (string) –

          The value for an Amazon Web Services resource tag.

    • NextToken (string) –

      The opaque string that indicates the position to begin the next list of results in the response.

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException

  • DataSync.Client.exceptions.InternalException