Tags
A tag is a label that you optionally define and associate with an application, campaign, message template, or segment in Amazon Pinpoint. Tags can help you categorize and manage these types of resources in different ways, such as by purpose, owner, environment, or other criteria. A resource can have as many as 50 tags.
Each tag consists of a required tag key and an associated
tag value, both of which you define. A tag key is a
general label that acts as a category for more specific tag values. A tag value
acts as a descriptor within a tag key. For example, if you have two versions of
an Amazon Pinpoint application, one for internal testing and another for
external use, you might assign a Stack
tag key to both
applications. The value of the key might be Test
for one version of
the application and Production
for the other version. For more
information about tags, see Tagging Amazon
Pinpoint Resources in the Amazon Pinpoint Developer
Guide.
You can use the Tags resource to add, retrieve, or remove tags from an application, campaign, message template, or segment.
URI
/v1/tags/
resource-arn
HTTP methods
GET
Operation ID: ListTagsForResource
Retrieves all the tags (keys and values) that are associated with an application, campaign, message template, or segment.
Name | Type | Required | Description |
---|---|---|---|
resource-arn | String | True | The Amazon Resource Name (ARN) of the resource. |
Status code | Response model | Description |
---|---|---|
200 | tagsModel | The request succeeded. |
POST
Operation ID: TagResource
Adds one or more tags (keys and values) to an application, campaign, message template, or segment.
Name | Type | Required | Description |
---|---|---|---|
resource-arn | String | True | The Amazon Resource Name (ARN) of the resource. |
Status code | Response model | Description |
---|---|---|
204 | None | The request succeeded and there's no additional content to send in the body of the response (No Content). |
DELETE
Operation ID: UntagResource
Removes one or more tags (keys and values) from an application, campaign, message template, or segment.
Name | Type | Required | Description |
---|---|---|---|
resource-arn | String | True | The Amazon Resource Name (ARN) of the resource. |
Name | Type | Required | Description |
---|---|---|---|
tagKeys | String | True | The key of the tag to remove from the resource. To remove multiple tags,
append the |
Status code | Response model | Description |
---|---|---|
204 | None | The request succeeded and there's no additional content to send in the body of the response (No Content). |
Schemas
Request bodies
{ "tags": { } }
Response bodies
{ "tags": { } }
Properties
tagsModel
Specifies the tags (keys and values) for an application, campaign, message template, or segment.
Property | Type | Required | Description |
---|---|---|---|
tags | object | True | 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. |
See also
For more information about using this API in one of the language-specific AWS SDKs and references, see the following: