get_statistics
(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.get_statistics(
indexName='string',
queryString='string',
aggregationField='string',
queryVersion='string'
)
AWS_Things
.[REQUIRED]
The query used to search. You can specify "*" for the query string to get the count of all indexed things in your Amazon Web Services account.
dict
Response Syntax
{
'statistics': {
'count': 123,
'average': 123.0,
'sum': 123.0,
'minimum': 123.0,
'maximum': 123.0,
'sumOfSquares': 123.0,
'variance': 123.0,
'stdDeviation': 123.0
}
}
Response Structure
(dict) --
statistics (dict) --
The statistics returned by the Fleet Indexing service based on the query and aggregation field.
count (integer) --
The count of things that match the query string criteria and contain a valid aggregation field value.
average (float) --
The average of the aggregated field values.
sum (float) --
The sum of the aggregated field values.
minimum (float) --
The minimum aggregated field value.
maximum (float) --
The maximum aggregated field value.
sumOfSquares (float) --
The sum of the squares of the aggregated field values.
variance (float) --
The variance of the aggregated field values.
stdDeviation (float) --
The standard deviation of the aggregated field values.
Exceptions
IoT.Client.exceptions.InvalidRequestException
IoT.Client.exceptions.ThrottlingException
IoT.Client.exceptions.UnauthorizedException
IoT.Client.exceptions.ServiceUnavailableException
IoT.Client.exceptions.InternalFailureException
IoT.Client.exceptions.ResourceNotFoundException
IoT.Client.exceptions.InvalidQueryException
IoT.Client.exceptions.InvalidAggregationException
IoT.Client.exceptions.IndexNotReadyException