1.10.3 • Published 5 months ago
@effect-aws/client-iot-data-plane v1.10.3
@effect-aws/client-iot-data-plane
Installation
npm install --save @effect-aws/client-iot-data-plane
Usage
With default IoTDataPlaneClient instance:
import { IoTDataPlane } from "@effect-aws/client-iot-data-plane";
const program = IoTDataPlane.publish(args);
const result = pipe(
program,
Effect.provide(IoTDataPlane.defaultLayer),
Effect.runPromise,
);
With custom IoTDataPlaneClient instance:
import { IoTDataPlane } from "@effect-aws/client-iot-data-plane";
const program = IoTDataPlane.publish(args);
const result = await pipe(
program,
Effect.provide(
IoTDataPlane.baseLayer(() => new IoTDataPlaneClient({ region: "eu-central-1" })),
),
Effect.runPromise,
);
With custom IoTDataPlaneClient configuration:
import { IoTDataPlane } from "@effect-aws/client-iot-data-plane";
const program = IoTDataPlane.publish(args);
const result = await pipe(
program,
Effect.provide(IoTDataPlane.layer({ region: "eu-central-1" })),
Effect.runPromiseExit,
);
or use IoTDataPlane.baseLayer((default) => new IoTDataPlaneClient({ ...default, region: "eu-central-1" }))