1import type * as rds from "@distilled.cloud/aws/rds";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { DBInstance } from "./DBInstance.ts";
5
6/**
7 * Runtime binding for the `StopDBInstance` operation (IAM action
8 * `rds:StopDBInstance`).
9 *
10 * Stops the bound {@link DBInstance} — e.g. an ops function that parks a
11 * development database overnight to save cost. The instance identifier is
12 * injected from the binding. Provide the implementation with
13 * `Effect.provide(AWS.RDS.StopDBInstanceHttp)`.
14 * ### Operating an Instance
15 * **Example:** Stop a Running Instance
16 * ```typescript
17 * // init — bind the operation to the instance
18 * const stopDBInstance = yield* AWS.RDS.StopDBInstance(instance);
19 *
20 * // runtime
21 * yield* stopDBInstance();
22 * ```
23 *
24 * @binding
25 */
26export interface StopDBInstance extends Binding.Service<
27 StopDBInstance,
28 "AWS.RDS.StopDBInstance",
29 (
30 instance: DBInstance,
31 ) => Effect.Effect<
32 (
33 request?: Omit<rds.StopDBInstanceMessage, "DBInstanceIdentifier">,
34 ) => Effect.Effect<rds.StopDBInstanceResult, rds.StopDBInstanceError>
35 >
36> {}
37export const StopDBInstance = Binding.Service<StopDBInstance>(
38 "AWS.RDS.StopDBInstance",
39);