| 1 | import * as Firehose from "@distilled.cloud/aws/firehose"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeDeliveryStreamHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { PutRecordBatch } from "./PutRecordBatch.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of {@link PutRecordBatch}. At deploy time it grants |
| 8 | * `firehose:PutRecordBatch` on the bound delivery stream; at runtime it calls |
| 9 | * the Firehose API with the host Function's credentials. Provide this layer |
| 10 | * on the Function using the binding. |
| 11 | */ |
| 12 | export const PutRecordBatchHttp = Layer.effect( |
| 13 | PutRecordBatch, |
| 14 | makeDeliveryStreamHttpBinding({ |
| 15 | tag: "AWS.Firehose.PutRecordBatch", |
| 16 | operation: Firehose.putRecordBatch, |
| 17 | actions: ["firehose:PutRecordBatch"], |
| 18 | }), |
| 19 | ); |