@Stability(value=Experimental) public static final class Distribution.Builder extends Object implements software.amazon.jsii.Builder<Distribution>
Distribution.| Modifier and Type | Method and Description |
|---|---|
Distribution.Builder |
additionalBehaviors(Map<String,? extends BehaviorOptions> additionalBehaviors)
(experimental) Additional behaviors for the distribution, mapped by the pathPattern that specifies which requests to apply the behavior to.
|
Distribution |
build() |
Distribution.Builder |
certificate(ICertificate certificate)
(experimental) A certificate to associate with the distribution.
|
Distribution.Builder |
comment(String comment)
(experimental) Any comments you want to include about the distribution.
|
static Distribution.Builder |
create(software.constructs.Construct scope,
String id) |
Distribution.Builder |
defaultBehavior(BehaviorOptions defaultBehavior)
(experimental) The default behavior for the distribution.
|
Distribution.Builder |
defaultRootObject(String defaultRootObject)
(experimental) The object that you want CloudFront to request from your origin (for example, index.html) when a viewer requests the root URL for your distribution.
|
Distribution.Builder |
domainNames(List<String> domainNames)
(experimental) Alternative domain names for this distribution.
|
Distribution.Builder |
enabled(Boolean enabled)
(experimental) Enable or disable the distribution.
|
Distribution.Builder |
enableIpv6(Boolean enableIpv6)
(experimental) Whether CloudFront will respond to IPv6 DNS requests with an IPv6 address.
|
Distribution.Builder |
enableLogging(Boolean enableLogging)
(experimental) Enable access logging for the distribution.
|
Distribution.Builder |
errorResponses(List<? extends ErrorResponse> errorResponses)
(experimental) How CloudFront should handle requests that are not successful (e.g., PageNotFound).
|
Distribution.Builder |
geoRestriction(GeoRestriction geoRestriction)
(experimental) Controls the countries in which your content is distributed.
|
Distribution.Builder |
httpVersion(HttpVersion httpVersion)
(experimental) Specify the maximum HTTP version that you want viewers to use to communicate with CloudFront.
|
Distribution.Builder |
logBucket(IBucket logBucket)
(experimental) The Amazon S3 bucket to store the access logs in.
|
Distribution.Builder |
logFilePrefix(String logFilePrefix)
(experimental) An optional string that you want CloudFront to prefix to the access log filenames for this distribution.
|
Distribution.Builder |
logIncludesCookies(Boolean logIncludesCookies)
(experimental) Specifies whether you want CloudFront to include cookies in access logs.
|
Distribution.Builder |
minimumProtocolVersion(SecurityPolicyProtocol minimumProtocolVersion)
(experimental) The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections.
|
Distribution.Builder |
priceClass(PriceClass priceClass)
(experimental) The price class that corresponds with the maximum price that you want to pay for CloudFront service.
|
Distribution.Builder |
webAclId(String webAclId)
(experimental) Unique identifier that specifies the AWS WAF web ACL to associate with this CloudFront distribution.
|
@Stability(value=Experimental) public static Distribution.Builder create(software.constructs.Construct scope, String id)
scope - This parameter is required.id - This parameter is required.Distribution.Builder.@Stability(value=Experimental) public Distribution.Builder defaultBehavior(BehaviorOptions defaultBehavior)
defaultBehavior - The default behavior for the distribution. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder additionalBehaviors(Map<String,? extends BehaviorOptions> additionalBehaviors)
Default: - no additional behaviors are added.
additionalBehaviors - Additional behaviors for the distribution, mapped by the pathPattern that specifies which requests to apply the behavior to. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder certificate(ICertificate certificate)
The certificate must be located in N. Virginia (us-east-1).
Default: - the CloudFront wildcard certificate (*.cloudfront.net) will be used.
certificate - A certificate to associate with the distribution. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder comment(String comment)
Default: - no comment
comment - Any comments you want to include about the distribution. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder defaultRootObject(String defaultRootObject)
Default: - no default root object
defaultRootObject - The object that you want CloudFront to request from your origin (for example, index.html) when a viewer requests the root URL for your distribution. If no default object is set, the request goes to the origin's root (e.g., example.com/). This parameter is required.this@Stability(value=Experimental) public Distribution.Builder domainNames(List<String> domainNames)
If you want to use your own domain name, such as www.example.com, instead of the cloudfront.net domain name, you can add an alternate domain name to your distribution. If you attach a certificate to the distribution, you must add (at least one of) the domain names of the certificate to this list.
Default: - The distribution will only support the default generated name (e.g., d111111abcdef8.cloudfront.net)
domainNames - Alternative domain names for this distribution. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder enabled(Boolean enabled)
Default: true
enabled - Enable or disable the distribution. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder enableIpv6(Boolean enableIpv6)
If you specify false, CloudFront responds to IPv6 DNS requests with the DNS response code NOERROR and with no IP addresses. This allows viewers to submit a second request, for an IPv4 address for your distribution.
Default: true
enableIpv6 - Whether CloudFront will respond to IPv6 DNS requests with an IPv6 address. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder enableLogging(Boolean enableLogging)
Default: - false, unless `logBucket` is specified.
enableLogging - Enable access logging for the distribution. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder errorResponses(List<? extends ErrorResponse> errorResponses)
Default: - No custom error responses.
errorResponses - How CloudFront should handle requests that are not successful (e.g., PageNotFound). This parameter is required.this@Stability(value=Experimental) public Distribution.Builder geoRestriction(GeoRestriction geoRestriction)
Default: - No geographic restrictions
geoRestriction - Controls the countries in which your content is distributed. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder httpVersion(HttpVersion httpVersion)
For viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 or later, and must support server name identification (SNI).
Default: HttpVersion.HTTP2
httpVersion - Specify the maximum HTTP version that you want viewers to use to communicate with CloudFront. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder logBucket(IBucket logBucket)
Default: - A bucket is created if `enableLogging` is true
logBucket - The Amazon S3 bucket to store the access logs in. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder logFilePrefix(String logFilePrefix)
Default: - no prefix
logFilePrefix - An optional string that you want CloudFront to prefix to the access log filenames for this distribution. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder logIncludesCookies(Boolean logIncludesCookies)
Default: false
logIncludesCookies - Specifies whether you want CloudFront to include cookies in access logs. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder minimumProtocolVersion(SecurityPolicyProtocol minimumProtocolVersion)
CloudFront serves your objects only to browsers or devices that support at least the SSL version that you specify.
Default: SecurityPolicyProtocol.TLS_V1_2_2019
minimumProtocolVersion - The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder priceClass(PriceClass priceClass)
If you specify PriceClass_All, CloudFront responds to requests for your objects from all CloudFront edge locations. If you specify a price class other than PriceClass_All, CloudFront serves your objects from the CloudFront edge location that has the lowest latency among the edge locations in your price class.
Default: PriceClass.PRICE_CLASS_ALL
priceClass - The price class that corresponds with the maximum price that you want to pay for CloudFront service. This parameter is required.this@Stability(value=Experimental) public Distribution.Builder webAclId(String webAclId)
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.
Default: - No AWS Web Application Firewall web access control list (web ACL).
webAclId - Unique identifier that specifies the AWS WAF web ACL to associate with this CloudFront distribution. This parameter is required.thishttps://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateDistribution.html#API_CreateDistribution_RequestParameters.@Stability(value=Experimental) public Distribution build()
build in interface software.amazon.jsii.Builder<Distribution>Copyright © 2021. All rights reserved.