The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | import type * as eks from "@distilled.cloud/aws/eks"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { Cluster } from "./Cluster.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `eks:DescribeUpdate`. |
| 8 | * |
| 9 | * Reads one update's status and parameters — poll it to track an in-flight version upgrade or config change. |
| 10 | * The cluster `name` is injected from the bound {@link Cluster} and `eks:DescribeUpdate` is granted on the cluster's ARN and sub-resource ARNs. |
| 11 | * Provide the implementation with |
| 12 | * `Effect.provide(AWS.EKS.DescribeUpdateHttp)`. |
| 13 | * ### Tracking Updates |
| 14 | * **Example:** Poll an Update's Status |
| 15 | * ```typescript |
| 16 | * // init |
| 17 | * const describeUpdate = yield* AWS.EKS.DescribeUpdate(cluster); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { update } = yield* describeUpdate({ updateId }); |
| 21 | * const done = update?.status === "Successful"; |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface DescribeUpdate extends Binding.Service< |
| 27 | DescribeUpdate, |
| 28 | "AWS.EKS.DescribeUpdate", |
| 29 | ( |
| 30 | cluster: Cluster, |
| 31 | ) => Effect.Effect< |
| 32 | ( |
| 33 | request: Omit<eks.DescribeUpdateRequest, "name">, |
| 34 | ) => Effect.Effect<eks.DescribeUpdateResponse, eks.DescribeUpdateError> |
| 35 | > |
| 36 | > {} |
| 37 | export const DescribeUpdate = Binding.Service<DescribeUpdate>("AWS.EKS.DescribeUpdate"); |