| 1 | import type * as aa from "@distilled.cloud/aws/accessanalyzer"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Analyzer } from "./Analyzer.ts"; |
| 5 | |
| 6 | /** `ListFindingsV2` request with `analyzerArn` injected from the bound {@link Analyzer}. */ |
| 7 | export interface ListFindingsV2Request extends Omit< |
| 8 | aa.ListFindingsV2Request, |
| 9 | "analyzerArn" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for the `ListFindingsV2` operation (IAM action |
| 14 | * `access-analyzer:ListFindings` — shared with the V1 API). |
| 15 | * |
| 16 | * Lists the analyzer's findings (external-access and unused-access), with |
| 17 | * optional filter and sort criteria. Provide the implementation with |
| 18 | * `Effect.provide(AWS.AccessAnalyzer.ListFindingsV2Http)`. |
| 19 | * ### Reading Findings |
| 20 | * **Example:** List Active Findings |
| 21 | * ```typescript |
| 22 | * // init — bind the operation to the analyzer |
| 23 | * const listFindings = yield* AWS.AccessAnalyzer.ListFindingsV2(analyzer); |
| 24 | * |
| 25 | * // runtime — page through active findings |
| 26 | * const page = yield* listFindings({ |
| 27 | * filter: { status: { eq: ["ACTIVE"] } }, |
| 28 | * maxResults: 50, |
| 29 | * }); |
| 30 | * ``` |
| 31 | * |
| 32 | * @binding |
| 33 | */ |
| 34 | export interface ListFindingsV2 extends Binding.Service< |
| 35 | ListFindingsV2, |
| 36 | "AWS.AccessAnalyzer.ListFindingsV2", |
| 37 | ( |
| 38 | analyzer: Analyzer, |
| 39 | ) => Effect.Effect< |
| 40 | ( |
| 41 | request?: ListFindingsV2Request, |
| 42 | ) => Effect.Effect<aa.ListFindingsV2Response, aa.ListFindingsV2Error> |
| 43 | > |
| 44 | > {} |
| 45 | |
| 46 | export const ListFindingsV2 = Binding.Service<ListFindingsV2>( |
| 47 | "AWS.AccessAnalyzer.ListFindingsV2", |
| 48 | ); |