deleteModelVersion method

Future<void> deleteModelVersion({
  1. required String modelId,
  2. required ModelTypeEnum modelType,
  3. required String modelVersionNumber,
})

Deletes a model version.

You can delete models and model versions in Amazon Fraud Detector, provided that they are not associated with a detector version.

When you delete a model version, Amazon Fraud Detector permanently deletes that model version and the data is no longer stored in Amazon Fraud Detector.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter modelId : The model ID of the model version to delete.

Parameter modelType : The model type of the model version to delete.

Parameter modelVersionNumber : The model version number of the model version to delete.

Implementation

Future<void> deleteModelVersion({
  required String modelId,
  required ModelTypeEnum modelType,
  required String modelVersionNumber,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSHawksNestServiceFacade.DeleteModelVersion'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'modelId': modelId,
      'modelType': modelType.value,
      'modelVersionNumber': modelVersionNumber,
    },
  );
}