UpdateList
Source:
src/AWS/FraudDetector/UpdateList.ts
Mutate the elements of a bound Amazon Fraud Detector list at runtime — the effectful write call made from a deployed Lambda or Task, e.g. to append a newly-confirmed fraudulent IP to a deny-list the detector’s rules reference.
Note that the List resource reconciles elements declaratively on every
deploy (a REPLACE update), so elements appended at runtime are removed by
the next deploy unless they are also added to the resource’s props.
Updating List Elements
Section titled “Updating List Elements”Provide the UpdateListHttp implementation layer on the Function effect,
bind the list in the init phase, then call the returned client at runtime.
The binding grants frauddetector:UpdateList on the list and injects its
name automatically.
// initconst updateList = yield* FraudDetector.UpdateList(blockedIps);
return { fetch: Effect.gen(function* () { // runtime yield* updateList({ elements: ["192.0.2.44"], updateMode: "APPEND" }); return HttpServerResponse.json({ ok: true }); }),};// on the Function effect:// .pipe(Effect.provide(FraudDetector.UpdateListHttp))