Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.config.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
keystringOne part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.
valuestringThe optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectregionList the tags for Config resource.
tag_resourceupdateregion, ResourceArn, TagsAssociates the specified tags to a resource with the specified ResourceArn. If existing tags on a resource are not specified in the request parameters, they are not changed. If existing tags are specified, however, then their values will be updated. When a resource is deleted, the tags associated with that resource are deleted as well.
untag_resourceupdateregion, ResourceArn, TagKeysDeletes specified tags 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)

SELECT examples

List the tags for Config resource.

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

UPDATE examples

Associates the specified tags to a resource with the specified ResourceArn. If existing tags on a resource are not specified in the request parameters, they are not changed. If existing tags are specified, however, then their values will be updated. When a resource is deleted, the tags associated with that resource are deleted as well.

UPDATE aws.config.tags
SET
ResourceArn = '{{ ResourceArn }}',
Tags = '{{ Tags }}'
WHERE
region = '{{ region }}' --required
AND ResourceArn = '{{ ResourceArn }}' --required
AND Tags = '{{ Tags }}' --required;