@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class OriginRequestPolicyConfig extends Object implements Serializable, Cloneable
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
.
Constructor and Description |
---|
OriginRequestPolicyConfig() |
Modifier and Type | Method and Description |
---|---|
OriginRequestPolicyConfig |
clone() |
boolean |
equals(Object obj) |
String |
getComment()
A comment to describe the origin request policy.
|
OriginRequestPolicyCookiesConfig |
getCookiesConfig()
The cookies from viewer requests to include in origin requests.
|
OriginRequestPolicyHeadersConfig |
getHeadersConfig()
The HTTP headers to include in origin requests.
|
String |
getName()
A unique name to identify the origin request policy.
|
OriginRequestPolicyQueryStringsConfig |
getQueryStringsConfig()
The URL query strings from viewer requests to include in origin requests.
|
int |
hashCode() |
void |
setComment(String comment)
A comment to describe the origin request policy.
|
void |
setCookiesConfig(OriginRequestPolicyCookiesConfig cookiesConfig)
The cookies from viewer requests to include in origin requests.
|
void |
setHeadersConfig(OriginRequestPolicyHeadersConfig headersConfig)
The HTTP headers to include in origin requests.
|
void |
setName(String name)
A unique name to identify the origin request policy.
|
void |
setQueryStringsConfig(OriginRequestPolicyQueryStringsConfig queryStringsConfig)
The URL query strings from viewer requests to include in origin requests.
|
String |
toString()
Returns a string representation of this object.
|
OriginRequestPolicyConfig |
withComment(String comment)
A comment to describe the origin request policy.
|
OriginRequestPolicyConfig |
withCookiesConfig(OriginRequestPolicyCookiesConfig cookiesConfig)
The cookies from viewer requests to include in origin requests.
|
OriginRequestPolicyConfig |
withHeadersConfig(OriginRequestPolicyHeadersConfig headersConfig)
The HTTP headers to include in origin requests.
|
OriginRequestPolicyConfig |
withName(String name)
A unique name to identify the origin request policy.
|
OriginRequestPolicyConfig |
withQueryStringsConfig(OriginRequestPolicyQueryStringsConfig queryStringsConfig)
The URL query strings from viewer requests to include in origin requests.
|
public void setComment(String comment)
A comment to describe the origin request policy. The comment cannot be longer than 128 characters.
comment
- A comment to describe the origin request policy. The comment cannot be longer than 128 characters.public String getComment()
A comment to describe the origin request policy. The comment cannot be longer than 128 characters.
public OriginRequestPolicyConfig withComment(String comment)
A comment to describe the origin request policy. The comment cannot be longer than 128 characters.
comment
- A comment to describe the origin request policy. The comment cannot be longer than 128 characters.public void setName(String name)
A unique name to identify the origin request policy.
name
- A unique name to identify the origin request policy.public String getName()
A unique name to identify the origin request policy.
public OriginRequestPolicyConfig withName(String name)
A unique name to identify the origin request policy.
name
- A unique name to identify the origin request policy.public void setHeadersConfig(OriginRequestPolicyHeadersConfig headersConfig)
The HTTP headers to include in origin requests. These can include headers from viewer requests and additional headers added by CloudFront.
headersConfig
- The HTTP headers to include in origin requests. These can include headers from viewer requests and
additional headers added by CloudFront.public OriginRequestPolicyHeadersConfig getHeadersConfig()
The HTTP headers to include in origin requests. These can include headers from viewer requests and additional headers added by CloudFront.
public OriginRequestPolicyConfig withHeadersConfig(OriginRequestPolicyHeadersConfig headersConfig)
The HTTP headers to include in origin requests. These can include headers from viewer requests and additional headers added by CloudFront.
headersConfig
- The HTTP headers to include in origin requests. These can include headers from viewer requests and
additional headers added by CloudFront.public void setCookiesConfig(OriginRequestPolicyCookiesConfig cookiesConfig)
The cookies from viewer requests to include in origin requests.
cookiesConfig
- The cookies from viewer requests to include in origin requests.public OriginRequestPolicyCookiesConfig getCookiesConfig()
The cookies from viewer requests to include in origin requests.
public OriginRequestPolicyConfig withCookiesConfig(OriginRequestPolicyCookiesConfig cookiesConfig)
The cookies from viewer requests to include in origin requests.
cookiesConfig
- The cookies from viewer requests to include in origin requests.public void setQueryStringsConfig(OriginRequestPolicyQueryStringsConfig queryStringsConfig)
The URL query strings from viewer requests to include in origin requests.
queryStringsConfig
- The URL query strings from viewer requests to include in origin requests.public OriginRequestPolicyQueryStringsConfig getQueryStringsConfig()
The URL query strings from viewer requests to include in origin requests.
public OriginRequestPolicyConfig withQueryStringsConfig(OriginRequestPolicyQueryStringsConfig queryStringsConfig)
The URL query strings from viewer requests to include in origin requests.
queryStringsConfig
- The URL query strings from viewer requests to include in origin requests.public String toString()
toString
in class Object
Object.toString()
public OriginRequestPolicyConfig clone()