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