The best way to control Claude Code, Codex and more from any computer or phone

main
ts 42 lines 1.41 KB
Raw
1 import type * as neptune from "@distilled.cloud/aws/neptune";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { DBCluster } from "./DBCluster.ts";
5
6 /**
7 * Runtime binding for the `FailoverDBCluster` operation (IAM action
8 * `rds:FailoverDBCluster`).
9 *
10 * Forces a failover of the bound {@link DBCluster} — one of the read
11 * replicas is promoted to primary — for resilience testing or to move the
12 * writer to a specific instance. The cluster identifier is injected from the
13 * binding. Provide the implementation with
14 * `Effect.provide(AWS.Neptune.FailoverDBClusterHttp)`.
15 * ### Operating a Cluster
16 * **Example:** Force a Failover
17 * ```typescript
18 * // init — bind the operation to the cluster
19 * const failoverDBCluster = yield* AWS.Neptune.FailoverDBCluster(cluster);
20 *
21 * // runtime — promote a specific replica
22 * yield* failoverDBCluster({
23 * TargetDBInstanceIdentifier: replicaId,
24 * });
25 * ```
26 *
27 * @binding
28 */
29 export interface FailoverDBCluster extends Binding.Service<
30 FailoverDBCluster,
31 "AWS.Neptune.FailoverDBCluster",
32 (
33 cluster: DBCluster,
34 ) => Effect.Effect<
35 (
36 request?: Omit<neptune.FailoverDBClusterMessage, "DBClusterIdentifier">,
37 ) => Effect.Effect<neptune.FailoverDBClusterResult, neptune.FailoverDBClusterError>
38 >
39 > {}
40 export const FailoverDBCluster = Binding.Service<FailoverDBCluster>(
41 "AWS.Neptune.FailoverDBCluster",
42 );