@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

main
ts 37 lines 1.24 KB
Raw
1 import type * as rds from "@distilled.cloud/aws/rds";
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} — promotes a reader to
11 * writer, e.g. for chaos testing or AZ evacuation. The cluster identifier
12 * is injected from the binding. Provide the implementation with
13 * `Effect.provide(AWS.RDS.FailoverDBClusterHttp)`.
14 * ### Operating a Cluster
15 * **Example:** Force a Failover
16 * ```typescript
17 * // init — bind the operation to the cluster
18 * const failoverDBCluster = yield* AWS.RDS.FailoverDBCluster(cluster);
19 *
20 * // runtime
21 * yield* failoverDBCluster();
22 * ```
23 *
24 * @binding
25 */
26 export interface FailoverDBCluster extends Binding.Service<
27 FailoverDBCluster,
28 "AWS.RDS.FailoverDBCluster",
29 (
30 cluster: DBCluster,
31 ) => Effect.Effect<
32 (
33 request?: Omit<rds.FailoverDBClusterMessage, "DBClusterIdentifier">,
34 ) => Effect.Effect<rds.FailoverDBClusterResult, rds.FailoverDBClusterError>
35 >
36 > {}
37 export const FailoverDBCluster = Binding.Service<FailoverDBCluster>("AWS.RDS.FailoverDBCluster");