1import * as composer from "@distilled.cloud/gcp/composer_v1";
2import * as Layer from "effect/Layer";
3import { makeEnvironmentHttpBinding } from "./BindingHttp.ts";
4import { ExecuteAirflowCommand } from "./ExecuteAirflowCommand.ts";
5
6/**
7 * HTTP implementation of {@link ExecuteAirflowCommand}.
8 *
9 * Grants `roles/composer.editor` on the project because
10 * `composer.environments.executeAirflowCommand` is in no narrower
11 * predefined role and Composer environments have no resource-level IAM.
12 *
13 * @layer
14 * @provides GCP.Composer.ExecuteAirflowCommand
15 */
16export const ExecuteAirflowCommandHttp = Layer.effect(
17 ExecuteAirflowCommand,
18 makeEnvironmentHttpBinding({
19 tag: "GCP.Composer.ExecuteAirflowCommand",
20 iam: { role: "roles/composer.editor" },
21 nameKey: "environment",
22 operation: composer.executeAirflowCommandProjectsLocationsEnvironments,
23 }),
24);