Skip to content

Latest commit

 

History

History
240 lines (131 loc) · 12.6 KB

File metadata and controls

240 lines (131 loc) · 12.6 KB

API Reference

Classes

Name Description
StaticWebsite No description
WebsiteAliasRecord No description
WebsiteBucket No description

Structs

Name Description
AliasProps No description
StaticWebsiteProps No description
WebsiteAliasRecordProps No description
WebsiteBucketProps No description

class StaticWebsite

Implements: IConstruct, IConstruct, IConstruct, IDependable Extends: Construct

Initializer

new StaticWebsite(scope: Construct, id: string, props?: StaticWebsiteProps)
  • scope (Construct) No description
  • id (string) No description
  • props (StaticWebsiteProps) No description
    • bucketName (string) Name of the bucket. Default: Assigned by CloudFormation (recommended).
    • disableUpload (boolean) Disable website deployment. Default: false
    • removalPolicy (RemovalPolicy) Policy to apply when the bucket is removed from this stack. Default: The bucket will be orphaned.
    • source (string) The source from which to deploy the website. Default: Dummy placeholder
    • websiteErrorDocument (string) The error page for the site like 'error.html'. Default: error.html
    • websiteIndexDocument (string) The index page for the site like 'index.html'. Default: index.html
    • aliasConfiguration (AliasProps) AliasConfiguration is used to configured CloudFront to respond to requests on custom domain names. Default: No custom domain names are set up
    • bucketConfiguration (WebsiteBucketProps) BucketConfiguration is used to configured the S3 website bucket. Default: The website bucket is provided with default values
    • disableIPv6 (boolean) An override flag that allows you to turn off support for IPv6 if required. Default: Cloudfront IPv6 support is enabled and if you've supplied an aliasConfiguration, an AAAA record will be created for your service, set this to true to switch this off.
    • errorConfigurations (Array<CfnDistribution.CustomErrorResponseProperty>) How CloudFront should handle requests that are not successful (e.g., PageNotFound). Default: No custom error responses.
    • webACLId (string) AWS WAF WebACL to associate with this CloudFront distribution. Default: No AWS Web Application Firewall web access control list (web ACL)

Properties

Name Type Description
distribution CloudFrontWebDistribution

Methods

addLambdaFunctionAssociation(assosiation)

addLambdaFunctionAssociation(assosiation: LambdaFunctionAssociation): void
  • assosiation (LambdaFunctionAssociation) No description
    • eventType (LambdaEdgeEventType) The lambda event type defines at which event the lambda is called during the request lifecycle.
    • lambdaFunction (IVersion) A version of the lambda to associate.
    • includeBody (boolean) Allows a Lambda function to have read access to the body content. Default: false

addLambdaFunctionAssociations(assosiations)

addLambdaFunctionAssociations(assosiations: Array<LambdaFunctionAssociation>): void

class WebsiteAliasRecord

Implements: IConstruct, IConstruct, IConstruct, IDependable Extends: Construct

Initializer

new WebsiteAliasRecord(scope: Construct, id: string, props: WebsiteAliasRecordProps)
  • scope (Construct) No description
  • id (string) No description
  • props (WebsiteAliasRecordProps) No description
    • domainName (string) The domain name for the site like 'example.com'.
    • recordNames (Array) Names for the records.
    • target (IAliasRecordTarget) Target for the alias record.
    • disableIPv6 (boolean) We support IPv6 and add an AAAA record by default, but you can turn it off. Optional
    • privateZone (boolean) Allow searching a private hosted zone. Default: false
    • vpcId (string) Specifies the ID of the VPC associated with a private hosted zone. Default: No VPC ID

class WebsiteBucket

Implements: IConstruct, IConstruct, IConstruct, IDependable Extends: Construct

Initializer

new WebsiteBucket(scope: Construct, id: string, props?: WebsiteBucketProps)
  • scope (Construct) No description
  • id (string) No description
  • props (WebsiteBucketProps) No description
    • bucketName (string) Name of the bucket. Default: Assigned by CloudFormation (recommended).
    • disableUpload (boolean) Disable website deployment. Default: false
    • removalPolicy (RemovalPolicy) Policy to apply when the bucket is removed from this stack. Default: The bucket will be orphaned.
    • source (string) The source from which to deploy the website. Default: Dummy placeholder
    • websiteErrorDocument (string) The error page for the site like 'error.html'. Default: error.html
    • websiteIndexDocument (string) The index page for the site like 'index.html'. Default: index.html

Properties

Name Type Description
s3OriginConfig S3OriginConfig

struct AliasProps

Name Type Description
acmCertRef⚠️ string ARN of an AWS Certificate Manager (ACM) certificate.
domainName string The domain name for the site like 'example.com'.
names⚠️ Array Domain names on the certificate.
privateZone? boolean Allow searching a private hosted zone.
Default: false
securityPolicy?⚠️ SecurityPolicyProtocol The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections.
Default: SSLv3 if sslMethod VIP, TLSv1 if sslMethod SNI
sslMethod?⚠️ SSLMethod How CloudFront should serve HTTPS requests.
Default: SSLMethod.SNI
vpcId? string Specifies the ID of the VPC associated with a private hosted zone.
Default: No VPC ID

struct StaticWebsiteProps

Name Type Description
aliasConfiguration? AliasProps AliasConfiguration is used to configured CloudFront to respond to requests on custom domain names.
Default: No custom domain names are set up
bucketConfiguration? WebsiteBucketProps BucketConfiguration is used to configured the S3 website bucket.
Default: The website bucket is provided with default values
bucketName? string Name of the bucket.
Default: Assigned by CloudFormation (recommended).
disableIPv6? boolean An override flag that allows you to turn off support for IPv6 if required.
Default: Cloudfront IPv6 support is enabled and if you've supplied an aliasConfiguration, an AAAA record will be created for your service, set this to true to switch this off.
disableUpload? boolean Disable website deployment.
Default: false
errorConfigurations? Array<CfnDistribution.CustomErrorResponseProperty> How CloudFront should handle requests that are not successful (e.g., PageNotFound).
Default: No custom error responses.
removalPolicy? RemovalPolicy Policy to apply when the bucket is removed from this stack.
Default: The bucket will be orphaned.
source? string The source from which to deploy the website.
Default: Dummy placeholder
webACLId? string AWS WAF WebACL to associate with this CloudFront distribution.
Default: No AWS Web Application Firewall web access control list (web ACL)
websiteErrorDocument? string The error page for the site like 'error.html'.
Default: error.html
websiteIndexDocument? string The index page for the site like 'index.html'.
Default: index.html

struct WebsiteAliasRecordProps

Name Type Description
domainName string The domain name for the site like 'example.com'.
recordNames Array Names for the records.
target IAliasRecordTarget Target for the alias record.
disableIPv6? boolean We support IPv6 and add an AAAA record by default, but you can turn it off.
Optional
privateZone? boolean Allow searching a private hosted zone.
Default: false
vpcId? string Specifies the ID of the VPC associated with a private hosted zone.
Default: No VPC ID

struct WebsiteBucketProps

Name Type Description
bucketName? string Name of the bucket.
Default: Assigned by CloudFormation (recommended).
disableUpload? boolean Disable website deployment.
Default: false
removalPolicy? RemovalPolicy Policy to apply when the bucket is removed from this stack.
Default: The bucket will be orphaned.
source? string The source from which to deploy the website.
Default: Dummy placeholder
websiteErrorDocument? string The error page for the site like 'error.html'.
Default: error.html
websiteIndexDocument? string The index page for the site like 'index.html'.
Default: index.html