---
title: "DELETE /2020-05-31/key-group/{Id}"
method: DELETE
path: "/2020-05-31/key-group/{Id}"
---

# DELETE /2020-05-31/key-group/{Id}

`DELETE /2020-05-31/key-group/{Id}`

Deletes a key group.

You cannot delete a key group that is referenced in a cache behavior. First update your distributions to remove the key group from all cache behaviors, then delete the key group.

To delete a key group, you must provide the key group's identifier and version. To get these values, use `ListKeyGroups` followed by `GetKeyGroup` or `GetKeyGroupConfig`.

## Path parameters

- `Id` string, required

## Headers

- `If-Match` string

## Response `204`

Success

## Other responses

- `480` — InvalidIfMatchVersion
- `481` — NoSuchResource
- `482` — PreconditionFailed
- `483` — ResourceInUse

---

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