stopCompilationJob method

Future<void> stopCompilationJob({
  1. required String compilationJobName,
})

Stops a model compilation job.

To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal. This gracefully shuts the job down. If the job hasn't stopped, it sends the SIGKILL signal.

When it receives a StopCompilationJob request, Amazon SageMaker changes the CompilationJobSummary$CompilationJobStatus of the job to Stopping. After Amazon SageMaker stops the job, it sets the CompilationJobSummary$CompilationJobStatus to Stopped.

May throw ResourceNotFound.

Parameter compilationJobName : The name of the model compilation job to stop.

Implementation

Future<void> stopCompilationJob({
  required String compilationJobName,
}) async {
  ArgumentError.checkNotNull(compilationJobName, 'compilationJobName');
  _s.validateStringLength(
    'compilationJobName',
    compilationJobName,
    1,
    63,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.StopCompilationJob'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'CompilationJobName': compilationJobName,
    },
  );
}