listQueues method
- QueueListBy? listBy,
- int? maxResults,
- String? nextToken,
- Order? order,
Retrieve a JSON array of up to twenty of your queues. This will return the queues themselves, not just a list of them. To retrieve the next twenty queues, use the nextToken string returned with the array.
May throw BadRequestException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw TooManyRequestsException. May throw ConflictException.
Parameter listBy
:
Optional. When you request a list of queues, you can choose to list them
alphabetically by NAME or chronologically by CREATION_DATE. If you don't
specify, the service will list them by creation date.
Parameter maxResults
:
Optional. Number of queues, up to twenty, that will be returned at one
time.
Parameter nextToken
:
Use this string, provided with the response to a previous request, to
request the next batch of queues.
Parameter order
:
Optional. When you request lists of resources, you can specify whether
they are sorted in ASCENDING or DESCENDING order. Default varies by
resource.
Implementation
Future<ListQueuesResponse> listQueues({
QueueListBy? listBy,
int? maxResults,
String? nextToken,
Order? order,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
20,
);
final $query = <String, List<String>>{
if (listBy != null) 'listBy': [listBy.toValue()],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (order != null) 'order': [order.toValue()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/2017-08-29/queues',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListQueuesResponse.fromJson(response);
}