deleteTrainingJob method

Future<void> deleteTrainingJob({
  1. required String trainingJobName,
})

Deletes a training job. After SageMaker deletes a training job, all of the metadata for the training job is lost. You can delete only training jobs that are in a terminal state (Stopped, Failed, or Completed) and don't retain an Available managed warm pool. You cannot delete a job that is in the InProgress or Stopping state. After deleting the job, you can reuse its name to create another training job.

May throw ResourceInUse. May throw ResourceNotFound.

Parameter trainingJobName : The name of the training job to delete.

Implementation

Future<void> deleteTrainingJob({
  required String trainingJobName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.DeleteTrainingJob'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'TrainingJobName': trainingJobName,
    },
  );
}