@effect-aws/client-eventbridge
v1.6.0
Published
[![npm version](https://img.shields.io/npm/v/%40effect-aws%2Fclient-eventbridge?color=brightgreen&label=npm%20package)](https://www.npmjs.com/package/@effect-aws/client-eventbridge) [![npm downloads](https://img.shields.io/npm/dm/%40effect-aws%2Fclient-ev
Downloads
2,497
Readme
@effect-aws/client-eventbridge
Installation
npm install --save @effect-aws/client-eventbridge
Usage
With default EventBridgeClient instance:
import { EventBridge } from "@effect-aws/client-eventbridge";
const program = EventBridge.putEvents(args);
const result = pipe(
program,
Effect.provide(EventBridge.defaultLayer),
Effect.runPromise,
);
With custom EventBridgeClient instance:
import { EventBridge } from "@effect-aws/client-eventbridge";
const program = EventBridge.putEvents(args);
const result = await pipe(
program,
Effect.provide(
EventBridge.baseLayer(() => new EventBridgeClient({ region: "eu-central-1" })),
),
Effect.runPromise,
);
With custom EventBridgeClient configuration:
import { EventBridge } from "@effect-aws/client-eventbridge";
const program = EventBridge.putEvents(args);
const result = await pipe(
program,
Effect.provide(EventBridge.layer({ region: "eu-central-1" })),
Effect.runPromiseExit,
);
or use EventBridge.baseLayer((default) => new EventBridgeClient({ ...default, region: "eu-central-1" }))