tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.lex_models.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
tags | array | The tags associated with a resource. |
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 a list of tags associated with the specified resource. Only bots, bot aliases, and bot channels can have tags associated with them. | |
tag_resource | update | resource_arn, region, tags | Adds the specified tags to the specified resource. If a tag key already exists, the existing value is replaced with the new value. | |
untag_resource | update | resource_arn, tagKeys, region | Removes tags from a bot, bot alias or bot channel. |
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 Amazon Resource Name (ARN) of the resource to remove the tags from. |
tagKeys | array | A list of tag keys to remove from the resource. If a tag key does not exist on the resource, it is ignored. |
SELECT examples
- list_tags_for_resource
Gets a list of tags associated with the specified resource. Only bots, bot aliases, and bot channels can have tags associated with them.
SELECT
tags
FROM aws.lex_models.tags
WHERE resource_arn = '{{ resource_arn }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- tag_resource
- untag_resource
Adds the specified tags to the specified resource. If a tag key already exists, the existing value is replaced with the new value.
UPDATE aws.lex_models.tags
SET
tags = '{{ tags }}'
WHERE
resource_arn = '{{ resource_arn }}' --required
AND region = '{{ region }}' --required
AND tags = '{{ tags }}' --required;
Removes tags from a bot, bot alias or bot channel.
UPDATE aws.lex_models.tags
SET
-- No updatable properties
WHERE
resource_arn = '{{ resource_arn }}' --required
AND tagKeys = '{{ tagKeys }}' --required
AND region = '{{ region }}' --required;