update_response_headers_policy
¶
update_response_headers_policy(
response_headers_policy_config: ResponseHeadersPolicyConfig,
id: string,
*,
config_overrides: Optional[CloudFrontClientConfig] = None,
if_match: Optional[string] = None,
) -> UpdateResponseHeadersPolicyResult
Updates a response headers policy.
When you update a response headers policy, the entire policy is replaced. You cannot update some policy fields independent of others. To update a response headers policy configuration:
-
Use
GetResponseHeadersPolicyConfigto get the current policy's configuration. -
Modify the fields in the response headers policy configuration that you want to update.
-
Call
UpdateResponseHeadersPolicy, providing the entire response headers policy configuration, including the fields that you modified and those that you didn't.
Parameters:
-
response_headers_policy_config(ResponseHeadersPolicyConfig) –A response headers policy configuration.
-
id(string) –The identifier for the response headers policy that you are updating.
-
if_match(Optional[string], default:None) –The version of the response headers policy that you are updating.
The version is returned in the cache policy's
ETagfield in the response toGetResponseHeadersPolicyConfig.
Raises:
-
AccessDenied–Access denied.
-
IllegalUpdate–The update contains modifications that are not allowed.
-
InconsistentQuantities–The value of
Quantityand the size ofItemsdon't match. -
InvalidArgument–An argument is invalid.
-
InvalidIfMatchVersion–The
If-Matchversion is missing or not valid. -
NoSuchResponseHeadersPolicy–The response headers policy does not exist.
-
PreconditionFailed–The precondition in one or more of the request fields evaluated to
false. -
ResponseHeadersPolicyAlreadyExists–A response headers policy with this name already exists. You must provide a unique name. To modify an existing response headers policy, use
UpdateResponseHeadersPolicy. -
TooLongCSPInResponseHeadersPolicy–The length of the
Content-Security-Policyheader value in the response headers policy exceeds the maximum.For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.
-
TooManyCustomHeadersInResponseHeadersPolicy–The number of custom headers in the response headers policy exceeds the maximum.
For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.
-
TooManyRemoveHeadersInResponseHeadersPolicy–The number of headers in
RemoveHeadersConfigin the response headers policy exceeds the maximum.For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudfront/_services/cloud_front.py
10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 | |