@Stability(value=Stable)
public static interface CfnOriginRequestPolicy.OriginRequestPolicyConfigProperty
extends software.amazon.jsii.JsiiSerializable
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 String |
getComment()
A comment to describe the origin request policy.
|
Object |
getCookiesConfig()
The cookies from viewer requests to include in origin requests.
|
Object |
getHeadersConfig()
The HTTP headers to include in origin requests.
|
String |
getName()
A unique name to identify the origin request policy.
|
Object |
getQueryStringsConfig()
The URL query strings from viewer requests to include in origin requests.
|
@Stability(value=Stable) @NotNull Object getCookiesConfig()
@Stability(value=Stable) @NotNull Object getHeadersConfig()
These can include headers from viewer requests and additional headers added by CloudFront.
@Stability(value=Stable) @NotNull String getName()
@Stability(value=Stable) @NotNull Object getQueryStringsConfig()
@Stability(value=Stable) @Nullable default String getComment()
The comment cannot be longer than 128 characters.
@Stability(value=Stable) static CfnOriginRequestPolicy.OriginRequestPolicyConfigProperty.Builder builder()
Copyright © 2022. All rights reserved.