Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.mpa.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
tagsobjectTags attached to the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectresource_arn, regionReturns a list of the tags for a resource.
untag_resourceupdateresource_arn, region, TagKeysRemoves a resource tag. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.
tag_resourceupdateresource_arn, regionCreates or updates a resource tag. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter 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
regionstringAWS region (default: us-east-1)
resource_arnstringAmazon Resource Name (ARN) for the resource you want to tag.

SELECT examples

Returns a list of the tags for a resource.

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

UPDATE examples

Removes a resource tag. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.

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