public static interface CfnOriginRequestPolicy.OriginRequestPolicyConfigProperty
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:
Host
, User-Agent
, and X-Amz-Cf-Id
.
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
.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.cloudfront.*; OriginRequestPolicyConfigProperty originRequestPolicyConfigProperty = OriginRequestPolicyConfigProperty.builder() .cookiesConfig(CookiesConfigProperty.builder() .cookieBehavior("cookieBehavior") // the properties below are optional .cookies(List.of("cookies")) .build()) .headersConfig(HeadersConfigProperty.builder() .headerBehavior("headerBehavior") // the properties below are optional .headers(List.of("headers")) .build()) .name("name") .queryStringsConfig(QueryStringsConfigProperty.builder() .queryStringBehavior("queryStringBehavior") // the properties below are optional .queryStrings(List.of("queryStrings")) .build()) // the properties below are optional .comment("comment") .build();
Modifier and Type | Interface and Description |
---|---|
static class |
CfnOriginRequestPolicy.OriginRequestPolicyConfigProperty.Builder
A builder for
CfnOriginRequestPolicy.OriginRequestPolicyConfigProperty |
static class |
CfnOriginRequestPolicy.OriginRequestPolicyConfigProperty.Jsii$Proxy
An implementation for
CfnOriginRequestPolicy.OriginRequestPolicyConfigProperty |
Modifier and Type | Method and Description |
---|---|
static CfnOriginRequestPolicy.OriginRequestPolicyConfigProperty.Builder |
builder() |
default java.lang.String |
getComment()
A comment to describe the origin request policy.
|
java.lang.Object |
getCookiesConfig()
The cookies from viewer requests to include in origin requests.
|
java.lang.Object |
getHeadersConfig()
The HTTP headers to include in origin requests.
|
java.lang.String |
getName()
A unique name to identify the origin request policy.
|
java.lang.Object |
getQueryStringsConfig()
The URL query strings from viewer requests to include in origin requests.
|
java.lang.Object getCookiesConfig()
java.lang.Object getHeadersConfig()
These can include headers from viewer requests and additional headers added by CloudFront.
java.lang.String getName()
java.lang.Object getQueryStringsConfig()
default java.lang.String getComment()
The comment cannot be longer than 128 characters.