1import type * as composer from "@distilled.cloud/gcp/composer_v1";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { RuntimeContext } from "../../RuntimeContext.ts";
5import type { Environment } from "./Environment.ts";
6
7export interface GetEnvironmentRequest extends Omit<
8 composer.GetProjectsLocationsEnvironmentsRequest,
9 "name"
10> {}
11
12/**
13 * Runtime binding for Cloud Composer `environments.get`.
14 *
15 * Bind this operation to an {@link Environment} in a Function/Action init
16 * phase. Provide {@link GetEnvironmentHttp}.
17 *
18 * ### Observing Environments
19 * **Example:** Read the bound environment
20 * ```typescript
21 * const getEnvironment = yield* GCP.Composer.GetEnvironment(airflow);
22 * const live = yield* getEnvironment();
23 * ```
24 *
25 * @binding
26 * @category Composer
27 */
28export interface GetEnvironment extends Binding.Service<
29 GetEnvironment,
30 "GCP.Composer.GetEnvironment",
31 (
32 environment: Environment,
33 ) => Effect.Effect<
34 (
35 request?: GetEnvironmentRequest,
36 ) => Effect.Effect<
37 composer.Environment,
38 composer.GetProjectsLocationsEnvironmentsError,
39 RuntimeContext
40 >
41 >
42> {}
43
44export const GetEnvironment = Binding.Service<GetEnvironment>(
45 "GCP.Composer.GetEnvironment",
46);