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:ListInsights`.
8 *
9 * Enumerates EKS upgrade/configuration insights for the bound cluster — findings that block or degrade a Kubernetes version upgrade.
10 * The cluster `clusterName` is injected from the bound {@link Cluster} and `eks:ListInsights` is granted on the cluster's ARN.
11 * Provide the implementation with
12 * `Effect.provide(AWS.EKS.ListInsightsHttp)`.
13 * ### Cluster Insights
14 * **Example:** List Upgrade-Blocking Insights
15 * ```typescript
16 * // init
17 * const listInsights = yield* AWS.EKS.ListInsights(cluster);
18 *
19 * // runtime
20 * const { insights } = yield* listInsights({
21 * filter: { statuses: ["ERROR", "WARNING"] },
22 * });
23 * ```
24 *
25 * @binding
26 */
27export interface ListInsights extends Binding.Service<
28 ListInsights,
29 "AWS.EKS.ListInsights",
30 (
31 cluster: Cluster,
32 ) => Effect.Effect<
33 (
34 request?: Omit<eks.ListInsightsRequest, "clusterName">,
35 ) => Effect.Effect<eks.ListInsightsResponse, eks.ListInsightsError>
36 >
37> {}
38export const ListInsights = Binding.Service<ListInsights>(
39 "AWS.EKS.ListInsights",
40);