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

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

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

Updates a key group.

When you update a key group, all the fields are updated with the values provided in the request. You cannot update some fields independent of others. To update a key group:

1.  Get the current key group with `GetKeyGroup` or `GetKeyGroupConfig`.
    
2.  Locally modify the fields in the key group that you want to update. For example, add or remove public key IDs.
    
3.  Call `UpdateKeyGroup` with the entire key group object, including the fields that you modified and those that you didn't.

## Path parameters

- `Id` string, required

## Headers

- `If-Match` string

## Response `200`

Success

## Other responses

- `480` — InvalidIfMatchVersion
- `481` — NoSuchResource
- `482` — PreconditionFailed
- `483` — KeyGroupAlreadyExists
- `484` — InvalidArgument
- `485` — TooManyPublicKeysInKeyGroup

---

[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/versions/fd674fc97471/schema)
