tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.tnb.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
tags | object | A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key and an optional value. You can use tags to search and filter your resources or track your Amazon Web Services costs. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_tags_for_resource | select | resource_arn, region | Lists tags for AWS TNB resources. | |
tag_resource | update | resource_arn, region, tags | Tags an AWS TNB resource. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key and an optional value. You can use tags to search and filter your resources or track your Amazon Web Services costs. | |
untag_resource | update | resource_arn, tagKeys, region | Untags an AWS TNB resource. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key and an optional value. You can use tags to search and filter your resources or track your Amazon Web Services costs. |
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 | Resource ARN. |
tagKeys | array | Tag keys. |
SELECT examples
- list_tags_for_resource
Lists tags for AWS TNB resources.
SELECT
tags
FROM aws.tnb.tags
WHERE resource_arn = '{{ resource_arn }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- tag_resource
- untag_resource
Tags an AWS TNB resource. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key and an optional value. You can use tags to search and filter your resources or track your Amazon Web Services costs.
UPDATE aws.tnb.tags
SET
tags = '{{ tags }}'
WHERE
resource_arn = '{{ resource_arn }}' --required
AND region = '{{ region }}' --required
AND tags = '{{ tags }}' --required;
Untags an AWS TNB resource. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key and an optional value. You can use tags to search and filter your resources or track your Amazon Web Services costs.
UPDATE aws.tnb.tags
SET
-- No updatable properties
WHERE
resource_arn = '{{ resource_arn }}' --required
AND tagKeys = '{{ tagKeys }}' --required
AND region = '{{ region }}' --required;