deleteEvent method
Deletes the specified event.
When you delete an event, Amazon Fraud Detector permanently deletes that event from the evaluation history, and the event data is no longer stored in Amazon Fraud Detector.
May throw InternalServerException. May throw ThrottlingException. May throw AccessDeniedException. May throw ValidationException.
Parameter eventId
:
The ID of the event to delete.
Parameter eventTypeName
:
The name of the event type.
Implementation
Future<void> deleteEvent({
required String eventId,
required String eventTypeName,
}) async {
ArgumentError.checkNotNull(eventId, 'eventId');
_s.validateStringLength(
'eventId',
eventId,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(eventTypeName, 'eventTypeName');
_s.validateStringLength(
'eventTypeName',
eventTypeName,
1,
64,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSHawksNestServiceFacade.DeleteEvent'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'eventId': eventId,
'eventTypeName': eventTypeName,
},
);
}