v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-142381,278956.3 KB

Updates a Device Defender detect custom metric.

Requires permission to access the UpdateCustomMetric action.

patch/custom-metric/{metricName}

Path parameters

metricNamestring required

The name of the custom metric. Cannot be updated.

Request body

displayNamestring required

Field represents a friendly name in the console for the custom metric, it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated.

Response

Success

metricNamestring

The name of the custom metric.

metricArnstring

The Amazon Resource Number (ARN) of the custom metric.

metricType'string-list' | 'ip-address-list' | 'number-list' | 'number'
<p> The type of the custom metric. </p> <important> <p>The type <code>number</code> only takes a single metric value as an input, but while submitting the metrics value in the DeviceMetrics report, it must be passed as an array with a single value.</p> </important>
displayNamestring

A friendly name in the console for the custom metric

creationDatestring date-time

The creation date of the custom metric in milliseconds since epoch.

lastModifiedDatestring date-time

The time the custom metric was last modified in milliseconds since epoch.