@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 37 lines 1.33 KB
Raw
1 import type * as eks from "@distilled.cloud/aws/eks";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Cluster } from "./Cluster.ts";
5
6 /**
7 * Runtime binding for `eks:DescribeNodegroup`.
8 *
9 * Reads one managed node group's full state — scaling config, instance types, AMI release version, health issues.
10 * The cluster `clusterName` is injected from the bound {@link Cluster} and `eks:DescribeNodegroup` is granted on the cluster's sub-resource ARNs.
11 * Provide the implementation with
12 * `Effect.provide(AWS.EKS.DescribeNodegroupHttp)`.
13 * ### Inspecting Compute
14 * **Example:** Check a Node Group's Health
15 * ```typescript
16 * // init
17 * const describeNodegroup = yield* AWS.EKS.DescribeNodegroup(cluster);
18 *
19 * // runtime
20 * const { nodegroup } = yield* describeNodegroup({ nodegroupName: "general" });
21 * const issues = nodegroup?.health?.issues ?? [];
22 * ```
23 *
24 * @binding
25 */
26 export interface DescribeNodegroup extends Binding.Service<
27 DescribeNodegroup,
28 "AWS.EKS.DescribeNodegroup",
29 (
30 cluster: Cluster,
31 ) => Effect.Effect<
32 (
33 request: Omit<eks.DescribeNodegroupRequest, "clusterName">,
34 ) => Effect.Effect<eks.DescribeNodegroupResponse, eks.DescribeNodegroupError>
35 >
36 > {}
37 export const DescribeNodegroup = Binding.Service<DescribeNodegroup>("AWS.EKS.DescribeNodegroup");