Interface OriginRequestPolicyProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
OriginRequestPolicyProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-05T03:43:40.026Z")
@Stability(Stable)
public interface OriginRequestPolicyProps
extends software.amazon.jsii.JsiiSerializable
Properties for creating a Origin Request Policy.
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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forOriginRequestPolicyProps
static final class
An implementation forOriginRequestPolicyProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default String
A comment to describe the origin request policy.default OriginRequestCookieBehavior
The cookies from viewer requests to include in origin requests.default OriginRequestHeaderBehavior
The HTTP headers to include in origin requests.default String
A unique name to identify the origin request policy.default OriginRequestQueryStringBehavior
The URL query strings from viewer requests to include in origin requests.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getComment
A comment to describe the origin request policy.Default: - no comment
-
getCookieBehavior
The cookies from viewer requests to include in origin requests.Default: OriginRequestCookieBehavior.none()
-
getHeaderBehavior
The HTTP headers to include in origin requests.These can include headers from viewer requests and additional headers added by CloudFront.
Default: OriginRequestHeaderBehavior.none()
-
getOriginRequestPolicyName
A unique name to identify the origin request policy.The name must only include '-', '_', or alphanumeric characters.
Default: - generated from the `id`
-
getQueryStringBehavior
The URL query strings from viewer requests to include in origin requests.Default: OriginRequestQueryStringBehavior.none()
-
builder
- Returns:
- a
OriginRequestPolicyProps.Builder
ofOriginRequestPolicyProps
-