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

1.9.5 • Public • Published

@effect-aws/client-ecs

npm version npm downloads

Installation

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

Usage

With default ECSClient instance:

import { ECS } from "@effect-aws/client-ecs";

const program = ECS.listClusters(args);

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

With custom ECSClient instance:

import { ECS } from "@effect-aws/client-ecs";

const program = ECS.listClusters(args);

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

With custom ECSClient configuration:

import { ECS } from "@effect-aws/client-ecs";

const program = ECS.listClusters(args);

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

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

Readme

Keywords

none

Package Sidebar

Install

npm i @effect-aws/client-ecs

Weekly Downloads

100

Version

1.9.5

License

MIT

Unpacked Size

175 kB

Total Files

53

Last publish

Collaborators

  • f1oyd