The best way to control Claude Code, Codex and more from any computer or phone

main
ts 35 lines 1.27 KB
Raw
1 import type * as sagemaker from "@distilled.cloud/aws/sagemaker";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import 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 */
26 export interface DescribeEndpoint extends Binding.Service<
27 DescribeEndpoint,
28 "AWS.SageMaker.DescribeEndpoint",
29 <E extends Endpoint>(
30 endpoint: E,
31 ) => Effect.Effect<
32 () => Effect.Effect<sagemaker.DescribeEndpointOutput, sagemaker.DescribeEndpointError>
33 >
34 > {}
35 export const DescribeEndpoint = Binding.Service<DescribeEndpoint>("AWS.SageMaker.DescribeEndpoint");