update_origin_request_policy
async
¶
update_origin_request_policy(
origin_request_policy_config: OriginRequestPolicyConfig,
id: string,
*,
config_overrides: Optional[AsyncCloudFrontClientConfig] = 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/async_cloud_front.py
10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 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 | |