Skip to main content

tags

Creates, updates, deletes, gets or lists a tags resource.

Overview

Nametags
TypeResource
Idaws.docdb.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
keystringThe 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}.:/=+\-]*)$").
valuestringThe 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}.:/=+\-]*)$").

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectResourceName, regionFiltersLists all tags on an Amazon DocumentDB resource.
add_tags_to_resourceupdateResourceName, Tags, regionAdds 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.
remove_tags_from_resourceupdateResourceName, TagKeys, regionRemoves metadata tags from an Amazon DocumentDB resource.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ResourceNamestringThe Amazon DocumentDB resource that the tags are removed from. This value is an Amazon Resource Name (ARN).
TagKeysarrayThe tag key (name) of the tag to be removed.
TagsarrayThe tags to be assigned to the Amazon DocumentDB resource.
regionstringAWS region (default: us-east-1)
FiltersarrayThis parameter is not currently supported.

SELECT examples

Lists all tags on an Amazon DocumentDB resource.

SELECT
key,
value
FROM aws.docdb.tags
WHERE ResourceName = '{{ ResourceName }}' -- required
AND region = '{{ region }}' -- required
AND Filters = '{{ Filters }}'
;

UPDATE examples

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.

UPDATE aws.docdb.tags
SET
-- No updatable properties
WHERE
ResourceName = '{{ ResourceName }}' --required
AND Tags = '{{ Tags }}' --required
AND region = '{{ region }}' --required;