| 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 | /** `GetAccessPreview` request with `analyzerArn` injected from the bound {@link Analyzer}. */ |
| 7 | export interface GetAccessPreviewRequest extends Omit< |
| 8 | aa.GetAccessPreviewRequest, |
| 9 | "analyzerArn" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for `access-analyzer:GetAccessPreview`. |
| 14 | * |
| 15 | * Retrieves an access preview's status and configuration. Provide the |
| 16 | * implementation with |
| 17 | * `Effect.provide(AWS.AccessAnalyzer.GetAccessPreviewHttp)`. |
| 18 | * ### Access Previews |
| 19 | * **Example:** Poll a Preview Until Completed |
| 20 | * ```typescript |
| 21 | * const getPreview = yield* AWS.AccessAnalyzer.GetAccessPreview(analyzer); |
| 22 | * const preview = yield* getPreview({ accessPreviewId }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface GetAccessPreview extends Binding.Service< |
| 28 | GetAccessPreview, |
| 29 | "AWS.AccessAnalyzer.GetAccessPreview", |
| 30 | ( |
| 31 | analyzer: Analyzer, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request: GetAccessPreviewRequest, |
| 35 | ) => Effect.Effect<aa.GetAccessPreviewResponse, aa.GetAccessPreviewError> |
| 36 | > |
| 37 | > {} |
| 38 | |
| 39 | export const GetAccessPreview = Binding.Service<GetAccessPreview>( |
| 40 | "AWS.AccessAnalyzer.GetAccessPreview", |
| 41 | ); |