Skip to content

Latest commit

 

History

History
1281 lines (703 loc) · 22 KB

File metadata and controls

1281 lines (703 loc) · 22 KB

README

@cloudcomponents/cdk-static-website

@cloudcomponents/cdk-static-website

Table of contents

Classes

Interfaces

Static Website

@cloudcomponents/cdk-static-website / StaticWebsite

Class: StaticWebsite

Hierarchy

  • Construct

    StaticWebsite

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new StaticWebsite(scope, id, props?)

Parameters

Name Type
scope Construct
id string
props StaticWebsiteProps

Overrides

Construct.constructor

Properties

distribution

Readonly distribution: CloudFrontWebDistribution


node

Readonly node: ConstructNode

The construct tree node associated with this construct.

stability stable

Inherited from

Construct.node

Methods

addLambdaFunctionAssociation

addLambdaFunctionAssociation(assosiation): void

Parameters

Name Type
assosiation LambdaFunctionAssociation

Returns

void


addLambdaFunctionAssociations

addLambdaFunctionAssociations(assosiations): void

Parameters

Name Type
assosiations LambdaFunctionAssociation[]

Returns

void


onPrepare

Protected onPrepare(): void

Perform final modifications before synthesis.

This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.

This is an advanced framework feature. Only use this if you understand the implications.

stability stable

Returns

void

Inherited from

Construct.onPrepare


onSynthesize

Protected onSynthesize(session): void

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

stability stable

Parameters

Name Type Description
session ISynthesisSession The synthesis session.

Returns

void

Inherited from

Construct.onSynthesize


onValidate

Protected onValidate(): string[]

Validate the current construct.

This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.

stability stable

Returns

string[]

An array of validation error messages, or an empty array if the construct is valid.

Inherited from

Construct.onValidate


prepare

Protected prepare(): void

Perform final modifications before synthesis.

This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.

This is an advanced framework feature. Only use this if you understand the implications.

stability stable

Returns

void

Inherited from

Construct.prepare


synthesize

Protected synthesize(session): void

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

stability stable

Parameters

Name Type Description
session ISynthesisSession The synthesis session.

Returns

void

Inherited from

Construct.synthesize


toString

toString(): string

Returns a string representation of this construct.

stability stable

Returns

string

Inherited from

Construct.toString


validate

Protected validate(): string[]

Validate the current construct.

This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.

stability stable

Returns

string[]

An array of validation error messages, or an empty array if the construct is valid.

Inherited from

Construct.validate


isConstruct

Static isConstruct(x): x is Construct

Return whether the given object is a Construct.

stability stable

Parameters

Name Type
x any

Returns

x is Construct

Inherited from

Construct.isConstruct

Website Alias Record

@cloudcomponents/cdk-static-website / WebsiteAliasRecord

Class: WebsiteAliasRecord

Hierarchy

  • Construct

    WebsiteAliasRecord

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new WebsiteAliasRecord(scope, id, props)

Parameters

Name Type
scope Construct
id string
props WebsiteAliasRecordProps

Overrides

Construct.constructor

Properties

node

Readonly node: ConstructNode

The construct tree node associated with this construct.

stability stable

Inherited from

Construct.node

Methods

onPrepare

Protected onPrepare(): void

Perform final modifications before synthesis.

This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.

This is an advanced framework feature. Only use this if you understand the implications.

stability stable

Returns

void

Inherited from

Construct.onPrepare


onSynthesize

Protected onSynthesize(session): void

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

stability stable

Parameters

Name Type Description
session ISynthesisSession The synthesis session.

Returns

void

Inherited from

Construct.onSynthesize


onValidate

Protected onValidate(): string[]

Validate the current construct.

This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.

stability stable

Returns

string[]

An array of validation error messages, or an empty array if the construct is valid.

Inherited from

Construct.onValidate


prepare

Protected prepare(): void

Perform final modifications before synthesis.

This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.

This is an advanced framework feature. Only use this if you understand the implications.

stability stable

Returns

void

