Skip to content
Source
Sign inSign up
Open History to see the last commit

StartDBInstance.ts

33 lines1.2 KB

1import type * as rds from "@distilled.cloud/aws/rds";
2import * as Binding from "alchemy/Binding";
3import type * as Effect from "effect/Effect";
4import type { DBInstance } from "./DBInstance.ts";
5​
6/**
7 * Runtime binding for the `StartDBInstance` operation (IAM action
8 * `rds:StartDBInstance`).
9 *
10 * Starts the bound {@link DBInstance} after it was stopped — e.g. an ops
11 * function that wakes a development database on a schedule. The instance
12 * identifier is injected from the binding. Provide the implementation with
13 * `Effect.provide(AWS.RDS.StartDBInstanceHttp)`.
14 * ### Operating an Instance
15 * **Example:** Start a Stopped Instance
16 * ```typescript
17 * // init — bind the operation to the instance
18 * const startDBInstance = yield* AWS.RDS.StartDBInstance(instance);
19 *
20 * // runtime
21 * yield* startDBInstance();
22 * ```
23 *
24 * @binding
25 */
26export interface StartDBInstance extends Binding.Service<
27 StartDBInstance,
28 "AWS.RDS.StartDBInstance",
29 (
30 instance: DBInstance,
31 ) => Effect.Effect<() => Effect.Effect<rds.StartDBInstanceResult, rds.StartDBInstanceError>>
32> {}
33export const StartDBInstance = Binding.Service<StartDBInstance>("AWS.RDS.StartDBInstance");