---
title: "PATCH /custom-metric/{metricName}"
method: PATCH
path: "/custom-metric/{metricName}"
---

# PATCH /custom-metric/{metricName}

`PATCH /custom-metric/{metricName}`

Updates a Device Defender detect custom metric.

Requires permission to access the [UpdateCustomMetric](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) action.

## Path parameters

- `metricName` string, required

## Request body

- object
  - `displayName` string, 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 `200`

Success

- UpdateCustomMetricResponse
  - `metricName` string — The name of the custom metric.
  - `metricArn` string — 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>
  - `displayName` string — A friendly name in the console for the custom metric
  - `creationDate` string, date-time — The creation date of the custom metric in milliseconds since epoch.
  - `lastModifiedDate` string, date-time — The time the custom metric was last modified in milliseconds since epoch.

## Other responses

- `480` — InvalidRequestException
- `481` — ResourceNotFoundException
- `482` — ThrottlingException
- `483` — InternalFailureException

---

[API](https://skmtc.net/aws/apis/iot.md) · [All operations](https://skmtc.net/aws/apis/iot/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/iot/versions/deef5c4b09f0/schema)
