Class StaticWebsiteProps.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • websiteContentPath

        @Stability(Experimental)
        public StaticWebsiteProps.Builder websiteContentPath​(String websiteContentPath)
        Parameters:
        websiteContentPath - Path to the directory containing the static website files and assets. This parameter is required. This directory must contain an index.html file.
        Returns:
        this
      • defaultWebsiteBucketEncryption

        @Stability(Experimental)
        public StaticWebsiteProps.Builder defaultWebsiteBucketEncryption​(software.amazon.awscdk.services.s3.BucketEncryption defaultWebsiteBucketEncryption)
        Parameters:
        defaultWebsiteBucketEncryption - Bucket encryption to use for the default bucket. Supported options are KMS or S3MANAGED.

        Note: If planning to use KMS, ensure you associate a Lambda Edge function to sign requests to S3 as OAI does not currently support KMS encryption. Refer to {@link https://aws.amazon.com/blogs/networking-and-content-delivery/serving-sse-kms-encrypted-content-from-s3-using-cloudfront/}

        Returns:
        this
      • defaultWebsiteBucketEncryptionKey

        @Stability(Experimental)
        public StaticWebsiteProps.Builder defaultWebsiteBucketEncryptionKey​(software.amazon.awscdk.services.kms.Key defaultWebsiteBucketEncryptionKey)
        Parameters:
        defaultWebsiteBucketEncryptionKey - A predefined KMS customer encryption key to use for the default bucket that gets created. Note: This is only used if the websiteBucket is left undefined, otherwise all settings from the provided websiteBucket will be used.
        Returns:
        this
      • distributionProps

        @Stability(Experimental)
        public StaticWebsiteProps.Builder distributionProps​(software.amazon.awscdk.services.cloudfront.DistributionProps distributionProps)
        Parameters:
        distributionProps - Custom distribution properties. Note: defaultBehaviour.origin is a required parameter, however it will not be used as this construct will wire it on your behalf. You will need to pass in an instance of StaticWebsiteOrigin (NoOp) to keep the compiler happy.
        Returns:
        this
      • webAclProps

        @Stability(Experimental)
        public StaticWebsiteProps.Builder webAclProps​(CloudFrontWebAclProps webAclProps)
        Parameters:
        webAclProps - Limited configuration settings for the generated webAcl. For more advanced settings, create your own ACL and pass in the webAclId as a param to distributionProps.

        Note: If pass in your own ACL, make sure the SCOPE is CLOUDFRONT and it is created in us-east-1.

        Returns:
        this