batchExecuteStatement method
Future<BatchExecuteStatementOutput>
batchExecuteStatement({
- required List<
BatchStatementRequest> statements,
This operation allows you to perform batch reads and writes on data stored in DynamoDB, using PartiQL.
May throw RequestLimitExceeded. May throw InternalServerError.
Parameter statements
:
The list of PartiQL statements representing the batch to run.
Implementation
Future<BatchExecuteStatementOutput> batchExecuteStatement({
required List<BatchStatementRequest> statements,
}) async {
ArgumentError.checkNotNull(statements, 'statements');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'DynamoDB_20120810.BatchExecuteStatement'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Statements': statements,
},
);
return BatchExecuteStatementOutput.fromJson(jsonResponse.body);
}