update_response_headers_policy
async
¶
update_response_headers_policy(
response_headers_policy_config: ResponseHeadersPolicyConfig,
id: string,
*,
config_overrides: Optional[AsyncCloudFrontClientConfig] = 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/async_cloud_front.py
10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 | |