deleteMLModel method

Future<DeleteMLModelOutput> deleteMLModel({
  1. required String mLModelId,
})

Assigns the DELETED status to an MLModel, rendering it unusable.

After using the DeleteMLModel operation, you can use the GetMLModel operation to verify that the status of the MLModel changed to DELETED.

Caution: The result of the DeleteMLModel operation is irreversible.

May throw InvalidInputException. May throw ResourceNotFoundException. May throw InternalServerException.

Parameter mLModelId : A user-supplied ID that uniquely identifies the MLModel.

Implementation

Future<DeleteMLModelOutput> deleteMLModel({
  required String mLModelId,
}) async {
  ArgumentError.checkNotNull(mLModelId, 'mLModelId');
  _s.validateStringLength(
    'mLModelId',
    mLModelId,
    1,
    64,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonML_20141212.DeleteMLModel'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'MLModelId': mLModelId,
    },
  );

  return DeleteMLModelOutput.fromJson(jsonResponse.body);
}