The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import * as aoss from "@distilled.cloud/aws/opensearchserverless"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeAossCollectionHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { UpdateIndex } from "./UpdateIndex.ts"; |
| 5 | |
| 6 | export const UpdateIndexHttp = Layer.effect( |
| 7 | UpdateIndex, |
| 8 | makeAossCollectionHttpBinding({ |
| 9 | tag: "AWS.OpenSearchServerless.UpdateIndex", |
| 10 | operation: aoss.updateIndex, |
| 11 | // IAM checks both: `aoss:UpdateIndex` 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:UpdateIndex", "aoss:APIAccessAll"], |
| 17 | }), |
| 18 | ); |