| 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:DescribeAddon`. |
| 8 | * |
| 9 | * Reads one installed add-on's state — version, status, health issues, and pod identity associations. |
| 10 | * The cluster `clusterName` is injected from the bound {@link Cluster} and `eks:DescribeAddon` is granted on the cluster's sub-resource ARNs. |
| 11 | * Provide the implementation with |
| 12 | * `Effect.provide(AWS.EKS.DescribeAddonHttp)`. |
| 13 | * ### Inspecting Add-ons |
| 14 | * **Example:** Check an Add-on's Version and Health |
| 15 | * ```typescript |
| 16 | * // init |
| 17 | * const describeAddon = yield* AWS.EKS.DescribeAddon(cluster); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { addon } = yield* describeAddon({ addonName: "vpc-cni" }); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface DescribeAddon extends Binding.Service< |
| 26 | DescribeAddon, |
| 27 | "AWS.EKS.DescribeAddon", |
| 28 | ( |
| 29 | cluster: Cluster, |
| 30 | ) => Effect.Effect< |
| 31 | ( |
| 32 | request: Omit<eks.DescribeAddonRequest, "clusterName">, |
| 33 | ) => Effect.Effect<eks.DescribeAddonResponse, eks.DescribeAddonError> |
| 34 | > |
| 35 | > {} |
| 36 | export const DescribeAddon = Binding.Service<DescribeAddon>( |
| 37 | "AWS.EKS.DescribeAddon", |
| 38 | ); |