You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP

@effect-aws/client-api-gateway

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effect-aws/client-api-gateway

Effectful AWS API Gateway client

1.10.3
latest
Version published
Maintainers
1
Created

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

FAQs

Package last updated on 17 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts