@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-11T17:58:48.828Z") @Stability(value=Stable) public class OriginRequestCookieBehavior extends software.amazon.jsii.JsiiObject
Example:
// Creating a custom origin request policy for a Distribution -- all parameters optional
S3Origin bucketOrigin;
OriginRequestPolicy myOriginRequestPolicy = OriginRequestPolicy.Builder.create(this, "OriginRequestPolicy")
.originRequestPolicyName("MyPolicy")
.comment("A default policy")
.cookieBehavior(OriginRequestCookieBehavior.none())
.headerBehavior(OriginRequestHeaderBehavior.all("CloudFront-Is-Android-Viewer"))
.queryStringBehavior(OriginRequestQueryStringBehavior.allowList("username"))
.build();
Distribution.Builder.create(this, "myDistCustomPolicy")
.defaultBehavior(BehaviorOptions.builder()
.origin(bucketOrigin)
.originRequestPolicy(myOriginRequestPolicy)
.build())
.build();
| Modifier | Constructor and Description |
|---|---|
protected |
OriginRequestCookieBehavior(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
OriginRequestCookieBehavior(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static OriginRequestCookieBehavior |
all()
All cookies in viewer requests are included in requests that CloudFront sends to the origin.
|
static OriginRequestCookieBehavior |
allowList(String... cookies)
Only the provided `cookies` are included in requests that CloudFront sends to the origin.
|
String |
getBehavior()
The behavior of cookies: allow all, none or an allow list.
|
List<String> |
getCookies()
The cookies to allow, if the behavior is an allow list.
|
static OriginRequestCookieBehavior |
none()
Cookies in viewer requests are not included in requests that CloudFront sends to the origin.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected OriginRequestCookieBehavior(software.amazon.jsii.JsiiObjectRef objRef)
protected OriginRequestCookieBehavior(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static OriginRequestCookieBehavior all()
@Stability(value=Stable) @NotNull public static OriginRequestCookieBehavior allowList(@NotNull String... cookies)
cookies - This parameter is required.@Stability(value=Stable) @NotNull public static OriginRequestCookieBehavior none()
Any cookies that are listed in a CachePolicy are still included in origin requests.
@Stability(value=Stable) @NotNull public String getBehavior()
Copyright © 2022. All rights reserved.