1.10.3 • Published 5 months ago

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

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

@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" }))

1.10.3

5 months ago

1.10.2

5 months ago

1.10.0

5 months ago