statistics
Creates, updates, deletes, gets or lists a statistics resource.
Overview
| Name | statistics |
| Type | Resource |
| Id | aws.iot.statistics |
Fields
The following fields are returned by SELECT queries:
- get_statistics
| Name | Datatype | Description |
|---|---|---|
average | number (double) | The average of the aggregated field values. |
count | integer | The count of things that match the query string criteria and contain a valid aggregation field value. |
maximum_ | number (double) | The maximum aggregated field value. |
minimum_ | number (double) | The minimum aggregated field value. |
std_deviation | number (double) | The standard deviation of the aggregated field values. |
sum | number (double) | The sum of the aggregated field values. |
sum_of_squares | number (double) | The sum of the squares of the aggregated field values. |
variance | number (double) | The variance of the aggregated field values. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_statistics | select | region | Returns the count, average, sum, minimum, maximum, sum of squares, variance, and standard deviation for the specified aggregated field. If the aggregation field is of type String, only the count statistic is returned. Requires permission to access the GetStatistics action. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_statistics
Returns the count, average, sum, minimum, maximum, sum of squares, variance, and standard deviation for the specified aggregated field. If the aggregation field is of type String, only the count statistic is returned. Requires permission to access the GetStatistics action.
SELECT
average,
count,
maximum_,
minimum_,
std_deviation,
sum,
sum_of_squares,
variance
FROM aws.iot.statistics
WHERE region = '{{ region }}' -- required
;