The best way to control Claude Code, Codex and more from any computer or phone

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