deleteModelVersion method
Future<void>
deleteModelVersion({
- required String modelId,
- required ModelTypeEnum modelType,
- 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 from the evaluation history, and the data is no longer stored in Amazon Fraud Detector.
May throw ValidationException. May throw InternalServerException. May throw AccessDeniedException. May throw ConflictException.
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 {
ArgumentError.checkNotNull(modelId, 'modelId');
_s.validateStringLength(
'modelId',
modelId,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(modelType, 'modelType');
ArgumentError.checkNotNull(modelVersionNumber, 'modelVersionNumber');
_s.validateStringLength(
'modelVersionNumber',
modelVersionNumber,
3,
7,
isRequired: true,
);
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.toValue(),
'modelVersionNumber': modelVersionNumber,
},
);
}