Inherited from

Construct.prepare


synthesize

Protected synthesize(session): void

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

stability stable

Parameters

Name Type Description
session ISynthesisSession The synthesis session.

Returns

void

Inherited from

Construct.synthesize


toString

toString(): string

Returns a string representation of this construct.

stability stable

Returns

string

Inherited from

Construct.toString


validate

Protected validate(): string[]

Validate the current construct.

This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.

stability stable

Returns

string[]

An array of validation error messages, or an empty array if the construct is valid.

Inherited from

Construct.validate


isConstruct

Static isConstruct(x): x is Construct

Return whether the given object is a Construct.

stability stable

Parameters

Name Type
x any

Returns

x is Construct

Inherited from

Construct.isConstruct

Website Bucket

@cloudcomponents/cdk-static-website / WebsiteBucket

Class: WebsiteBucket

Hierarchy

  • Construct

    WebsiteBucket

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new WebsiteBucket(scope, id, props?)

Parameters

Name Type
scope Construct
id string
props WebsiteBucketProps

Overrides

Construct.constructor

Properties

node

Readonly node: ConstructNode

The construct tree node associated with this construct.

stability stable

Inherited from

Construct.node


s3OriginConfig

Readonly s3OriginConfig: S3OriginConfig

Methods

onPrepare

Protected onPrepare(): void

Perform final modifications before synthesis.

This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.

This is an advanced framework feature. Only use this if you understand the implications.

stability stable

Returns

void

Inherited from

Construct.onPrepare


onSynthesize

Protected onSynthesize(session): void

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

stability stable

Parameters

Name Type Description
session ISynthesisSession The synthesis session.

Returns

void

Inherited from

Construct.onSynthesize


onValidate

Protected onValidate(): string[]

Validate the current construct.

This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.

stability stable

Returns

string[]

An array of validation error messages, or an empty array if the construct is valid.

Inherited from

Construct.onValidate


prepare

Protected prepare(): void

Perform final modifications before synthesis.

This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.

This is an advanced framework feature. Only use this if you understand the implications.

stability stable

Returns

void

Inherited from

Construct.prepare


synthesize

Protected synthesize(session): void

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

stability stable

Parameters

Name Type Description
session ISynthesisSession The synthesis session.

Returns

void

Inherited from

Construct.synthesize


toString

toString(): string

Returns a string representation of this construct.

stability stable

Returns

string

Inherited from

Construct.toString


validate

Protected validate(): string[]

Validate the current construct.

This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.

stability stable

Returns

string[]

An array of validation error messages, or an empty array if the construct is valid.

Inherited from

Construct.validate


isConstruct

Static isConstruct(x): x is Construct

Return whether the given object is a Construct.

stability stable

Parameters

Name Type
x any

Returns

x is Construct

Inherited from

Construct.isConstruct

Alias Props

@cloudcomponents/cdk-static-website / AliasProps

Interface: AliasProps

Hierarchy

  • AliasConfiguration

    AliasProps

Table of contents

Properties

Properties

acmCertRef

Readonly acmCertRef: string

(deprecated) ARN of an AWS Certificate Manager (ACM) certificate.

deprecated

Inherited from

AliasConfiguration.acmCertRef


domainName

Readonly domainName: string

The domain name for the site like 'example.com'


names

Readonly names: string[]

(deprecated) Domain names on the certificate.

Both main domain name and Subject Alternative Names.

deprecated

Inherited from

AliasConfiguration.names


privateZone

Optional Readonly privateZone: boolean

Allow searching a private hosted zone.

default false


securityPolicy

Optional Readonly securityPolicy: SecurityPolicyProtocol

(deprecated) The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections.

CloudFront serves your objects only to browsers or devices that support at least the SSL version that you specify.

default - SSLv3 if sslMethod VIP, TLSv1 if sslMethod SNI

deprecated

Inherited from

AliasConfiguration.securityPolicy


sslMethod

Optional Readonly sslMethod: SSLMethod

