1import * as ECS from "@distilled.cloud/aws/ecs";
2import * as Layer from "effect/Layer";
3import { makeEcsClusterHttpBinding } from "./BindingHttp.ts";
4import { ExecuteCommand } from "./ExecuteCommand.ts";
5
6export const ExecuteCommandHttp = Layer.effect(
7 ExecuteCommand,
8 makeEcsClusterHttpBinding({
9 tag: "AWS.ECS.ExecuteCommand",
10 operation: ECS.executeCommand,
11 actions: ["ecs:ExecuteCommand"],
12 // `ecs:ExecuteCommand` authorizes against both the cluster and the task.
13 resources: ["cluster", "task"],
14 }),
15);