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:DescribeInsight`.
8 *
9 * Reads one insight's full detail — category, status, recommendation, and the resources it flags.
10 * The cluster `clusterName` is injected from the bound {@link Cluster} and `eks:DescribeInsight` is granted on the cluster's ARN.
11 * Provide the implementation with
12 * `Effect.provide(AWS.EKS.DescribeInsightHttp)`.
13 * ### Cluster Insights
14 * **Example:** Read an Insight's Recommendation
15 * ```typescript
16 * // init
17 * const describeInsight = yield* AWS.EKS.DescribeInsight(cluster);
18 *
19 * // runtime
20 * const { insight } = yield* describeInsight({ id: insightId });
21 * ```
22 *
23 * @binding
24 */
25export interface DescribeInsight extends Binding.Service<
26 DescribeInsight,
27 "AWS.EKS.DescribeInsight",
28 (
29 cluster: Cluster,
30 ) => Effect.Effect<
31 (
32 request: Omit<eks.DescribeInsightRequest, "clusterName">,
33 ) => Effect.Effect<eks.DescribeInsightResponse, eks.DescribeInsightError>
34 >
35> {}
36export const DescribeInsight = Binding.Service<DescribeInsight>(
37 "AWS.EKS.DescribeInsight",
38);