Class CloudFrontWebDistribution
(deprecated) 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.
Inherited Members
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
[Obsolete("Use `Distribution` instead")]
public class CloudFrontWebDistribution : Resource, IDistribution, IResource, IConstruct, IDependable
Syntax (vb)
<Obsolete("Use `Distribution` instead")>
Public Class CloudFrontWebDistribution Inherits Resource Implements IDistribution, IResource, 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:
var sourceBucket = new Bucket(this, "Bucket");
var 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 its origin.
You can customize the distribution using additional properties from the CloudFrontWebDistributionProps interface.
Stability: Deprecated
Resource: AWS::CloudFront::Distribution
ExampleMetadata: infused
Examples
Bucket sourceBucket;
var viewerCertificate = ViewerCertificate.FromIamCertificate("MYIAMROLEIDENTIFIER", new ViewerCertificateOptions {
Aliases = new [] { "MYALIAS" }
});
new CloudFrontWebDistribution(this, "MyCfWebDistribution", new CloudFrontWebDistributionProps {
OriginConfigs = new [] { new SourceConfiguration {
S3OriginSource = new S3OriginConfig {
S3BucketSource = sourceBucket
},
Behaviors = new [] { new Behavior { IsDefaultBehavior = true } }
} },
ViewerCertificate = viewerCertificate
});
Synopsis
Constructors
CloudFrontWebDistribution(Construct, string, ICloudFrontWebDistributionProps) | (deprecated) 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. |
Properties
DistributionArn | (deprecated) The distribution ARN for this distribution. |
DistributionDomainName | (deprecated) The domain name created by CloudFront for this distribution. |
DistributionId | (deprecated) The distribution ID for this distribution. |
LoggingBucket | (deprecated) The logging bucket for this CloudFront distribution. |
PROPERTY_INJECTION_ID | (deprecated) Uniquely identifies this class. |
Methods
FromDistributionAttributes(Construct, string, ICloudFrontWebDistributionAttributes) | (deprecated) Creates a construct that represents an external (imported) distribution. |
Grant(IGrantable, params string[]) | (deprecated) Adds an IAM policy statement associated with this distribution to an IAM principal's policy. |
GrantCreateInvalidation(IGrantable) | (deprecated) Grant to create invalidations for this bucket to an IAM principal (Role/Group/User). |
Constructors
CloudFrontWebDistribution(Construct, string, ICloudFrontWebDistributionProps)
(deprecated) 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.
[Obsolete]
public CloudFrontWebDistribution(Construct scope, string id, ICloudFrontWebDistributionProps props)
Parameters
- scope Construct
- id string
- props ICloudFrontWebDistributionProps
Remarks
Stability: Deprecated
Properties
DistributionArn
(deprecated) The distribution ARN for this distribution.
[Obsolete]
public virtual string DistributionArn { get; }
Property Value
Remarks
Stability: Deprecated
DistributionDomainName
(deprecated) The domain name created by CloudFront for this distribution.
[Obsolete]
public virtual string DistributionDomainName { get; }
Property Value
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
DistributionId
(deprecated) The distribution ID for this distribution.
[Obsolete]
public virtual string DistributionId { get; }
Property Value
Remarks
Stability: Deprecated
LoggingBucket
(deprecated) The logging bucket for this CloudFront distribution.
[Obsolete]
public virtual IBucket? LoggingBucket { get; }
Property Value
Remarks
If logging is not enabled for this distribution - this property will be undefined.
Stability: Deprecated
PROPERTY_INJECTION_ID
(deprecated) Uniquely identifies this class.
[Obsolete]
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
Stability: Deprecated
Methods
FromDistributionAttributes(Construct, string, ICloudFrontWebDistributionAttributes)
(deprecated) Creates a construct that represents an external (imported) distribution.
[Obsolete]
public static IDistribution FromDistributionAttributes(Construct scope, string id, ICloudFrontWebDistributionAttributes attrs)
Parameters
- scope Construct
- id string
- attrs ICloudFrontWebDistributionAttributes
Returns
Remarks
Stability: Deprecated
Grant(IGrantable, params string[])
(deprecated) Adds an IAM policy statement associated with this distribution to an IAM principal's policy.
[Obsolete]
public virtual Grant Grant(IGrantable identity, params string[] actions)
Parameters
- identity IGrantable
The principal.
- actions string[]
The set of actions to allow (i.e. "cloudfront:ListInvalidations").
Returns
Remarks
Stability: Deprecated
GrantCreateInvalidation(IGrantable)
(deprecated) Grant to create invalidations for this bucket to an IAM principal (Role/Group/User).
[Obsolete]
public virtual Grant GrantCreateInvalidation(IGrantable identity)
Parameters
- identity IGrantable
The principal.
Returns
Remarks
Stability: Deprecated