tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.pinpoint.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
tags | object | A string-to-string map of key-value pairs that defines the tags for an application, campaign, message template, or segment. Each of these resources can have a maximum of 50 tags. Each tag consists of a required tag key and an associated tag value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters. |
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 | Retrieves all the tags (keys and values) that are associated with an application, campaign, message template, or segment. | |
tag_resource | update | resource-arn, region, TagsModel | Adds one or more tags (keys and values) to an application, campaign, message template, or segment. | |
untag_resource | update | resource-arn, tagKeys, region | Removes one or more tags (keys and values) from an application, campaign, message template, or segment. |
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. |
tagKeys | array | The key of the tag to remove from the resource. To remove multiple tags, append the tagKeys parameter and argument for each additional tag to remove, separated by an ampersand (&). |
SELECT examples
- list_tags_for_resource
Retrieves all the tags (keys and values) that are associated with an application, campaign, message template, or segment.
SELECT
tags
FROM aws.pinpoint.tags
WHERE `resource-arn` = '{{ resource-arn }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- tag_resource
- untag_resource
Adds one or more tags (keys and values) to an application, campaign, message template, or segment.
UPDATE aws.pinpoint.tags
SET
TagsModel = '{{ TagsModel }}'
WHERE
`resource-arn` = '{{ resource-arn }}' --required
AND region = '{{ region }}' --required
AND TagsModel = '{{ TagsModel }}' --required;
Removes one or more tags (keys and values) from an application, campaign, message template, or segment.
UPDATE aws.pinpoint.tags
SET
-- No updatable properties
WHERE
`resource-arn` = '{{ resource-arn }}' --required
AND tagKeys = '{{ tagKeys }}' --required
AND region = '{{ region }}' --required;