getBatchImportJobs method

Future<GetBatchImportJobsResult> getBatchImportJobs({
  1. String? jobId,
  2. int? maxResults,
  3. String? nextToken,
})

Gets all batch import jobs or a specific job of the specified ID. This is a paginated API. If you provide a null maxResults, this action retrieves a maximum of 50 records per page. If you provide a maxResults, the value must be between 1 and 50. To get the next page results, provide the pagination token from the GetBatchImportJobsResponse as part of your request. A null pagination token fetches the records from the beginning.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter jobId : The ID of the batch import job to get.

Parameter maxResults : The maximum number of objects to return for request.

Parameter nextToken : The next token from the previous request.

Implementation

Future<GetBatchImportJobsResult> getBatchImportJobs({
  String? jobId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSHawksNestServiceFacade.GetBatchImportJobs'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (jobId != null) 'jobId': jobId,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return GetBatchImportJobsResult.fromJson(jsonResponse.body);
}