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

main
ts 44 lines 1.65 KB
Raw
1 import type * as elasticache from "@distilled.cloud/aws/elasticache";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { ServerlessCache } from "./ServerlessCache.ts";
5
6 /**
7 * Runtime binding for the `CreateServerlessCacheSnapshot` operation (IAM
8 * actions `elasticache:CreateServerlessCacheSnapshot` +
9 * `elasticache:AddTagsToResource`), scoped to one {@link ServerlessCache}.
10 *
11 * Takes an on-demand snapshot of the bound serverless cache — e.g. a
12 * pre-migration backup from an operational Lambda. Available for valkey,
13 * redis, and serverless memcached. Provide the implementation with
14 * `Effect.provide(AWS.ElastiCache.CreateServerlessCacheSnapshotHttp)`.
15 * ### Managing Snapshots
16 * **Example:** Take an On-Demand Snapshot
17 * ```typescript
18 * const createSnapshot = yield* ElastiCache.CreateServerlessCacheSnapshot(cache);
19 *
20 * const result = yield* createSnapshot({
21 * ServerlessCacheSnapshotName: "pre-migration",
22 * });
23 * // result.ServerlessCacheSnapshot.Status → "creating"
24 * ```
25 *
26 * @binding
27 */
28 export interface CreateServerlessCacheSnapshot extends Binding.Service<
29 CreateServerlessCacheSnapshot,
30 "AWS.ElastiCache.CreateServerlessCacheSnapshot",
31 (
32 cache: ServerlessCache,
33 ) => Effect.Effect<
34 (
35 request: Omit<elasticache.CreateServerlessCacheSnapshotRequest, "ServerlessCacheName">,
36 ) => Effect.Effect<
37 elasticache.CreateServerlessCacheSnapshotResponse,
38 elasticache.CreateServerlessCacheSnapshotError
39 >
40 >
41 > {}
42 export const CreateServerlessCacheSnapshot = Binding.Service<CreateServerlessCacheSnapshot>(
43 "AWS.ElastiCache.CreateServerlessCacheSnapshot",
44 );