Skip to content

SNSClient.publish_batch

rboto-sns==0.4.0 · Service index · Types

Model summary (excerpt): Publishes up to 10 messages to the specified topic in a single batch. This is a batch version of the Publish API. If you try to send more than 10 messages in a single batch request, you will receive a TooManyEntriesInBatchRequest exception. For FIFO topics, multiple messages within a single batch are published in the order they are sent, and messages are deduplicated within the batch and...

Install and imports

python -m pip install "rboto[sns]==0.4.0"
from rboto import SNSClient
from collections.abc import Sequence
from rboto_sns.types import (
    PublishBatchOutput,
    PublishBatchRequestEntry,
)

Signature

async def publish_batch(
    *,
    topic_arn: str,
    publish_batch_request_entries: Sequence[PublishBatchRequestEntry],
) -> PublishBatchOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
topic_arn Yes The Amazon resource name (ARN) of the topic you want to batch publish to.
publish_batch_request_entries Yes A list of PublishBatch request entries to be sent to the SNS topic.

Output

PublishBatchOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
successful list[PublishBatchResultEntryOutput] | None Always present PublishBatchResultEntryOutput
failed list[BatchResultErrorEntryOutput] | None Always present BatchResultErrorEntryOutput

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

PublishBatchOutput, PublishBatchRequestEntry

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_sns.exceptions:

AuthorizationError, BatchEntryIdsNotDistinctError, BatchRequestTooLongError, EmptyBatchRequestError, EndpointDisabledError, InternalError, InvalidBatchEntryIdError, InvalidParameterError, InvalidParameterValueError, InvalidSecurityError, KMSAccessDeniedError, KMSDisabledError, KMSInvalidStateError, KMSNotFoundError, KMSOptInRequiredError, KMSThrottlingError, NotFoundError, PlatformApplicationDisabledError, TooManyEntriesInBatchRequestError, ValidationError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model