list_tags_for_resource

EKS.Client.list_tags_for_resource(**kwargs)

List the tags for an Amazon EKS resource.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    resourceArn='string'
)
Parameters
resourceArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) that identifies the resource for which to list the tags. Currently, the supported resources are Amazon EKS clusters and managed node groups.

Return type
dict
Returns
Response Syntax
{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --
    • tags (dict) --

      The tags for the resource.

      • (string) --
        • (string) --

Exceptions

  • EKS.Client.exceptions.BadRequestException
  • EKS.Client.exceptions.NotFoundException

Examples

This example lists all of the tags for the beta cluster.

response = client.list_tags_for_resource(
    resourceArn='arn:aws:eks:us-west-2:012345678910:cluster/beta',
)

print(response)

Expected Output:

{
    'tags': {
        'aws:tag:domain': 'beta',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}