Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

AssociateCustomDomainHttp.ts

20 lines766 Bytes

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