Class OriginRequestPolicyProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.OriginRequestPolicyProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<OriginRequestPolicyProps>
- Enclosing interface:
OriginRequestPolicyProps
@Stability(Stable)
public static final class OriginRequestPolicyProps.Builder
extends Object
implements software.amazon.jsii.Builder<OriginRequestPolicyProps>
A builder for
OriginRequestPolicyProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofOriginRequestPolicyProps.getComment()
cookieBehavior
(OriginRequestCookieBehavior cookieBehavior) Sets the value ofOriginRequestPolicyProps.getCookieBehavior()
headerBehavior
(OriginRequestHeaderBehavior headerBehavior) Sets the value ofOriginRequestPolicyProps.getHeaderBehavior()
originRequestPolicyName
(String originRequestPolicyName) Sets the value ofOriginRequestPolicyProps.getOriginRequestPolicyName()
queryStringBehavior
(OriginRequestQueryStringBehavior queryStringBehavior) Sets the value ofOriginRequestPolicyProps.getQueryStringBehavior()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
comment
Sets the value ofOriginRequestPolicyProps.getComment()
- Parameters:
comment
- A comment to describe the origin request policy.- Returns:
this
-
cookieBehavior
@Stability(Stable) public OriginRequestPolicyProps.Builder cookieBehavior(OriginRequestCookieBehavior cookieBehavior) Sets the value ofOriginRequestPolicyProps.getCookieBehavior()
- Parameters:
cookieBehavior
- The cookies from viewer requests to include in origin requests.- Returns:
this
-
headerBehavior
@Stability(Stable) public OriginRequestPolicyProps.Builder headerBehavior(OriginRequestHeaderBehavior headerBehavior) Sets the value ofOriginRequestPolicyProps.getHeaderBehavior()
- Parameters:
headerBehavior
- The HTTP headers to include in origin requests. These can include headers from viewer requests and additional headers added by CloudFront.- Returns:
this
-
originRequestPolicyName
@Stability(Stable) public OriginRequestPolicyProps.Builder originRequestPolicyName(String originRequestPolicyName) Sets the value ofOriginRequestPolicyProps.getOriginRequestPolicyName()
- Parameters:
originRequestPolicyName
- A unique name to identify the origin request policy. The name must only include '-', '_', or alphanumeric characters.- Returns:
this
-
queryStringBehavior
@Stability(Stable) public OriginRequestPolicyProps.Builder queryStringBehavior(OriginRequestQueryStringBehavior queryStringBehavior) Sets the value ofOriginRequestPolicyProps.getQueryStringBehavior()
- Parameters:
queryStringBehavior
- The URL query strings from viewer requests to include in origin requests.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<OriginRequestPolicyProps>
- Returns:
- a new instance of
OriginRequestPolicyProps
- Throws:
NullPointerException
- if any required attribute was not provided
-