stopTargetedSentimentDetectionJob method
Future<StopTargetedSentimentDetectionJobResponse>
stopTargetedSentimentDetectionJob({
- required String jobId,
Stops a targeted sentiment detection job in progress.
If the job state is IN_PROGRESS, the job is marked for
termination and put into the STOP_REQUESTED state. If the job
completes before it can be stopped, it is put into the
COMPLETED state; otherwise the job is be stopped and put into
the STOPPED state.
If the job is in the COMPLETED or FAILED state
when you call the StopDominantLanguageDetectionJob operation,
the operation returns a 400 Internal Request Exception.
When a job is stopped, any documents already processed are written to the output location.
May throw InternalServerException.
May throw InvalidRequestException.
May throw JobNotFoundException.
Parameter jobId :
The identifier of the targeted sentiment detection job to stop.
Implementation
Future<StopTargetedSentimentDetectionJobResponse>
stopTargetedSentimentDetectionJob({
required String jobId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Comprehend_20171127.StopTargetedSentimentDetectionJob'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'JobId': jobId,
},
);
return StopTargetedSentimentDetectionJobResponse.fromJson(
jsonResponse.body);
}