IoT / Client / list_metric_values
list_metric_values#
- IoT.Client.list_metric_values(**kwargs)#
Lists the values reported for an IoT Device Defender metric (device-side metric, cloud-side metric, or custom metric) by the given thing during the specified time period.
See also: AWS API Documentation
Request Syntax
response = client.list_metric_values( thingName='string', metricName='string', dimensionName='string', dimensionValueOperator='IN'|'NOT_IN', startTime=datetime(2015, 1, 1), endTime=datetime(2015, 1, 1), maxResults=123, nextToken='string' )
- Parameters:
thingName (string) –
[REQUIRED]
The name of the thing for which security profile metric values are returned.
metricName (string) –
[REQUIRED]
The name of the security profile metric for which values are returned.
dimensionName (string) – The dimension name.
dimensionValueOperator (string) – The dimension value operator.
startTime (datetime) –
[REQUIRED]
The start of the time period for which metric values are returned.
endTime (datetime) –
[REQUIRED]
The end of the time period for which metric values are returned.
maxResults (integer) – The maximum number of results to return at one time.
nextToken (string) – The token for the next set of results.
- Return type:
dict
- Returns:
Response Syntax
{ 'metricDatumList': [ { 'timestamp': datetime(2015, 1, 1), 'value': { 'count': 123, 'cidrs': [ 'string', ], 'ports': [ 123, ], 'number': 123.0, 'numbers': [ 123.0, ], 'strings': [ 'string', ] } }, ], 'nextToken': 'string' }
Response Structure
(dict) –
metricDatumList (list) –
The data the thing reports for the metric during the specified time period.
(dict) –
A metric.
timestamp (datetime) –
The time the metric value was reported.
value (dict) –
The value reported for the metric.
count (integer) –
If the
comparisonOperator
calls for a numeric value, use this to specify that numeric value to be compared with themetric
.cidrs (list) –
If the
comparisonOperator
calls for a set of CIDRs, use this to specify that set to be compared with themetric
.(string) –
ports (list) –
If the
comparisonOperator
calls for a set of ports, use this to specify that set to be compared with themetric
.(integer) –
number (float) –
The numeral value of a metric.
numbers (list) –
The numeral values of a metric.
(float) –
strings (list) –
The string values of a metric.
(string) –
nextToken (string) –
A token that can be used to retrieve the next set of results, or
null
if there are no additional results.
Exceptions