Skip to content

Asset

Source: src/AWS/IoTSiteWise/Asset.ts

An AWS IoT SiteWise asset — an instance of an asset model representing a physical piece of industrial equipment or a logical grouping.

Asset creation and updates are asynchronous (CREATING/UPDATINGACTIVE); the provider waits for the asset to converge to ACTIVE before returning.

import * as AWS from "alchemy/AWS";
const model = yield* AWS.IoTSiteWise.AssetModel("PumpModel", {
assetModelProperties: [
{ name: "Temperature", dataType: "DOUBLE", type: { measurement: {} } },
],
});
const asset = yield* AWS.IoTSiteWise.Asset("Pump1", {
assetModelId: model.assetModelId,
assetDescription: "Pump #1 on the west line",
});