deleteMessageBatch method
- required List<
DeleteMessageBatchRequestEntry> entries, - required String queueUrl,
Deletes up to ten messages from the specified queue. This is a batch
version of DeleteMessage.
The result of the action on
each message is reported individually in the response.
Some actions take lists of parameters. These lists are specified using the
param.n
notation. Values of n
are integers
starting from 1. For example, a parameter list with two elements looks
like this:
&AttributeName.1=first
&AttributeName.2=second
May throw TooManyEntriesInBatchRequest. May throw EmptyBatchRequest. May throw BatchEntryIdsNotDistinct. May throw InvalidBatchEntryId.
Parameter entries
:
A list of receipt handles for the messages to be deleted.
Parameter queueUrl
:
The URL of the Amazon SQS queue from which messages are deleted.
Queue URLs and names are case-sensitive.
Implementation
Future<DeleteMessageBatchResult> deleteMessageBatch({
required List<DeleteMessageBatchRequestEntry> entries,
required String queueUrl,
}) async {
ArgumentError.checkNotNull(entries, 'entries');
ArgumentError.checkNotNull(queueUrl, 'queueUrl');
final $request = <String, dynamic>{};
$request['Entries'] = entries;
$request['QueueUrl'] = queueUrl;
final $result = await _protocol.send(
$request,
action: 'DeleteMessageBatch',
version: '2012-11-05',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['DeleteMessageBatchRequest'],
shapes: shapes,
resultWrapper: 'DeleteMessageBatchResult',
);
return DeleteMessageBatchResult.fromXml($result);
}