Class ResponseHeadersStrictTransportSecurity.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.ResponseHeadersStrictTransportSecurity.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ResponseHeadersStrictTransportSecurity>
- Enclosing interface:
ResponseHeadersStrictTransportSecurity
@Stability(Stable)
public static final class ResponseHeadersStrictTransportSecurity.Builder
extends Object
implements software.amazon.jsii.Builder<ResponseHeadersStrictTransportSecurity>
A builder for
ResponseHeadersStrictTransportSecurity-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccessControlMaxAge(Duration accessControlMaxAge) Sets the value ofResponseHeadersStrictTransportSecurity.getAccessControlMaxAge()build()Builds the configured instance.includeSubdomains(Boolean includeSubdomains) Sets the value ofResponseHeadersStrictTransportSecurity.getIncludeSubdomains()Sets the value ofResponseHeadersStrictTransportSecurity.getOverride()Sets the value ofResponseHeadersStrictTransportSecurity.getPreload()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
accessControlMaxAge
@Stability(Stable) public ResponseHeadersStrictTransportSecurity.Builder accessControlMaxAge(Duration accessControlMaxAge) Sets the value ofResponseHeadersStrictTransportSecurity.getAccessControlMaxAge()- Parameters:
accessControlMaxAge- A number that CloudFront uses as the value for the max-age directive in the Strict-Transport-Security HTTP response header. This parameter is required.- Returns:
this
-
override
Sets the value ofResponseHeadersStrictTransportSecurity.getOverride()- Parameters:
override- A Boolean that determines whether CloudFront overrides the Strict-Transport-Security HTTP response header received from the origin with the one specified in this response headers policy. This parameter is required.- Returns:
this
-
includeSubdomains
@Stability(Stable) public ResponseHeadersStrictTransportSecurity.Builder includeSubdomains(Boolean includeSubdomains) Sets the value ofResponseHeadersStrictTransportSecurity.getIncludeSubdomains()- Parameters:
includeSubdomains- A Boolean that determines whether CloudFront includes the includeSubDomains directive in the Strict-Transport-Security HTTP response header.- Returns:
this
-
preload
Sets the value ofResponseHeadersStrictTransportSecurity.getPreload()- Parameters:
preload- A Boolean that determines whether CloudFront includes the preload directive in the Strict-Transport-Security HTTP response header.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ResponseHeadersStrictTransportSecurity>- Returns:
- a new instance of
ResponseHeadersStrictTransportSecurity - Throws:
NullPointerException- if any required attribute was not provided
-