| 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 | /** `ListFindings` request with `analyzerArn` injected from the bound {@link Analyzer}. */ |
| 7 | export interface ListFindingsRequest extends Omit< |
| 8 | aa.ListFindingsRequest, |
| 9 | "analyzerArn" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for `access-analyzer:ListFindings`. |
| 14 | * |
| 15 | * Lists the analyzer's external-access findings (V1 API — prefer {@link |
| 16 | * ListFindingsV2}, which also returns unused-access findings). Provide the |
| 17 | * implementation with `Effect.provide(AWS.AccessAnalyzer.ListFindingsHttp)`. |
| 18 | * ### Reading Findings |
| 19 | * **Example:** List Findings (V1) |
| 20 | * ```typescript |
| 21 | * const listFindings = yield* AWS.AccessAnalyzer.ListFindings(analyzer); |
| 22 | * const page = yield* listFindings({ maxResults: 50 }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface ListFindings extends Binding.Service< |
| 28 | ListFindings, |
| 29 | "AWS.AccessAnalyzer.ListFindings", |
| 30 | ( |
| 31 | analyzer: Analyzer, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request?: ListFindingsRequest, |
| 35 | ) => Effect.Effect<aa.ListFindingsResponse, aa.ListFindingsError> |
| 36 | > |
| 37 | > {} |
| 38 | |
| 39 | export const ListFindings = Binding.Service<ListFindings>( |
| 40 | "AWS.AccessAnalyzer.ListFindings", |
| 41 | ); |