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