Skip to content

DescribeAsset

Source: src/AWS/IoTSiteWise/DescribeAsset.ts

Runtime binding for iotsitewise:DescribeAsset — read the bound asset’s full description (including its properties with their service-assigned ids and names) from a deployed Lambda or Task. Use it to resolve a property’s id by name before reading or ingesting values.

Provide the DescribeAssetHttp implementation layer on the Function effect, bind the asset in the init phase, then call the returned client at runtime.

// init
const describeAsset = yield* AWS.IoTSiteWise.DescribeAsset(asset);
// runtime
const described = yield* describeAsset();
const propertyId = described.assetProperties.find(
(p) => p.name === "Temperature",
)?.id;
// on the Function effect:
// .pipe(Effect.provide(AWS.IoTSiteWise.DescribeAssetHttp))