| 1 | import * as Logs from "@distilled.cloud/aws/cloudwatch-logs"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeLogGroupHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { StartQuery } from "./StartQuery.ts"; |
| 5 | |
| 6 | export const StartQueryHttp = Layer.effect( |
| 7 | StartQuery, |
| 8 | makeLogGroupHttpBinding({ |
| 9 | tag: "AWS.Logs.StartQuery", |
| 10 | operation: Logs.startQuery, |
| 11 | // logs:StopQuery is deliberately NOT bundled here: it does not support |
| 12 | // resource-level permissions, so a group-scoped grant never matches. |
| 13 | // Use the dedicated StopQuery binding (which grants on `*`). |
| 14 | actions: ["logs:StartQuery"], |
| 15 | }), |
| 16 | ); |