deleteExperiment method

Future<DeleteExperimentResponse> deleteExperiment({
  1. required String experimentName,
})

Deletes an Amazon SageMaker experiment. All trials associated with the experiment must be deleted first. Use the ListTrials API to get a list of the trials associated with the experiment.

May throw ResourceNotFound.

Parameter experimentName : The name of the experiment to delete.

Implementation

Future<DeleteExperimentResponse> deleteExperiment({
  required String experimentName,
}) async {
  ArgumentError.checkNotNull(experimentName, 'experimentName');
  _s.validateStringLength(
    'experimentName',
    experimentName,
    1,
    120,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.DeleteExperiment'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ExperimentName': experimentName,
    },
  );

  return DeleteExperimentResponse.fromJson(jsonResponse.body);
}