This documentation is for the developer preview release of the AWS CDK. Do not use this version of the AWS CDK in production. Subsequent releases of the AWS CDK will likely include breaking changes.

@aws-cdk/aws-cloudfront

AWS CloudFront Construct Library

A CloudFront construct - for setting up the AWS CDN with ease!

Example usage:

const sourceBucket = new Bucket(this, 'Bucket');

const distribution = new CloudFrontWebDistribution(this, 'MyDistribution', {
    originConfigs: [
        {
            s3OriginSource: {
                s3BucketSource: sourceBucket
            },
            behaviors : [ {isDefaultBehavior: true}]
        }
    ]
 });

Reference

View in Nuget

csproj:

<PackageReference Include="Amazon.CDK.AWS.CloudFront" Version="0.25.3" />

dotnet:

dotnet add package Amazon.CDK.AWS.CloudFront --version 0.25.3

packages.config:

<package id="Amazon.CDK.AWS.CloudFront" version="0.25.3" />

View in Maven Central

Apache Buildr:

'software.amazon.awscdk:cloudfront:jar:0.25.3'

Apache Ivy:

<dependency groupId="software.amazon.awscdk" name="cloudfront" rev="0.25.3"/>

Apache Maven:

<dependency>
  <groupId>software.amazon.awscdk</groupId>
  <artifactId>cloudfront</artifactId>
  <version>0.25.3</version>
</dependency>

Gradle / Grails:

compile 'software.amazon.awscdk:cloudfront:0.25.3'

Groovy Grape:

@Grapes(
@Grab(group='software.amazon.awscdk', module='cloudfront', version='0.25.3')
)

View in NPM

npm:

$ npm i @aws-cdk/aws-cloudfront@0.25.3

package.json:

{
  "@aws-cdk/aws-cloudfront": "^0.25.3"
}

yarn:

$ yarn add @aws-cdk/aws-cloudfront@0.25.3

View in NPM

npm:

$ npm i @aws-cdk/aws-cloudfront@0.25.3

package.json:

{
  "@aws-cdk/aws-cloudfront": "^0.25.3"
}

yarn:

$ yarn add @aws-cdk/aws-cloudfront@0.25.3

AliasConfiguration (interface)

class @aws-cdk/aws-cloudfront.AliasConfiguration

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.AliasConfiguration;
// AliasConfiguration is an interface
import { AliasConfiguration } from '@aws-cdk/aws-cloudfront';

Configuration for custom domain names

CloudFront can use a custom domain that you provide instead of a

“cloudfront.net” domain. To use this feature you must provide the list of

additional domains, and the ACM Certificate that CloudFront should use for

these additional domains.

acmCertRef

ARN of an AWS Certificate Manager (ACM) certificate.

Type:string (readonly)
names

Domain names on the certificate

Both main domain name and Subject Alternative Names.

Type:string[] (readonly)
securityPolicy

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.

Type:SecurityPolicyProtocol (optional) (readonly)
Default:securityPolicy: SSLv3 if sslMethod VIP, TLSv1 if sslMethod SNI
sslMethod

How CloudFront should serve HTTPS requests.

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

Type:SSLMethod (optional) (readonly)
Default:SNI

Behavior (interface)

class @aws-cdk/aws-cloudfront.Behavior

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.Behavior;
// Behavior is an interface
import { Behavior } from '@aws-cdk/aws-cloudfront';

A CloudFront behavior wrapper.

allowedMethods

The method this CloudFront distribution responds do.

Type:CloudFrontAllowedMethods (optional)
Default:GET_HEAD
cachedMethods

Which methods are cached by CloudFront by default.

Type:CloudFrontAllowedCachedMethods (optional)
Default:GET_HEAD
compress

If CloudFront should automatically compress some content types.

Type:boolean (optional)
Default:true
defaultTtlSeconds

The default amount of time CloudFront will cache an object.

This value applies only when your custom origin does not add HTTP headers,

such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects.

Type:number (optional)
Default:86400 (1 day)
forwardedValues

The values CloudFront will forward to the origin when making a request.

Type:ForwardedValuesProperty (optional)
Default:none (no cookies - no headers)
isDefaultBehavior

If this behavior is the default behavior for the distribution.

You must specify exactly one default distribution per CloudFront distribution.

The default behavior is allowed to omit the “path” property.

Type:boolean (optional)
maxTtlSeconds

The max amount of time you want objects to stay in the cache

before CloudFront queries your origin.

Type:number (optional)
Default:31536000 (one year)
minTtlSeconds

The minimum amount of time that you want objects to stay in the cache

before CloudFront queries your origin.

Type:number (optional)
pathPattern

The path this behavior responds to.

Required for all non-default behaviors. (The default behavior implicitly has “*” as the path pattern. )

Type:string (optional)
trustedSigners

Trusted signers is how CloudFront allows you to serve private content.

The signers are the account IDs that are allowed to sign cookies/presigned URLs for this distribution.

If you pass a non empty value, all requests for this behavior must be signed (no public access will be allowed)

Type:string[] (optional)

CfnCloudFrontOriginAccessIdentity

class @aws-cdk/aws-cloudfront.CfnCloudFrontOriginAccessIdentity(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnCloudFrontOriginAccessIdentity;
const { CfnCloudFrontOriginAccessIdentity } = require('@aws-cdk/aws-cloudfront');
import { CfnCloudFrontOriginAccessIdentity } from '@aws-cdk/aws-cloudfront';
Extends:

@aws-cdk/cdk.Resource

Parameters:
renderProperties(properties) → string => any

Overrides @aws-cdk/cdk.Resource.renderProperties()

Protected method

Parameters:properties (any) –
Return type:string => any
resourceTypeName

The CloudFormation resource type name for this resource class.

Type:string (readonly) (static)
cloudFrontOriginAccessIdentityId
Type:string (readonly)
cloudFrontOriginAccessIdentityS3CanonicalUserId
Type:string (readonly)
propertyOverrides
Type:CfnCloudFrontOriginAccessIdentityProps (readonly)
class CloudFrontOriginAccessIdentityConfigProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnCloudFrontOriginAccessIdentity.CloudFrontOriginAccessIdentityConfigProperty;
// CfnCloudFrontOriginAccessIdentity.CloudFrontOriginAccessIdentityConfigProperty is an interface
import { CfnCloudFrontOriginAccessIdentity.CloudFrontOriginAccessIdentityConfigProperty } from '@aws-cdk/aws-cloudfront';
comment

CfnCloudFrontOriginAccessIdentity.CloudFrontOriginAccessIdentityConfigProperty.Comment

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-cloudfrontoriginaccessidentity-cloudfrontoriginaccessidentityconfig.html#cfn-cloudfront-cloudfrontoriginaccessidentity-cloudfrontoriginaccessidentityconfig-comment

Type:string
toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

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.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)
ref

Inherited from @aws-cdk/cdk.Referenceable

Returns a token to a CloudFormation { Ref } that references this entity based on it’s logical ID.

Type:string (readonly)
addDeletionOverride(path)

