1import type * as aa from "@distilled.cloud/aws/accessanalyzer";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Analyzer } from "./Analyzer.ts";
5
6/** `GetFindingV2` request with `analyzerArn` injected from the bound {@link Analyzer}. */
7export interface GetFindingV2Request extends Omit<
8 aa.GetFindingV2Request,
9 "analyzerArn"
10> {}
11
12/**
13 * Runtime binding for the `GetFindingV2` operation (IAM action
14 * `access-analyzer:GetFinding` — shared with the V1 API).
15 *
16 * Retrieves a single finding with its typed `findingDetails` (external-access
17 * or unused-access). Provide the implementation with
18 * `Effect.provide(AWS.AccessAnalyzer.GetFindingV2Http)`.
19 * ### Reading Findings
20 * **Example:** Get a Finding by Id
21 * ```typescript
22 * const getFinding = yield* AWS.AccessAnalyzer.GetFindingV2(analyzer);
23 * const finding = yield* getFinding({ id: findingId });
24 * ```
25 *
26 * @binding
27 */
28export interface GetFindingV2 extends Binding.Service<
29 GetFindingV2,
30 "AWS.AccessAnalyzer.GetFindingV2",
31 (
32 analyzer: Analyzer,
33 ) => Effect.Effect<
34 (
35 request: GetFindingV2Request,
36 ) => Effect.Effect<aa.GetFindingV2Response, aa.GetFindingV2Error>
37 >
38> {}
39
40export const GetFindingV2 = Binding.Service<GetFindingV2>(
41 "AWS.AccessAnalyzer.GetFindingV2",
42);