| 1 | import * as acm from "@distilled.cloud/aws/acm"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeAcmAccountHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { |
| 5 | ImportCertificate, |
| 6 | type ImportCertificateRequest, |
| 7 | } from "./ImportCertificate.ts"; |
| 8 | |
| 9 | export const ImportCertificateHttp = Layer.effect( |
| 10 | ImportCertificate, |
| 11 | makeAcmAccountHttpBinding({ |
| 12 | capability: "ImportCertificate", |
| 13 | // Importing with `Tags` additionally requires `acm:AddTagsToCertificate`, |
| 14 | // which ACM checks alongside the import itself. |
| 15 | iamActions: ["acm:ImportCertificate", "acm:AddTagsToCertificate"], |
| 16 | operation: acm.importCertificate, |
| 17 | }), |
| 18 | ); |