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

1.10.3 • Public • Published

@effect-aws/client-api-gateway-v2

npm version npm downloads

Installation

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

Usage

With default ApiGatewayV2Client instance:

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

const program = ApiGatewayV2.getApi(args);

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

With custom ApiGatewayV2Client instance:

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

const program = ApiGatewayV2.getApi(args);

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

With custom ApiGatewayV2Client configuration:

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

const program = ApiGatewayV2.getApi(args);

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

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

Readme

Keywords

none

Package Sidebar

Install

npm i @effect-aws/client-api-gateway-v2

Weekly Downloads

10

Version

1.10.3

License

MIT

Unpacked Size

176 kB

Total Files

53

Last publish

Collaborators

  • f1oyd