EKS / Client / tag_resource



Associates the specified tags to an Amazon EKS resource with the specified resourceArn. If existing tags on a resource are not specified in the request parameters, they aren’t changed. When a resource is deleted, the tags associated with that resource are also deleted. Tags that you create for Amazon EKS resources don’t propagate to any other resources associated with the cluster. For example, if you tag a cluster with this operation, that tag doesn’t automatically propagate to the subnets and nodes associated with the cluster.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
        'string': 'string'
  • resourceArn (string) –


    The Amazon Resource Name (ARN) of the resource to add tags to.

  • tags (dict) –


    Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don’t propagate to any other cluster or Amazon Web Services resources.

    • (string) –

      One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.

      • (string) –

        The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).

Return type:



Response Syntax


Response Structure

  • (dict) –


  • EKS.Client.exceptions.BadRequestException

  • EKS.Client.exceptions.NotFoundException