Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.sns.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
keystringThe required key portion of the tag.
valuestringThe optional value portion of the tag.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectResourceArn, regionList all tags added to the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon Simple Notification Service Developer Guide.
tag_resourceupdateResourceArn, Tags, regionAdd tags to the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon SNS Developer Guide. When you use topic tags, keep the following guidelines in mind: Adding more than 50 tags to a topic isn't recommended. Tags don't have any semantic meaning. Amazon SNS interprets tags as character strings. Tags are case-sensitive. A new tag with a key identical to that of an existing tag overwrites the existing tag. Tagging actions are limited to 10 TPS per Amazon Web Services account, per Amazon Web Services Region. If your application requires a higher throughput, file a technical support request.
untag_resourceupdateResourceArn, TagKeys, regionRemove tags from the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon SNS Developer 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.

NameDatatypeDescription
ResourceArnstringThe ARN of the topic from which to remove tags.
TagKeysarrayThe list of tag keys to remove from the specified topic.
TagsarrayThe tags to be added to the specified topic. A tag consists of a required key and an optional value.
regionstringAWS region (default: us-east-1)

SELECT examples

List all tags added to the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon Simple Notification Service Developer Guide.

SELECT
key,
value
FROM aws.sns.tags
WHERE ResourceArn = '{{ ResourceArn }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

Add tags to the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon SNS Developer Guide. When you use topic tags, keep the following guidelines in mind: Adding more than 50 tags to a topic isn't recommended. Tags don't have any semantic meaning. Amazon SNS interprets tags as character strings. Tags are case-sensitive. A new tag with a key identical to that of an existing tag overwrites the existing tag. Tagging actions are limited to 10 TPS per Amazon Web Services account, per Amazon Web Services Region. If your application requires a higher throughput, file a technical support request.

UPDATE aws.sns.tags
SET
-- No updatable properties
WHERE
ResourceArn = '{{ ResourceArn }}' --required
AND Tags = '{{ Tags }}' --required
AND region = '{{ region }}' --required;