1import type * as sagemaker from "@distilled.cloud/aws/sagemaker";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Endpoint } from "./Endpoint.ts";
5
6/**
7 * Runtime binding for `sagemaker:DescribeEndpoint` — read a live endpoint's
8 * status, variants, and deployment state from a function runtime.
9 *
10 * Bind this operation to an `Endpoint` inside a function runtime to get a
11 * callable that automatically injects the endpoint name. Use it to check
12 * `EndpointStatus` (e.g. gate invocations while an update is rolling) or to
13 * observe per-variant weights and instance counts.
14 * ### Observing Endpoints
15 * **Example:** Check Endpoint Status
16 * ```typescript
17 * // init
18 * const describeEndpoint = yield* AWS.SageMaker.DescribeEndpoint(endpoint);
19 *
20 * // runtime
21 * const { EndpointStatus, ProductionVariants } = yield* describeEndpoint();
22 * ```
23 *
24 * @binding
25 */
26export interface DescribeEndpoint extends Binding.Service<
27 DescribeEndpoint,
28 "AWS.SageMaker.DescribeEndpoint",
29 <E extends Endpoint>(
30 endpoint: E,
31 ) => Effect.Effect<
32 () => Effect.Effect<
33 sagemaker.DescribeEndpointOutput,
34 sagemaker.DescribeEndpointError
35 >
36 >
37> {}
38export const DescribeEndpoint = Binding.Service<DescribeEndpoint>(
39 "AWS.SageMaker.DescribeEndpoint",
40);