1import type * as microvms from "@distilled.cloud/aws/lambda-microvms";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { MicrovmImage } from "./MicrovmImage.ts";
5
6export interface GetMicrovmImageRequest extends Omit<
7 microvms.GetMicrovmImageInput,
8 "imageIdentifier"
9> {}
10
11/**
12 * Runtime binding for `GetMicrovmImage`.
13 *
14 * Bind it to a {@link MicrovmImage} to read the image's state and versions at
15 * runtime (the `imageIdentifier` is injected).
16 * ### Image Reads
17 * **Example:** Get the image
18 * ```typescript
19 * const getMicrovmImage = yield* AWS.Lambda.GetMicrovmImage(Sandbox);
20 * const image = yield* getMicrovmImage({});
21 * ```
22 *
23 * @binding
24 */
25export interface GetMicrovmImage extends Binding.Service<
26 GetMicrovmImage,
27 "AWS.Lambda.GetMicrovmImage",
28 (
29 image: MicrovmImage,
30 ) => Effect.Effect<
31 (
32 request: GetMicrovmImageRequest,
33 ) => Effect.Effect<
34 microvms.GetMicrovmImageOutput,
35 microvms.GetMicrovmImageError
36 >
37 >
38> {}
39export const GetMicrovmImage = Binding.Service<GetMicrovmImage>(
40 "AWS.Lambda.GetMicrovmImage",
41);