tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.apigateway.tags |
Fields
The following fields are returned by SELECT queries:
- get_tags
| Name | Datatype | Description |
|---|---|---|
tags | object | The collection of tags. Each tag element is associated with a given resource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_tags | select | resource_arn, region | position, limit | Gets the Tags collection for a given resource. |
tag_resource | update | resource_arn, region, tags | Adds or updates a tag on a given resource. | |
untag_resource | update | resource_arn, tagKeys, region | Removes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
resource_arn | string | The ARN of a resource that can be tagged. |
tagKeys | array | The Tag keys to delete. |
limit | integer | (Not currently supported) The maximum number of returned results per page. The default value is 25 and the maximum value is 500. |
position | string | (Not currently supported) The current pagination position in the paged result set. |
SELECT examples
- get_tags
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
- tag_resource
- untag_resource
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;
Removes a tag from a given resource.
UPDATE aws.apigateway.tags
SET
-- No updatable properties
WHERE
resource_arn = '{{ resource_arn }}' --required
AND tagKeys = '{{ tagKeys }}' --required
AND region = '{{ region }}' --required;