| 1 | import * as ECS from "@distilled.cloud/aws/ecs"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeEcsClusterHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { ListTasks } from "./ListTasks.ts"; |
| 5 | |
| 6 | export const ListTasksHttp = Layer.effect( |
| 7 | ListTasks, |
| 8 | makeEcsClusterHttpBinding({ |
| 9 | tag: "AWS.ECS.ListTasks", |
| 10 | operation: ECS.listTasks, |
| 11 | actions: ["ecs:ListTasks"], |
| 12 | // `ecs:ListTasks` has no useful resource-level scoping on Fargate (its |
| 13 | // resource type is container-instance), so grant `*` conditioned on the |
| 14 | // bound cluster. |
| 15 | resources: "cluster-condition", |
| 16 | }), |
| 17 | ); |