1import * as apprunner from "@distilled.cloud/aws/apprunner";
2import { makeAppRunnerHttpBinding } from "./BindingHttp.ts";
3import { DisassociateCustomDomain } from "./DisassociateCustomDomain.ts";
4import 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 */
11export 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);