DocDB / Client / add_tags_to_resource

add_tags_to_resource#

DocDB.Client.add_tags_to_resource(**kwargs)#

Adds metadata tags to an Amazon DocumentDB resource. You can use these tags with cost allocation reporting to track costs that are associated with Amazon DocumentDB resources or in a Condition statement in an Identity and Access Management (IAM) policy for Amazon DocumentDB.

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

    The Amazon DocumentDB resource that the tags are added to. This value is an Amazon Resource Name .

  • Tags (list) –

    [REQUIRED]

    The tags to be assigned to the Amazon DocumentDB resource.

    • (dict) –

      Metadata assigned to an Amazon DocumentDB resource consisting of a key-value pair.

      • Key (string) –

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

      • Value (string) –

        The optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can’t be prefixed with “ aws:” or “ rds:”. The string can contain only the set of Unicode letters, digits, white space, ‘_’, ‘.’, ‘/’, ‘=’, ‘+’, ‘-’ (Java regex: “^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$”).

Returns:

None

Exceptions

  • DocDB.Client.exceptions.DBInstanceNotFoundFault

  • DocDB.Client.exceptions.DBSnapshotNotFoundFault

  • DocDB.Client.exceptions.DBClusterNotFoundFault