tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.ivschat.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
tags | object | Tags attached to the resource. Array of maps, each of the form string:string (key:value). |
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 | Gets information about AWS tags for the specified ARN. | |
tag_resource | update | resource_arn, region, tags | Adds or updates tags for the AWS resource with the specified ARN. | |
untag_resource | update | resource_arn, tagKeys, region | Removes tags from the resource with the specified ARN. |
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 the resource to be untagged. The ARN must be URL-encoded. |
tagKeys | array | Array of tags to be removed. Array of maps, each of the form string:string (key:value). See Best practices and strategies in Tagging Amazon Web Services Resources and Tag Editor for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no constraints beyond what is documented there. |
SELECT examples
- list_tags_for_resource
Gets information about AWS tags for the specified ARN.
SELECT
tags
FROM aws.ivschat.tags
WHERE resource_arn = '{{ resource_arn }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- tag_resource
- untag_resource
Adds or updates tags for the AWS resource with the specified ARN.
UPDATE aws.ivschat.tags
SET
tags = '{{ tags }}'
WHERE
resource_arn = '{{ resource_arn }}' --required
AND region = '{{ region }}' --required
AND tags = '{{ tags }}' --required;
Removes tags from the resource with the specified ARN.
UPDATE aws.ivschat.tags
SET
-- No updatable properties
WHERE
resource_arn = '{{ resource_arn }}' --required
AND tagKeys = '{{ tagKeys }}' --required
AND region = '{{ region }}' --required;