batchGetTask method

Future<BatchGetTaskResponse> batchGetTask({
  1. required List<BatchGetTaskIdentifier> identifiers,
})

Retrieves multiple tasks in a single request. This is a batch version of the GetTask API.

The result of getting each task is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

May throw AccessDeniedException. May throw InternalServerErrorException. May throw ThrottlingException. May throw ValidationException.

Parameter identifiers : The list of task identifiers to retrieve. You can specify up to 100 identifiers per request.

Implementation

Future<BatchGetTaskResponse> batchGetTask({
  required List<BatchGetTaskIdentifier> identifiers,
}) async {
  final $payload = <String, dynamic>{
    'identifiers': identifiers,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/2023-10-12/batch-get-task',
    exceptionFnMap: _exceptionFns,
  );
  return BatchGetTaskResponse.fromJson(response);
}