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:StartInsightsRefresh`.
8 *
9 * Kicks off an on-demand refresh of the bound cluster's upgrade/configuration insights instead of waiting for the periodic automatic evaluation. Track progress with {@link DescribeInsightsRefresh}.
10 * The cluster `clusterName` is injected from the bound {@link Cluster} and `eks:StartInsightsRefresh` is granted on the cluster's ARN.
11 * Provide the implementation with
12 * `Effect.provide(AWS.EKS.StartInsightsRefreshHttp)`.
13 * ### Cluster Insights
14 * **Example:** Refresh Insights Before an Upgrade Check
15 * ```typescript
16 * // init
17 * const startInsightsRefresh = yield* AWS.EKS.StartInsightsRefresh(cluster);
18 *
19 * // runtime
20 * const { status } = yield* startInsightsRefresh();
21 * ```
22 *
23 * @binding
24 */
25export interface StartInsightsRefresh extends Binding.Service<
26 StartInsightsRefresh,
27 "AWS.EKS.StartInsightsRefresh",
28 (
29 cluster: Cluster,
30 ) => Effect.Effect<
31 (
32 request?: Omit<eks.StartInsightsRefreshRequest, "clusterName">,
33 ) => Effect.Effect<
34 eks.StartInsightsRefreshResponse,
35 eks.StartInsightsRefreshError
36 >
37 >
38> {}
39export const StartInsightsRefresh = Binding.Service<StartInsightsRefresh>(
40 "AWS.EKS.StartInsightsRefresh",
41);