Class ResponseHeadersPolicyProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.ResponseHeadersPolicyProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ResponseHeadersPolicyProps>
- Enclosing interface:
- ResponseHeadersPolicyProps
@Stability(Stable)
public static final class ResponseHeadersPolicyProps.Builder
extends Object
implements software.amazon.jsii.Builder<ResponseHeadersPolicyProps>
A builder for
ResponseHeadersPolicyProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofResponseHeadersPolicyProps.getComment()corsBehavior(ResponseHeadersCorsBehavior corsBehavior) Sets the value ofResponseHeadersPolicyProps.getCorsBehavior()customHeadersBehavior(ResponseCustomHeadersBehavior customHeadersBehavior) Sets the value ofResponseHeadersPolicyProps.getCustomHeadersBehavior()responseHeadersPolicyName(String responseHeadersPolicyName) Sets the value ofResponseHeadersPolicyProps.getResponseHeadersPolicyName()securityHeadersBehavior(ResponseSecurityHeadersBehavior securityHeadersBehavior) Sets the value ofResponseHeadersPolicyProps.getSecurityHeadersBehavior()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
comment
Sets the value ofResponseHeadersPolicyProps.getComment()- Parameters:
comment- A comment to describe the response headers policy.- Returns:
this
-
corsBehavior
@Stability(Stable) public ResponseHeadersPolicyProps.Builder corsBehavior(ResponseHeadersCorsBehavior corsBehavior) Sets the value ofResponseHeadersPolicyProps.getCorsBehavior()- Parameters:
corsBehavior- A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).- Returns:
this
-
customHeadersBehavior
@Stability(Stable) public ResponseHeadersPolicyProps.Builder customHeadersBehavior(ResponseCustomHeadersBehavior customHeadersBehavior) Sets the value ofResponseHeadersPolicyProps.getCustomHeadersBehavior()- Parameters:
customHeadersBehavior- A configuration for a set of custom HTTP response headers.- Returns:
this
-
responseHeadersPolicyName
@Stability(Stable) public ResponseHeadersPolicyProps.Builder responseHeadersPolicyName(String responseHeadersPolicyName) Sets the value ofResponseHeadersPolicyProps.getResponseHeadersPolicyName()- Parameters:
responseHeadersPolicyName- A unique name to identify the response headers policy.- Returns:
this
-
securityHeadersBehavior
@Stability(Stable) public ResponseHeadersPolicyProps.Builder securityHeadersBehavior(ResponseSecurityHeadersBehavior securityHeadersBehavior) Sets the value ofResponseHeadersPolicyProps.getSecurityHeadersBehavior()- Parameters:
securityHeadersBehavior- A configuration for a set of security-related HTTP response headers.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ResponseHeadersPolicyProps>- Returns:
- a new instance of
ResponseHeadersPolicyProps - Throws:
NullPointerException- if any required attribute was not provided
-