update_origin_request_policy
¶
update_origin_request_policy(
origin_request_policy_config: OriginRequestPolicyConfig,
id: string,
*,
config_overrides: Optional[CloudFrontClientConfig] = None,
if_match: Optional[string] = None,
) -> UpdateOriginRequestPolicyResult
Updates an origin request policy configuration.
When you update an origin request policy configuration, all the fields are updated with the values provided in the request. You cannot update some fields independent of others. To update an origin request policy configuration:
-
Use
GetOriginRequestPolicyConfigto get the current configuration. -
Locally modify the fields in the origin request policy configuration that you want to update.
-
Call
UpdateOriginRequestPolicyby providing the entire origin request policy configuration, including the fields that you modified and those that you didn't.
Parameters:
-
origin_request_policy_config(OriginRequestPolicyConfig) –An origin request policy configuration.
-
id(string) –The unique identifier for the origin request policy that you are updating. The identifier is returned in a cache behavior's
OriginRequestPolicyIdfield in the response toGetDistributionConfig. -
if_match(Optional[string], default:None) –The version of the origin request policy that you are updating. The version is returned in the origin request policy's
ETagfield in the response toGetOriginRequestPolicyConfig.
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. -
NoSuchOriginRequestPolicy–The origin request policy does not exist.
-
OriginRequestPolicyAlreadyExists–An origin request policy with this name already exists. You must provide a unique name. To modify an existing origin request policy, use
UpdateOriginRequestPolicy. -
PreconditionFailed–The precondition in one or more of the request fields evaluated to
false. -
TooManyCookiesInOriginRequestPolicy–The number of cookies in the origin request policy exceeds the maximum. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.
-
TooManyHeadersInOriginRequestPolicy–The number of headers in the origin request policy exceeds the maximum. For more information, see Quotas (formerly known as limits) in the Amazon CloudFront Developer Guide.
-
TooManyQueryStringsInOriginRequestPolicy–The number of query strings in the origin request 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
9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 | |