Skip to content

list_message_move_tasks async

list_message_move_tasks(
    source_arn: String,
    *,
    config_overrides: Optional[AsyncSQSClientConfig] = None,
    max_results: Optional[NullableInteger] = None,
) -> ListMessageMoveTasksResult

Gets the most recent message movement tasks (up to 10) under a specific source queue.

  • This action is currently limited to supporting message redrive from dead-letter queues (DLQs) only. In this context, the source queue is the dead-letter queue (DLQ), while the destination queue can be the original source queue (from which the messages were driven to the dead-letter-queue), or a custom destination queue.

  • Only one active message movement task is supported per queue at any given time.

Parameters:

  • source_arn (String) –

    The ARN of the queue whose message movement tasks are to be listed.

  • max_results (Optional[NullableInteger], default: None ) –

    The maximum number of results to include in the response. The default is 1, which provides the most recent message movement task. The upper limit is 10.

Raises:

  • InvalidAddress –

    The specified ID is invalid.

  • InvalidSecurity –

    The request was not made over HTTPS or did not use SigV4 for signing.

  • RequestThrottled –

    The request was denied due to request throttling.

    • Exceeds the permitted request rate for the queue or for the recipient of the request.

    • Ensure that the request rate is within the Amazon SQS limits for sending messages. For more information, see Amazon SQS quotas in the Amazon SQS Developer Guide.

  • ResourceNotFoundException –

    One or more specified resources don't exist.

  • UnsupportedOperation –

    Error code 400. Unsupported operation.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_sqs/_services/async_sqs.py
async def list_message_move_tasks(
    self,
    source_arn: "capo_sqs.types.string.String",
    *,
    config_overrides: Optional[AsyncSQSClientConfig] = None,
    max_results: Optional["capo_sqs.types.nullable_integer.NullableInteger"] = None,
) -> "capo_sqs.types.list_message_move_tasks_result.ListMessageMoveTasksResult":
    """<p>Gets the most recent message movement tasks (up to 10) under a specific source queue.</p> <note> <ul> <li> <p>This action is currently limited to supporting message redrive from <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html">dead-letter queues (DLQs)</a> only. In this context, the source queue is the dead-letter queue (DLQ), while the destination queue can be the original source queue (from which the messages were driven to the dead-letter-queue), or a custom destination queue. </p> </li> <li> <p>Only one active message movement task is supported per queue at any given time.</p> </li> </ul> </note>

    Args:
        source_arn: <p>The ARN of the queue whose message movement tasks are to be listed.</p>
        max_results: <p>The maximum number of results to include in the response. The default is 1, which provides the most recent message movement task. The upper limit is 10.</p>

    Raises:
        capo_sqs.errors.invalid_address.InvalidAddress: <p>The specified ID is invalid.</p>
        capo_sqs.errors.invalid_security.InvalidSecurity: <p>The request was not made over HTTPS or did not use SigV4 for signing.</p>
        capo_sqs.errors.request_throttled.RequestThrottled: <p>The request was denied due to request throttling.</p> <ul> <li> <p>Exceeds the permitted request rate for the queue or for the recipient of the request.</p> </li> <li> <p>Ensure that the request rate is within the Amazon SQS limits for sending messages. For more information, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-quotas.html#quotas-requests">Amazon SQS quotas</a> in the <i>Amazon SQS Developer Guide</i>.</p> </li> </ul>
        capo_sqs.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more specified resources don't exist.</p>
        capo_sqs.errors.unsupported_operation.UnsupportedOperation: <p>Error code 400. Unsupported operation.</p>
        capo_sqs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sqs.types.list_message_move_tasks_request.ListMessageMoveTasksRequest]",
    ) -> AsyncOperationResponse[
        "capo_sqs.types.list_message_move_tasks_result.ListMessageMoveTasksResult"
    ]:
        import capo_sqs._operations.amazon_sqs.list_message_move_tasks

        (
            output,
            http_response,
        ) = await capo_sqs._operations.amazon_sqs.list_message_move_tasks.async_list_message_move_tasks(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListMessageMoveTasks")
    )
    input_: capo_sqs.types.list_message_move_tasks_request.ListMessageMoveTasksRequest = {
        "source_arn": source_arn
    }
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output