metric_values
Creates, updates, deletes, gets or lists a metric_values resource.
Overview
| Name | metric_values |
| Type | Resource |
| Id | aws.iot.metric_values |
Fields
The following fields are returned by SELECT queries:
- list_metric_values
| Name | Datatype | Description |
|---|---|---|
timestamp | string (date-time) | The time the metric value was reported. |
value | object | The value reported for the metric. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_metric_values | select | thingName, metricName, startTime, endTime, region | dimensionName, dimensionValueOperator, maxResults, nextToken | 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. |
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 |
|---|---|---|
endTime | string (date-time) | The end of the time period for which metric values are returned. |
metricName | string | The name of the security profile metric for which values are returned. |
region | string | AWS region (default: us-east-1) |
startTime | string (date-time) | The start of the time period for which metric values are returned. |
thingName | string | The name of the thing for which security profile metric values are returned. |
dimensionName | string | The dimension name. |
dimensionValueOperator | string | The dimension value operator. |
maxResults | integer | The maximum number of results to return at one time. |
nextToken | string | The token for the next set of results. |
SELECT examples
- list_metric_values
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.
SELECT
timestamp,
value
FROM aws.iot.metric_values
WHERE thingName = '{{ thingName }}' -- required
AND metricName = '{{ metricName }}' -- required
AND startTime = '{{ startTime }}' -- required
AND endTime = '{{ endTime }}' -- required
AND region = '{{ region }}' -- required
AND dimensionName = '{{ dimensionName }}'
AND dimensionValueOperator = '{{ dimensionValueOperator }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;