| 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 { PutLogEvents } from "./PutLogEvents.ts"; |
| 5 | |
| 6 | export const PutLogEventsHttp = Layer.effect( |
| 7 | PutLogEvents, |
| 8 | makeLogGroupHttpBinding({ |
| 9 | tag: "AWS.Logs.PutLogEvents", |
| 10 | operation: Logs.putLogEvents, |
| 11 | actions: ["logs:PutLogEvents"], |
| 12 | // PutLogEvents authorizes against the log-stream resource |
| 13 | // (`log-group:{name}:log-stream:{stream}`), covered by the `:*` |
| 14 | // wildcard on the group ARN. |
| 15 | iamResources: "streams", |
| 16 | }), |
| 17 | ); |