| 1 | import type * as eks from "@distilled.cloud/aws/eks"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Cluster } from "./Cluster.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `eks:DescribeInsightsRefresh`. |
| 8 | * |
| 9 | * Reads the status of the bound cluster's insights refresh — whether an on-demand refresh (kicked off via {@link StartInsightsRefresh}) is in progress, completed, or failed. |
| 10 | * The cluster `clusterName` is injected from the bound {@link Cluster} and `eks:DescribeInsightsRefresh` is granted on the cluster's ARN. |
| 11 | * Provide the implementation with |
| 12 | * `Effect.provide(AWS.EKS.DescribeInsightsRefreshHttp)`. |
| 13 | * ### Cluster Insights |
| 14 | * **Example:** Check an Insights Refresh's Status |
| 15 | * ```typescript |
| 16 | * // init |
| 17 | * const describeInsightsRefresh = yield* AWS.EKS.DescribeInsightsRefresh(cluster); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { status } = yield* describeInsightsRefresh(); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface DescribeInsightsRefresh extends Binding.Service< |
| 26 | DescribeInsightsRefresh, |
| 27 | "AWS.EKS.DescribeInsightsRefresh", |
| 28 | ( |
| 29 | cluster: Cluster, |
| 30 | ) => Effect.Effect< |
| 31 | ( |
| 32 | request?: Omit<eks.DescribeInsightsRefreshRequest, "clusterName">, |
| 33 | ) => Effect.Effect< |
| 34 | eks.DescribeInsightsRefreshResponse, |
| 35 | eks.DescribeInsightsRefreshError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const DescribeInsightsRefresh = Binding.Service<DescribeInsightsRefresh>( |
| 40 | "AWS.EKS.DescribeInsightsRefresh", |
| 41 | ); |