listIngestionJobs method
Lists the data ingestion jobs for a data source. The list also includes information about each job.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter dataSourceId :
The unique identifier of the data source for the list of data ingestion
jobs.
Parameter knowledgeBaseId :
The unique identifier of the knowledge base for the list of data ingestion
jobs.
Parameter filters :
Contains information about the filters for filtering the data.
Parameter maxResults :
The maximum number of results to return in the response. If the total
number of results is greater than this value, use the token returned in
the response in the nextToken field when making another
request to return the next batch of results.
Parameter nextToken :
If the total number of results is greater than the maxResults
value provided in the request, enter the token returned in the
nextToken field in the response in this field to return the
next batch of results.
Parameter sortBy :
Contains details about how to sort the data.
Implementation
Future<ListIngestionJobsResponse> listIngestionJobs({
required String dataSourceId,
required String knowledgeBaseId,
List<IngestionJobFilter>? filters,
int? maxResults,
String? nextToken,
IngestionJobSortBy? sortBy,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $payload = <String, dynamic>{
if (filters != null) 'filters': filters,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (sortBy != null) 'sortBy': sortBy,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/knowledgebases/${Uri.encodeComponent(knowledgeBaseId)}/datasources/${Uri.encodeComponent(dataSourceId)}/ingestionjobs/',
exceptionFnMap: _exceptionFns,
);
return ListIngestionJobsResponse.fromJson(response);
}