Skip to main content

tags

Creates, updates, deletes, gets or lists a tags resource.

Overview

Nametags
TypeResource
Idaws.pinpoint.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
tagsobjectA 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:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectresource-arn, regionRetrieves all the tags (keys and values) that are associated with an application, campaign, message template, or segment.
tag_resourceupdateresource-arn, region, TagsModelAdds one or more tags (keys and values) to an application, campaign, message template, or segment.
untag_resourceupdateresource-arn, tagKeys, regionRemoves 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
resource-arnstringThe Amazon Resource Name (ARN) of the resource.
tagKeysarrayThe 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

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

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;