tag_resource

SNS.Client.tag_resource(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    ResourceArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The ARN of the topic to which to add tags.

  • Tags (list) --

    [REQUIRED]

    The tags to be added to the specified topic. A tag consists of a required key and an optional value.

    • (dict) --

      The list of tags to be added to the specified topic.

      • Key (string) -- [REQUIRED]

        The required key portion of the tag.

      • Value (string) -- [REQUIRED]

        The optional value portion of the tag.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • SNS.Client.exceptions.ResourceNotFoundException
  • SNS.Client.exceptions.TagLimitExceededException
  • SNS.Client.exceptions.StaleTagException
  • SNS.Client.exceptions.TagPolicyException
  • SNS.Client.exceptions.InvalidParameterException
  • SNS.Client.exceptions.AuthorizationErrorException
  • SNS.Client.exceptions.ConcurrentAccessException