| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.CloudFront.UpdateCachePolicy
Description
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:
- Use
GetCachePolicyConfigto get the current configuration. - Locally modify the fields in the cache policy configuration that you want to update.
- Call
UpdateCachePolicyby providing the entire cache policy configuration, including the fields that you modified and those that you didn't.
Synopsis
- data UpdateCachePolicy = UpdateCachePolicy' {}
- newUpdateCachePolicy :: CachePolicyConfig -> Text -> UpdateCachePolicy
- updateCachePolicy_ifMatch :: Lens' UpdateCachePolicy (Maybe Text)
- updateCachePolicy_cachePolicyConfig :: Lens' UpdateCachePolicy CachePolicyConfig
- updateCachePolicy_id :: Lens' UpdateCachePolicy Text
- data UpdateCachePolicyResponse = UpdateCachePolicyResponse' {
- cachePolicy :: Maybe CachePolicy
- eTag :: Maybe Text
- httpStatus :: Int
- newUpdateCachePolicyResponse :: Int -> UpdateCachePolicyResponse
- updateCachePolicyResponse_cachePolicy :: Lens' UpdateCachePolicyResponse (Maybe CachePolicy)
- updateCachePolicyResponse_eTag :: Lens' UpdateCachePolicyResponse (Maybe Text)
- updateCachePolicyResponse_httpStatus :: Lens' UpdateCachePolicyResponse Int
Creating a Request
data UpdateCachePolicy Source #
See: newUpdateCachePolicy smart constructor.
Constructors
| UpdateCachePolicy' | |
Fields
| |
Instances
Arguments
| :: CachePolicyConfig | |
| -> Text | |
| -> UpdateCachePolicy |
Create a value of UpdateCachePolicy with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:ifMatch:UpdateCachePolicy', updateCachePolicy_ifMatch - The version of the cache policy that you are updating. The version is
returned in the cache policy's ETag field in the response to
GetCachePolicyConfig.
UpdateCachePolicy, updateCachePolicy_cachePolicyConfig - A cache policy configuration.
UpdateCachePolicy, updateCachePolicy_id - The unique identifier for the cache policy that you are updating. The
identifier is returned in a cache behavior's CachePolicyId field in
the response to GetDistributionConfig.
Request Lenses
updateCachePolicy_ifMatch :: Lens' UpdateCachePolicy (Maybe Text) Source #
The version of the cache policy that you are updating. The version is
returned in the cache policy's ETag field in the response to
GetCachePolicyConfig.
updateCachePolicy_cachePolicyConfig :: Lens' UpdateCachePolicy CachePolicyConfig Source #
A cache policy configuration.
updateCachePolicy_id :: Lens' UpdateCachePolicy Text Source #
The unique identifier for the cache policy that you are updating. The
identifier is returned in a cache behavior's CachePolicyId field in
the response to GetDistributionConfig.
Destructuring the Response
data UpdateCachePolicyResponse Source #
See: newUpdateCachePolicyResponse smart constructor.
Constructors
| UpdateCachePolicyResponse' | |
Fields
| |
Instances
newUpdateCachePolicyResponse Source #
Create a value of UpdateCachePolicyResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
UpdateCachePolicyResponse, updateCachePolicyResponse_cachePolicy - A cache policy.
$sel:eTag:UpdateCachePolicyResponse', updateCachePolicyResponse_eTag - The current version of the cache policy.
$sel:httpStatus:UpdateCachePolicyResponse', updateCachePolicyResponse_httpStatus - The response's http status code.
Response Lenses
updateCachePolicyResponse_cachePolicy :: Lens' UpdateCachePolicyResponse (Maybe CachePolicy) Source #
A cache policy.
updateCachePolicyResponse_eTag :: Lens' UpdateCachePolicyResponse (Maybe Text) Source #
The current version of the cache policy.
updateCachePolicyResponse_httpStatus :: Lens' UpdateCachePolicyResponse Int Source #
The response's http status code.