| 1 | import type * as guardduty from "@distilled.cloud/aws/guardduty"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Detector } from "./Detector.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `guardduty:UpdateFindingsFeedback`. |
| 8 | * |
| 9 | * Marks findings as `USEFUL` or `NOT_USEFUL` to tune GuardDuty's signal quality. |
| 10 | * The detector id is injected from the bound {@link Detector}. |
| 11 | * Provide the implementation with |
| 12 | * `Effect.provide(AWS.GuardDuty.UpdateFindingsFeedbackHttp)`. |
| 13 | * ### Working with Findings |
| 14 | * **Example:** Mark Findings Useful |
| 15 | * ```typescript |
| 16 | * // init |
| 17 | * const updateFindingsFeedback = yield* AWS.GuardDuty.UpdateFindingsFeedback(detector); |
| 18 | * |
| 19 | * // runtime |
| 20 | * yield* updateFindingsFeedback({ |
| 21 | * FindingIds: findingIds, |
| 22 | * Feedback: "USEFUL", |
| 23 | * }); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface UpdateFindingsFeedback extends Binding.Service< |
| 29 | UpdateFindingsFeedback, |
| 30 | "AWS.GuardDuty.UpdateFindingsFeedback", |
| 31 | ( |
| 32 | detector: Detector, |
| 33 | ) => Effect.Effect< |
| 34 | ( |
| 35 | request?: Omit<guardduty.UpdateFindingsFeedbackRequest, "DetectorId">, |
| 36 | ) => Effect.Effect< |
| 37 | guardduty.UpdateFindingsFeedbackResponse, |
| 38 | guardduty.UpdateFindingsFeedbackError |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | export const UpdateFindingsFeedback = Binding.Service<UpdateFindingsFeedback>( |
| 43 | "AWS.GuardDuty.UpdateFindingsFeedback", |
| 44 | ); |