| 1 | import * as docdbelastic from "@distilled.cloud/aws/docdb-elastic"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { |
| 4 | makeDocDBElasticClusterHttpBinding, |
| 5 | SNAPSHOT_ARN_WILDCARD, |
| 6 | } from "./BindingHttp.ts"; |
| 7 | import { CreateClusterSnapshot } from "./CreateClusterSnapshot.ts"; |
| 8 | |
| 9 | export const CreateClusterSnapshotHttp = Layer.effect( |
| 10 | CreateClusterSnapshot, |
| 11 | makeDocDBElasticClusterHttpBinding({ |
| 12 | tag: "AWS.DocDBElastic.CreateClusterSnapshot", |
| 13 | operation: docdbelastic.createClusterSnapshot, |
| 14 | actions: [ |
| 15 | "docdb-elastic:CreateClusterSnapshot", |
| 16 | "docdb-elastic:TagResource", |
| 17 | ], |
| 18 | // The action authorizes against both the source cluster and the |
| 19 | // to-be-created snapshot (whose UUID-based ARN is server-generated). |
| 20 | extraResources: [SNAPSHOT_ARN_WILDCARD], |
| 21 | }), |
| 22 | ); |