tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.pinpoint_sms_voice_v2.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
resource_arn | string | The ARN of the resource. (pattern: <code>arn:[A-Za-z0-9_:/-]+</code>) |
tags | array | An array of key and value pair tags that are associated with the resource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_tags_for_resource | select | region | List all tags associated with a resource. | |
untag_resource | update | region, ResourceArn, TagKeys | Removes the association of the specified tags from a resource. For more information on tags see Tags in the End User Messaging SMS User Guide. | |
tag_resource | update | region, ResourceArn | Adds or overwrites only the specified tags for the specified resource. When you specify an existing tag key, the value is overwritten with the new value. Each tag consists of a key and an optional value. Tag keys must be unique per resource. For more information about tags, see Tags in the End User Messaging SMS 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 all tags associated with a resource.
SELECT
resource_arn,
tags
FROM aws.pinpoint_sms_voice_v2.tags
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- untag_resource
- tag_resource
Removes the association of the specified tags from a resource. For more information on tags see Tags in the End User Messaging SMS User Guide.
UPDATE aws.pinpoint_sms_voice_v2.tags
SET
ResourceArn = '{{ ResourceArn }}',
TagKeys = '{{ TagKeys }}'
WHERE
region = '{{ region }}' --required
AND ResourceArn = '{{ ResourceArn }}' --required
AND TagKeys = '{{ TagKeys }}' --required;
Adds or overwrites only the specified tags for the specified resource. When you specify an existing tag key, the value is overwritten with the new value. Each tag consists of a key and an optional value. Tag keys must be unique per resource. For more information about tags, see Tags in the End User Messaging SMS User Guide.
UPDATE aws.pinpoint_sms_voice_v2.tags
SET
ResourceArn = '{{ ResourceArn }}',
Tags = '{{ Tags }}'
WHERE
region = '{{ region }}' --required
AND ResourceArn = '{{ ResourceArn }}' --required;