1import type * as mwaa from "@distilled.cloud/aws/mwaa";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Environment } from "./Environment.ts";
5
6/**
7 * Runtime binding for `airflow:GetEnvironment`.
8 *
9 * Bind an {@link Environment} inside a function runtime to observe the
10 * environment's live status, webserver URL, and last-update details — useful
11 * for health checks and for gating REST API calls on `Status === "AVAILABLE"`.
12 * Provide the implementation with
13 * `Effect.provide(AWS.MWAA.GetEnvironmentHttp)`.
14 * ### Describing the Environment
15 * **Example:** Check Environment Health
16 * ```typescript
17 * // init — bind the operation to the environment
18 * const getEnvironment = yield* AWS.MWAA.GetEnvironment(environment);
19 *
20 * // runtime — observe live status
21 * const result = yield* getEnvironment();
22 * const healthy = result.Environment?.Status === "AVAILABLE";
23 * ```
24 *
25 * @binding
26 */
27export interface GetEnvironment extends Binding.Service<
28 GetEnvironment,
29 "AWS.MWAA.GetEnvironment",
30 (
31 environment: Environment,
32 ) => Effect.Effect<
33 () => Effect.Effect<mwaa.GetEnvironmentOutput, mwaa.GetEnvironmentError>
34 >
35> {}
36
37export const GetEnvironment = Binding.Service<GetEnvironment>(
38 "AWS.MWAA.GetEnvironment",
39);