Aggregates for an asset property (Amazon CLI)
To query aggregates for an asset property (Amazon CLI)
-
Run the following command to get aggregates for the asset property. This command queries the average and sum with a 1 hour resolution for a specific 1 hour interval. Replace
asset-id
with the ID of the asset andproperty-id
with the ID of the property. Replace the parameters with the aggregates and interval to query.aws iotsitewise get-asset-property-aggregates \ --asset-id
asset-id
\ --property-idproperty-id
\ --start-date1575216000
\ --end-date1575219600
\ --aggregate-typesAVERAGE SUM
\ --resolution1h
The operation returns a response that contains the historical TQVs of the property in the following format. The response includes only the requested aggregates.
{ "aggregatedValues": [ { "timestamp":
Number
, "quality": "String
", "value": { "average":Number
, "count":Number
, "maximum":Number
, "minimum":Number
, "standardDeviation":Number
, "sum":Number
} } ], "nextToken": "String
" } -
If more value entries exist, you can pass the pagination token from the
nextToken
field to a subsequent call to the GetAssetPropertyAggregates operation.