tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.dsql.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
tags | object | A map of key and value pairs that you used to tag your resource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_tags_for_resource | select | resource_arn, region | Lists all of the tags for a resource. | |
tag_resource | update | resource_arn, region, tags | Tags a resource with a map of key and value pairs. | |
untag_resource | update | resource_arn, tagKeys, region | Removes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
resource_arn | string | The ARN of the resource from which to remove tags. |
tagKeys | array | The array of keys of the tags that you want to remove. |
SELECT examples
- list_tags_for_resource
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
- tag_resource
- untag_resource
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;
Removes a tag from a resource.
UPDATE aws.dsql.tags
SET
-- No updatable properties
WHERE
resource_arn = '{{ resource_arn }}' --required
AND tagKeys = '{{ tagKeys }}' --required
AND region = '{{ region }}' --required;