@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

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