1import type * as SVC from "@distilled.cloud/aws/finspace";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { KxEnvironment } from "./KxEnvironment.ts";
5
6/**
7 * Runtime binding for `finspace:UpdateKxClusterDatabases` — remounts a running cluster's databases at new changesets (with rolling or no-restart deployment) — how ingestion pipelines roll fresh data out to clusters that don't read through dataviews.
8 * Provide the implementation with
9 * `Effect.provide(AWS.FinSpace.UpdateKxClusterDatabasesHttp)`.
10 * ### Deploying to Clusters
11 * **Example:** Roll a Cluster to a New Changeset
12 * ```typescript
13 * const updateClusterDatabases = yield* AWS.FinSpace.UpdateKxClusterDatabases(kdb);
14 *
15 * yield* updateClusterDatabases({
16 * clusterName: "hdb",
17 * databases: [{ databaseName: "ticks", changesetId }],
18 * deploymentConfiguration: { deploymentStrategy: "NO_RESTART" },
19 * clientToken: crypto.randomUUID(),
20 * });
21 * ```
22 *
23 * @binding
24 */
25export interface UpdateKxClusterDatabases extends Binding.Service<
26 UpdateKxClusterDatabases,
27 "AWS.FinSpace.UpdateKxClusterDatabases",
28 <K extends KxEnvironment>(
29 environment: K,
30 ) => Effect.Effect<
31 (
32 request: Omit<SVC.UpdateKxClusterDatabasesRequest, "environmentId">,
33 ) => Effect.Effect<
34 SVC.UpdateKxClusterDatabasesResponse,
35 SVC.UpdateKxClusterDatabasesError
36 >
37 >
38> {}
39export const UpdateKxClusterDatabases =
40 Binding.Service<UpdateKxClusterDatabases>(
41 "AWS.FinSpace.UpdateKxClusterDatabases",
42 );