npm

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

1.1.0 • Public • Published

@effect-aws/client-sts

npm version npm downloads

Installation

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

Usage

With default STSClient instance:

import { STS } from "@effect-aws/client-sts";

const program = STS.getCallerIdentity(args);

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

With custom STSClient instance:

import { STS } from "@effect-aws/client-sts";

const program = STS.getCallerIdentity(args);

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

With custom STSClient configuration:

import { STS } from "@effect-aws/client-sts";

const program = STS.getCallerIdentity(args);

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

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

Readme

Keywords

none

Package Sidebar

Install

npm i @effect-aws/client-sts

Weekly Downloads

133

Version

1.1.0

License

MIT

Unpacked Size

80.4 kB

Total Files

22

Last publish

Collaborators

  • f1oyd