@effect-aws/client-sts
v1.1.0
Published
[![npm version](https://img.shields.io/npm/v/%40effect-aws%2Fclient-sts?color=brightgreen&label=npm%20package)](https://www.npmjs.com/package/@effect-aws/client-sts) [![npm downloads](https://img.shields.io/npm/dm/%40effect-aws%2Fclient-sts)](https://www.
Downloads
267
Readme
@effect-aws/client-sts
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" }))