1import * as appsync from "@distilled.cloud/aws/appsync";
2import * as Layer from "effect/Layer";
3import { makeAppSyncAccountHttpBinding } from "./BindingHttp.ts";
4import { EvaluateCode } from "./EvaluateCode.ts";
5
6/**
7 * HTTP implementation of the {@link EvaluateCode} binding. Calls
8 * `appsync:EvaluateCode` with the host Function's IAM role. The action
9 * defines no IAM resource types, so the grant is necessarily
10 * `Resource: "*"`.
11 */
12export const EvaluateCodeHttp = Layer.effect(
13 EvaluateCode,
14 makeAppSyncAccountHttpBinding({
15 tag: "AWS.AppSync.EvaluateCode",
16 actions: ["appsync:EvaluateCode"],
17 operation: appsync.evaluateCode,
18 }),
19);