1.10.3 • Published 5 months ago

@effect-aws/client-api-gateway v1.10.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@effect-aws/client-api-gateway

npm version npm downloads

Installation

npm install --save @effect-aws/client-api-gateway

Usage

With default APIGatewayClient instance:

import { APIGateway } from "@effect-aws/client-api-gateway";

const program = APIGateway.getApiKey(args);

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

With custom APIGatewayClient instance:

import { APIGateway } from "@effect-aws/client-api-gateway";

const program = APIGateway.getApiKey(args);

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

With custom APIGatewayClient configuration:

import { APIGateway } from "@effect-aws/client-api-gateway";

const program = APIGateway.getApiKey(args);

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

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

1.10.3

5 months ago

1.10.2

5 months ago

1.10.0

5 months ago