Inherited from @aws-cdk/cdk.Resource

Syntactic sugar for addOverride(path, undefined).

Parameters:path (string) – The path of the value to delete
addDependsOn(resource)

Inherited from @aws-cdk/cdk.Resource

Indicates that this resource depends on another resource and cannot be provisioned

unless the other resource has been successfully provisioned.

Parameters:resource (@aws-cdk/cdk.Resource) –
addOverride(path, value)

Inherited from @aws-cdk/cdk.Resource

Adds an override to the synthesized CloudFormation resource. To add a

property override, either use addPropertyOverride or prefix path with

“Properties.” (i.e. Properties.TopicName).

Parameters:
  • path (string) – The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.
  • value (any) – The value. Could be primitive or complex.
addPropertyDeletionOverride(propertyPath)

Inherited from @aws-cdk/cdk.Resource

Adds an override that deletes the value of a property from the resource definition.

Parameters:propertyPath (string) – The path to the property.
addPropertyOverride(propertyPath, value)

Inherited from @aws-cdk/cdk.Resource

Adds an override to a resource property.

Syntactic sugar for addOverride(“Properties.<…>”, value).

Parameters:
  • propertyPath (string) – The path of the property
  • value (any) – The value
getAtt(attributeName) → @aws-cdk/cdk.CfnReference

Inherited from @aws-cdk/cdk.Resource

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility

in case there is no generated attribute.

Parameters:attributeName (string) – The name of the attribute.
Return type:@aws-cdk/cdk.CfnReference
toCloudFormation() → json

Inherited from @aws-cdk/cdk.Resource

Emits CloudFormation for this resource.

Return type:json
options

Inherited from @aws-cdk/cdk.Resource

Options for this resource, such as condition, update policy etc.

Type:@aws-cdk/cdk.ResourceOptions (readonly)
properties

Inherited from @aws-cdk/cdk.Resource

AWS resource properties.

This object is rendered via a call to “renderProperties(this.properties)”.

Protected property

Type:any (readonly)
resourceType

Inherited from @aws-cdk/cdk.Resource

AWS resource type.

Type:string (readonly)
untypedPropertyOverrides

Inherited from @aws-cdk/cdk.Resource

AWS resource property overrides.

During synthesis, the method “renderProperties(this.overrides)” is called

with this object, and merged on top of the output of

“renderProperties(this.properties)”.

Derived classes should expose a strongly-typed version of this object as

a public property called propertyOverrides.

Protected property

Type:any (readonly)
overrideLogicalId(newLogicalId)

Inherited from @aws-cdk/cdk.StackElement

Overrides the auto-generated logical ID with a specific ID.

Parameters:newLogicalId (string) – The new logical ID to use for this stack element.
prepare()

Inherited from @aws-cdk/cdk.StackElement

Automatically detect references in this StackElement

Protected method

creationStackTrace

Inherited from @aws-cdk/cdk.StackElement

Type:string[] (readonly)
logicalId

Inherited from @aws-cdk/cdk.StackElement

The logical ID for this CloudFormation stack element. The logical ID of the element

is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Type:string (readonly)
stackPath

Inherited from @aws-cdk/cdk.StackElement

Return the path with respect to the stack

Type:string (readonly)

CfnCloudFrontOriginAccessIdentityProps (interface)

class @aws-cdk/aws-cloudfront.CfnCloudFrontOriginAccessIdentityProps

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnCloudFrontOriginAccessIdentityProps;
// CfnCloudFrontOriginAccessIdentityProps is an interface
import { CfnCloudFrontOriginAccessIdentityProps } from '@aws-cdk/aws-cloudfront';
cloudFrontOriginAccessIdentityConfig

AWS::CloudFront::CloudFrontOriginAccessIdentity.CloudFrontOriginAccessIdentityConfig

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-cloudfrontoriginaccessidentity.html#cfn-cloudfront-cloudfrontoriginaccessidentity-cloudfrontoriginaccessidentityconfig

Type:CloudFrontOriginAccessIdentityConfigProperty or @aws-cdk/cdk.Token

CfnDistribution

class @aws-cdk/aws-cloudfront.CfnDistribution(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution;
const { CfnDistribution } = require('@aws-cdk/aws-cloudfront');
import { CfnDistribution } from '@aws-cdk/aws-cloudfront';
Extends:

@aws-cdk/cdk.Resource

Parameters:
renderProperties(properties) → string => any

Overrides @aws-cdk/cdk.Resource.renderProperties()

Protected method

Parameters:properties (any) –
Return type:string => any
resourceTypeName

The CloudFormation resource type name for this resource class.

Type:string (readonly) (static)
distributionDomainName
Type:string (readonly)
distributionId
Type:string (readonly)
propertyOverrides
Type:CfnDistributionProps (readonly)
tags

The TagManager handles setting, removing and formatting tags

Tags should be managed either passing them as properties during

initiation or by calling methods on this object. If both techniques are

used only the tags from the TagManager will be used. Tag (aspect)

will use the manager.

Type:@aws-cdk/cdk.TagManager (readonly)
class CacheBehaviorProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.CacheBehaviorProperty;
// CfnDistribution.CacheBehaviorProperty is an interface
import { CfnDistribution.CacheBehaviorProperty } from '@aws-cdk/aws-cloudfront';
forwardedValues

CfnDistribution.CacheBehaviorProperty.ForwardedValues

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-forwardedvalues

Type:ForwardedValuesProperty or @aws-cdk/cdk.Token
pathPattern

CfnDistribution.CacheBehaviorProperty.PathPattern

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-pathpattern

Type:string
targetOriginId

CfnDistribution.CacheBehaviorProperty.TargetOriginId

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-targetoriginid

Type:string
viewerProtocolPolicy

CfnDistribution.CacheBehaviorProperty.ViewerProtocolPolicy

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-viewerprotocolpolicy

Type:string
allowedMethods

CfnDistribution.CacheBehaviorProperty.AllowedMethods

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-allowedmethods

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
cachedMethods

CfnDistribution.CacheBehaviorProperty.CachedMethods

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-cachedmethods

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
compress

CfnDistribution.CacheBehaviorProperty.Compress

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-compress

Type:boolean or @aws-cdk/cdk.Token (optional)
defaultTtl

CfnDistribution.CacheBehaviorProperty.DefaultTTL

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-defaultttl

Type:number or @aws-cdk/cdk.Token (optional)
fieldLevelEncryptionId

CfnDistribution.CacheBehaviorProperty.FieldLevelEncryptionId

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-fieldlevelencryptionid

Type:string (optional)
lambdaFunctionAssociations

CfnDistribution.CacheBehaviorProperty.LambdaFunctionAssociations

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-lambdafunctionassociations

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or LambdaFunctionAssociationProperty)[] (optional)
maxTtl

CfnDistribution.CacheBehaviorProperty.MaxTTL

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-maxttl

Type:number or @aws-cdk/cdk.Token (optional)
minTtl

CfnDistribution.CacheBehaviorProperty.MinTTL

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-minttl

Type:number or @aws-cdk/cdk.Token (optional)
smoothStreaming

