@stedi/sdk-client-events
TypeScript icon, indicating that this package has built-in type declarations

0.4.78 • Public • Published

@stedi/sdk-client-events

NPM version NPM downloads Stability Index Minimum Node.js version

Description

Stedi Events SDK for JavaScript.

Installing

To install the this package, simply type add or install @stedi/sdk-client-events using your favorite package manager:

  • npm install @stedi/sdk-client-events
  • yarn add @stedi/sdk-client-events
  • pnpm add @stedi/sdk-client-events

Getting Started

Initialize the client

First, create a new EventsClient.

import { EventsClient, CancelRetryHttpDestinationFailuresTaskCommand } from "@stedi/sdk-client-events";

const client = new EventsClient({
  region: "us",
  apiKey: "my-api-key",
});

Usage

Once the client is initiated, you may use it to send multiple commands. If you are using a custom http handler, you may call destroy() to close open connections.

Create a command by creating a new CancelRetryHttpDestinationFailuresTaskCommand.

import { EventsClient, CancelRetryHttpDestinationFailuresTaskCommand } from "@stedi/sdk-client-events";

const client = new EventsClient({
  region: "us",
  apiKey: "my-api-key",
});

const params = {
  /** input parameters */
};

const command = new CancelRetryHttpDestinationFailuresTaskCommand(params);

try {
  const data = await client.send(command);
  // process data.
} catch (error) {
  // error handling.
} finally {
  // finally.
}

Troubleshooting

When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).

try {
  const data = await client.send(command);
  // process data.
} catch (error) {
  const { requestId, cfId, extendedRequestId } = error.$metadata;
  console.log({ requestId, cfId, extendedRequestId });
  /**
   * The keys within exceptions are also parsed.
   * You can access them by checking if it is a certain instance of exception:
   * if (error instanceof SomeServiceException) {
   *     const value = error.specialKeyInException;
   * }
   */
}

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.

Client Commands (Operations List)

CancelRetryHttpDestinationFailuresTask

Command API Reference / Input / Output

CreateEventToFunctionBinding

Command API Reference / Input / Output

CreateEventToHttpBinding

Command API Reference / Input / Output

CreateFunctionSchedule

Command API Reference / Input / Output

CreateHttpConnection

Command API Reference / Input / Output

CreateHttpDestination

Command API Reference / Input / Output

CreateNetSuiteConnection

Command API Reference / Input / Output

CreateNetSuiteDestination

Command API Reference / Input / Output

DecodeCloudWatchEvent

Command API Reference / Input / Output

DeleteEventToFunctionBinding

Command API Reference / Input / Output

DeleteEventToHttpBinding

Command API Reference / Input / Output

DeleteFunctionSchedule

Command API Reference / Input / Output

DeleteHttpConnection

Command API Reference / Input / Output

DeleteHttpDestination

Command API Reference / Input / Output

DeleteNetSuiteConnection

Command API Reference / Input / Output

DeleteNetSuiteDestination

Command API Reference / Input / Output

DescribeEventToFunctionBinding

Command API Reference / Input / Output

DescribeEventToHttpBinding

Command API Reference / Input / Output

DescribeFunctionSchedule

Command API Reference / Input / Output

DescribeHttpConnection

Command API Reference / Input / Output

DescribeHttpDestination

Command API Reference / Input / Output

DescribeNetSuiteConnection

Command API Reference / Input / Output

DescribeNetSuiteDestination

Command API Reference / Input / Output

ListEventBindingsByFunction

Command API Reference / Input / Output

ListEventToFunctionBindings

Command API Reference / Input / Output

ListEventToHttpBindings

Command API Reference / Input / Output

ListFunctionSchedules

Command API Reference / Input / Output

ListHttpConnections

Command API Reference / Input / Output

ListHttpDestinations

Command API Reference / Input / Output

ListNetSuiteConnections

Command API Reference / Input / Output

ListNetSuiteDestinations

Command API Reference / Input / Output

ListRetryHttpDestinationFailuresTasks

Command API Reference / Input / Output

StartRetryHttpDestinationFailuresTask

Command API Reference / Input / Output

UpdateEventToFunctionBinding

Command API Reference / Input / Output

UpdateEventToHttpBinding

Command API Reference / Input / Output

UpdateFunctionSchedule

Command API Reference / Input / Output

UpdateHttpConnection

Command API Reference / Input / Output

UpdateHttpDestination

Command API Reference / Input / Output

UpdateNetSuiteConnection

Command API Reference / Input / Output

UpdateNetSuiteDestination

Command API Reference / Input / Output

Readme

Keywords

none

Package Sidebar

Install

npm i @stedi/sdk-client-events

Weekly Downloads

35

Version

0.4.78

License

Apache-2.0

Unpacked Size

2.2 MB

Total Files

904

Last publish

Collaborators

  • stediengineering