Skip to content

GetEnvironment

Source: src/AWS/MWAA/GetEnvironment.ts

Runtime binding for airflow:GetEnvironment.

Bind an Environment inside a function runtime to observe the environment’s live status, webserver URL, and last-update details — useful for health checks and for gating REST API calls on Status === "AVAILABLE". Provide the implementation with Effect.provide(AWS.MWAA.GetEnvironmentHttp).

// init — bind the operation to the environment
const getEnvironment = yield* AWS.MWAA.GetEnvironment(environment);
// runtime — observe live status
const result = yield* getEnvironment();
const healthy = result.Environment?.Status === "AVAILABLE";