1import * as elasticache from "@distilled.cloud/aws/elasticache";
2import * as Layer from "effect/Layer";
3import {
4 makeElastiCacheAccountHttpBinding,
5 SERVERLESS_SNAPSHOT_ARN_WILDCARD,
6} from "./BindingHttp.ts";
7import { ExportServerlessCacheSnapshot } from "./ExportServerlessCacheSnapshot.ts";
8
9export const ExportServerlessCacheSnapshotHttp = Layer.effect(
10 ExportServerlessCacheSnapshot,
11 makeElastiCacheAccountHttpBinding({
12 tag: "AWS.ElastiCache.ExportServerlessCacheSnapshot",
13 operation: elasticache.exportServerlessCacheSnapshot,
14 actions: ["elasticache:ExportServerlessCacheSnapshot"],
15 // Snapshot names are runtime data. S3 access is granted to the
16 // ElastiCache service via the target bucket's policy, not to the caller.
17 resources: [SERVERLESS_SNAPSHOT_ARN_WILDCARD],
18 }),
19);