| 1 | import * as apprunner from "@distilled.cloud/aws/apprunner"; |
| 2 | import { makeAppRunnerHttpBinding } from "./BindingHttp.ts"; |
| 3 | import { DisassociateCustomDomain } from "./DisassociateCustomDomain.ts"; |
| 4 | import type { Service } from "./Service.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of the {@link DisassociateCustomDomain} binding. |
| 8 | * Calls `apprunner:DisassociateCustomDomain` with the Lambda's IAM role, |
| 9 | * scoped to the bound service. |
| 10 | */ |
| 11 | export const DisassociateCustomDomainHttp = makeAppRunnerHttpBinding( |
| 12 | DisassociateCustomDomain, |
| 13 | { |
| 14 | operation: apprunner.disassociateCustomDomain, |
| 15 | spec: (service: Service) => ({ |
| 16 | identifiers: { ServiceArn: service.serviceArn }, |
| 17 | iam: () => ({ |
| 18 | actions: ["apprunner:DisassociateCustomDomain"], |
| 19 | resources: [service.serviceArn], |
| 20 | }), |
| 21 | }), |
| 22 | }, |
| 23 | ); |