GetAssetPropertyValueHistory
Source:
src/AWS/IoTSiteWise/GetAssetPropertyValueHistory.ts
Runtime binding for iotsitewise:GetAssetPropertyValueHistory — read the
historical timestamp-quality-values of one property of the bound asset
over a time range from a deployed Lambda or Task.
Reading Value History
Section titled “Reading Value History”Provide the GetAssetPropertyValueHistoryHttp implementation layer on
the Function effect, bind the asset in the init phase, then call the
returned client at runtime. Page through large ranges with nextToken.
// initconst getHistory = yield* AWS.IoTSiteWise.GetAssetPropertyValueHistory(asset);
// runtimeconst now = yield* Effect.sync(() => new Date());const { assetPropertyValueHistory } = yield* getHistory({ propertyId, startDate: new Date(now.getTime() - 3_600_000), endDate: now, timeOrdering: "DESCENDING",});// on the Function effect:// .pipe(Effect.provide(AWS.IoTSiteWise.GetAssetPropertyValueHistoryHttp))