Class CfnResponseHeadersPolicy.XSSProtectionProperty.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.CfnResponseHeadersPolicy.XSSProtectionProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnResponseHeadersPolicy.XSSProtectionProperty>
- Enclosing interface:
CfnResponseHeadersPolicy.XSSProtectionProperty
@Stability(Stable)
public static final class CfnResponseHeadersPolicy.XSSProtectionProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnResponseHeadersPolicy.XSSProtectionProperty>
A builder for
CfnResponseHeadersPolicy.XSSProtectionProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnResponseHeadersPolicy.XSSProtectionProperty.getModeBlock()
modeBlock
(IResolvable modeBlock) Sets the value ofCfnResponseHeadersPolicy.XSSProtectionProperty.getModeBlock()
Sets the value ofCfnResponseHeadersPolicy.XSSProtectionProperty.getOverride()
override
(IResolvable override) Sets the value ofCfnResponseHeadersPolicy.XSSProtectionProperty.getOverride()
protection
(Boolean protection) Sets the value ofCfnResponseHeadersPolicy.XSSProtectionProperty.getProtection()
protection
(IResolvable protection) Sets the value ofCfnResponseHeadersPolicy.XSSProtectionProperty.getProtection()
Sets the value ofCfnResponseHeadersPolicy.XSSProtectionProperty.getReportUri()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
override
@Stability(Stable) public CfnResponseHeadersPolicy.XSSProtectionProperty.Builder override(Boolean override) Sets the value ofCfnResponseHeadersPolicy.XSSProtectionProperty.getOverride()
- Parameters:
override
- A Boolean that determines whether CloudFront overrides theX-XSS-Protection
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.XSSProtectionProperty.Builder override(IResolvable override) Sets the value ofCfnResponseHeadersPolicy.XSSProtectionProperty.getOverride()
- Parameters:
override
- A Boolean that determines whether CloudFront overrides theX-XSS-Protection
HTTP response header received from the origin with the one specified in this response headers policy. This parameter is required.- Returns:
this
-
protection
@Stability(Stable) public CfnResponseHeadersPolicy.XSSProtectionProperty.Builder protection(Boolean protection) Sets the value ofCfnResponseHeadersPolicy.XSSProtectionProperty.getProtection()
- Parameters:
protection
- A Boolean that determines the value of theX-XSS-Protection
HTTP response header. This parameter is required. When this setting istrue
, the value of theX-XSS-Protection
header is1
. When this setting isfalse
, the value of theX-XSS-Protection
header is0
.For more information about these settings, see X-XSS-Protection in the MDN Web Docs.
- Returns:
this
-
protection
@Stability(Stable) public CfnResponseHeadersPolicy.XSSProtectionProperty.Builder protection(IResolvable protection) Sets the value ofCfnResponseHeadersPolicy.XSSProtectionProperty.getProtection()
- Parameters:
protection
- A Boolean that determines the value of theX-XSS-Protection
HTTP response header. This parameter is required. When this setting istrue
, the value of theX-XSS-Protection
header is1
. When this setting isfalse
, the value of theX-XSS-Protection
header is0
.For more information about these settings, see X-XSS-Protection in the MDN Web Docs.
- Returns:
this
-
modeBlock
@Stability(Stable) public CfnResponseHeadersPolicy.XSSProtectionProperty.Builder modeBlock(Boolean modeBlock) Sets the value ofCfnResponseHeadersPolicy.XSSProtectionProperty.getModeBlock()
- Parameters:
modeBlock
- A Boolean that determines whether CloudFront includes themode=block
directive in theX-XSS-Protection
header. For more information about this directive, see X-XSS-Protection in the MDN Web Docs.- Returns:
this
-
modeBlock
@Stability(Stable) public CfnResponseHeadersPolicy.XSSProtectionProperty.Builder modeBlock(IResolvable modeBlock) Sets the value ofCfnResponseHeadersPolicy.XSSProtectionProperty.getModeBlock()
- Parameters:
modeBlock
- A Boolean that determines whether CloudFront includes themode=block
directive in theX-XSS-Protection
header. For more information about this directive, see X-XSS-Protection in the MDN Web Docs.- Returns:
this
-
reportUri
@Stability(Stable) public CfnResponseHeadersPolicy.XSSProtectionProperty.Builder reportUri(String reportUri) Sets the value ofCfnResponseHeadersPolicy.XSSProtectionProperty.getReportUri()
- Parameters:
reportUri
- A reporting URI, which CloudFront uses as the value of thereport
directive in theX-XSS-Protection
header. You cannot specify aReportUri
whenModeBlock
istrue
.For more information about using a reporting URL, see X-XSS-Protection in the MDN Web Docs.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnResponseHeadersPolicy.XSSProtectionProperty>
- Returns:
- a new instance of
CfnResponseHeadersPolicy.XSSProtectionProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-