Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.macie2.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
tagsobjectA map of key-value pairs that specifies which tags (keys and values) are associated with the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectresource_arn, regionRetrieves the tags (keys and values) that are associated with an Amazon Macie resource.
tag_resourceupdateresource_arn, region, tagsAdds or updates one or more tags (keys and values) that are associated with an Amazon Macie resource.
untag_resourceupdateresource_arn, tagKeys, regionRemoves one or more tags (keys and values) from an Amazon Macie 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) of the resource.
tagKeysarrayOne or more tags (keys) to remove from the resource. In an HTTP request to remove multiple tags, append the tagKeys parameter and argument for each tag to remove, separated by an ampersand (&).

SELECT examples

Retrieves the tags (keys and values) that are associated with an Amazon Macie resource.

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

UPDATE examples

Adds or updates one or more tags (keys and values) that are associated with an Amazon Macie resource.

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