Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.opensearch.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
tag_listarrayA list of tags attached to a domain.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tagsselectarn, regionReturns all resource tags for an Amazon OpenSearch Service domain, data source, or application. For more information, see Tagging Amazon OpenSearch Service resources.
add_tagsupdateregion, TagListAttaches tags to an existing Amazon OpenSearch Service domain, data source, or application. Tags are a set of case-sensitive key-value pairs. A domain, data source, or application can have up to 10 tags. For more information, see Tagging Amazon OpenSearch Service resources.
remove_tagsupdateregion, TagKeysRemoves the specified set of tags from an Amazon OpenSearch Service domain, data source, or application. For more information, see Tagging Amazon OpenSearch Service resources.

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
arnstringAmazon Resource Name (ARN) for the domain, data source, or application to view tags for.
regionstringAWS region (default: us-east-1)

SELECT examples

Returns all resource tags for an Amazon OpenSearch Service domain, data source, or application. For more information, see Tagging Amazon OpenSearch Service resources.

SELECT
tag_list
FROM aws.opensearch.tags
WHERE arn = '{{ arn }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

Attaches tags to an existing Amazon OpenSearch Service domain, data source, or application. Tags are a set of case-sensitive key-value pairs. A domain, data source, or application can have up to 10 tags. For more information, see Tagging Amazon OpenSearch Service resources.

UPDATE aws.opensearch.tags
SET
ARN = '{{ ARN }}',
TagList = '{{ TagList }}'
WHERE
region = '{{ region }}' --required
AND TagList = '{{ TagList }}' --required;