update_cache_policy¶
Operation¶
update_cache_policy
async
¶
update_cache_policy(input: UpdateCachePolicyInput, plugins: list[Plugin] | None = None) -> UpdateCachePolicyOutput
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.
Warning
If your minimum TTL is greater than 0, CloudFront will cache content for
at least the duration specified in the cache policy's minimum TTL, even
if the Cache-Control: no-cache, no-store, or private directives
are present in the origin headers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
UpdateCachePolicyInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
UpdateCachePolicyOutput
|
An instance of |
Input¶
UpdateCachePolicyInput
dataclass
¶
Bases: _SerdeShape
Dataclass for UpdateCachePolicyInput structure.
Attributes¶
cache_policy_config
class-attribute
instance-attribute
¶
cache_policy_config: CachePolicyConfig | None = ...
A cache policy configuration.
Output¶
UpdateCachePolicyOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for UpdateCachePolicyOutput structure.
Attributes¶
cache_policy
class-attribute
instance-attribute
¶
cache_policy: CachePolicy | None = ...
A cache policy.
e_tag
class-attribute
instance-attribute
¶
e_tag: str | None = ...
The current version of the cache policy.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.