Skip to main content

tags

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

Overview​

Nametags
TypeResource
Idaws.iotsitewise.tags

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
tagsobjectThe list of key-value pairs that contain metadata for the resource. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectresourceArn, regionRetrieves the list of tags for an IoT SiteWise resource.
tag_resourceupdateresourceArn, region, tagsAdds tags to an IoT SiteWise resource. If a tag already exists for the resource, this operation updates the tag's value.
untag_resourceupdateresourceArn, tagKeys, regionRemoves a tag from an IoT SiteWise 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)
resourceArnstringThe ARN of the resource to untag.
tagKeysarrayA list of keys for tags to remove from the resource.

SELECT examples​

Retrieves the list of tags for an IoT SiteWise resource.

SELECT
tags
FROM aws.iotsitewise.tags
WHERE resourceArn = '{{ resourceArn }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples​

Adds tags to an IoT SiteWise resource. If a tag already exists for the resource, this operation updates the tag's value.

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