AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

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:

  1. Use GetOriginRequestPolicyConfig to get the current configuration.

  2. Locally modify the fields in the origin request policy configuration that you want to update.

  3. Call UpdateOriginRequestPolicy by providing the entire origin request policy configuration, including the fields that you modified and those that you didn't.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to UpdateOriginRequestPolicyAsync.

Namespace: Amazon.CloudFront
Assembly: AWSSDK.CloudFront.dll
Version: 3.x.y.z

Syntax

C#
public virtual UpdateOriginRequestPolicyResponse UpdateOriginRequestPolicy(
         UpdateOriginRequestPolicyRequest request
)

Parameters

request
Type: Amazon.CloudFront.Model.UpdateOriginRequestPolicyRequest

Container for the necessary parameters to execute the UpdateOriginRequestPolicy service method.

Return Value


The response from the UpdateOriginRequestPolicy service method, as returned by CloudFront.

Exceptions

ExceptionCondition
AccessDeniedException Access denied.
IllegalUpdateException The update contains modifications that are not allowed.
InconsistentQuantitiesException The value of Quantity and the size of Items don't match.
InvalidArgumentException An argument is invalid.
InvalidIfMatchVersionException The If-Match version is missing or not valid.
NoSuchOriginRequestPolicyException The origin request policy does not exist.
OriginRequestPolicyAlreadyExistsException An origin request policy with this name already exists. You must provide a unique name. To modify an existing origin request policy, use UpdateOriginRequestPolicy.
PreconditionFailedException The precondition in one or more of the request fields evaluated to false.
TooManyCookiesInOriginRequestPolicyException 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.
TooManyHeadersInOriginRequestPolicyException 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.
TooManyQueryStringsInOriginRequestPolicyException 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.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

See Also