aws iot update-custom-metric
The IoT Device Defender detect feature will no longer be available to new customers starting August 31, 2026. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To update a custom metric
The following update-custom-metric example updates a custom metric to have a new display-name.
aws iot update-custom-metric --metric-name batteryPercentage --display-name 'remaining battery percentage on device'Identify--metric-nameThe name of the custom metric.--display-nameField represents a friendly name in the console for the custom metric, it doesn't have to be unique.Its output
{
"metricName": "batteryPercentage",
"metricArn": "arn:aws:iot:us-west-2:1234564789012:custommetric/batteryPercentage",
"metricType": "number",
"displayName": "remaining battery percentage on device",
"creationDate": "2020-11-17T23:01:35.110000-08:00",
"lastModifiedDate": "2020-11-17T23:02:12.879000-08:00"
}For more information, see Custom metrics in the AWS IoT Core Developer Guide.
Options
--display-nameField represents a friendly name in the console for the custom metric, it doesn't have to be unique.--metric-nameThe name of the custom metric.