stopJob method
Stops a running job. When you call StopJob, Amazon SageMaker
sets the job status to Stopping. After the job stops, the
status changes to Stopped. Partial results may be available
in the output location if the job was in progress. To delete a stopped
job, call DeleteJob.
The following operations are related to StopJob:
-
CreateJob -
DescribeJob -
DeleteJob
May throw ResourceNotFound.
Parameter jobCategory :
The category of the job to stop.
Parameter jobName :
The name of the job to stop.
Implementation
Future<void> stopJob({
required JobCategory jobCategory,
required String jobName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.StopJob'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'JobCategory': jobCategory.value,
'JobName': jobName,
},
);
}