listBatchLoadTasks method

Future<ListBatchLoadTasksResponse> listBatchLoadTasks({
  1. int? maxResults,
  2. String? nextToken,
  3. BatchLoadStatus? taskStatus,
})

Provides a list of batch load tasks, along with the name, status, when the task is resumable until, and other details. See code sample for details.

May throw AccessDeniedException. May throw InternalServerException. May throw InvalidEndpointException. May throw ThrottlingException. May throw ValidationException.

Parameter maxResults : The total number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.

Parameter nextToken : A token to specify where to start paginating. This is the NextToken from a previously truncated response.

Parameter taskStatus : Status of the batch load task.

Implementation

Future<ListBatchLoadTasksResponse> listBatchLoadTasks({
  int? maxResults,
  String? nextToken,
  BatchLoadStatus? taskStatus,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'Timestream_20181101.ListBatchLoadTasks'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (taskStatus != null) 'TaskStatus': taskStatus.value,
    },
  );

  return ListBatchLoadTasksResponse.fromJson(jsonResponse.body);
}