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 InternalServiceException. May throw InvalidArnException. May throw RetryableConflictException. May throw ValidationException. May throw LimitExceededException. May throw AccessDeniedException. May throw DirectoryNotEnabledException. May throw BatchWriteException.

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 {
  ArgumentError.checkNotNull(directoryArn, 'directoryArn');
  ArgumentError.checkNotNull(operations, 'operations');
  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);
}