deleteModel method

Future<void> deleteModel({
  1. required String modelName,
})

Deletes a model. The DeleteModel API deletes only the model entry that was created in Amazon SageMaker when you called the CreateModel API. It does not delete model artifacts, inference code, or the IAM role that you specified when creating the model.

Parameter modelName : The name of the model to delete.

Implementation

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