@Generated(value="software.amazon.awssdk:codegen") public final class OriginRequestPolicyConfig extends Object implements SdkPojo, Serializable, ToCopyableBuilder<OriginRequestPolicyConfig.Builder,OriginRequestPolicyConfig>
An origin request policy configuration.
This configuration determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
The request body and the URL path (without the domain name) from the viewer request.
The headers that CloudFront automatically includes in every origin request, including Host
,
User-Agent
, and X-Amz-Cf-Id
.
All HTTP headers, cookies, and URL query strings that are specified in the cache policy or the origin request policy. These can include items from the viewer request and, in the case of headers, additional ones that are added by CloudFront.
CloudFront sends a request when it can’t find an object in its cache that matches the request. If you want to send
values to the origin and also include them in the cache key, use CachePolicy
.
Modifier and Type | Class and Description |
---|---|
static interface |
OriginRequestPolicyConfig.Builder |
Modifier and Type | Method and Description |
---|---|
static OriginRequestPolicyConfig.Builder |
builder() |
String |
comment()
A comment to describe the origin request policy.
|
OriginRequestPolicyCookiesConfig |
cookiesConfig()
The cookies from viewer requests to include in origin requests.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj)
Indicates whether some other object is "equal to" this one by SDK fields.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
OriginRequestPolicyHeadersConfig |
headersConfig()
The HTTP headers to include in origin requests.
|
String |
name()
A unique name to identify the origin request policy.
|
OriginRequestPolicyQueryStringsConfig |
queryStringsConfig()
The URL query strings from viewer requests to include in origin requests.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends OriginRequestPolicyConfig.Builder> |
serializableBuilderClass() |
OriginRequestPolicyConfig.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString()
Returns a string representation of this object.
|
copy
public final String comment()
A comment to describe the origin request policy.
public final String name()
A unique name to identify the origin request policy.
public final OriginRequestPolicyHeadersConfig headersConfig()
The HTTP headers to include in origin requests. These can include headers from viewer requests and additional headers added by CloudFront.
public final OriginRequestPolicyCookiesConfig cookiesConfig()
The cookies from viewer requests to include in origin requests.
public final OriginRequestPolicyQueryStringsConfig queryStringsConfig()
The URL query strings from viewer requests to include in origin requests.
public OriginRequestPolicyConfig.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<OriginRequestPolicyConfig.Builder,OriginRequestPolicyConfig>
public static OriginRequestPolicyConfig.Builder builder()
public static Class<? extends OriginRequestPolicyConfig.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
SdkPojo
SdkPojo
class,
and is generated based on a service model.
If an SdkPojo
class does not have any inherited fields, equalsBySdkFields
and equals
are essentially the same.
equalsBySdkFields
in interface SdkPojo
obj
- the object to be compared withpublic final String toString()
Copyright © 2021 Amazon Web Services, Inc. All Rights Reserved.