ListDeadLetterSourceQueuesCommand

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.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { SQSClient, ListDeadLetterSourceQueuesCommand } from "@aws-sdk/client-sqs"; // ES Modules import
// const { SQSClient, ListDeadLetterSourceQueuesCommand } = require("@aws-sdk/client-sqs"); // CommonJS import
const client = new SQSClient(config);
const input = { // ListDeadLetterSourceQueuesRequest
  QueueUrl: "STRING_VALUE", // required
  NextToken: "STRING_VALUE",
  MaxResults: Number("int"),
};
const command = new ListDeadLetterSourceQueuesCommand(input);
const response = await client.send(command);
// { // ListDeadLetterSourceQueuesResult
//   queueUrls: [ // QueueUrlList // required
//     "STRING_VALUE",
//   ],
//   NextToken: "STRING_VALUE",
// };

ListDeadLetterSourceQueuesCommand Input

Parameter
Type
Description
QueueUrl
Required
string | undefined

The URL of a dead-letter queue.

Queue URLs and names are case-sensitive.

MaxResults
number | undefined

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.

NextToken
string | undefined

Pagination token to request the next set of results.

ListDeadLetterSourceQueuesCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
queueUrls
Required
string[] | undefined

A list of source queue URLs that have the RedrivePolicy queue attribute configured with a dead-letter queue.

NextToken
string | undefined

Pagination token to include in the next request. Token value is null if there are no additional results to request, or if you did not set MaxResults in the request.

Throws

Name
Fault
Details
InvalidAddress
client

The specified ID is invalid.

InvalidSecurity
client

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

QueueDoesNotExist
client

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

RequestThrottled
client

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
client

Error code 400. Unsupported operation.

SQSServiceException
Base exception class for all service exceptions from SQS service.