Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.apigateway.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
tagsobjectThe collection of tags. Each tag element is associated with a given resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_tagsselectresource_arn, regionposition, limitGets the Tags collection for a given resource.
tag_resourceupdateresource_arn, region, tagsAdds or updates a tag on a given resource.
untag_resourceupdateresource_arn, tagKeys, regionRemoves a tag from a given 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 ARN of a resource that can be tagged.
tagKeysarrayThe Tag keys to delete.
limitinteger(Not currently supported) The maximum number of returned results per page. The default value is 25 and the maximum value is 500.
positionstring(Not currently supported) The current pagination position in the paged result set.

SELECT examples

Gets the Tags collection for a given resource.

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

UPDATE examples

Adds or updates a tag on a given resource.

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