CfnDistribution.CacheBehaviorProperty.SmoothStreaming

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-smoothstreaming

Type:boolean or @aws-cdk/cdk.Token (optional)
trustedSigners

CfnDistribution.CacheBehaviorProperty.TrustedSigners

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html#cfn-cloudfront-distribution-cachebehavior-trustedsigners

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
class CookiesProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.CookiesProperty;
// CfnDistribution.CookiesProperty is an interface
import { CfnDistribution.CookiesProperty } from '@aws-cdk/aws-cloudfront';
forward

CfnDistribution.CookiesProperty.Forward

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cookies.html#cfn-cloudfront-distribution-cookies-forward

Type:string
whitelistedNames

CfnDistribution.CookiesProperty.WhitelistedNames

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cookies.html#cfn-cloudfront-distribution-cookies-whitelistednames

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
class CustomErrorResponseProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.CustomErrorResponseProperty;
// CfnDistribution.CustomErrorResponseProperty is an interface
import { CfnDistribution.CustomErrorResponseProperty } from '@aws-cdk/aws-cloudfront';
errorCode

CfnDistribution.CustomErrorResponseProperty.ErrorCode

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html#cfn-cloudfront-distribution-customerrorresponse-errorcode

Type:number or @aws-cdk/cdk.Token
errorCachingMinTtl

CfnDistribution.CustomErrorResponseProperty.ErrorCachingMinTTL

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html#cfn-cloudfront-distribution-customerrorresponse-errorcachingminttl

Type:number or @aws-cdk/cdk.Token (optional)
responseCode

CfnDistribution.CustomErrorResponseProperty.ResponseCode

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html#cfn-cloudfront-distribution-customerrorresponse-responsecode

Type:number or @aws-cdk/cdk.Token (optional)
responsePagePath

CfnDistribution.CustomErrorResponseProperty.ResponsePagePath

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html#cfn-cloudfront-distribution-customerrorresponse-responsepagepath

Type:string (optional)
class CustomOriginConfigProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.CustomOriginConfigProperty;
// CfnDistribution.CustomOriginConfigProperty is an interface
import { CfnDistribution.CustomOriginConfigProperty } from '@aws-cdk/aws-cloudfront';
originProtocolPolicy

CfnDistribution.CustomOriginConfigProperty.OriginProtocolPolicy

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customoriginconfig.html#cfn-cloudfront-distribution-customoriginconfig-originprotocolpolicy

Type:string
httpPort

CfnDistribution.CustomOriginConfigProperty.HTTPPort

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customoriginconfig.html#cfn-cloudfront-distribution-customoriginconfig-httpport

Type:number or @aws-cdk/cdk.Token (optional)
httpsPort

CfnDistribution.CustomOriginConfigProperty.HTTPSPort

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customoriginconfig.html#cfn-cloudfront-distribution-customoriginconfig-httpsport

Type:number or @aws-cdk/cdk.Token (optional)
originKeepaliveTimeout

CfnDistribution.CustomOriginConfigProperty.OriginKeepaliveTimeout

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customoriginconfig.html#cfn-cloudfront-distribution-customoriginconfig-originkeepalivetimeout

Type:number or @aws-cdk/cdk.Token (optional)
originReadTimeout

CfnDistribution.CustomOriginConfigProperty.OriginReadTimeout

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customoriginconfig.html#cfn-cloudfront-distribution-customoriginconfig-originreadtimeout

Type:number or @aws-cdk/cdk.Token (optional)
originSslProtocols

CfnDistribution.CustomOriginConfigProperty.OriginSSLProtocols

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customoriginconfig.html#cfn-cloudfront-distribution-customoriginconfig-originsslprotocols

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
class DefaultCacheBehaviorProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.DefaultCacheBehaviorProperty;
// CfnDistribution.DefaultCacheBehaviorProperty is an interface
import { CfnDistribution.DefaultCacheBehaviorProperty } from '@aws-cdk/aws-cloudfront';
forwardedValues

CfnDistribution.DefaultCacheBehaviorProperty.ForwardedValues

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-forwardedvalues

Type:ForwardedValuesProperty or @aws-cdk/cdk.Token
targetOriginId

CfnDistribution.DefaultCacheBehaviorProperty.TargetOriginId

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-targetoriginid

Type:string
viewerProtocolPolicy

CfnDistribution.DefaultCacheBehaviorProperty.ViewerProtocolPolicy

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-viewerprotocolpolicy

Type:string
allowedMethods

CfnDistribution.DefaultCacheBehaviorProperty.AllowedMethods

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-allowedmethods

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
cachedMethods

CfnDistribution.DefaultCacheBehaviorProperty.CachedMethods

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-cachedmethods

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
compress

CfnDistribution.DefaultCacheBehaviorProperty.Compress

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-compress

Type:boolean or @aws-cdk/cdk.Token (optional)
defaultTtl

CfnDistribution.DefaultCacheBehaviorProperty.DefaultTTL

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-defaultttl

Type:number or @aws-cdk/cdk.Token (optional)
fieldLevelEncryptionId

CfnDistribution.DefaultCacheBehaviorProperty.FieldLevelEncryptionId

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-fieldlevelencryptionid

Type:string (optional)
lambdaFunctionAssociations

CfnDistribution.DefaultCacheBehaviorProperty.LambdaFunctionAssociations

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-lambdafunctionassociations

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or LambdaFunctionAssociationProperty)[] (optional)
maxTtl

CfnDistribution.DefaultCacheBehaviorProperty.MaxTTL

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-maxttl

Type:number or @aws-cdk/cdk.Token (optional)
minTtl

CfnDistribution.DefaultCacheBehaviorProperty.MinTTL

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-minttl

Type:number or @aws-cdk/cdk.Token (optional)
smoothStreaming

CfnDistribution.DefaultCacheBehaviorProperty.SmoothStreaming

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-smoothstreaming

Type:boolean or @aws-cdk/cdk.Token (optional)
trustedSigners

CfnDistribution.DefaultCacheBehaviorProperty.TrustedSigners

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html#cfn-cloudfront-distribution-defaultcachebehavior-trustedsigners

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
class DistributionConfigProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.DistributionConfigProperty;
// CfnDistribution.DistributionConfigProperty is an interface
import { CfnDistribution.DistributionConfigProperty } from '@aws-cdk/aws-cloudfront';
enabled

CfnDistribution.DistributionConfigProperty.Enabled

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-enabled

Type:boolean or @aws-cdk/cdk.Token
aliases

CfnDistribution.DistributionConfigProperty.Aliases

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-aliases

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
cacheBehaviors

CfnDistribution.DistributionConfigProperty.CacheBehaviors

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-cachebehaviors

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or CacheBehaviorProperty)[] (optional)
comment

CfnDistribution.DistributionConfigProperty.Comment

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-comment

Type:string (optional)
customErrorResponses

CfnDistribution.DistributionConfigProperty.CustomErrorResponses

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-customerrorresponses

Type:@aws-cdk/cdk.Token or (CustomErrorResponseProperty or @aws-cdk/cdk.Token)[] (optional)
defaultCacheBehavior

