Show / Hide Table of Contents

Class CloudFrontWebDistribution

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.

Inheritance
System.Object
Construct
Resource
CloudFrontWebDistribution
Implements
IDistribution
IResource
IConstruct
Constructs.IConstruct
IDependable
Inherited Members
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(String, IArnComponents)
Resource.GetResourceNameAttribute(String)
Resource.Env
Resource.PhysicalName
Resource.Stack
Construct.IsConstruct(Object)
Construct.OnPrepare()
Construct.OnSynthesize(ISynthesisSession)
Construct.OnValidate()
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.Validate()
Construct.Node
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.AWS.CloudFront.dll
Syntax (csharp)
public class CloudFrontWebDistribution : Resource, IDistribution, IResource, IConstruct, IConstruct, IDependable
Syntax (vb)
Public Class CloudFrontWebDistribution
    Inherits Resource
    Implements IDistribution, IResource, IConstruct, IConstruct, IDependable
Remarks

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

Here's how you can use this construct:

// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
using Amazon.CDK.AWS.CloudFront;

var sourceBucket = new Bucket(this, "Bucket");

CloudFrontWebDistribution distribution = new CloudFrontWebDistribution(this, "MyDistribution", new CloudFrontWebDistributionProps {
    OriginConfigs = new [] { new SourceConfiguration {
        S3OriginSource = new S3OriginConfig {
            S3BucketSource = sourceBucket
        },
        Behaviors = new [] { new Behavior { IsDefaultBehavior = true } }
    } }
});

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.

Resource: AWS::CloudFront::Distribution

Synopsis

Constructors

CloudFrontWebDistribution(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

CloudFrontWebDistribution(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

CloudFrontWebDistribution(Construct, String, ICloudFrontWebDistributionProps)

Properties

DistributionDomainName

The domain name created by CloudFront for this distribution.

DistributionId

The distribution ID for this distribution.

DomainName

(deprecated) The domain name created by CloudFront for this distribution.

LoggingBucket

The logging bucket for this CloudFront distribution.

Methods

FromDistributionAttributes(Construct, String, ICloudFrontWebDistributionAttributes)

Creates a construct that represents an external (imported) distribution.

Constructors

CloudFrontWebDistribution(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected CloudFrontWebDistribution(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

CloudFrontWebDistribution(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected CloudFrontWebDistribution(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

CloudFrontWebDistribution(Construct, String, ICloudFrontWebDistributionProps)

public CloudFrontWebDistribution(Construct scope, string id, ICloudFrontWebDistributionProps props)
Parameters
scope Constructs.Construct
id System.String
props ICloudFrontWebDistributionProps

Properties

DistributionDomainName

The domain name created by CloudFront for this distribution.

public virtual string DistributionDomainName { get; }
Property Value

System.String

Remarks

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.)

DistributionId

The distribution ID for this distribution.

public virtual string DistributionId { get; }
Property Value

System.String

DomainName

(deprecated) The domain name created by CloudFront for this distribution.

public virtual string DomainName { get; }
Property Value

System.String

Remarks

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.)

Stability: Deprecated

LoggingBucket

The logging bucket for this CloudFront distribution.

public virtual IBucket LoggingBucket { get; }
Property Value

IBucket

Remarks

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

Methods

FromDistributionAttributes(Construct, String, ICloudFrontWebDistributionAttributes)

Creates a construct that represents an external (imported) distribution.

public static IDistribution FromDistributionAttributes(Construct scope, string id, ICloudFrontWebDistributionAttributes attrs)
Parameters
scope Constructs.Construct
id System.String
attrs ICloudFrontWebDistributionAttributes
Returns

IDistribution

Implements

IDistribution
IResource
IConstruct
Constructs.IConstruct
IDependable
Back to top Generated by DocFX