1import type * as dataproc from "@distilled.cloud/gcp/dataproc_v1";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { RuntimeContext } from "../../RuntimeContext.ts";
5import type { Cluster } from "./Cluster.ts";
6
7export interface GetClusterRequest extends Omit<
8 dataproc.GetProjectsRegionsClustersRequest,
9 "projectId" | "region" | "clusterName"
10> {}
11
12/**
13 * Runtime binding for Dataproc `clusters.get`.
14 *
15 * Bind this operation to a {@link Cluster} in a Function/Action init
16 * phase. Provide {@link GetClusterHttp}.
17 *
18 * ### Observing Clusters
19 * **Example:** Read the bound cluster
20 * ```typescript
21 * const getCluster = yield* GCP.Dataproc.GetCluster(cluster);
22 * const live = yield* getCluster();
23 * ```
24 *
25 * @binding
26 * @category Dataproc
27 */
28export interface GetCluster extends Binding.Service<
29 GetCluster,
30 "GCP.Dataproc.GetCluster",
31 (
32 cluster: Cluster,
33 ) => Effect.Effect<
34 (
35 request?: GetClusterRequest,
36 ) => Effect.Effect<
37 dataproc.Cluster,
38 dataproc.GetProjectsRegionsClustersError,
39 RuntimeContext
40 >
41 >
42> {}
43
44export const GetCluster = Binding.Service<GetCluster>(
45 "GCP.Dataproc.GetCluster",
46);