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

main
ts 18 lines 769 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 { GetIndex } from "./GetIndex.ts";
5
6 export const GetIndexHttp = Layer.effect(
7 GetIndex,
8 makeAossCollectionHttpBinding({
9 tag: "AWS.OpenSearchServerless.GetIndex",
10 operation: aoss.getIndex,
11 // IAM checks both: `aoss:GetIndex` 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:GetIndex", "aoss:APIAccessAll"],
17 }),
18 );