DirectoryService / Client / add_tags_to_resource

add_tags_to_resource#

DirectoryService.Client.add_tags_to_resource(**kwargs)#

Adds or overwrites one or more tags for the specified directory. Each directory can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique to each resource.

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

    Identifier (ID) for the directory to which to add the tag.

  • Tags (list) –

    [REQUIRED]

    The tags to be assigned to the directory.

    • (dict) –

      Metadata assigned to a directory consisting of a key-value pair.

      • Key (string) – [REQUIRED]

        Required name of the tag. The string value can be Unicode characters and cannot be prefixed with “aws:”. The string can contain only the set of Unicode letters, digits, white-space, ‘_’, ‘.’, ‘/’, ‘=’, ‘+’, ‘-’ (Java regex: “^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$”).

      • Value (string) – [REQUIRED]

        The optional value of the tag. The string value can be Unicode characters. The string can contain only the set of Unicode letters, digits, white-space, ‘_’, ‘.’, ‘/’, ‘=’, ‘+’, ‘-’ (Java regex: “^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$”).

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions