1import type * as eks from "@distilled.cloud/aws/eks";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import 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 */
26export 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<
35 eks.DescribeNodegroupResponse,
36 eks.DescribeNodegroupError
37 >
38 >
39> {}
40export const DescribeNodegroup = Binding.Service<DescribeNodegroup>(
41 "AWS.EKS.DescribeNodegroup",
42);