Class CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty>
- Enclosing interface:
CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty
@Stability(Stable)
public static final class CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.corsConfig
(IResolvable corsConfig) customHeadersConfig
(IResolvable customHeadersConfig) customHeadersConfig
(CfnResponseHeadersPolicy.CustomHeadersConfigProperty customHeadersConfig) Sets the value ofCfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.getName()
removeHeadersConfig
(IResolvable removeHeadersConfig) removeHeadersConfig
(CfnResponseHeadersPolicy.RemoveHeadersConfigProperty removeHeadersConfig) securityHeadersConfig
(IResolvable securityHeadersConfig) securityHeadersConfig
(CfnResponseHeadersPolicy.SecurityHeadersConfigProperty securityHeadersConfig) serverTimingHeadersConfig
(IResolvable serverTimingHeadersConfig) serverTimingHeadersConfig
(CfnResponseHeadersPolicy.ServerTimingHeadersConfigProperty serverTimingHeadersConfig)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
@Stability(Stable) public CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder name(String name) Sets the value ofCfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.getName()
- Parameters:
name
- A name to identify the response headers policy. This parameter is required. The name must be unique for response headers policies in this AWS account .- Returns:
this
-
comment
@Stability(Stable) public CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder comment(String comment) - Parameters:
comment
- A comment to describe the response headers policy. The comment cannot be longer than 128 characters.- Returns:
this
-
corsConfig
@Stability(Stable) public CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder corsConfig(IResolvable corsConfig) - Parameters:
corsConfig
- A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).- Returns:
this
-
corsConfig
@Stability(Stable) public CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder corsConfig(CfnResponseHeadersPolicy.CorsConfigProperty corsConfig) - Parameters:
corsConfig
- A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).- Returns:
this
-
customHeadersConfig
@Stability(Stable) public CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder customHeadersConfig(IResolvable customHeadersConfig) Sets the value ofCfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.getCustomHeadersConfig()
- Parameters:
customHeadersConfig
- A configuration for a set of custom HTTP response headers.- Returns:
this
-
customHeadersConfig
@Stability(Stable) public CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder customHeadersConfig(CfnResponseHeadersPolicy.CustomHeadersConfigProperty customHeadersConfig) Sets the value ofCfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.getCustomHeadersConfig()
- Parameters:
customHeadersConfig
- A configuration for a set of custom HTTP response headers.- Returns:
this
-
removeHeadersConfig
@Stability(Stable) public CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder removeHeadersConfig(IResolvable removeHeadersConfig) Sets the value ofCfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.getRemoveHeadersConfig()
- Parameters:
removeHeadersConfig
- A configuration for a set of HTTP headers to remove from the HTTP response.- Returns:
this
-
removeHeadersConfig
@Stability(Stable) public CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder removeHeadersConfig(CfnResponseHeadersPolicy.RemoveHeadersConfigProperty removeHeadersConfig) Sets the value ofCfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.getRemoveHeadersConfig()
- Parameters:
removeHeadersConfig
- A configuration for a set of HTTP headers to remove from the HTTP response.- Returns:
this
-
securityHeadersConfig
@Stability(Stable) public CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder securityHeadersConfig(IResolvable securityHeadersConfig) Sets the value ofCfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.getSecurityHeadersConfig()
- Parameters:
securityHeadersConfig
- A configuration for a set of security-related HTTP response headers.- Returns:
this
-
securityHeadersConfig
@Stability(Stable) public CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder securityHeadersConfig(CfnResponseHeadersPolicy.SecurityHeadersConfigProperty securityHeadersConfig) Sets the value ofCfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.getSecurityHeadersConfig()
- Parameters:
securityHeadersConfig
- A configuration for a set of security-related HTTP response headers.- Returns:
this
-
serverTimingHeadersConfig
@Stability(Stable) public CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder serverTimingHeadersConfig(IResolvable serverTimingHeadersConfig) Sets the value ofCfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.getServerTimingHeadersConfig()
- Parameters:
serverTimingHeadersConfig
- A configuration for enabling theServer-Timing
header in HTTP responses sent from CloudFront.- Returns:
this
-
serverTimingHeadersConfig
@Stability(Stable) public CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder serverTimingHeadersConfig(CfnResponseHeadersPolicy.ServerTimingHeadersConfigProperty serverTimingHeadersConfig) Sets the value ofCfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.getServerTimingHeadersConfig()
- Parameters:
serverTimingHeadersConfig
- A configuration for enabling theServer-Timing
header in HTTP responses sent from CloudFront.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty>
- Returns:
- a new instance of
CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-