EMR / Client / add_tags

add_tags#

EMR.Client.add_tags(**kwargs)#

Adds tags to an Amazon EMR resource, such as a cluster or an Amazon EMR Studio. Tags make it easier to associate resources in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see Tag Clusters.

See also: AWS API Documentation

Request Syntax

response = client.add_tags(
    ResourceId='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • ResourceId (string) –

    [REQUIRED]

    The Amazon EMR resource identifier to which tags will be added. For example, a cluster identifier or an Amazon EMR Studio ID.

  • Tags (list) –

    [REQUIRED]

    A list of tags to associate with a resource. Tags are user-defined key-value pairs that consist of a required key string with a maximum of 128 characters, and an optional value string with a maximum of 256 characters.

    • (dict) –

      A key-value pair containing user-defined metadata that you can associate with an Amazon EMR resource. Tags make it easier to associate clusters in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see Tag Clusters.

      • Key (string) –

        A user-defined key, which is the minimum required information for a valid tag. For more information, see Tag.

      • Value (string) –

        A user-defined value, which is optional in a tag. For more information, see Tag Clusters.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

    This output indicates the result of adding tags to a resource.

Exceptions

  • EMR.Client.exceptions.InternalServerException

  • EMR.Client.exceptions.InvalidRequestException