(deprecated) How CloudFront should serve HTTPS requests.

See the notes on SSLMethod if you wish to use other SSL termination types.

default SSLMethod.SNI

see https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ViewerCertificate.html

deprecated

Inherited from

AliasConfiguration.sslMethod


vpcId

Optional Readonly vpcId: string

Specifies the ID of the VPC associated with a private hosted zone.

If a VPC ID is provided and privateZone is false, no results will be returned and an error will be raised

default - No VPC ID

Static Website Props

@cloudcomponents/cdk-static-website / StaticWebsiteProps

Interface: StaticWebsiteProps

Hierarchy

Table of contents

Properties

Properties

aliasConfiguration

Optional Readonly 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

Optional Readonly bucketConfiguration: WebsiteBucketProps

BucketConfiguration is used to configured the S3 website bucket

default - The website bucket is provided with default values


bucketName

Optional Readonly bucketName: string

Name of the bucket

default - Assigned by CloudFormation (recommended).

Inherited from

WebsiteBucketProps.bucketName


disableIPv6

Optional Readonly 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

Optional Readonly disableUpload: boolean

Disable website deployment

default - false

Inherited from

WebsiteBucketProps.disableUpload


errorConfigurations

Optional Readonly errorConfigurations: CustomErrorResponseProperty[]

How CloudFront should handle requests that are not successful (e.g., PageNotFound).

default - No custom error responses.


removalPolicy

Optional Readonly removalPolicy: RemovalPolicy

Policy to apply when the bucket is removed from this stack.

default - The bucket will be orphaned.

Inherited from

WebsiteBucketProps.removalPolicy


source

Optional Readonly source: string

The source from which to deploy the website

default - Dummy placeholder

Inherited from

WebsiteBucketProps.source


webACLId

Optional Readonly webACLId: string

AWS WAF WebACL to associate with this CloudFront distribution

default - No AWS Web Application Firewall web access control list (web ACL)


websiteErrorDocument

Optional Readonly websiteErrorDocument: string

The error page for the site like 'error.html'

default - error.html

Inherited from

WebsiteBucketProps.websiteErrorDocument


websiteIndexDocument

Optional Readonly websiteIndexDocument: string

The index page for the site like 'index.html'

default - index.html

Inherited from

WebsiteBucketProps.websiteIndexDocument

Website Alias Record Props

@cloudcomponents/cdk-static-website / WebsiteAliasRecordProps

Interface: WebsiteAliasRecordProps

Table of contents

Properties

Properties

disableIPv6

Optional Readonly disableIPv6: boolean

We support IPv6 and add an AAAA record by default, but you can turn it off


domainName

Readonly domainName: string

The domain name for the site like 'example.com'


privateZone

Optional Readonly privateZone: boolean

Allow searching a private hosted zone.

default false


recordNames

Readonly recordNames: string[]

Names for the records.


target

Readonly target: IAliasRecordTarget

Target for the alias record


vpcId

Optional Readonly vpcId: string

Specifies the ID of the VPC associated with a private hosted zone.

If a VPC ID is provided and privateZone is false, no results will be returned and an error will be raised

default - No VPC ID

Website Bucket Props

@cloudcomponents/cdk-static-website / WebsiteBucketProps

Interface: WebsiteBucketProps

Hierarchy

Table of contents

Properties

Properties

bucketName

Optional Readonly bucketName: string

Name of the bucket

default - Assigned by CloudFormation (recommended).


disableUpload

Optional Readonly disableUpload: boolean

Disable website deployment

default - false


removalPolicy

Optional Readonly removalPolicy: RemovalPolicy

Policy to apply when the bucket is removed from this stack.

default - The bucket will be orphaned.


source

Optional Readonly source: string

The source from which to deploy the website

default - Dummy placeholder


websiteErrorDocument

Optional Readonly websiteErrorDocument: string

The error page for the site like 'error.html'

default - error.html


websiteIndexDocument

Optional Readonly websiteIndexDocument: string

The index page for the site like 'index.html'

default - index.html