listDataIngestionJobs method

Future<ListDataIngestionJobsResponse> listDataIngestionJobs({
  1. String? datasetName,
  2. int? maxResults,
  3. String? nextToken,
  4. IngestionJobStatus? status,
})

Provides a list of all data ingestion jobs, including dataset name and ARN, S3 location of the input data, status, and so on.

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

Parameter datasetName : The name of the dataset being used for the data ingestion job.

Parameter maxResults : Specifies the maximum number of data ingestion jobs to list.

Parameter nextToken : An opaque pagination token indicating where to continue the listing of data ingestion jobs.

Parameter status : Indicates the status of the data ingestion job.

Implementation

Future<ListDataIngestionJobsResponse> listDataIngestionJobs({
  String? datasetName,
  int? maxResults,
  String? nextToken,
  IngestionJobStatus? status,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    500,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AWSLookoutEquipmentFrontendService.ListDataIngestionJobs'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (datasetName != null) 'DatasetName': datasetName,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (status != null) 'Status': status.value,
    },
  );

  return ListDataIngestionJobsResponse.fromJson(jsonResponse.body);
}