stopIngestionJob method

Future<StopIngestionJobResponse> stopIngestionJob({
  1. required String dataSourceId,
  2. required String ingestionJobId,
  3. required String knowledgeBaseId,
})

Stops a currently running data ingestion job. You can send a StartIngestionJob request again to ingest the rest of your data when you are ready.

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

Parameter dataSourceId : The unique identifier of the data source for the data ingestion job you want to stop.

Parameter ingestionJobId : The unique identifier of the data ingestion job you want to stop.

Parameter knowledgeBaseId : The unique identifier of the knowledge base for the data ingestion job you want to stop.

Implementation

Future<StopIngestionJobResponse> stopIngestionJob({
  required String dataSourceId,
  required String ingestionJobId,
  required String knowledgeBaseId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'POST',
    requestUri:
        '/knowledgebases/${Uri.encodeComponent(knowledgeBaseId)}/datasources/${Uri.encodeComponent(dataSourceId)}/ingestionjobs/${Uri.encodeComponent(ingestionJobId)}/stop',
    exceptionFnMap: _exceptionFns,
  );
  return StopIngestionJobResponse.fromJson(response);
}