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 `ExportServerlessCacheSnapshot` operation (IAM
7 * action `elasticache:ExportServerlessCacheSnapshot`).
8 *
9 * Exports a serverless cache snapshot's data to an S3 bucket — e.g. shipping
10 * a backup out of ElastiCache for offline analysis or cross-account
11 * restore. Available for valkey and redis only. The target bucket must grant
12 * the ElastiCache service access via its bucket policy. Provide the
13 * implementation with
14 * `Effect.provide(AWS.ElastiCache.ExportServerlessCacheSnapshotHttp)`.
15 * ### Managing Snapshots
16 * **Example:** Export a Snapshot to S3
17 * ```typescript
18 * const exportSnapshot = yield* ElastiCache.ExportServerlessCacheSnapshot();
19 *
20 * yield* exportSnapshot({
21 * ServerlessCacheSnapshotName: "nightly",
22 * S3BucketName: "my-backup-bucket",
23 * });
24 * ```
25 *
26 * @binding
27 */
28export interface ExportServerlessCacheSnapshot extends Binding.Service<
29 ExportServerlessCacheSnapshot,
30 "AWS.ElastiCache.ExportServerlessCacheSnapshot",
31 () => Effect.Effect<
32 (
33 request: elasticache.ExportServerlessCacheSnapshotRequest,
34 ) => Effect.Effect<
35 elasticache.ExportServerlessCacheSnapshotResponse,
36 elasticache.ExportServerlessCacheSnapshotError
37 >
38 >
39> {}
40export const ExportServerlessCacheSnapshot =
41 Binding.Service<ExportServerlessCacheSnapshot>(
42 "AWS.ElastiCache.ExportServerlessCacheSnapshot",
43 );