List the tags for an Amazon EKS resource.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
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.
{
'tags': {
'string': 'string'
}
}
Response Structure
The tags for the resource.
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': {
'...': '...',
},
}