| 1 | import type * as securityhub from "@distilled.cloud/aws/securityhub"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `securityhub:GetFindings`. |
| 7 | * |
| 8 | * Returns findings that match the specified filter criteria. With cross-Region aggregation enabled, the home Region returns matching findings from all linked Regions. |
| 9 | * Account-level operation — invoked with the caller's request as-is. |
| 10 | * Provide the implementation with |
| 11 | * `Effect.provide(AWS.SecurityHub.GetFindingsHttp)`. |
| 12 | * ### Working with Findings |
| 13 | * **Example:** Query High-Severity Findings |
| 14 | * ```typescript |
| 15 | * // init — account-level binding, no resource argument |
| 16 | * const getFindings = yield* AWS.SecurityHub.GetFindings(); |
| 17 | * |
| 18 | * // runtime |
| 19 | * const { Findings } = yield* getFindings({ |
| 20 | * Filters: { SeverityLabel: [{ Value: "HIGH", Comparison: "EQUALS" }] }, |
| 21 | * MaxResults: 25, |
| 22 | * }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface GetFindings extends Binding.Service< |
| 28 | GetFindings, |
| 29 | "AWS.SecurityHub.GetFindings", |
| 30 | () => Effect.Effect< |
| 31 | ( |
| 32 | request?: securityhub.GetFindingsRequest, |
| 33 | ) => Effect.Effect< |
| 34 | securityhub.GetFindingsResponse, |
| 35 | securityhub.GetFindingsError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const GetFindings = Binding.Service<GetFindings>( |
| 40 | "AWS.SecurityHub.GetFindings", |
| 41 | ); |