tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.iotthingsgraph.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
key | string | The 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>) |
value | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_tags_for_resource | select | region | Lists all tags on an AWS IoT Things Graph resource. | |
tag_resource | update | region, resourceArn, tags | Creates a tag for the specified resource. | |
untag_resource | update | region, resourceArn, tagKeys | Removes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_tags_for_resource
Lists all tags on an AWS IoT Things Graph resource.
SELECT
key,
value
FROM aws.iotthingsgraph.tags
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- tag_resource
- untag_resource
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;
Removes a tag from the specified resource.
UPDATE aws.iotthingsgraph.tags
SET
resourceArn = '{{ resourceArn }}',
tagKeys = '{{ tagKeys }}'
WHERE
region = '{{ region }}' --required
AND resourceArn = '{{ resourceArn }}' --required
AND tagKeys = '{{ tagKeys }}' --required;