The best way to control Claude Code, Codex and more from any computer or phone

main
ts 18 lines 793 Bytes
Raw
1 import * as aoss from "@distilled.cloud/aws/opensearchserverless";
2 import * as Layer from "effect/Layer";
3 import { makeAossCollectionHttpBinding } from "./BindingHttp.ts";
4 import { CreateIndex } from "./CreateIndex.ts";
5
6 export const CreateIndexHttp = Layer.effect(
7 CreateIndex,
8 makeAossCollectionHttpBinding({
9 tag: "AWS.OpenSearchServerless.CreateIndex",
10 operation: aoss.createIndex,
11 // IAM checks both: `aoss:CreateIndex` for the API call, and
12 // `aoss:APIAccessAll` because the service reads the index through the
13 // collection's data plane ("Access denied to head index" without it).
14 // IAM has no narrower data-plane action; per-index permissions belong in
15 // the collection's AccessPolicy.
16 actions: ["aoss:CreateIndex", "aoss:APIAccessAll"],
17 }),
18 );