DeleteEventsByEventType
Source:
src/AWS/FraudDetector/DeleteEventsByEventType.ts
Start an asynchronous bulk delete of ALL events stored for a bound Amazon
Fraud Detector event type — the effectful cleanup call (e.g. a data-privacy
purge) made from a deployed Lambda or Task. Track progress with the
companion GetDeleteEventsByEventTypeStatus binding.
Purging Stored Events
Section titled “Purging Stored Events”Provide the DeleteEventsByEventTypeHttp 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:DeleteEventsByEventType on the event type and injects its
eventTypeName automatically.
// initconst deleteEventsByEventType = yield* FraudDetector.DeleteEventsByEventType(eventType);const getDeleteStatus = yield* FraudDetector.GetDeleteEventsByEventTypeStatus(eventType);
return { fetch: Effect.gen(function* () { // runtime yield* deleteEventsByEventType({}); const { eventsDeletionStatus } = yield* getDeleteStatus({}); return HttpServerResponse.json({ status: eventsDeletionStatus }); }),};// on the Function effect:// .pipe(Effect.provide(Layer.mergeAll(// FraudDetector.DeleteEventsByEventTypeHttp,// FraudDetector.GetDeleteEventsByEventTypeStatusHttp,// )))