1import * as Logs from "@distilled.cloud/aws/cloudwatch-logs";
2import * as Layer from "effect/Layer";
3import { makeLogGroupHttpBinding } from "./BindingHttp.ts";
4import { PutLogEvents } from "./PutLogEvents.ts";
5
6export 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);