You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@effect-aws/client-cloudsearch

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effect-aws/client-cloudsearch

[![npm version](https://img.shields.io/npm/v/%40effect-aws%2Fclient-cloudsearch?color=brightgreen&label=npm%20package)](https://www.npmjs.com/package/@effect-aws/client-cloudsearch) [![npm downloads](https://img.shields.io/npm/dm/%40effect-aws%2Fclient-cl

1.0.0
Source
npm
Version published
Weekly downloads
16
-48.39%
Maintainers
0
Weekly downloads
 
Created
Source

@effect-aws/client-cloudsearch

npm version npm downloads

Installation

npm install --save @effect-aws/client-cloudsearch

Usage

With default CloudSearchClient instance:

import { CloudSearchService, DefaultCloudSearchServiceLayer } from "@effect-aws/client-cloudsearch";

const program = CloudSearchService.describeDomains(args);

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

With custom CloudSearchClient instance:

import {
  CloudSearchService,
  BaseCloudSearchServiceLayer,
  CloudSearchClientInstance,
} from "@effect-aws/client-cloudsearch";

const program = CloudSearchService.describeDomains(args);

const CloudSearchClientInstanceLayer = Layer.succeed(
  CloudSearchClientInstance,
  new CloudSearchClient({ region: "eu-central-1" }),
);

const result = await pipe(
  program,
  Effect.provide(BaseCloudSearchServiceLayer),
  Effect.provide(CloudSearchClientInstanceLayer),
  Effect.runPromise,
);

With custom CloudSearchClient configuration:

import {
  CloudSearchService,
  BaseCloudSearchServiceLayer,
  DefaultCloudSearchClientConfigLayer,
  CloudSearchClientInstance,
  CloudSearchClientInstanceConfig,
} from "@effect-aws/client-cloudsearch";

const program = CloudSearchService.describeDomains(args);

const CloudSearchClientInstanceLayer = Layer.provide(
  Layer.effect(
    CloudSearchClientInstance,
    CloudSearchClientInstanceConfig.pipe(
      Effect.map(
        (config) => new CloudSearchClient({ ...config, region: "eu-central-1" }),
      ),
    ),
  ),
  DefaultCloudSearchClientConfigLayer,
);

const result = await pipe(
  program,
  Effect.provide(BaseCloudSearchServiceLayer),
  Effect.provide(CloudSearchClientInstanceLayer),
  Effect.runPromiseExit,
);

or map over DefaultCloudSearchClientConfigLayer layer context and update the configuration...

FAQs

Package last updated on 25 Oct 2024

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