BatchPutAssetPropertyValue
Source:
src/AWS/IoTSiteWise/BatchPutAssetPropertyValue.ts
Runtime binding for iotsitewise:BatchPutAssetPropertyValue — ingest
timestamped property values (measurements) into the bound asset’s data
streams from a deployed Lambda or Task.
Ingesting Property Values
Section titled “Ingesting Property Values”Provide the BatchPutAssetPropertyValueHttp implementation layer on the
Function effect, bind the asset in the init phase, then call the returned
client at runtime. The binding grants
iotsitewise:BatchPutAssetPropertyValue on the asset and injects its id
into every entry automatically.
// initconst asset = yield* AWS.IoTSiteWise.Asset("Pump1", { assetModelId: model.assetModelId,});const putValues = yield* AWS.IoTSiteWise.BatchPutAssetPropertyValue(asset);
// runtimeconst now = yield* Effect.sync(() => Math.floor(Date.now() / 1000));const { errorEntries } = yield* putValues({ entries: [ { entryId: "temp-1", propertyId, propertyValues: [ { value: { doubleValue: 23.5 }, timestamp: { timeInSeconds: now }, quality: "GOOD", }, ], }, ],});// on the Function effect:// .pipe(Effect.provide(AWS.IoTSiteWise.BatchPutAssetPropertyValueHttp))