GetInterpolatedAssetPropertyValues
Source:
src/AWS/IoTSiteWise/GetInterpolatedAssetPropertyValues.ts
Runtime binding for iotsitewise:GetInterpolatedAssetPropertyValues —
compute interpolated values (LINEAR_INTERPOLATION or
LOCF_INTERPOLATION) of one property of the bound asset at a fixed
interval from a deployed Lambda or Task.
Reading Interpolated Values
Section titled “Reading Interpolated Values”Provide the GetInterpolatedAssetPropertyValuesHttp implementation layer
on the Function effect, bind the asset in the init phase, then call the
returned client at runtime.
// initconst getInterpolated = yield* AWS.IoTSiteWise.GetInterpolatedAssetPropertyValues(asset);
// runtimeconst now = yield* Effect.sync(() => Math.floor(Date.now() / 1000));const { interpolatedAssetPropertyValues } = yield* getInterpolated({ propertyId, startTimeInSeconds: now - 3600, endTimeInSeconds: now, intervalInSeconds: 60, quality: "GOOD", type: "LINEAR_INTERPOLATION",});// on the Function effect:// .pipe(Effect.provide(AWS.IoTSiteWise.GetInterpolatedAssetPropertyValuesHttp))