Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.kafka.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
tagsobjectThe key-value pair for the resource tag.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectresource_arn, regionReturns a list of the tags associated with the specified resource.
untag_resourceupdateresource_arn, tagKeys, regionRemoves the tags associated with the keys that are provided in the query.
tag_resourceupdateresource_arn, regionAdds tags to the specified MSK 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 Amazon Resource Name (ARN) that uniquely identifies the resource that's associated with the tags.
tagKeysarrayTag keys must be unique for a given cluster. In addition, the following restrictions apply: Each tag key must be unique. If you add a tag with a key that's already in use, your new tag overwrites the existing key-value pair. You can't start a tag key with aws: because this prefix is reserved for use by AWS. AWS creates tags that begin with this prefix on your behalf, but you can't edit or delete them. Tag keys must be between 1 and 128 Unicode characters in length. Tag keys must consist of the following characters: Unicode letters, digits, white space, and the following special characters: _ . / = + - @.

SELECT examples

Returns a list of the tags associated with the specified resource.

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

UPDATE examples

Removes the tags associated with the keys that are provided in the query.

UPDATE aws.kafka.tags
SET
-- No updatable properties
WHERE
resource_arn = '{{ resource_arn }}' --required
AND tagKeys = '{{ tagKeys }}' --required
AND region = '{{ region }}' --required;