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