@effect-aws/client-secrets-manager
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

@effect-aws/client-secrets-manager

npm version npm downloads

Installation

npm install --save @effect-aws/client-secrets-manager

Usage

With default SecretsManagerClient instance:

import { SecretsManager } from "@effect-aws/client-secrets-manager";

const program = SecretsManager.getSecretValue(args);

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

With custom SecretsManagerClient instance:

import { SecretsManager } from "@effect-aws/client-secrets-manager";

const program = SecretsManager.getSecretValue(args);

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

With custom SecretsManagerClient configuration:

import { SecretsManager } from "@effect-aws/client-secrets-manager";

const program = SecretsManager.getSecretValue(args);

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

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

Readme

Keywords

none

Package Sidebar

Install

npm i @effect-aws/client-secrets-manager

Weekly Downloads

29

Version

1.3.0

License

MIT

Unpacked Size

124 kB

Total Files

22

Last publish

Collaborators

  • f1oyd