Class ResponseHeadersContentSecurityPolicy.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.ResponseHeadersContentSecurityPolicy.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ResponseHeadersContentSecurityPolicy>
- Enclosing interface:
ResponseHeadersContentSecurityPolicy
@Stability(Stable)
public static final class ResponseHeadersContentSecurityPolicy.Builder
extends Object
implements software.amazon.jsii.Builder<ResponseHeadersContentSecurityPolicy>
A builder for
ResponseHeadersContentSecurityPolicy-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.contentSecurityPolicy(String contentSecurityPolicy) Sets the value ofResponseHeadersContentSecurityPolicy.getContentSecurityPolicy()Sets the value ofResponseHeadersContentSecurityPolicy.getOverride()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
contentSecurityPolicy
@Stability(Stable) public ResponseHeadersContentSecurityPolicy.Builder contentSecurityPolicy(String contentSecurityPolicy) Sets the value ofResponseHeadersContentSecurityPolicy.getContentSecurityPolicy()- Parameters:
contentSecurityPolicy- The policy directives and their values that CloudFront includes as values for the Content-Security-Policy HTTP response header. This parameter is required.- Returns:
this
-
override
Sets the value ofResponseHeadersContentSecurityPolicy.getOverride()- Parameters:
override- A Boolean that determines whether CloudFront overrides the Content-Security-Policy HTTP response header received from the origin with the one specified in this response headers policy. This parameter is required.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ResponseHeadersContentSecurityPolicy>- Returns:
- a new instance of
ResponseHeadersContentSecurityPolicy - Throws:
NullPointerException- if any required attribute was not provided
-