---
title: "PUT /2020-05-31/cache-policy/{Id}"
method: PUT
path: "/2020-05-31/cache-policy/{Id}"
---

# PUT /2020-05-31/cache-policy/{Id}

`PUT /2020-05-31/cache-policy/{Id}`

Updates a cache policy configuration.

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

1.  Use `GetCachePolicyConfig` to get the current configuration.
    
2.  Locally modify the fields in the cache policy configuration that you want to update.
    
3.  Call `UpdateCachePolicy` by providing the entire cache policy configuration, 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` — AccessDenied
- `481` — IllegalUpdate
- `482` — InconsistentQuantities
- `483` — InvalidArgument
- `484` — InvalidIfMatchVersion
- `485` — NoSuchCachePolicy
- `486` — PreconditionFailed
- `487` — CachePolicyAlreadyExists
- `488` — TooManyHeadersInCachePolicy
- `489` — TooManyCookiesInCachePolicy
- `490` — TooManyQueryStringsInCachePolicy

---

[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)
