Back to Aws Sdk Js V3

@aws-sdk/client-iotfleetwise

clients/client-iotfleetwise/README.md

3.1043.033.4 KB
Original Source
<!-- generated file, do not edit directly -->

@aws-sdk/client-iotfleetwise

Description

AWS SDK for JavaScript IoTFleetWise Client for Node.js, Browser and React Native.

<p>Amazon Web Services IoT FleetWise is a fully managed service that you can use to collect, model, and transfer vehicle data to the Amazon Web Services cloud at scale. With Amazon Web Services IoT FleetWise, you can standardize all of your vehicle data models, independent of the in-vehicle communication architecture, and define data collection rules to transfer only high-value data to the cloud. </p> <p>For more information, see <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/">What is Amazon Web Services IoT FleetWise?</a> in the <i>Amazon Web Services IoT FleetWise Developer Guide</i>.</p> <p>Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/fleetwise-regions.html">Amazon Web Services Region and feature availability</a> in the <i>Amazon Web Services IoT FleetWise Developer Guide</i>.</p>

Installing

To install this package, use the CLI of your favorite package manager:

  • npm install @aws-sdk/client-iotfleetwise
  • yarn add @aws-sdk/client-iotfleetwise
  • pnpm add @aws-sdk/client-iotfleetwise

Getting Started

Import

The AWS SDK is modulized by clients and commands. To send a request, you only need to import the IoTFleetWiseClient and the commands you need, for example ListFleetsCommand:

js
// ES5 example
const { IoTFleetWiseClient, ListFleetsCommand } = require("@aws-sdk/client-iotfleetwise");
ts
// ES6+ example
import { IoTFleetWiseClient, ListFleetsCommand } from "@aws-sdk/client-iotfleetwise";

Usage

To send a request:

  • Instantiate a client with configuration (e.g. credentials, region).
  • Instantiate a command with input parameters.
  • Call the send operation on the client, providing the command object as input.
js
const client = new IoTFleetWiseClient({ region: "REGION" });

const params = { /** input parameters */ };
const command = new ListFleetsCommand(params);

Async/await

We recommend using the await operator to wait for the promise returned by send operation as follows:

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

Promises

You can also use Promise chaining.

js
client
  .send(command)
  .then((data) => {
    // process data.
  })
  .catch((error) => {
    // error handling.
  })
  .finally(() => {
    // finally.
  });

Aggregated client

The aggregated client class is exported from the same package, but without the "Client" suffix.

IoTFleetWise extends IoTFleetWiseClient and additionally supports all operations, waiters, and paginators as methods. This style may be familiar to you from the AWS SDK for JavaScript v2.

If you are bundling the AWS SDK, we recommend using only the bare-bones client (IoTFleetWiseClient). More details are in the blog post on modular packages in AWS SDK for JavaScript.

ts
import { IoTFleetWise } from "@aws-sdk/client-iotfleetwise";

const client = new IoTFleetWise({ region: "REGION" });

// async/await.
try {
  const data = await client.listFleets(params);
  // process data.
} catch (error) {
  // error handling.
}

// Promises.
client
  .listFleets(params)
  .then((data) => {
    // process data.
  })
  .catch((error) => {
    // error handling.
  });

// callbacks (not recommended).
client.listFleets(params, (err, data) => {
  // process err and data.
});

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 specifying exception names:
   * if (error.name === 'SomeServiceException') {
   *     const value = error.specialKeyInException;
   * }
   */
}

See also docs/ERROR_HANDLING.

Getting Help

Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.

To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.

Contributing

This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-iotfleetwise package is updated. To contribute to client you can check our generate clients scripts.

License

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

Client Commands (Operations List)

<details> <summary> AssociateVehicleFleet </summary>

Command API Reference / Input / Output

</details> <details> <summary> BatchCreateVehicle </summary>

Command API Reference / Input / Output

</details> <details> <summary> BatchUpdateVehicle </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateCampaign </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateDecoderManifest </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateFleet </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateModelManifest </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateSignalCatalog </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateStateTemplate </summary>

Command API Reference / Input / Output

</details> <details> <summary> CreateVehicle </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteCampaign </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteDecoderManifest </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteFleet </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteModelManifest </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteSignalCatalog </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteStateTemplate </summary>

Command API Reference / Input / Output

</details> <details> <summary> DeleteVehicle </summary>

Command API Reference / Input / Output

</details> <details> <summary> DisassociateVehicleFleet </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetCampaign </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetDecoderManifest </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetEncryptionConfiguration </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetFleet </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetLoggingOptions </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetModelManifest </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetRegisterAccountStatus </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetSignalCatalog </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetStateTemplate </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetVehicle </summary>

Command API Reference / Input / Output

</details> <details> <summary> GetVehicleStatus </summary>

Command API Reference / Input / Output

</details> <details> <summary> ImportDecoderManifest </summary>

Command API Reference / Input / Output

</details> <details> <summary> ImportSignalCatalog </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListCampaigns </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListDecoderManifestNetworkInterfaces </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListDecoderManifests </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListDecoderManifestSignals </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListFleets </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListFleetsForVehicle </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListModelManifestNodes </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListModelManifests </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListSignalCatalogNodes </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListSignalCatalogs </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListStateTemplates </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListTagsForResource </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListVehicles </summary>

Command API Reference / Input / Output

</details> <details> <summary> ListVehiclesInFleet </summary>

Command API Reference / Input / Output

</details> <details> <summary> PutEncryptionConfiguration </summary>

Command API Reference / Input / Output

</details> <details> <summary> PutLoggingOptions </summary>

Command API Reference / Input / Output

</details> <details> <summary> RegisterAccount </summary>

Command API Reference / Input / Output

</details> <details> <summary> TagResource </summary>

Command API Reference / Input / Output

</details> <details> <summary> UntagResource </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateCampaign </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateDecoderManifest </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateFleet </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateModelManifest </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateSignalCatalog </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateStateTemplate </summary>

Command API Reference / Input / Output

</details> <details> <summary> UpdateVehicle </summary>

Command API Reference / Input / Output

</details>