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