Skip to content

list_dead_letter_source_queues async

list_dead_letter_source_queues(
    queue_url: String,
    *,
    config_overrides: Optional[AsyncSQSClientConfig] = None,
    next_token: Optional[Token] = None,
    max_results: Optional[BoxedInteger] = None,
) -> ListDeadLetterSourceQueuesResult

Returns a list of your queues that have the RedrivePolicy queue attribute configured with a dead-letter queue.

The ListDeadLetterSourceQueues methods supports pagination. Set parameter MaxResults in the request to specify the maximum number of results to be returned in the response. If you do not set MaxResults, the response includes a maximum of 1,000 results. If you set MaxResults and there are additional results to display, the response includes a value for NextToken. Use NextToken as a parameter in your next request to ListDeadLetterSourceQueues to receive the next page of results.

For more information about using dead-letter queues, see Using Amazon SQS Dead-Letter Queues in the Amazon SQS Developer Guide.

Parameters:

  • queue_url (String) –

    The URL of a dead-letter queue.

    Queue URLs and names are case-sensitive.

  • next_token (Optional[Token], default: None ) –

    Pagination token to request the next set of results.

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

    Maximum number of results to include in the response. Value range is 1 to 1000. You must set MaxResults to receive a value for NextToken in the response.

Raises:

  • InvalidAddress –

    The specified ID is invalid.

  • InvalidSecurity –

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

  • QueueDoesNotExist –

    Ensure that the QueueUrl is correct and that the queue has not been deleted.

  • 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.

  • 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_dead_letter_source_queues(
    self,
    queue_url: "capo_sqs.types.string.String",
    *,
    config_overrides: Optional[AsyncSQSClientConfig] = None,
    next_token: Optional["capo_sqs.types.token.Token"] = None,
    max_results: Optional["capo_sqs.types.boxed_integer.BoxedInteger"] = None,
) -> "capo_sqs.types.list_dead_letter_source_queues_result.ListDeadLetterSourceQueuesResult":
    """<p>Returns a list of your queues that have the <code>RedrivePolicy</code> queue attribute configured with a dead-letter queue.</p> <p> The <code>ListDeadLetterSourceQueues</code> methods supports pagination. Set parameter <code>MaxResults</code> in the request to specify the maximum number of results to be returned in the response. If you do not set <code>MaxResults</code>, the response includes a maximum of 1,000 results. If you set <code>MaxResults</code> and there are additional results to display, the response includes a value for <code>NextToken</code>. Use <code>NextToken</code> as a parameter in your next request to <code>ListDeadLetterSourceQueues</code> to receive the next page of results. </p> <p>For more information about using dead-letter queues, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html">Using Amazon SQS Dead-Letter Queues</a> in the <i>Amazon SQS Developer Guide</i>.</p>

    Args:
        queue_url: <p>The URL of a dead-letter queue.</p> <p>Queue URLs and names are case-sensitive.</p>
        next_token: <p>Pagination token to request the next set of results.</p>
        max_results: <p>Maximum number of results to include in the response. Value range is 1 to 1000. You must set <code>MaxResults</code> to receive a value for <code>NextToken</code> in the response.</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.queue_does_not_exist.QueueDoesNotExist: <p>Ensure that the <code>QueueUrl</code> is correct and that the queue has not been deleted.</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.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_dead_letter_source_queues_request.ListDeadLetterSourceQueuesRequest]",
    ) -> AsyncOperationResponse[
        "capo_sqs.types.list_dead_letter_source_queues_result.ListDeadLetterSourceQueuesResult"
    ]:
        import capo_sqs._operations.amazon_sqs.list_dead_letter_source_queues

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDeadLetterSourceQueues")
    )
    input_: capo_sqs.types.list_dead_letter_source_queues_request.ListDeadLetterSourceQueuesRequest = {
        "queue_url": queue_url
    }
    if next_token is not None:
        input_["next_token"] = next_token
    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