| 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 | /** `GetFinding` request with `analyzerArn` injected from the bound {@link Analyzer}. */ |
| 7 | export interface GetFindingRequest extends Omit< |
| 8 | aa.GetFindingRequest, |
| 9 | "analyzerArn" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for `access-analyzer:GetFinding`. |
| 14 | * |
| 15 | * Retrieves a single external-access finding (V1 API — prefer {@link |
| 16 | * GetFindingV2}). Provide the implementation with |
| 17 | * `Effect.provide(AWS.AccessAnalyzer.GetFindingHttp)`. |
| 18 | * ### Reading Findings |
| 19 | * **Example:** Get a Finding by Id (V1) |
| 20 | * ```typescript |
| 21 | * const getFinding = yield* AWS.AccessAnalyzer.GetFinding(analyzer); |
| 22 | * const result = yield* getFinding({ id: findingId }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface GetFinding extends Binding.Service< |
| 28 | GetFinding, |
| 29 | "AWS.AccessAnalyzer.GetFinding", |
| 30 | ( |
| 31 | analyzer: Analyzer, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request: GetFindingRequest, |
| 35 | ) => Effect.Effect<aa.GetFindingResponse, aa.GetFindingError> |
| 36 | > |
| 37 | > {} |
| 38 | |
| 39 | export const GetFinding = Binding.Service<GetFinding>( |
| 40 | "AWS.AccessAnalyzer.GetFinding", |
| 41 | ); |