Skip to content

DeleteEvent

Source: src/AWS/FraudDetector/DeleteEvent.ts

Delete a stored event from Amazon Fraud Detector — the effectful erasure call made from a deployed Lambda or Task, e.g. to honor a data-deletion request. Set deleteAuditHistory to also remove the event’s prediction history.

Provide the DeleteEventHttp implementation layer on the Function effect, bind the event type in the init phase, then call the returned client at runtime. The binding grants frauddetector:DeleteEvent on the event type and injects its eventTypeName automatically.

// init
const deleteEvent = yield* FraudDetector.DeleteEvent(eventType);
return {
fetch: Effect.gen(function* () {
// runtime
yield* deleteEvent({ eventId: "order-123", deleteAuditHistory: true });
return HttpServerResponse.json({ ok: true });
}),
};
// on the Function effect:
// .pipe(Effect.provide(FraudDetector.DeleteEventHttp))