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

# DELETE /custom-metric/{metricName}

`DELETE /custom-metric/{metricName}`

Deletes a Device Defender detect custom metric.

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

Before you can delete a custom metric, you must first remove the custom metric from all security profiles it's a part of. The security profile associated with the custom metric can be found using the [ListSecurityProfiles](https://docs.aws.amazon.com/iot/latest/apireference/API_ListSecurityProfiles.html) API with `metricName` set to your custom metric name.

## Path parameters

- `metricName` string, required

## Response `200`

Success

- DeleteCustomMetricResponse

## Other responses

- `480` — InvalidRequestException
- `481` — ThrottlingException
- `482` — 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)
