public static final class CloudFrontWebDistributionProps.Builder
extends java.lang.Object
CloudFrontWebDistributionProps
Constructor and Description |
---|
Builder() |
public CloudFrontWebDistributionProps.Builder originConfigs(java.util.List<? extends SourceConfiguration> originConfigs)
CloudFrontWebDistributionProps.getOriginConfigs()
originConfigs
- The origin configurations for this distribution. This parameter is required.
Behaviors are a part of the origin.this
@Deprecated public CloudFrontWebDistributionProps.Builder aliasConfiguration(AliasConfiguration aliasConfiguration)
CloudFrontWebDistributionProps#viewerCertificate
with ViewerCertificate#acmCertificate
CloudFrontWebDistributionProps.getAliasConfiguration()
aliasConfiguration
- AliasConfiguration is used to configured CloudFront to respond to requests on custom domain names.this
public CloudFrontWebDistributionProps.Builder comment(java.lang.String comment)
CloudFrontWebDistributionProps.getComment()
comment
- A comment for this distribution in the CloudFront console.this
public CloudFrontWebDistributionProps.Builder defaultRootObject(java.lang.String defaultRootObject)
CloudFrontWebDistributionProps.getDefaultRootObject()
defaultRootObject
- The default object to serve.this
public CloudFrontWebDistributionProps.Builder enabled(java.lang.Boolean enabled)
CloudFrontWebDistributionProps.getEnabled()
enabled
- Enable or disable the distribution.this
public CloudFrontWebDistributionProps.Builder enableIpV6(java.lang.Boolean enableIpV6)
CloudFrontWebDistributionProps.getEnableIpV6()
enableIpV6
- If your distribution should have IPv6 enabled.this
public CloudFrontWebDistributionProps.Builder errorConfigurations(java.util.List<? extends CfnDistribution.CustomErrorResponseProperty> errorConfigurations)
CloudFrontWebDistributionProps.getErrorConfigurations()
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.this
public CloudFrontWebDistributionProps.Builder geoRestriction(GeoRestriction geoRestriction)
CloudFrontWebDistributionProps.getGeoRestriction()
geoRestriction
- Controls the countries in which your content is distributed.this
public CloudFrontWebDistributionProps.Builder httpVersion(HttpVersion httpVersion)
CloudFrontWebDistributionProps.getHttpVersion()
httpVersion
- The max supported HTTP Versions.this
public CloudFrontWebDistributionProps.Builder loggingConfig(LoggingConfiguration loggingConfig)
CloudFrontWebDistributionProps.getLoggingConfig()
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.this
public CloudFrontWebDistributionProps.Builder priceClass(PriceClass priceClass)
CloudFrontWebDistributionProps.getPriceClass()
priceClass
- The price class for the distribution (this impacts how many locations CloudFront uses for your distribution, and billing).this
public CloudFrontWebDistributionProps.Builder viewerCertificate(ViewerCertificate viewerCertificate)
CloudFrontWebDistributionProps.getViewerCertificate()
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.this
public CloudFrontWebDistributionProps.Builder viewerProtocolPolicy(ViewerProtocolPolicy viewerProtocolPolicy)
CloudFrontWebDistributionProps.getViewerProtocolPolicy()
viewerProtocolPolicy
- The default viewer policy for incoming clients.this
public CloudFrontWebDistributionProps.Builder webAclId(java.lang.String webAclId)
CloudFrontWebDistributionProps#getWebAclId
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 example
arn: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
.
this
public CloudFrontWebDistributionProps build()
CloudFrontWebDistributionProps
java.lang.NullPointerException
- if any required attribute was not provided