Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.xray.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
keystringA tag key, such as Stage or Name. A tag key cannot be empty. The key can be a maximum of 128 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /
valuestringAn optional tag value, such as Production or test-only. The value can be a maximum of 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectregionReturns a list of tags that are applied to the specified Amazon Web Services X-Ray group or sampling rule.
tag_resourceupdateregion, ResourceARN, TagsApplies tags to an existing Amazon Web Services X-Ray group or sampling rule.
untag_resourceupdateregion, ResourceARN, TagKeysRemoves tags from an Amazon Web Services X-Ray group or sampling rule. You cannot edit or delete system tags (those with an aws: prefix).

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
regionstringAWS region (default: us-east-1)

SELECT examples

Returns a list of tags that are applied to the specified Amazon Web Services X-Ray group or sampling rule.

SELECT
key,
value
FROM aws.xray.tags
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Applies tags to an existing Amazon Web Services X-Ray group or sampling rule.

UPDATE aws.xray.tags
SET
ResourceARN = '{{ ResourceARN }}',
Tags = '{{ Tags }}'
WHERE
region = '{{ region }}' --required
AND ResourceARN = '{{ ResourceARN }}' --required
AND Tags = '{{ Tags }}' --required;