Skip to content

SQS  >  Operations  >  change_message_visibility_batch

change_message_visibility_batch

Operation

change_message_visibility_batch async

change_message_visibility_batch(input: ChangeMessageVisibilityBatchInput, plugins: list[Plugin] | None = None) -> ChangeMessageVisibilityBatchOutput

Changes the visibility timeout of multiple messages. This is a batch version of ``ChangeMessageVisibility``. The result of the action on each message is reported individually in the response. You can send up to 10 ``ChangeMessageVisibility`` requests with each ChangeMessageVisibilityBatch action.

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 ChangeMessageVisibilityBatchInput

An instance of ChangeMessageVisibilityBatchInput.

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
ChangeMessageVisibilityBatchOutput

An instance of ChangeMessageVisibilityBatchOutput.

Input

ChangeMessageVisibilityBatchInput dataclass

Attributes

entries class-attribute instance-attribute

Lists the receipt handles of the messages for which the visibility timeout must be changed.

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

The URL of the Amazon SQS queue whose messages' visibility is changed.

Queue URLs and names are case-sensitive.

Output

ChangeMessageVisibilityBatchOutput dataclass

For each message in the batch, the response contains a ``ChangeMessageVisibilityBatchResultEntry`` tag if the message succeeds or a ``BatchResultErrorEntry`` tag if the message fails.

Attributes

failed instance-attribute

A list of ``BatchResultErrorEntry`` items.

successful instance-attribute

A list of ``ChangeMessageVisibilityBatchResultEntry`` items.