deleteDetectorVersion method
Deletes the detector version. You cannot delete detector versions that are
in ACTIVE
status.
When you delete a detector version, Amazon Fraud Detector permanently deletes the detector and the data is no longer stored in Amazon Fraud Detector.
May throw ValidationException. May throw ResourceNotFoundException. May throw InternalServerException. May throw ThrottlingException. May throw ConflictException. May throw AccessDeniedException.
Parameter detectorId
:
The ID of the parent detector for the detector version to delete.
Parameter detectorVersionId
:
The ID of the detector version to delete.
Implementation
Future<void> deleteDetectorVersion({
required String detectorId,
required String detectorVersionId,
}) async {
ArgumentError.checkNotNull(detectorId, 'detectorId');
_s.validateStringLength(
'detectorId',
detectorId,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(detectorVersionId, 'detectorVersionId');
_s.validateStringLength(
'detectorVersionId',
detectorVersionId,
1,
5,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSHawksNestServiceFacade.DeleteDetectorVersion'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'detectorId': detectorId,
'detectorVersionId': detectorVersionId,
},
);
}