Skip to content

tag_resource

Operation

tag_resource

tag_resource(request: TagResourceInput | TagResourceInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[TagResourceInputDict]) -> TagResourceOutput

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.

Parameters:

Name Type Description Default
request TagResourceInput | TagResourceInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[TagResourceInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
TagResourceOutput

An instance of TagResourceOutput.

tag_resource async

tag_resource(request: TagResourceInput | TagResourceInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[TagResourceInputDict]) -> TagResourceOutput

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.

Parameters:

Name Type Description Default
request TagResourceInput | TagResourceInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[TagResourceInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
TagResourceOutput

An instance of TagResourceOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

TagResourceInputDict

Bases: TypedDict

Dictionary form of TagResourceInput.

Attributes

resource_arn instance-attribute
resource_arn: Required[str]

The ARN of the topic to which to add tags.

tags instance-attribute

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

TagResourceInput dataclass

Bases: _SerdeShape

Dataclass for TagResourceInput structure.

Attributes

resource_arn class-attribute instance-attribute
resource_arn: str | None = ...

The ARN of the topic to which to add tags.

tags class-attribute instance-attribute
tags: list[Tag] | None = ...

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

Output

TagResourceOutput dataclass

Bases: _SerdeShape

Dataclass for TagResourceOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.