Skip to content

Latest commit

 

History

History
432 lines (257 loc) · 14 KB

API.md

File metadata and controls

432 lines (257 loc) · 14 KB

API Reference

Constructs

CreateBasicSite

Initializers

import { CreateBasicSite } from 'cdk-simplewebsite-deploy'

new CreateBasicSite(scope: Construct, id: string, props: BasicSiteConfiguration)
Name Type Description
scope constructs.Construct No description.
id string No description.
props BasicSiteConfiguration No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.

toString
public toString(): string

Returns a string representation of this construct.

Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { CreateBasicSite } from 'cdk-simplewebsite-deploy'

CreateBasicSite.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


CreateCloudfrontSite

Initializers

import { CreateCloudfrontSite } from 'cdk-simplewebsite-deploy'

new CreateCloudfrontSite(scope: Construct, id: string, props: CloudfrontSiteConfiguration)
Name Type Description
scope constructs.Construct No description.
id string No description.
props CloudfrontSiteConfiguration No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.

toString
public toString(): string

Returns a string representation of this construct.

Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { CreateCloudfrontSite } from 'cdk-simplewebsite-deploy'

CreateCloudfrontSite.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


Structs

BasicSiteConfiguration

Initializer

import { BasicSiteConfiguration } from 'cdk-simplewebsite-deploy'

const basicSiteConfiguration: BasicSiteConfiguration = { ... }

Properties

Name Type Description
hostedZone string Hosted Zone used to create the DNS record for the website.
indexDoc string The index document of the website.
websiteFolder string Local path to the website folder you want to deploy on S3.
errorDoc string The error document of the website.

hostedZoneRequired
public readonly hostedZone: string;
  • Type: string

Hosted Zone used to create the DNS record for the website.


indexDocRequired
public readonly indexDoc: string;
  • Type: string

The index document of the website.


websiteFolderRequired
public readonly websiteFolder: string;
  • Type: string

Local path to the website folder you want to deploy on S3.


errorDocOptional
public readonly errorDoc: string;
  • Type: string
  • Default: No error document.

The error document of the website.


CloudfrontSiteConfiguration

Initializer

import { CloudfrontSiteConfiguration } from 'cdk-simplewebsite-deploy'

const cloudfrontSiteConfiguration: CloudfrontSiteConfiguration = { ... }

Properties

Name Type Description
hostedZone string Hosted Zone used to create the DNS record for the website.
indexDoc string The index document of the website.
websiteFolder string Local path to the website folder you want to deploy on S3.
domain string Used to deploy a Cloudfront site with a single domain.
errorDoc string The error document of the website.
priceClass PriceClass The price class determines how many edge locations CloudFront will use for your distribution.
subDomain string The subdomain name you want to deploy.

hostedZoneRequired
public readonly hostedZone: string;
  • Type: string

Hosted Zone used to create the DNS record for the website.


indexDocRequired
public readonly indexDoc: string;
  • Type: string

The index document of the website.


websiteFolderRequired
public readonly websiteFolder: string;
  • Type: string

Local path to the website folder you want to deploy on S3.


domainOptional
public readonly domain: string;
  • Type: string
  • Default: no value

Used to deploy a Cloudfront site with a single domain.

e.g. sample.example.com If you include a value for both domain and subDomain, an error will be thrown.


errorDocOptional
public readonly errorDoc: string;
  • Type: string
  • Default: No error document.

The error document of the website.


priceClassOptional
public readonly priceClass: PriceClass;
  • Type: PriceClass
  • Default: PriceClass.PRICE_CLASS_100.

The price class determines how many edge locations CloudFront will use for your distribution.

https://aws.amazon.com/cloudfront/pricing/.


subDomainOptional
public readonly subDomain: string;
  • Type: string
  • Default: no value

The subdomain name you want to deploy.

e.g. www.example.com If you include a value for both domain and subDomain, an error will be thrown.


Enums

PriceClass

Members

Name Description
PRICE_CLASS_100 USA, Canada, Europe, & Israel.
PRICE_CLASS_200 PRICE_CLASS_100 + South Africa, Kenya, Middle East, Japan, Singapore, South Korea, Taiwan, Hong Kong, & Philippines.
PRICE_CLASS_ALL All locations.

PRICE_CLASS_100

USA, Canada, Europe, & Israel.


PRICE_CLASS_200

PRICE_CLASS_100 + South Africa, Kenya, Middle East, Japan, Singapore, South Korea, Taiwan, Hong Kong, & Philippines.


PRICE_CLASS_ALL

All locations.