stopTrainingDocumentClassifier method

Future<void> stopTrainingDocumentClassifier({
  1. required String documentClassifierArn,
})

Stops a document classifier training job while in progress.

If the training job state is TRAINING, the job is marked for termination and put into the STOP_REQUESTED state. If the training job completes before it can be stopped, it is put into the TRAINED; otherwise the training job is stopped and put into the STOPPED state and the service sends back an HTTP 200 response with an empty HTTP body.

May throw InvalidRequestException. May throw TooManyRequestsException. May throw ResourceNotFoundException. May throw InternalServerException.

Parameter documentClassifierArn : The Amazon Resource Name (ARN) that identifies the document classifier currently being trained.

Implementation

Future<void> stopTrainingDocumentClassifier({
  required String documentClassifierArn,
}) async {
  ArgumentError.checkNotNull(documentClassifierArn, 'documentClassifierArn');
  _s.validateStringLength(
    'documentClassifierArn',
    documentClassifierArn,
    0,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Comprehend_20171127.StopTrainingDocumentClassifier'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DocumentClassifierArn': documentClassifierArn,
    },
  );
}