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:ListNodegroups`.
8 *
9 * Enumerates the managed node group names attached to the bound cluster.
10 * The cluster `clusterName` is injected from the bound {@link Cluster} and `eks:ListNodegroups` is granted on the cluster's ARN.
11 * Provide the implementation with
12 * `Effect.provide(AWS.EKS.ListNodegroupsHttp)`.
13 * ### Inspecting Compute
14 * **Example:** List the Cluster's Node Groups
15 * ```typescript
16 * // init
17 * const listNodegroups = yield* AWS.EKS.ListNodegroups(cluster);
18 *
19 * // runtime
20 * const { nodegroups } = yield* listNodegroups();
21 * ```
22 *
23 * @binding
24 */
25export interface ListNodegroups extends Binding.Service<
26 ListNodegroups,
27 "AWS.EKS.ListNodegroups",
28 (
29 cluster: Cluster,
30 ) => Effect.Effect<
31 (
32 request?: Omit<eks.ListNodegroupsRequest, "clusterName">,
33 ) => Effect.Effect<eks.ListNodegroupsResponse, eks.ListNodegroupsError>
34 >
35> {}
36export const ListNodegroups = Binding.Service<ListNodegroups>(
37 "AWS.EKS.ListNodegroups",
38);