Class StaticWebsiteProps.Builder
- java.lang.Object
-
- software.aws.awsprototypingsdk.staticwebsite.StaticWebsiteProps.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<StaticWebsiteProps>
- Enclosing interface:
- StaticWebsiteProps
@Stability(Experimental) public static final class StaticWebsiteProps.Builder extends Object implements software.amazon.jsii.Builder<StaticWebsiteProps>
A builder forStaticWebsiteProps
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
websiteContentPath
@Stability(Experimental) public StaticWebsiteProps.Builder websiteContentPath(String websiteContentPath)
Sets the value ofStaticWebsiteProps.getWebsiteContentPath()- 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)
Sets the value ofStaticWebsiteProps.getDefaultWebsiteBucketEncryption()- 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)
Sets the value ofStaticWebsiteProps.getDefaultWebsiteBucketEncryptionKey()- 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)
Sets the value ofStaticWebsiteProps.getDistributionProps()- 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
-
runtimeOptions
@Stability(Experimental) public StaticWebsiteProps.Builder runtimeOptions(RuntimeOptions runtimeOptions)
Sets the value ofStaticWebsiteProps.getRuntimeOptions()- Parameters:
runtimeOptions- Dynamic configuration which gets resolved only during deployment.- Returns:
this
-
webAclProps
@Stability(Experimental) public StaticWebsiteProps.Builder webAclProps(CloudFrontWebAclProps webAclProps)
Sets the value ofStaticWebsiteProps.getWebAclProps()- 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
-
websiteBucket
@Stability(Experimental) public StaticWebsiteProps.Builder websiteBucket(software.amazon.awscdk.services.s3.IBucket websiteBucket)
Sets the value ofStaticWebsiteProps.getWebsiteBucket()- Parameters:
websiteBucket- Predefined bucket to deploy the website into.- Returns:
this
-
build
@Stability(Experimental) public StaticWebsiteProps build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<StaticWebsiteProps>- Returns:
- a new instance of
StaticWebsiteProps - Throws:
NullPointerException- if any required attribute was not provided
-
-