Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.dsql.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
tagsobjectA map of key and value pairs that you used to tag your resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectresource_arn, regionLists all of the tags for a resource.
tag_resourceupdateresource_arn, region, tagsTags a resource with a map of key and value pairs.
untag_resourceupdateresource_arn, tagKeys, regionRemoves a tag from a 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)
resource_arnstringThe ARN of the resource from which to remove tags.
tagKeysarrayThe array of keys of the tags that you want to remove.

SELECT examples

Lists all of the tags for a resource.

SELECT
tags
FROM aws.dsql.tags
WHERE resource_arn = '{{ resource_arn }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

Tags a resource with a map of key and value pairs.

UPDATE aws.dsql.tags
SET
tags = '{{ tags }}'
WHERE
resource_arn = '{{ resource_arn }}' --required
AND region = '{{ region }}' --required
AND tags = '{{ tags }}' --required;