Aggregates for an asset property (Amazon CLI) - Amazon IoT SiteWise
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Aggregates for an asset property (Amazon CLI)

To query aggregates for an asset property (Amazon CLI)
  1. 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 and property-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-id property-id \ --start-date 1575216000 \ --end-date 1575219600 \ --aggregate-types AVERAGE SUM \ --resolution 1h

    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" }
  2. If more value entries exist, you can pass the pagination token from the nextToken field to a subsequent call to the GetAssetPropertyAggregates operation.