@finnairoyj/cdk-constructs-lib
    Preparing search index...

    Interface CloudfrontDistributionProps

    interface CloudfrontDistributionProps {
        additionalBehaviors?: Record<string, BehaviorOptions>;
        certificate: string | DNSValidatedCertificate;
        customErrorResponses?: ErrorResponse[];
        defaultBehavior: BehaviorOptions;
        defaultRootObject?: string;
        description?: string;
        domains?: CFDomain[];
        enabled?: boolean;
        logging?: CFLogging;
        priceClass?: PriceClass;
        stackOutputResolverLambda?: IFunction;
        webAclArn?: string;
    }
    Index

    Properties

    additionalBehaviors?: Record<string, BehaviorOptions>

    Additional behaviors for the distribution

    certificate: string | DNSValidatedCertificate

    ACM certificate to be attached to the Distribution. The Certificate must be created on the us-east-1 region. Following values can be passed:

    • DNSValidatedCertificate instance created in the same CDK project
    • CloudFormation Stack output name for an externally created Stack in the us-east-1 region that resolves to the Certificate ARN
    • ARN of an externally created certificate on the us-east-1 region
    customErrorResponses?: ErrorResponse[]

    Customized error responses for the distribution

    defaultBehavior: BehaviorOptions

    Default behavior for the distribution

    defaultRootObject?: string

    The object that you want CloudFront to request from your origin (for example, index.html) when a viewer requests the root URL for your distribution.

    'index.html'
    
    description?: string

    Description of the distribution

    domains?: CFDomain[]

    List of domains to associate to the distribution. The domain names must be unique and must not be associated to any other CloudFront distribution globally. The provided ACM certificate needs to cover all provided domain names.

    If a HostedZone is provided for the domain name, ALIAS record will be created automatically for the domain name. HostedZone must be hosted on the same account

    No domain names associated. The default cloudfront.net domain name is used
    
    enabled?: boolean

    Enable the distribution

    true
    
    logging?: CFLogging

    CloudFront access log options

    Access logging is disabled
    
    priceClass?: PriceClass

    Price class for the distribution

    PriceClass.PRICE_CLASS_100
    
    stackOutputResolverLambda?: IFunction

    Optional common StackOutputResolver Lambda instance. If not provided, a new Lambda function will be created

    Dedicated StackOutputResolver Lambda will be created
    
    webAclArn?: string

    Name of the CloudFormation stack output parameter for the WAF WebACL ARN to be attached to the distribution. WebACL with the scope CLOUDFRONT must be created on the us-east-1 region. Following values can be passed:

    • CloudFormation Stack output name for an externally created Stack in the us-east-1 region that resolves to the WebACL ARN
    • ARN of an externally created WebACL on the us-east-1 region
    No WebACL is used for the distribution