Class CloudFrontWebDistributionProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.CloudFrontWebDistributionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CloudFrontWebDistributionProps>
- Enclosing interface:
CloudFrontWebDistributionProps
@Stability(Stable)
public static final class CloudFrontWebDistributionProps.Builder
extends Object
implements software.amazon.jsii.Builder<CloudFrontWebDistributionProps>
A builder for
CloudFrontWebDistributionProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCloudFrontWebDistributionProps.getComment()
defaultRootObject
(String defaultRootObject) Sets the value ofCloudFrontWebDistributionProps.getDefaultRootObject()
Sets the value ofCloudFrontWebDistributionProps.getEnabled()
enableIpV6
(Boolean enableIpV6) Sets the value ofCloudFrontWebDistributionProps.getEnableIpV6()
errorConfigurations
(List<? extends CfnDistribution.CustomErrorResponseProperty> errorConfigurations) Sets the value ofCloudFrontWebDistributionProps.getErrorConfigurations()
geoRestriction
(GeoRestriction geoRestriction) Sets the value ofCloudFrontWebDistributionProps.getGeoRestriction()
httpVersion
(HttpVersion httpVersion) Sets the value ofCloudFrontWebDistributionProps.getHttpVersion()
loggingConfig
(LoggingConfiguration loggingConfig) Sets the value ofCloudFrontWebDistributionProps.getLoggingConfig()
originConfigs
(List<? extends SourceConfiguration> originConfigs) Sets the value ofCloudFrontWebDistributionProps.getOriginConfigs()
priceClass
(PriceClass priceClass) Sets the value ofCloudFrontWebDistributionProps.getPriceClass()
viewerCertificate
(ViewerCertificate viewerCertificate) Sets the value ofCloudFrontWebDistributionProps.getViewerCertificate()
viewerProtocolPolicy
(ViewerProtocolPolicy viewerProtocolPolicy) Sets the value ofCloudFrontWebDistributionProps.getViewerProtocolPolicy()
Sets the value ofinvalid @link
CloudFrontWebDistributionProps#getWebAclId
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
originConfigs
@Stability(Stable) public CloudFrontWebDistributionProps.Builder originConfigs(List<? extends SourceConfiguration> originConfigs) Sets the value ofCloudFrontWebDistributionProps.getOriginConfigs()
- Parameters:
originConfigs
- The origin configurations for this distribution. This parameter is required. Behaviors are a part of the origin.- Returns:
this
-
comment
Sets the value ofCloudFrontWebDistributionProps.getComment()
- Parameters:
comment
- A comment for this distribution in the CloudFront console.- Returns:
this
-
defaultRootObject
@Stability(Stable) public CloudFrontWebDistributionProps.Builder defaultRootObject(String defaultRootObject) Sets the value ofCloudFrontWebDistributionProps.getDefaultRootObject()
- Parameters:
defaultRootObject
- The default object to serve.- Returns:
this
-
enabled
Sets the value ofCloudFrontWebDistributionProps.getEnabled()
- Parameters:
enabled
- Enable or disable the distribution.- Returns:
this
-
enableIpV6
Sets the value ofCloudFrontWebDistributionProps.getEnableIpV6()
- Parameters:
enableIpV6
- If your distribution should have IPv6 enabled.- Returns:
this
-
errorConfigurations
@Stability(Stable) public CloudFrontWebDistributionProps.Builder errorConfigurations(List<? extends CfnDistribution.CustomErrorResponseProperty> errorConfigurations) Sets the value ofCloudFrontWebDistributionProps.getErrorConfigurations()
- Parameters:
errorConfigurations
- How CloudFront should handle requests that are not successful (eg PageNotFound). By default, CloudFront does not replace HTTP status codes in the 4xx and 5xx range with custom error messages. CloudFront does not cache HTTP status codes.- Returns:
this
-
geoRestriction
@Stability(Stable) public CloudFrontWebDistributionProps.Builder geoRestriction(GeoRestriction geoRestriction) Sets the value ofCloudFrontWebDistributionProps.getGeoRestriction()
- Parameters:
geoRestriction
- Controls the countries in which your content is distributed.- Returns:
this
-
httpVersion
@Stability(Stable) public CloudFrontWebDistributionProps.Builder httpVersion(HttpVersion httpVersion) Sets the value ofCloudFrontWebDistributionProps.getHttpVersion()
- Parameters:
httpVersion
- The max supported HTTP Versions.- Returns:
this
-
loggingConfig
@Stability(Stable) public CloudFrontWebDistributionProps.Builder loggingConfig(LoggingConfiguration loggingConfig) Sets the value ofCloudFrontWebDistributionProps.getLoggingConfig()
- Parameters:
loggingConfig
- Optional - if we should enable logging. You can pass an empty object ({}) to have us auto create a bucket for logging. Omission of this property indicates no logging is to be enabled.- Returns:
this
-
priceClass
Sets the value ofCloudFrontWebDistributionProps.getPriceClass()
- Parameters:
priceClass
- The price class for the distribution (this impacts how many locations CloudFront uses for your distribution, and billing).- Returns:
this
-
viewerCertificate
@Stability(Stable) public CloudFrontWebDistributionProps.Builder viewerCertificate(ViewerCertificate viewerCertificate) Sets the value ofCloudFrontWebDistributionProps.getViewerCertificate()
- Parameters:
viewerCertificate
- Specifies whether you want viewers to use HTTP or HTTPS to request your objects, whether you're using an alternate domain name with HTTPS, and if so, if you're using AWS Certificate Manager (ACM) or a third-party certificate authority.- Returns:
this
-
viewerProtocolPolicy
@Stability(Stable) public CloudFrontWebDistributionProps.Builder viewerProtocolPolicy(ViewerProtocolPolicy viewerProtocolPolicy) Sets the value ofCloudFrontWebDistributionProps.getViewerProtocolPolicy()
- Parameters:
viewerProtocolPolicy
- The default viewer policy for incoming clients.- Returns:
this
-
webAclId
Sets the value ofinvalid @link
CloudFrontWebDistributionProps#getWebAclId
- Parameters:
webAclId
- Unique identifier that specifies the AWS WAF web ACL to associate with this CloudFront distribution. To specify a web ACL created using the latest version of AWS WAF, use the ACL ARN, for examplearn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a
.To specify a web ACL created using AWS WAF Classic, use the ACL ID, for example
473e64fd-f30b-4765-81a0-62ad96dd167a
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CloudFrontWebDistributionProps>
- Returns:
- a new instance of
CloudFrontWebDistributionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-