| 1 | import type * as SVC from "@distilled.cloud/aws/finspace"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { KxEnvironment } from "./KxEnvironment.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `finspace:UpdateKxClusterCodeConfiguration` — deploys new q code (and optionally a new initialization script or command-line arguments) to a running cluster with a rolling, forced, or no-restart strategy. |
| 8 | * Provide the implementation with |
| 9 | * `Effect.provide(AWS.FinSpace.UpdateKxClusterCodeConfigurationHttp)`. |
| 10 | * ### Deploying to Clusters |
| 11 | * **Example:** Roll New Code onto a Cluster |
| 12 | * ```typescript |
| 13 | * const updateClusterCode = yield* AWS.FinSpace.UpdateKxClusterCodeConfiguration(kdb); |
| 14 | * |
| 15 | * yield* updateClusterCode({ |
| 16 | * clusterName: "rdb", |
| 17 | * code: { s3Bucket: "code-bucket", s3Key: "release/v2.zip" }, |
| 18 | * deploymentConfiguration: { deploymentStrategy: "ROLLING" }, |
| 19 | * clientToken: crypto.randomUUID(), |
| 20 | * }); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface UpdateKxClusterCodeConfiguration extends Binding.Service< |
| 26 | UpdateKxClusterCodeConfiguration, |
| 27 | "AWS.FinSpace.UpdateKxClusterCodeConfiguration", |
| 28 | <K extends KxEnvironment>( |
| 29 | environment: K, |
| 30 | ) => Effect.Effect< |
| 31 | ( |
| 32 | request: Omit< |
| 33 | SVC.UpdateKxClusterCodeConfigurationRequest, |
| 34 | "environmentId" |
| 35 | >, |
| 36 | ) => Effect.Effect< |
| 37 | SVC.UpdateKxClusterCodeConfigurationResponse, |
| 38 | SVC.UpdateKxClusterCodeConfigurationError |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | export const UpdateKxClusterCodeConfiguration = |
| 43 | Binding.Service<UpdateKxClusterCodeConfiguration>( |
| 44 | "AWS.FinSpace.UpdateKxClusterCodeConfiguration", |
| 45 | ); |