CfnDistribution.DistributionConfigProperty.DefaultCacheBehavior

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-defaultcachebehavior

Type:@aws-cdk/cdk.Token or DefaultCacheBehaviorProperty (optional)
defaultRootObject

CfnDistribution.DistributionConfigProperty.DefaultRootObject

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-defaultrootobject

Type:string (optional)
httpVersion

CfnDistribution.DistributionConfigProperty.HttpVersion

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-httpversion

Type:string (optional)
ipv6Enabled

CfnDistribution.DistributionConfigProperty.IPV6Enabled

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-ipv6enabled

Type:boolean or @aws-cdk/cdk.Token (optional)
logging

CfnDistribution.DistributionConfigProperty.Logging

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-logging

Type:@aws-cdk/cdk.Token or LoggingProperty (optional)
origins

CfnDistribution.DistributionConfigProperty.Origins

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-origins

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or OriginProperty)[] (optional)
priceClass

CfnDistribution.DistributionConfigProperty.PriceClass

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-priceclass

Type:string (optional)
restrictions

CfnDistribution.DistributionConfigProperty.Restrictions

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-restrictions

Type:@aws-cdk/cdk.Token or RestrictionsProperty (optional)
viewerCertificate

CfnDistribution.DistributionConfigProperty.ViewerCertificate

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-viewercertificate

Type:@aws-cdk/cdk.Token or ViewerCertificateProperty (optional)
webAclId

CfnDistribution.DistributionConfigProperty.WebACLId

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-webaclid

Type:string (optional)
class ForwardedValuesProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.ForwardedValuesProperty;
// CfnDistribution.ForwardedValuesProperty is an interface
import { CfnDistribution.ForwardedValuesProperty } from '@aws-cdk/aws-cloudfront';
queryString

CfnDistribution.ForwardedValuesProperty.QueryString

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-forwardedvalues.html#cfn-cloudfront-distribution-forwardedvalues-querystring

Type:boolean or @aws-cdk/cdk.Token
cookies

CfnDistribution.ForwardedValuesProperty.Cookies

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-forwardedvalues.html#cfn-cloudfront-distribution-forwardedvalues-cookies

Type:@aws-cdk/cdk.Token or CookiesProperty (optional)
headers

CfnDistribution.ForwardedValuesProperty.Headers

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-forwardedvalues.html#cfn-cloudfront-distribution-forwardedvalues-headers

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
queryStringCacheKeys

CfnDistribution.ForwardedValuesProperty.QueryStringCacheKeys

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-forwardedvalues.html#cfn-cloudfront-distribution-forwardedvalues-querystringcachekeys

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
class GeoRestrictionProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.GeoRestrictionProperty;
// CfnDistribution.GeoRestrictionProperty is an interface
import { CfnDistribution.GeoRestrictionProperty } from '@aws-cdk/aws-cloudfront';
restrictionType

CfnDistribution.GeoRestrictionProperty.RestrictionType

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-georestriction.html#cfn-cloudfront-distribution-georestriction-restrictiontype

Type:string
locations

CfnDistribution.GeoRestrictionProperty.Locations

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-georestriction.html#cfn-cloudfront-distribution-georestriction-locations

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
class LambdaFunctionAssociationProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.LambdaFunctionAssociationProperty;
// CfnDistribution.LambdaFunctionAssociationProperty is an interface
import { CfnDistribution.LambdaFunctionAssociationProperty } from '@aws-cdk/aws-cloudfront';
eventType

CfnDistribution.LambdaFunctionAssociationProperty.EventType

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-lambdafunctionassociation.html#cfn-cloudfront-distribution-lambdafunctionassociation-eventtype

Type:string (optional)
lambdaFunctionArn

CfnDistribution.LambdaFunctionAssociationProperty.LambdaFunctionARN

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-lambdafunctionassociation.html#cfn-cloudfront-distribution-lambdafunctionassociation-lambdafunctionarn

Type:string (optional)
class LoggingProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.LoggingProperty;
// CfnDistribution.LoggingProperty is an interface
import { CfnDistribution.LoggingProperty } from '@aws-cdk/aws-cloudfront';
bucket

CfnDistribution.LoggingProperty.Bucket

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-logging.html#cfn-cloudfront-distribution-logging-bucket

Type:string
includeCookies

CfnDistribution.LoggingProperty.IncludeCookies

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-logging.html#cfn-cloudfront-distribution-logging-includecookies

Type:boolean or @aws-cdk/cdk.Token (optional)
prefix

CfnDistribution.LoggingProperty.Prefix

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-logging.html#cfn-cloudfront-distribution-logging-prefix

Type:string (optional)
class OriginCustomHeaderProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.OriginCustomHeaderProperty;
// CfnDistribution.OriginCustomHeaderProperty is an interface
import { CfnDistribution.OriginCustomHeaderProperty } from '@aws-cdk/aws-cloudfront';
headerName

CfnDistribution.OriginCustomHeaderProperty.HeaderName

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origincustomheader.html#cfn-cloudfront-distribution-origincustomheader-headername

Type:string
headerValue

CfnDistribution.OriginCustomHeaderProperty.HeaderValue

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origincustomheader.html#cfn-cloudfront-distribution-origincustomheader-headervalue

Type:string
class OriginProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.OriginProperty;
// CfnDistribution.OriginProperty is an interface
import { CfnDistribution.OriginProperty } from '@aws-cdk/aws-cloudfront';
domainName

CfnDistribution.OriginProperty.DomainName

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origin.html#cfn-cloudfront-distribution-origin-domainname

Type:string
id

CfnDistribution.OriginProperty.Id

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origin.html#cfn-cloudfront-distribution-origin-id

Type:string
customOriginConfig

CfnDistribution.OriginProperty.CustomOriginConfig

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origin.html#cfn-cloudfront-distribution-origin-customoriginconfig

Type:@aws-cdk/cdk.Token or CustomOriginConfigProperty (optional)
originCustomHeaders

CfnDistribution.OriginProperty.OriginCustomHeaders

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origin.html#cfn-cloudfront-distribution-origin-origincustomheaders

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or OriginCustomHeaderProperty)[] (optional)
originPath

CfnDistribution.OriginProperty.OriginPath

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origin.html#cfn-cloudfront-distribution-origin-originpath

Type:string (optional)
s3OriginConfig

CfnDistribution.OriginProperty.S3OriginConfig

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origin.html#cfn-cloudfront-distribution-origin-s3originconfig

Type:@aws-cdk/cdk.Token or S3OriginConfigProperty (optional)
class RestrictionsProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.RestrictionsProperty;
// CfnDistribution.RestrictionsProperty is an interface
import { CfnDistribution.RestrictionsProperty } from '@aws-cdk/aws-cloudfront';
geoRestriction

CfnDistribution.RestrictionsProperty.GeoRestriction

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-restrictions.html#cfn-cloudfront-distribution-restrictions-georestriction

