The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import * as memorydb from "@distilled.cloud/aws/memorydb"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeMemoryDBClusterHttpBinding, SNAPSHOT_ARN_WILDCARD } from "./BindingHttp.ts"; |
| 4 | import { CreateSnapshot } from "./CreateSnapshot.ts"; |
| 5 | |
| 6 | export const CreateSnapshotHttp = Layer.effect( |
| 7 | CreateSnapshot, |
| 8 | makeMemoryDBClusterHttpBinding({ |
| 9 | tag: "AWS.MemoryDB.CreateSnapshot", |
| 10 | operation: memorydb.createSnapshot, |
| 11 | // TagResource authorizes tag-on-create for the snapshot. |
| 12 | actions: ["memorydb:CreateSnapshot", "memorydb:TagResource"], |
| 13 | // The action authorizes against both the source cluster and the |
| 14 | // to-be-created snapshot (whose name-based ARN is runtime data). |
| 15 | extraResources: [SNAPSHOT_ARN_WILDCARD], |
| 16 | }), |
| 17 | ); |