batchRead method

Future<BatchReadResponse> batchRead({
  1. required String directoryArn,
  2. required List<BatchReadOperation> operations,
  3. ConsistencyLevel? consistencyLevel,
})

Performs all the read operations in a batch.

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

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.

Parameter consistencyLevel : Represents the manner and timing in which the successful write or update of an object is reflected in a subsequent read operation of that same object.

Implementation

Future<BatchReadResponse> batchRead({
  required String directoryArn,
  required List<BatchReadOperation> operations,
  ConsistencyLevel? consistencyLevel,
}) async {
  ArgumentError.checkNotNull(directoryArn, 'directoryArn');
  ArgumentError.checkNotNull(operations, 'operations');
  final headers = <String, String>{
    'x-amz-data-partition': directoryArn.toString(),
    if (consistencyLevel != null)
      'x-amz-consistency-level': consistencyLevel.toValue(),
  };
  final $payload = <String, dynamic>{
    'Operations': operations,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/amazonclouddirectory/2017-01-11/batchread',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return BatchReadResponse.fromJson(response);
}