Type:@aws-cdk/cdk.Token or GeoRestrictionProperty
class S3OriginConfigProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.S3OriginConfigProperty;
// CfnDistribution.S3OriginConfigProperty is an interface
import { CfnDistribution.S3OriginConfigProperty } from '@aws-cdk/aws-cloudfront';
originAccessIdentity

CfnDistribution.S3OriginConfigProperty.OriginAccessIdentity

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-s3originconfig.html#cfn-cloudfront-distribution-s3originconfig-originaccessidentity

Type:string (optional)
class ViewerCertificateProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistribution.ViewerCertificateProperty;
// CfnDistribution.ViewerCertificateProperty is an interface
import { CfnDistribution.ViewerCertificateProperty } from '@aws-cdk/aws-cloudfront';
acmCertificateArn

CfnDistribution.ViewerCertificateProperty.AcmCertificateArn

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-viewercertificate.html#cfn-cloudfront-distribution-viewercertificate-acmcertificatearn

Type:string (optional)
cloudFrontDefaultCertificate

CfnDistribution.ViewerCertificateProperty.CloudFrontDefaultCertificate

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-viewercertificate.html#cfn-cloudfront-distribution-viewercertificate-cloudfrontdefaultcertificate

Type:boolean or @aws-cdk/cdk.Token (optional)
iamCertificateId

CfnDistribution.ViewerCertificateProperty.IamCertificateId

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-viewercertificate.html#cfn-cloudfront-distribution-viewercertificate-iamcertificateid

Type:string (optional)
minimumProtocolVersion

CfnDistribution.ViewerCertificateProperty.MinimumProtocolVersion

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-viewercertificate.html#cfn-cloudfront-distribution-viewercertificate-minimumprotocolversion

Type:string (optional)
sslSupportMethod

CfnDistribution.ViewerCertificateProperty.SslSupportMethod

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-viewercertificate.html#cfn-cloudfront-distribution-viewercertificate-sslsupportmethod

Type:string (optional)
toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

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.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)
ref

Inherited from @aws-cdk/cdk.Referenceable

Returns a token to a CloudFormation { Ref } that references this entity based on it’s logical ID.

Type:string (readonly)
addDeletionOverride(path)

Inherited from @aws-cdk/cdk.Resource

Syntactic sugar for addOverride(path, undefined).

Parameters:path (string) – The path of the value to delete
addDependsOn(resource)

Inherited from @aws-cdk/cdk.Resource

Indicates that this resource depends on another resource and cannot be provisioned

unless the other resource has been successfully provisioned.

Parameters:resource (@aws-cdk/cdk.Resource) –
addOverride(path, value)

Inherited from @aws-cdk/cdk.Resource

Adds an override to the synthesized CloudFormation resource. To add a

property override, either use addPropertyOverride or prefix path with

“Properties.” (i.e. Properties.TopicName).

Parameters:
  • path (string) – The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.
  • value (any) – The value. Could be primitive or complex.
addPropertyDeletionOverride(propertyPath)

Inherited from @aws-cdk/cdk.Resource

Adds an override that deletes the value of a property from the resource definition.

Parameters:propertyPath (string) – The path to the property.
addPropertyOverride(propertyPath, value)

Inherited from @aws-cdk/cdk.Resource

Adds an override to a resource property.

Syntactic sugar for addOverride(“Properties.<…>”, value).

Parameters:
  • propertyPath (string) – The path of the property
  • value (any) – The value
getAtt(attributeName) → @aws-cdk/cdk.CfnReference

Inherited from @aws-cdk/cdk.Resource

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility

in case there is no generated attribute.

Parameters:attributeName (string) – The name of the attribute.
Return type:@aws-cdk/cdk.CfnReference
toCloudFormation() → json

Inherited from @aws-cdk/cdk.Resource

Emits CloudFormation for this resource.

Return type:json
options

Inherited from @aws-cdk/cdk.Resource

Options for this resource, such as condition, update policy etc.

Type:@aws-cdk/cdk.ResourceOptions (readonly)
properties

Inherited from @aws-cdk/cdk.Resource

AWS resource properties.

This object is rendered via a call to “renderProperties(this.properties)”.

Protected property

Type:any (readonly)
resourceType

Inherited from @aws-cdk/cdk.Resource

AWS resource type.

Type:string (readonly)
untypedPropertyOverrides

Inherited from @aws-cdk/cdk.Resource

AWS resource property overrides.

During synthesis, the method “renderProperties(this.overrides)” is called

with this object, and merged on top of the output of

“renderProperties(this.properties)”.

Derived classes should expose a strongly-typed version of this object as

a public property called propertyOverrides.

Protected property

Type:any (readonly)
overrideLogicalId(newLogicalId)

Inherited from @aws-cdk/cdk.StackElement

Overrides the auto-generated logical ID with a specific ID.

Parameters:newLogicalId (string) – The new logical ID to use for this stack element.
prepare()

Inherited from @aws-cdk/cdk.StackElement

Automatically detect references in this StackElement

Protected method

creationStackTrace

Inherited from @aws-cdk/cdk.StackElement

Type:string[] (readonly)
logicalId

Inherited from @aws-cdk/cdk.StackElement

The logical ID for this CloudFormation stack element. The logical ID of the element

is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Type:string (readonly)
stackPath

Inherited from @aws-cdk/cdk.StackElement

Return the path with respect to the stack

Type:string (readonly)

CfnDistributionProps (interface)

class @aws-cdk/aws-cloudfront.CfnDistributionProps

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnDistributionProps;
// CfnDistributionProps is an interface
import { CfnDistributionProps } from '@aws-cdk/aws-cloudfront';
distributionConfig

AWS::CloudFront::Distribution.DistributionConfig

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-distribution.html#cfn-cloudfront-distribution-distributionconfig

Type:@aws-cdk/cdk.Token or DistributionConfigProperty
tags

AWS::CloudFront::Distribution.Tags

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-distribution.html#cfn-cloudfront-distribution-tags

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or @aws-cdk/cdk.CfnTag)[] (optional)

CfnStreamingDistribution

