Class ResponseSecurityHeadersBehavior.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.ResponseSecurityHeadersBehavior.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ResponseSecurityHeadersBehavior>
- Enclosing interface:
ResponseSecurityHeadersBehavior
@Stability(Stable)
public static final class ResponseSecurityHeadersBehavior.Builder
extends Object
implements software.amazon.jsii.Builder<ResponseSecurityHeadersBehavior>
A builder for
ResponseSecurityHeadersBehavior
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.contentSecurityPolicy
(ResponseHeadersContentSecurityPolicy contentSecurityPolicy) Sets the value ofResponseSecurityHeadersBehavior.getContentSecurityPolicy()
contentTypeOptions
(ResponseHeadersContentTypeOptions contentTypeOptions) Sets the value ofResponseSecurityHeadersBehavior.getContentTypeOptions()
frameOptions
(ResponseHeadersFrameOptions frameOptions) Sets the value ofResponseSecurityHeadersBehavior.getFrameOptions()
referrerPolicy
(ResponseHeadersReferrerPolicy referrerPolicy) Sets the value ofResponseSecurityHeadersBehavior.getReferrerPolicy()
strictTransportSecurity
(ResponseHeadersStrictTransportSecurity strictTransportSecurity) Sets the value ofResponseSecurityHeadersBehavior.getStrictTransportSecurity()
xssProtection
(ResponseHeadersXSSProtection xssProtection) Sets the value ofResponseSecurityHeadersBehavior.getXssProtection()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
contentSecurityPolicy
@Stability(Stable) public ResponseSecurityHeadersBehavior.Builder contentSecurityPolicy(ResponseHeadersContentSecurityPolicy contentSecurityPolicy) Sets the value ofResponseSecurityHeadersBehavior.getContentSecurityPolicy()
- Parameters:
contentSecurityPolicy
- The policy directives and their values that CloudFront includes as values for the Content-Security-Policy HTTP response header.- Returns:
this
-
contentTypeOptions
@Stability(Stable) public ResponseSecurityHeadersBehavior.Builder contentTypeOptions(ResponseHeadersContentTypeOptions contentTypeOptions) Sets the value ofResponseSecurityHeadersBehavior.getContentTypeOptions()
- Parameters:
contentTypeOptions
- Determines whether CloudFront includes the X-Content-Type-Options HTTP response header with its value set to nosniff.- Returns:
this
-
frameOptions
@Stability(Stable) public ResponseSecurityHeadersBehavior.Builder frameOptions(ResponseHeadersFrameOptions frameOptions) Sets the value ofResponseSecurityHeadersBehavior.getFrameOptions()
- Parameters:
frameOptions
- Determines whether CloudFront includes the X-Frame-Options HTTP response header and the header’s value.- Returns:
this
-
referrerPolicy
@Stability(Stable) public ResponseSecurityHeadersBehavior.Builder referrerPolicy(ResponseHeadersReferrerPolicy referrerPolicy) Sets the value ofResponseSecurityHeadersBehavior.getReferrerPolicy()
- Parameters:
referrerPolicy
- Determines whether CloudFront includes the Referrer-Policy HTTP response header and the header’s value.- Returns:
this
-
strictTransportSecurity
@Stability(Stable) public ResponseSecurityHeadersBehavior.Builder strictTransportSecurity(ResponseHeadersStrictTransportSecurity strictTransportSecurity) Sets the value ofResponseSecurityHeadersBehavior.getStrictTransportSecurity()
- Parameters:
strictTransportSecurity
- Determines whether CloudFront includes the Strict-Transport-Security HTTP response header and the header’s value.- Returns:
this
-
xssProtection
@Stability(Stable) public ResponseSecurityHeadersBehavior.Builder xssProtection(ResponseHeadersXSSProtection xssProtection) Sets the value ofResponseSecurityHeadersBehavior.getXssProtection()
- Parameters:
xssProtection
- Determines whether CloudFront includes the X-XSS-Protection HTTP response header and the header’s value.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ResponseSecurityHeadersBehavior>
- Returns:
- a new instance of
ResponseSecurityHeadersBehavior
- Throws:
NullPointerException
- if any required attribute was not provided
-