Route53Resolver / Client / list_tags_for_resource

list_tags_for_resource#

Route53Resolver.Client.list_tags_for_resource(**kwargs)#

Lists the tags that you associated with the specified resource.

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

    The Amazon Resource Name (ARN) for the resource that you want to list tags for.

  • MaxResults (integer) – The maximum number of tags that you want to return in the response to a ListTagsForResource request. If you don’t specify a value for MaxResults, Resolver returns up to 100 tags.

  • NextToken (string) –

    For the first ListTagsForResource request, omit this value.

    If you have more than MaxResults tags, you can submit another ListTagsForResource request to get the next group of tags for the resource. In the next request, specify the value of NextToken from the previous response.

Return type:

dict

Returns:

Response Syntax

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

Response Structure

  • (dict) –

    • Tags (list) –

      The tags that are associated with the resource that you specified in the ListTagsForResource request.

      • (dict) –

        One tag that you want to add to the specified resource. A tag consists of a Key (a name for the tag) and a Value.

        • Key (string) –

          The name for the tag. For example, if you want to associate Resolver resources with the account IDs of your customers for billing purposes, the value of Key might be account-id.

        • Value (string) –

          The value for the tag. For example, if Key is account-id, then Value might be the ID of the customer account that you’re creating the resource for.

    • NextToken (string) –

      If more than MaxResults tags match the specified criteria, you can submit another ListTagsForResource request to get the next group of results. In the next request, specify the value of NextToken from the previous response.

Exceptions

  • Route53Resolver.Client.exceptions.ResourceNotFoundException

  • Route53Resolver.Client.exceptions.InvalidParameterException

  • Route53Resolver.Client.exceptions.InvalidNextTokenException

  • Route53Resolver.Client.exceptions.InvalidRequestException

  • Route53Resolver.Client.exceptions.InternalServiceErrorException

  • Route53Resolver.Client.exceptions.ThrottlingException