npm package: @stedi/sdk-client-functions
Description: Stedi SDK for JavaScript that includes Functions client for Node.js, Browser and React Native
Author: Stedi Team
Latest version: 0.4.78
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

<!-- generated file, do not edit directly -->

# @stedi/sdk-client-functions

[![NPM version](https://img.shields.io/npm/v/@stedi/sdk-client-functions/latest.svg)](https://www.npmjs.com/package/@stedi/sdk-client-functions)
[![NPM downloads](https://img.shields.io/npm/dm/@stedi/sdk-client-functions.svg)](https://www.npmjs.com/package/@stedi/sdk-client-functions)
[![Stability Index](https://img.shields.io/badge/dynamic/json?color=yellow&url=https://unpkg.com/@stedi/sdk-client-functions/package.json&query=$.stability&label=stability)](https://github.com/dominictarr/stability)
[![Minimum Node.js version](https://img.shields.io/badge/dynamic/json?color=brightgreen&url=https://unpkg.com/@stedi/sdk-client-functions/package.json&query=$.engines.node&label=nodejs)](https://nodejs.org/)

## Description

Stedi Functions SDK for JavaScript.

## Installing

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

- `npm install @stedi/sdk-client-functions`
- `yarn add @stedi/sdk-client-functions`
- `pnpm add @stedi/sdk-client-functions`

## Getting Started

### Initialize the client

First, create a new `FunctionsClient`.

```ts
import { FunctionsClient, CreateFunctionCommand } from "@stedi/sdk-client-functions";

const client = new FunctionsClient({
  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 `CreateFunctionCommand`.

```ts
import { FunctionsClient, CreateFunctionCommand } from "@stedi/sdk-client-functions";

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

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

const command = new CreateFunctionCommand(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).

```js
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](http://www.apache.org/licenses/LICENSE-2.0),
see LICENSE for more information.

## Client Commands (Operations List)

<details>
<summary>
CreateFunction
</summary>

[Command API Reference](/docs/sdk/clients/functions/docs/classes/CreateFunctionCommand.html) / [Input](/docs/sdk/clients/functions/docs/interfaces/CreateFunctionCommandInput.html) / [Output](/docs/sdk/clients/functions/docs/interfaces/CreateFunctionCommandOutput.html)

</details>
<details>
<summary>
DeleteFunction
</summary>

[Command API Reference](/docs/sdk/clients/functions/docs/classes/DeleteFunctionCommand.html) / [Input](/docs/sdk/clients/functions/docs/interfaces/DeleteFunctionCommandInput.html) / [Output](/docs/sdk/clients/functions/docs/interfaces/DeleteFunctionCommandOutput.html)

</details>
<details>
<summary>
DescribeFunction
</summary>

[Command API Reference](/docs/sdk/clients/functions/docs/classes/DescribeFunctionCommand.html) / [Input](/docs/sdk/clients/functions/docs/interfaces/DescribeFunctionCommandInput.html) / [Output](/docs/sdk/clients/functions/docs/interfaces/DescribeFunctionCommandOutput.html)

</details>
<details>
<summary>
DescribeFunctionPackage
</summary>

[Command API Reference](/docs/sdk/clients/functions/docs/classes/DescribeFunctionPackageCommand.html) / [Input](/docs/sdk/clients/functions/docs/interfaces/DescribeFunctionPackageCommandInput.html) / [Output](/docs/sdk/clients/functions/docs/interfaces/DescribeFunctionPackageCommandOutput.html)

</details>
<details>
<summary>
GetAccountSettings
</summary>

[Command API Reference](/docs/sdk/clients/functions/docs/classes/GetAccountSettingsCommand.html) / [Input](/docs/sdk/clients/functions/docs/interfaces/GetAccountSettingsCommandInput.html) / [Output](/docs/sdk/clients/functions/docs/interfaces/GetAccountSettingsCommandOutput.html)

</details>
<details>
<summary>
InvokeFunction
</summary>

[Command API Reference](/docs/sdk/clients/functions/docs/classes/InvokeFunctionCommand.html) / [Input](/docs/sdk/clients/functions/docs/interfaces/InvokeFunctionCommandInput.html) / [Output](/docs/sdk/clients/functions/docs/interfaces/InvokeFunctionCommandOutput.html)

</details>
<details>
<summary>
ListFunctions
</summary>

[Command API Reference](/docs/sdk/clients/functions/docs/classes/ListFunctionsCommand.html) / [Input](/docs/sdk/clients/functions/docs/interfaces/ListFunctionsCommandInput.html) / [Output](/docs/sdk/clients/functions/docs/interfaces/ListFunctionsCommandOutput.html)

</details>
<details>
<summary>
UpdateFunction
</summary>

[Command API Reference](/docs/sdk/clients/functions/docs/classes/UpdateFunctionCommand.html) / [Input](/docs/sdk/clients/functions/docs/interfaces/UpdateFunctionCommandInput.html) / [Output](/docs/sdk/clients/functions/docs/interfaces/UpdateFunctionCommandOutput.html)

</details>