Skip to content

SQS  >  Operations  >  delete_message_batch

delete_message_batch

Operation

delete_message_batch async

delete_message_batch(input: DeleteMessageBatchInput, plugins: list[Plugin] | None = None) -> DeleteMessageBatchOutput

Deletes up to ten messages from the specified queue. This is a batch version of ``DeleteMessage``. The result of the action on each message is reported individually in the response.

Warning

Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

Parameters:

Name Type Description Default
input DeleteMessageBatchInput

An instance of DeleteMessageBatchInput.

required
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

Returns:

Type Description
DeleteMessageBatchOutput

An instance of DeleteMessageBatchOutput.

Input

DeleteMessageBatchInput dataclass

Attributes

entries class-attribute instance-attribute
entries: list[DeleteMessageBatchRequestEntry] | None = None

Lists the receipt handles for the messages to be deleted.

queue_url class-attribute instance-attribute
queue_url: str | None = None

The URL of the Amazon SQS queue from which messages are deleted.

Queue URLs and names are case-sensitive.

Output

DeleteMessageBatchOutput dataclass

For each message in the batch, the response contains a ``DeleteMessageBatchResultEntry`` tag if the message is deleted or a ``BatchResultErrorEntry`` tag if the message can't be deleted.

Attributes

failed instance-attribute

A list of ``BatchResultErrorEntry`` items.

successful instance-attribute

A list of ``DeleteMessageBatchResultEntry`` items.