tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.proton.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
key | string | The key of the resource tag. |
value | string | The value of the resource tag. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_tags_for_resource | select | region | List tags for a resource. For more information, see Proton resources and tagging in the Proton User Guide. | |
tag_resource | update | region, resourceArn, tags | Tag a resource. A tag is a key-value pair of metadata that you associate with an Proton resource. For more information, see Proton resources and tagging in the Proton User Guide. | |
untag_resource | update | region, resourceArn, tagKeys | Remove a customer tag from a resource. A tag is a key-value pair of metadata associated with an Proton resource. For more information, see Proton resources and tagging in the Proton User Guide. |
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) |
SELECT examples
- list_tags_for_resource
List tags for a resource. For more information, see Proton resources and tagging in the Proton User Guide.
SELECT
key,
value
FROM aws.proton.tags
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- tag_resource
- untag_resource
Tag a resource. A tag is a key-value pair of metadata that you associate with an Proton resource. For more information, see Proton resources and tagging in the Proton User Guide.
UPDATE aws.proton.tags
SET
resourceArn = '{{ resourceArn }}',
tags = '{{ tags }}'
WHERE
region = '{{ region }}' --required
AND resourceArn = '{{ resourceArn }}' --required
AND tags = '{{ tags }}' --required;
Remove a customer tag from a resource. A tag is a key-value pair of metadata associated with an Proton resource. For more information, see Proton resources and tagging in the Proton User Guide.
UPDATE aws.proton.tags
SET
resourceArn = '{{ resourceArn }}',
tagKeys = '{{ tagKeys }}'
WHERE
region = '{{ region }}' --required
AND resourceArn = '{{ resourceArn }}' --required
AND tagKeys = '{{ tagKeys }}' --required;