1import type * as elasticache from "@distilled.cloud/aws/elasticache";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for the `CopyServerlessCacheSnapshot` operation (IAM
7 * actions `elasticache:CopyServerlessCacheSnapshot` +
8 * `elasticache:AddTagsToResource`).
9 *
10 * Copies an existing serverless cache snapshot, optionally re-encrypting it
11 * under a different KMS key — e.g. duplicating a nightly backup before a
12 * risky migration. Available for valkey, redis, and serverless memcached.
13 * Provide the implementation with
14 * `Effect.provide(AWS.ElastiCache.CopyServerlessCacheSnapshotHttp)`.
15 * ### Managing Snapshots
16 * **Example:** Copy a Snapshot
17 * ```typescript
18 * const copySnapshot = yield* ElastiCache.CopyServerlessCacheSnapshot();
19 *
20 * const result = yield* copySnapshot({
21 * SourceServerlessCacheSnapshotName: "nightly",
22 * TargetServerlessCacheSnapshotName: "pre-migration",
23 * });
24 * ```
25 *
26 * @binding
27 */
28export interface CopyServerlessCacheSnapshot extends Binding.Service<
29 CopyServerlessCacheSnapshot,
30 "AWS.ElastiCache.CopyServerlessCacheSnapshot",
31 () => Effect.Effect<
32 (
33 request: elasticache.CopyServerlessCacheSnapshotRequest,
34 ) => Effect.Effect<
35 elasticache.CopyServerlessCacheSnapshotResponse,
36 elasticache.CopyServerlessCacheSnapshotError
37 >
38 >
39> {}
40export const CopyServerlessCacheSnapshot =
41 Binding.Service<CopyServerlessCacheSnapshot>(
42 "AWS.ElastiCache.CopyServerlessCacheSnapshot",
43 );