class @aws-cdk/aws-cloudfront.CfnStreamingDistribution(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnStreamingDistribution;
const { CfnStreamingDistribution } = require('@aws-cdk/aws-cloudfront');
import { CfnStreamingDistribution } from '@aws-cdk/aws-cloudfront';
Extends:

@aws-cdk/cdk.Resource

Parameters:
renderProperties(properties) → string => any

Overrides @aws-cdk/cdk.Resource.renderProperties()

Protected method

Parameters:properties (any) –
Return type:string => any
resourceTypeName

The CloudFormation resource type name for this resource class.

Type:string (readonly) (static)
propertyOverrides
Type:CfnStreamingDistributionProps (readonly)
streamingDistributionDomainName
Type:string (readonly)
streamingDistributionId
Type:string (readonly)
tags

The TagManager handles setting, removing and formatting tags

Tags should be managed either passing them as properties during

initiation or by calling methods on this object. If both techniques are

used only the tags from the TagManager will be used. Tag (aspect)

will use the manager.

Type:@aws-cdk/cdk.TagManager (readonly)
class LoggingProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnStreamingDistribution.LoggingProperty;
// CfnStreamingDistribution.LoggingProperty is an interface
import { CfnStreamingDistribution.LoggingProperty } from '@aws-cdk/aws-cloudfront';
bucket

CfnStreamingDistribution.LoggingProperty.Bucket

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-logging.html#cfn-cloudfront-streamingdistribution-logging-bucket

Type:string
enabled

CfnStreamingDistribution.LoggingProperty.Enabled

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-logging.html#cfn-cloudfront-streamingdistribution-logging-enabled

Type:boolean or @aws-cdk/cdk.Token
prefix

CfnStreamingDistribution.LoggingProperty.Prefix

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-logging.html#cfn-cloudfront-streamingdistribution-logging-prefix

Type:string
class S3OriginProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnStreamingDistribution.S3OriginProperty;
// CfnStreamingDistribution.S3OriginProperty is an interface
import { CfnStreamingDistribution.S3OriginProperty } from '@aws-cdk/aws-cloudfront';
domainName

CfnStreamingDistribution.S3OriginProperty.DomainName

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-s3origin.html#cfn-cloudfront-streamingdistribution-s3origin-domainname

Type:string
originAccessIdentity

CfnStreamingDistribution.S3OriginProperty.OriginAccessIdentity

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-s3origin.html#cfn-cloudfront-streamingdistribution-s3origin-originaccessidentity

Type:string
class StreamingDistributionConfigProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnStreamingDistribution.StreamingDistributionConfigProperty;
// CfnStreamingDistribution.StreamingDistributionConfigProperty is an interface
import { CfnStreamingDistribution.StreamingDistributionConfigProperty } from '@aws-cdk/aws-cloudfront';
comment

CfnStreamingDistribution.StreamingDistributionConfigProperty.Comment

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-streamingdistributionconfig.html#cfn-cloudfront-streamingdistribution-streamingdistributionconfig-comment

Type:string
enabled

CfnStreamingDistribution.StreamingDistributionConfigProperty.Enabled

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-streamingdistributionconfig.html#cfn-cloudfront-streamingdistribution-streamingdistributionconfig-enabled

Type:boolean or @aws-cdk/cdk.Token
s3Origin

CfnStreamingDistribution.StreamingDistributionConfigProperty.S3Origin

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-streamingdistributionconfig.html#cfn-cloudfront-streamingdistribution-streamingdistributionconfig-s3origin

Type:@aws-cdk/cdk.Token or S3OriginProperty
trustedSigners

CfnStreamingDistribution.StreamingDistributionConfigProperty.TrustedSigners

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-streamingdistributionconfig.html#cfn-cloudfront-streamingdistribution-streamingdistributionconfig-trustedsigners

Type:@aws-cdk/cdk.Token or TrustedSignersProperty
aliases

CfnStreamingDistribution.StreamingDistributionConfigProperty.Aliases

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-streamingdistributionconfig.html#cfn-cloudfront-streamingdistribution-streamingdistributionconfig-aliases

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
logging

CfnStreamingDistribution.StreamingDistributionConfigProperty.Logging

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-streamingdistributionconfig.html#cfn-cloudfront-streamingdistribution-streamingdistributionconfig-logging

Type:@aws-cdk/cdk.Token or LoggingProperty (optional)
priceClass

CfnStreamingDistribution.StreamingDistributionConfigProperty.PriceClass

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-streamingdistributionconfig.html#cfn-cloudfront-streamingdistribution-streamingdistributionconfig-priceclass

Type:string (optional)
class TrustedSignersProperty

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnStreamingDistribution.TrustedSignersProperty;
// CfnStreamingDistribution.TrustedSignersProperty is an interface
import { CfnStreamingDistribution.TrustedSignersProperty } from '@aws-cdk/aws-cloudfront';
enabled

CfnStreamingDistribution.TrustedSignersProperty.Enabled

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-trustedsigners.html#cfn-cloudfront-streamingdistribution-trustedsigners-enabled

Type:boolean or @aws-cdk/cdk.Token
awsAccountNumbers

CfnStreamingDistribution.TrustedSignersProperty.AwsAccountNumbers

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-trustedsigners.html#cfn-cloudfront-streamingdistribution-trustedsigners-awsaccountnumbers

Type:@aws-cdk/cdk.Token or (string or @aws-cdk/cdk.Token)[] (optional)
toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

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.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)
ref

Inherited from @aws-cdk/cdk.Referenceable

Returns a token to a CloudFormation { Ref } that references this entity based on it’s logical ID.

Type:string (readonly)
addDeletionOverride(path)

Inherited from @aws-cdk/cdk.Resource

Syntactic sugar for addOverride(path, undefined).

Parameters:path (string) – The path of the value to delete
addDependsOn(resource)

Inherited from @aws-cdk/cdk.Resource

Indicates that this resource depends on another resource and cannot be provisioned

unless the other resource has been successfully provisioned.

Parameters:resource (@aws-cdk/cdk.Resource) –
addOverride(path, value)

Inherited from @aws-cdk/cdk.Resource

Adds an override to the synthesized CloudFormation resource. To add a

property override, either use addPropertyOverride or prefix path with

“Properties.” (i.e. Properties.TopicName).

Parameters:
  • path (string) – The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.
  • value (any) – The value. Could be primitive or complex.
addPropertyDeletionOverride(propertyPath)

Inherited from @aws-cdk/cdk.Resource

Adds an override that deletes the value of a property from the resource definition.

Parameters:propertyPath (string) – The path to the property.
addPropertyOverride(propertyPath, value)

Inherited from @aws-cdk/cdk.Resource

Adds an override to a resource property.

Syntactic sugar for addOverride(“Properties.<…>”, value).

Parameters:
  • propertyPath (string) – The path of the property
  • value (any) – The value
getAtt(attributeName) → @aws-cdk/cdk.CfnReference

Inherited from @aws-cdk/cdk.Resource

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility

in case there is no generated attribute.

Parameters:attributeName (string) – The name of the attribute.
Return type:@aws-cdk/cdk.CfnReference
toCloudFormation() → json

Inherited from @aws-cdk/cdk.Resource

Emits CloudFormation for this resource.

Return type:json
options

Inherited from @aws-cdk/cdk.Resource

Options for this resource, such as condition, update policy etc.

Type:@aws-cdk/cdk.ResourceOptions (readonly)
properties

Inherited from @aws-cdk/cdk.Resource

AWS resource properties.

This object is rendered via a call to “renderProperties(this.properties)”.

Protected property

Type:any (readonly)
resourceType

Inherited from @aws-cdk/cdk.Resource

AWS resource type.

Type:string (readonly)
untypedPropertyOverrides

Inherited from @aws-cdk/cdk.Resource

AWS resource property overrides.

During synthesis, the method “renderProperties(this.overrides)” is called

with this object, and merged on top of the output of

“renderProperties(this.properties)”.

Derived classes should expose a strongly-typed version of this object as

a public property called propertyOverrides.

Protected property

