npm.io
1.11.3 • Published 2d ago

@effect-aws/client-dsql

Licence
MIT
Version
1.11.3
Deps
2
Size
79 kB
Vulns
0
Weekly
0
Stars
205

@effect-aws/client-dsql

npm version npm downloads

Installation

npm install --save @effect-aws/client-dsql

Usage

With default DSQLClient instance:

import { DSQL } from "@effect-aws/client-dsql";

const program = DSQL.listClusters(args);

const result = pipe(
  program,
  Effect.provide(DSQL.defaultLayer),
  Effect.runPromise,
);

With custom DSQLClient instance:

import { DSQL } from "@effect-aws/client-dsql";

const program = DSQL.listClusters(args);

const result = await pipe(
  program,
  Effect.provide(
    DSQL.baseLayer(() => new DSQLClient({ region: "eu-central-1" })),
  ),
  Effect.runPromise,
);

With custom DSQLClient configuration:

import { DSQL } from "@effect-aws/client-dsql";

const program = DSQL.listClusters(args);

const result = await pipe(
  program,
  Effect.provide(DSQL.layer({ region: "eu-central-1" })),
  Effect.runPromiseExit,
);

or use DSQL.baseLayer((default) => new DSQLClient({ ...default, region: "eu-central-1" }))