Skip to content

GetAssetPropertyValue

Source: src/AWS/IoTSiteWise/GetAssetPropertyValue.ts

Runtime binding for iotsitewise:GetAssetPropertyValue — read the current (latest) timestamp-quality-value of one property of the bound asset from a deployed Lambda or Task.

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

// init
const getValue = yield* AWS.IoTSiteWise.GetAssetPropertyValue(asset);
// runtime
const { propertyValue } = yield* getValue({ propertyId });
const celsius = propertyValue?.value.doubleValue;
// on the Function effect:
// .pipe(Effect.provide(AWS.IoTSiteWise.GetAssetPropertyValueHttp))