Type:any (readonly)
overrideLogicalId(newLogicalId)

Inherited from @aws-cdk/cdk.StackElement

Overrides the auto-generated logical ID with a specific ID.

Parameters:newLogicalId (string) – The new logical ID to use for this stack element.
prepare()

Inherited from @aws-cdk/cdk.StackElement

Automatically detect references in this StackElement

Protected method

creationStackTrace

Inherited from @aws-cdk/cdk.StackElement

Type:string[] (readonly)
logicalId

Inherited from @aws-cdk/cdk.StackElement

The logical ID for this CloudFormation stack element. The logical ID of the element

is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Type:string (readonly)
stackPath

Inherited from @aws-cdk/cdk.StackElement

Return the path with respect to the stack

Type:string (readonly)

CfnStreamingDistributionProps (interface)

class @aws-cdk/aws-cloudfront.CfnStreamingDistributionProps

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CfnStreamingDistributionProps;
// CfnStreamingDistributionProps is an interface
import { CfnStreamingDistributionProps } from '@aws-cdk/aws-cloudfront';
streamingDistributionConfig

AWS::CloudFront::StreamingDistribution.StreamingDistributionConfig

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-streamingdistribution.html#cfn-cloudfront-streamingdistribution-streamingdistributionconfig

Type:@aws-cdk/cdk.Token or StreamingDistributionConfigProperty
tags

AWS::CloudFront::StreamingDistribution.Tags

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-streamingdistribution.html#cfn-cloudfront-streamingdistribution-tags

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or @aws-cdk/cdk.CfnTag)[]

CloudFrontAllowedCachedMethods (enum)

class @aws-cdk/aws-cloudfront.CloudFrontAllowedCachedMethods

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CloudFrontAllowedCachedMethods;
const { CloudFrontAllowedCachedMethods } = require('@aws-cdk/aws-cloudfront');
import { CloudFrontAllowedCachedMethods } from '@aws-cdk/aws-cloudfront';

Enums for the methods CloudFront can cache.

GET_HEAD
GET_HEAD_OPTIONS

CloudFrontAllowedMethods (enum)

class @aws-cdk/aws-cloudfront.CloudFrontAllowedMethods

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CloudFrontAllowedMethods;
const { CloudFrontAllowedMethods } = require('@aws-cdk/aws-cloudfront');
import { CloudFrontAllowedMethods } from '@aws-cdk/aws-cloudfront';

An enum for the supported methods to a CloudFront distribution.

GET_HEAD
GET_HEAD_OPTIONS
ALL

CloudFrontWebDistribution

