Interface CloudFrontWebDistributionProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CloudFrontWebDistributionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:43.669Z") @Stability(Stable) public interface CloudFrontWebDistributionProps extends software.amazon.jsii.JsiiSerializable
Example:

 Bucket sourceBucket;
 ViewerCertificate viewerCertificate = ViewerCertificate.fromIamCertificate("MYIAMROLEIDENTIFIER", ViewerCertificateOptions.builder()
         .aliases(List.of("MYALIAS"))
         .build());
 CloudFrontWebDistribution.Builder.create(this, "MyCfWebDistribution")
         .originConfigs(List.of(SourceConfiguration.builder()
                 .s3OriginSource(S3OriginConfig.builder()
                         .s3BucketSource(sourceBucket)
                         .build())
                 .behaviors(List.of(Behavior.builder().isDefaultBehavior(true).build()))
                 .build()))
         .viewerCertificate(viewerCertificate)
         .build();
 
  • Method Details

    • getOriginConfigs

      @Stability(Stable) @NotNull List<SourceConfiguration> getOriginConfigs()
      The origin configurations for this distribution.

      Behaviors are a part of the origin.

    • getAliasConfiguration

      @Stability(Deprecated) @Deprecated @Nullable default AliasConfiguration getAliasConfiguration()
      Deprecated.
      see
      invalid @link
      CloudFrontWebDistributionProps#viewerCertificate
      with
      invalid @link
      ViewerCertificate#acmCertificate
      (deprecated) AliasConfiguration is used to configured CloudFront to respond to requests on custom domain names.

      Default: - None.

    • getComment

      @Stability(Stable) @Nullable default String getComment()
      A comment for this distribution in the CloudFront console.

      Default: - No comment is added to distribution.

    • getDefaultRootObject

      @Stability(Stable) @Nullable default String getDefaultRootObject()
      The default object to serve.

      Default: - "index.html" is served.

    • getEnabled

      @Stability(Stable) @Nullable default Boolean getEnabled()
      Enable or disable the distribution.

      Default: true

    • getEnableIpV6

      @Stability(Stable) @Nullable default Boolean getEnableIpV6()
      If your distribution should have IPv6 enabled.

      Default: true

    • getErrorConfigurations

      @Stability(Stable) @Nullable default List<CfnDistribution.CustomErrorResponseProperty> getErrorConfigurations()
      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.

      Default: - No custom error configuration.

    • getGeoRestriction

      @Stability(Stable) @Nullable default GeoRestriction getGeoRestriction()
      Controls the countries in which your content is distributed.

      Default: No geo restriction

    • getHttpVersion

      @Stability(Stable) @Nullable default HttpVersion getHttpVersion()
      The max supported HTTP Versions.

      Default: HttpVersion.HTTP2

    • getLoggingConfig

      @Stability(Stable) @Nullable default LoggingConfiguration getLoggingConfig()
      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.

      Default: - no logging is enabled by default.

    • getPriceClass

      @Stability(Stable) @Nullable default PriceClass getPriceClass()
      The price class for the distribution (this impacts how many locations CloudFront uses for your distribution, and billing).

      Default: PriceClass.PRICE_CLASS_100 the cheapest option for CloudFront is picked by default.

    • getViewerCertificate

      @Stability(Stable) @Nullable default ViewerCertificate getViewerCertificate()
      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.

      Default: ViewerCertificate.fromCloudFrontDefaultCertificate()

      See Also:
    • getViewerProtocolPolicy

      @Stability(Stable) @Nullable default ViewerProtocolPolicy getViewerProtocolPolicy()
      The default viewer policy for incoming clients.

      Default: RedirectToHTTPs

    • getWebACLId

      @Stability(Stable) @Nullable default String getWebACLId()
      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.

      Default: - No AWS Web Application Firewall web access control list (web ACL).

      See Also:
    • builder

      @Stability(Stable) static CloudFrontWebDistributionProps.Builder builder()
      Returns:
      a CloudFrontWebDistributionProps.Builder of CloudFrontWebDistributionProps