stopTrainingEntityRecognizer method
Stops an entity recognizer 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 putted
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 entityRecognizerArn
:
The Amazon Resource Name (ARN) that identifies the entity recognizer
currently being trained.
Implementation
Future<void> stopTrainingEntityRecognizer({
required String entityRecognizerArn,
}) async {
ArgumentError.checkNotNull(entityRecognizerArn, 'entityRecognizerArn');
_s.validateStringLength(
'entityRecognizerArn',
entityRecognizerArn,
0,
256,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Comprehend_20171127.StopTrainingEntityRecognizer'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'EntityRecognizerArn': entityRecognizerArn,
},
);
}