class @aws-cdk/aws-cloudfront.CloudFrontWebDistribution(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CloudFrontWebDistribution;
const { CloudFrontWebDistribution } = require('@aws-cdk/aws-cloudfront');
import { CloudFrontWebDistribution } from '@aws-cdk/aws-cloudfront';

Amazon CloudFront is a global content delivery network (CDN) service that securely delivers data, videos,

applications, and APIs to your viewers with low latency and high transfer speeds.

CloudFront fronts user provided content and caches it at edge locations across the world.

Here’s how you can use this construct:

```ts

  • import { CloudFront } from @aws-cdk/aws-cloudfront
  • const sourceBucket = new Bucket(this, ‘Bucket’);
  • const distribution = new CloudFrontDistribution(this, ‘MyDistribution’, {
  • originConfigs: [
  • {
  • s3OriginSource: {
  • s3BucketSource: sourceBucket
  • },
  • behaviors : [ {isDefaultBehavior}]
  • }
  • ]
  • });
  • ```

This will create a CloudFront distribution that uses your S3Bucket as it’s origin.

You can customize the distribution using additional properties from the CloudFrontWebDistributionProps interface.

Extends:

@aws-cdk/cdk.Construct

Implements:

@aws-cdk/aws-route53.IAliasRecordTarget

Parameters:
asAliasRecordTarget() → @aws-cdk/aws-route53.AliasRecordTargetProps

Implements @aws-cdk/aws-route53.IAliasRecordTarget.asAliasRecordTarget()

Return hosted zone ID and DNS name, usable for Route53 alias targets

Return type:@aws-cdk/aws-route53.AliasRecordTargetProps
aliasHostedZoneId

The hosted zone Id if using an alias record in Route53.

This value never changes.

Type:string (readonly)
distributionId

The distribution ID for this distribution.

Type:string (readonly)
domainName

The domain name created by CloudFront for this distribution.

If you are using aliases for your distribution, this is the domainName your DNS records should point to.

(In Route53, you could create an ALIAS record to this value, for example. )

Type:string (readonly)
loggingBucket

The logging bucket for this CloudFront distribution.

If logging is not enabled for this distribution - this property will be undefined.

Type:@aws-cdk/aws-s3.IBucket (optional) (readonly)
prepare()

Inherited from @aws-cdk/cdk.Construct

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.

Protected method

toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

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.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

CloudFrontWebDistributionProps (interface)

class @aws-cdk/aws-cloudfront.CloudFrontWebDistributionProps

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CloudFrontWebDistributionProps;
// CloudFrontWebDistributionProps is an interface
import { CloudFrontWebDistributionProps } from '@aws-cdk/aws-cloudfront';
originConfigs

The origin configurations for this distribution. Behaviors are a part of the origin.

Type:SourceConfiguration[]
aliasConfiguration

AliasConfiguration is used to configured CloudFront to respond to requests on custom domain names.

Type:AliasConfiguration (optional)
Default:none
comment

A comment for this distribution in the cloud front console.

Type:string (optional)
defaultRootObject

The default object to serve.

Type:string (optional)
Default:“index.html”
enableIpV6

If your distribution should have IPv6 enabled.

Type:boolean (optional)
Default:true
errorConfigurations

How CloudFront should handle requests that are no successful (eg PageNotFound)

Type:CustomErrorResponseProperty[] (optional)
httpVersion

The max supported HTTP Versions.

Type:HttpVersion (optional)
Default:HttpVersion.HTTP2
loggingConfig

Optional - if we should enable logging.

You can pass an empty object ({}) to have us auto create a bucket for logging.

Omission of this property indicates no logging is to be enabled.

Type:LoggingConfiguration (optional)
Default:: no logging is enabled by default.
priceClass

The price class for the distribution (this impacts how many locations CloudFront uses for your distribution, and billing)

Type:PriceClass (optional)
Default:PriceClass_100: the cheapest option for CloudFront is picked by default.
viewerProtocolPolicy

The default viewer policy for incoming clients.

Type:ViewerProtocolPolicy (optional)
Default:RedirectToHTTPs
webACLId

Optional AWS WAF WebACL to associate with this CloudFront distribution

Type:string (optional)

CustomOriginConfig (interface)

class @aws-cdk/aws-cloudfront.CustomOriginConfig

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.CustomOriginConfig;
// CustomOriginConfig is an interface
import { CustomOriginConfig } from '@aws-cdk/aws-cloudfront';

A custom origin configuration

domainName

The domain name of the custom origin. Should not include the path - that should be in the parent SourceConfiguration

Type:string (readonly)
allowedOriginSSLVersions

The SSL versions to use when interacting with the origin.

Type:OriginSslPolicy[] (optional) (readonly)
Default:[TLSv1_2]
httpPort

The origin HTTP port

Type:number (optional) (readonly)
Default:80
httpsPort

The origin HTTPS port

Type:number (optional) (readonly)
Default:443
originKeepaliveTimeoutSeconds

The keep alive timeout when making calls in seconds.

Type:number (optional) (readonly)
Default:: 5 seconds
originProtocolPolicy

The protocol (http or https) policy to use when interacting with the origin.

Type:OriginProtocolPolicy (optional) (readonly)
Default:: HttpsOnly
originReadTimeoutSeconds

The read timeout when calling the origin in seconds

Type:number (optional) (readonly)
Default:30 seconds

ErrorConfiguration (interface)

class @aws-cdk/aws-cloudfront.ErrorConfiguration

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.ErrorConfiguration;
// ErrorConfiguration is an interface
import { ErrorConfiguration } from '@aws-cdk/aws-cloudfront';
originErrorCode

The error code matched from the origin

Type:number
respondWithErrorCode

The error code that is sent to the caller.

Type:number
respondWithPage

The path to service instead

Type:string
cacheTtl

How long before this error is retried.

Type:number (optional)

HttpVersion (enum)

class @aws-cdk/aws-cloudfront.HttpVersion

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.HttpVersion;
const { HttpVersion } = require('@aws-cdk/aws-cloudfront');
import { HttpVersion } from '@aws-cdk/aws-cloudfront';
HTTP1_1
HTTP2

LoggingConfiguration (interface)

class @aws-cdk/aws-cloudfront.LoggingConfiguration

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.LoggingConfiguration;
// LoggingConfiguration is an interface
import { LoggingConfiguration } from '@aws-cdk/aws-cloudfront';

Logging configuration for incoming requests

bucket

Bucket to log requests to

Type:@aws-cdk/aws-s3.IBucket (optional) (readonly)
Default:A logging bucket is automatically created
includeCookies

Whether to include the cookies in the logs

Type:boolean (optional) (readonly)
Default:false
prefix

Where in the bucket to store logs

Type:string (optional) (readonly)
Default:No prefix

OriginProtocolPolicy (enum)

class @aws-cdk/aws-cloudfront.OriginProtocolPolicy

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.OriginProtocolPolicy;
const { OriginProtocolPolicy } = require('@aws-cdk/aws-cloudfront');
import { OriginProtocolPolicy } from '@aws-cdk/aws-cloudfront';
HttpOnly
MatchViewer
HttpsOnly

OriginSslPolicy (enum)

class @aws-cdk/aws-cloudfront.OriginSslPolicy

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.OriginSslPolicy;
const { OriginSslPolicy } = require('@aws-cdk/aws-cloudfront');
import { OriginSslPolicy } from '@aws-cdk/aws-cloudfront';
SSLv3
TLSv1
TLSv1_1
TLSv1_2

PriceClass (enum)

class @aws-cdk/aws-cloudfront.PriceClass

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.PriceClass;
const { PriceClass } = require('@aws-cdk/aws-cloudfront');
import { PriceClass } from '@aws-cdk/aws-cloudfront';

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

PriceClass100
PriceClass200
PriceClassAll

S3OriginConfig (interface)

class @aws-cdk/aws-cloudfront.S3OriginConfig

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.S3OriginConfig;
// S3OriginConfig is an interface
import { S3OriginConfig } from '@aws-cdk/aws-cloudfront';
s3BucketSource

The source bucket to serve content from

Type:@aws-cdk/aws-s3.IBucket (readonly)
originAccessIdentity

The optional origin identity cloudfront will use when calling your s3 bucket.

Type:CfnCloudFrontOriginAccessIdentity (optional) (readonly)

SSLMethod (enum)

class @aws-cdk/aws-cloudfront.SSLMethod

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.SSLMethod;
const { SSLMethod } = require('@aws-cdk/aws-cloudfront');
import { SSLMethod } from '@aws-cdk/aws-cloudfront';

The SSL method CloudFront will use for your distribution.

Server Name Indication (SNI) - is an extension to the TLS computer networking protocol by which a client indicates

which hostname it is attempting to connect to at the start of the handshaking process. This allows a server to present

multiple certificates on the same IP address and TCP port number and hence allows multiple secure (HTTPS) websites

(or any other service over TLS) to be served by the same IP address without requiring all those sites to use the same certificate.

CloudFront can use SNI to host multiple distributions on the same IP - which a large majority of clients will support.

If your clients cannot support SNI however - CloudFront can use dedicated IPs for your distribution - but there is a prorated monthly charge for

using this feature. By default, we use SNI - but you can optionally enable dedicated IPs (VIP).

See the CloudFront SSL for more details about pricing : https://aws.amazon.com/cloudfront/custom-ssl-domains/

SNI
VIP

SecurityPolicyProtocol (enum)

class @aws-cdk/aws-cloudfront.SecurityPolicyProtocol

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.SecurityPolicyProtocol;
const { SecurityPolicyProtocol } = require('@aws-cdk/aws-cloudfront');
import { SecurityPolicyProtocol } from '@aws-cdk/aws-cloudfront';

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.

SSLv3
TLSv1
TLSv1_2016
TLSv1_1_2016
TLSv1_2_2018

SourceConfiguration (interface)

class @aws-cdk/aws-cloudfront.SourceConfiguration

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.SourceConfiguration;
// SourceConfiguration is an interface
import { SourceConfiguration } from '@aws-cdk/aws-cloudfront';

A source configuration is a wrapper for CloudFront origins and behaviors.

An origin is what CloudFront will “be in front of” - that is, CloudFront will pull it’s assets from an origin.

If you’re using s3 as a source - pass the s3Origin property, otherwise, pass the customOriginSource property.

One or the other must be passed, and it is invalid to pass both in the same SourceConfiguration.

behaviors

The behaviors associated with this source.

At least one (default) behavior must be included.

Type:Behavior[] (readonly)
customOriginSource

A custom origin source - for all non-s3 sources.

Type:CustomOriginConfig (optional) (readonly)
originHeaders

Any additional headers to pass to the origin

Type:string => string (optional) (readonly)
Default:no additional headers are passed
originPath

The relative path to the origin root to use for sources.

Type:string (optional) (readonly)
Default:/
s3OriginSource

An s3 origin source - if you’re using s3 for your assets

Type:S3OriginConfig (optional) (readonly)

ViewerProtocolPolicy (enum)

class @aws-cdk/aws-cloudfront.ViewerProtocolPolicy

Language-specific names:

using Amazon.CDK.AWS.CloudFront;
import software.amazon.awscdk.services.cloudfront.ViewerProtocolPolicy;
const { ViewerProtocolPolicy } = require('@aws-cdk/aws-cloudfront');
import { ViewerProtocolPolicy } from '@aws-cdk/aws-cloudfront';

How HTTPs should be handled with your distribution.

HTTPSOnly
RedirectToHTTPS
AllowAll