tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.comprehend.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
resource_arn | string | The Amazon Resource Name (ARN) of the given Amazon Comprehend resource you are querying. (pattern: <code>arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]:[0-9]{12}:[a-zA-Z0-9-]{1,64}/[a-zA-Z0-9](-[a-zA-Z0-9])((/dataset/[a-zA-Z0-9](-[a-zA-Z0-9]))|(/version/[a-zA-Z0-9](-[a-zA-Z0-9])*))?</code>) |
tags | array | Tags associated with the Amazon Comprehend resource being queried. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_tags_for_resource | select | region | Lists all tags associated with a given Amazon Comprehend resource. | |
untag_resource | update | region, ResourceArn, TagKeys | Removes a specific tag associated with an Amazon Comprehend resource. | |
tag_resource | update | region, ResourceArn | Associates a specific tag with an Amazon Comprehend resource. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department. |
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
Lists all tags associated with a given Amazon Comprehend resource.
SELECT
resource_arn,
tags
FROM aws.comprehend.tags
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- untag_resource
- tag_resource
Removes a specific tag associated with an Amazon Comprehend resource.
UPDATE aws.comprehend.tags
SET
ResourceArn = '{{ ResourceArn }}',
TagKeys = '{{ TagKeys }}'
WHERE
region = '{{ region }}' --required
AND ResourceArn = '{{ ResourceArn }}' --required
AND TagKeys = '{{ TagKeys }}' --required;
Associates a specific tag with an Amazon Comprehend resource. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
UPDATE aws.comprehend.tags
SET
ResourceArn = '{{ ResourceArn }}',
Tags = '{{ Tags }}'
WHERE
region = '{{ region }}' --required
AND ResourceArn = '{{ ResourceArn }}' --required;