| 1 | import type * as emrc from "@distilled.cloud/aws/emr-containers"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { VirtualCluster } from "./VirtualCluster.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `emr-containers:DescribeManagedEndpoint`. |
| 8 | * |
| 9 | * Reads a managed endpoint (the EMR Studio gateway) on the bound |
| 10 | * {@link VirtualCluster} — its state, server URL, and security group. The |
| 11 | * virtual cluster ID is injected from the binding; pass the endpoint `id`. |
| 12 | * Provide the implementation with |
| 13 | * `Effect.provide(AWS.EMRContainers.DescribeManagedEndpointHttp)`. |
| 14 | * ### Managed Endpoints |
| 15 | * **Example:** Check An Endpoint Is Active |
| 16 | * ```typescript |
| 17 | * // init |
| 18 | * const describeManagedEndpoint = |
| 19 | * yield* AWS.EMRContainers.DescribeManagedEndpoint(virtualCluster); |
| 20 | * |
| 21 | * // runtime |
| 22 | * const { endpoint } = yield* describeManagedEndpoint({ id: endpointId }); |
| 23 | * yield* Effect.log(`endpoint state: ${endpoint?.state}`); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface DescribeManagedEndpoint extends Binding.Service< |
| 29 | DescribeManagedEndpoint, |
| 30 | "AWS.EMRContainers.DescribeManagedEndpoint", |
| 31 | ( |
| 32 | virtualCluster: VirtualCluster, |
| 33 | ) => Effect.Effect< |
| 34 | ( |
| 35 | request: Omit<emrc.DescribeManagedEndpointRequest, "virtualClusterId">, |
| 36 | ) => Effect.Effect< |
| 37 | emrc.DescribeManagedEndpointResponse, |
| 38 | emrc.DescribeManagedEndpointError |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | export const DescribeManagedEndpoint = Binding.Service<DescribeManagedEndpoint>( |
| 43 | "AWS.EMRContainers.DescribeManagedEndpoint", |
| 44 | ); |