batchWrite method

Future<BatchWriteResponse> batchWrite({
  1. required String directoryArn,
  2. required List<BatchWriteOperation> operations,
})

Performs all the write operations in a batch. Either all the operations succeed or none.

May throw AccessDeniedException. May throw BatchWriteException. May throw DirectoryNotEnabledException. May throw InternalServiceException. May throw InvalidArnException. May throw LimitExceededException. May throw RetryableConflictException. May throw ValidationException.

Parameter directoryArn : The Amazon Resource Name (ARN) that is associated with the Directory. For more information, see arns.

Parameter operations : A list of operations that are part of the batch.

Implementation

Future<BatchWriteResponse> batchWrite({
  required String directoryArn,
  required List<BatchWriteOperation> operations,
}) async {
  final headers = <String, String>{
    'x-amz-data-partition': directoryArn.toString(),
  };
  final $payload = <String, dynamic>{
    'Operations': operations,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/amazonclouddirectory/2017-01-11/batchwrite',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return BatchWriteResponse.fromJson(response);
}