This is the preferred interface for making CloudFront WebDistributions with Fugue. If you want to manage a CloudFront WebDistribution with Fugue, the new function is the right place to start.

Table of Contents

Module Members



Create a reference to an externally managed WebDistribution.

Example usage:

distribution: CloudFront.WebDistribution.external("S11A16G5KZMEQD")

Type Signature

 fun (String, Region) -> WebDistribution
Argument: distributionId

The CloudFront DistributionId. Must be a 14-character alphanumeric string.

Type: String

Argument: region

The Region containing the target WebDistribution.

Type: Region


A reference to the specified WebDistribution.

Type: WebDistribution



new CloudFront WebDistribution (Constructor)

Call this constructor to create a new Fugue.Core.AWS.CloudFront.WebDistribution value.

Type Signature

 fun { aliases: Optional<List<String>>,
       defaultRootObject: Optional<String>,
       origins: List<Origin>,
       defaultCacheBehavior: DefaultCacheBehavior,
       cacheBehaviors: Optional<List<CacheBehavior>>,
       customErrorResponses: Optional<List<CustomErrorResponse>>,
       comment: String,
       logging: Optional<LoggingConfig>,
       priceClass: Optional<PriceClass>,
       enabled: Bool,
       viewerCertificate: Optional<ViewerCertificate>,
       restrictions: Optional<GeoRestriction>,
       webACL: Optional<WebACL> } -> WebDistribution
Argument: aliases

A list of CNAME elements, if any, for this distribution.

Type: Optional<List<String>>

Argument: defaultRootObject

The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL for your distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/index.html). Specifying a default root object avoids exposing the contents of your distribution.

Type: Optional<String>

Argument: origins

A list of CloudFront.Origin objects that contains information about origins for this distribution.

Type: List<Origin>

Argument: defaultCacheBehavior

A CloudFront.DefaultCacheBehavior object that describes the default cache behavior if you do not specify a CacheBehavior element or if files don’t match any of the values of PathPattern in CacheBehavior elements. You must create exactly one default cache behavior.

Type: DefaultCacheBehavior

Argument: cacheBehaviors

A list of CloudFront.CacheBehavior objects that describe the cache behavior of this WebDistribution.

Type: Optional<List<CacheBehavior>>

Argument: customErrorResponses

A list of CloudFront.CustomErrorResponse objects that describe custom error responses for this WebDistribution.

Type: Optional<List<CustomErrorResponse>>

Argument: comment

Any comments you want to include about the distribution.

Type: String

Argument: logging

A CloudFront.LoggingConfig object that describes the logging configuration for this WebDistribution.

Type: Optional<LoggingConfig>

Argument: priceClass

A CloudFront.PriceClass object that contains information about price class for this WebDistribution.

Type: Optional<PriceClass>

Argument: enabled

Whether the distribution is enabled to accept end user requests for content.

Type: Bool

Argument: viewerCertificate

A CloudFront.ViewerCertificate object that contains information about viewer certificates for this WebDistribution.

Type: Optional<ViewerCertificate>

Argument: restrictions

A CloudFront.GeoRestriction object that contains information about ways in which to restrict distribution of content in this WebDistribution.

Type: Optional<GeoRestriction>

Argument: webACL

If you’re using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution.

Type: Optional<WebACL>


A Fugue.Core.AWS.CloudFront.WebDistribution value.

Type: WebDistribution