@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, 04:45 UTC

main
ts 40 lines 1.46 KB
Raw
1 import type * as docdb from "@distilled.cloud/aws/docdb";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for the `DeleteDBClusterSnapshot` operation (IAM action
7 * `rds:DeleteDBClusterSnapshot` — DocumentDB shares the RDS control plane).
8 *
9 * Deletes a DocumentDB cluster snapshot by identifier — the retention half
10 * of snapshot-rotation automation (create nightly, prune the oldest).
11 * Snapshot identifiers are runtime data, so the grant spans the account's
12 * `cluster-snapshot` ARNs. Provide the implementation with
13 * `Effect.provide(AWS.DocDB.DeleteDBClusterSnapshotHttp)`.
14 * ### Managing Snapshots
15 * **Example:** Prune an Expired Snapshot
16 * ```typescript
17 * const deleteSnapshot = yield* DocDB.DeleteDBClusterSnapshot();
18 *
19 * yield* deleteSnapshot({
20 * DBClusterSnapshotIdentifier: "nightly-2026-06-01",
21 * }).pipe(
22 * // already gone — rotation is idempotent
23 * Effect.catchTag("DBClusterSnapshotNotFoundFault", () => Effect.void),
24 * );
25 * ```
26 *
27 * @binding
28 */
29 export interface DeleteDBClusterSnapshot extends Binding.Service<
30 DeleteDBClusterSnapshot,
31 "AWS.DocDB.DeleteDBClusterSnapshot",
32 () => Effect.Effect<
33 (
34 request: docdb.DeleteDBClusterSnapshotMessage,
35 ) => Effect.Effect<docdb.DeleteDBClusterSnapshotResult, docdb.DeleteDBClusterSnapshotError>
36 >
37 > {}
38 export const DeleteDBClusterSnapshot = Binding.Service<DeleteDBClusterSnapshot>(
39 "AWS.DocDB.DeleteDBClusterSnapshot",
40 );