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