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

main
ts 40 lines 1.35 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 { DBInstance } from "./DBInstance.ts";
5
6 /**
7 * Runtime binding for the `CreateDBSnapshot` operation (IAM actions
8 * `rds:CreateDBSnapshot` +
9 * `rds:AddTagsToResource`).
10 *
11 * Takes a manual snapshot of the bound {@link DBInstance} — e.g. a
12 * pre-migration backup function or a scheduled snapshot-rotation job. The
13 * instance identifier is injected from the binding. Provide the implementation with
14 * `Effect.provide(AWS.RDS.CreateDBSnapshotHttp)`.
15 * ### Managing Instance Snapshots
16 * **Example:** Take a Manual Instance Snapshot
17 * ```typescript
18 * // init — bind the operation to the instance
19 * const createDBSnapshot = yield* AWS.RDS.CreateDBSnapshot(instance);
20 *
21 * // runtime
22 * yield* createDBSnapshot({
23 * DBSnapshotIdentifier: `pre-migration-${runId}`,
24 * });
25 * ```
26 *
27 * @binding
28 */
29 export interface CreateDBSnapshot extends Binding.Service<
30 CreateDBSnapshot,
31 "AWS.RDS.CreateDBSnapshot",
32 (
33 instance: DBInstance,
34 ) => Effect.Effect<
35 (
36 request: Omit<rds.CreateDBSnapshotMessage, "DBInstanceIdentifier">,
37 ) => Effect.Effect<rds.CreateDBSnapshotResult, rds.CreateDBSnapshotError>
38 >
39 > {}
40 export const CreateDBSnapshot = Binding.Service<CreateDBSnapshot>("AWS.RDS.CreateDBSnapshot");