Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.iotthingsgraph.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. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>)
valuestringThe optional value of the tag. The string value can be from 1 to 256 Unicode characters in length.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectregionLists all tags on an AWS IoT Things Graph resource.
tag_resourceupdateregion, resourceArn, tagsCreates a tag for the specified resource.
untag_resourceupdateregion, resourceArn, tagKeysRemoves a tag from the specified 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
regionstringAWS region (default: us-east-1)

SELECT examples

Lists all tags on an AWS IoT Things Graph resource.

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

UPDATE examples

Creates a tag for the specified resource.

UPDATE aws.iotthingsgraph.tags
SET
resourceArn = '{{ resourceArn }}',
tags = '{{ tags }}'
WHERE
region = '{{ region }}' --required
AND resourceArn = '{{ resourceArn }}' --required
AND tags = '{{ tags }}' --required;