| 1 | import * as memorydb from "@distilled.cloud/aws/memorydb"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { |
| 4 | makeMemoryDBAccountHttpBinding, |
| 5 | SNAPSHOT_ARN_WILDCARD, |
| 6 | } from "./BindingHttp.ts"; |
| 7 | import { CopySnapshot } from "./CopySnapshot.ts"; |
| 8 | |
| 9 | export const CopySnapshotHttp = Layer.effect( |
| 10 | CopySnapshot, |
| 11 | makeMemoryDBAccountHttpBinding({ |
| 12 | tag: "AWS.MemoryDB.CopySnapshot", |
| 13 | operation: memorydb.copySnapshot, |
| 14 | // TagResource authorizes tag-on-create for the target snapshot. |
| 15 | actions: ["memorydb:CopySnapshot", "memorydb:TagResource"], |
| 16 | // Both the source and target snapshot names are runtime data. |
| 17 | resources: [SNAPSHOT_ARN_WILDCARD], |
| 18 | }), |
| 19 | ); |