Class CfnDistribution
The AWS::Lightsail::Distribution resource specifies a content delivery network (CDN) distribution.
Inherited Members
Namespace: Amazon.CDK.AWS.Lightsail
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnDistribution : CfnResource, IInspectable, IDistributionRef, IConstruct, IDependable, IEnvironmentAware, ITaggable
Syntax (vb)
Public Class CfnDistribution Inherits CfnResource Implements IInspectable, IDistributionRef, IConstruct, IDependable, IEnvironmentAware, ITaggable
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lightsail;
var cfnDistribution = new CfnDistribution(this, "MyCfnDistribution", new CfnDistributionProps {
BundleId = "bundleId",
DefaultCacheBehavior = new CacheBehaviorProperty {
Behavior = "behavior"
},
DistributionName = "distributionName",
Origin = new InputOriginProperty {
Name = "name",
ProtocolPolicy = "protocolPolicy",
RegionName = "regionName"
},
// the properties below are optional
CacheBehaviors = new [] { new CacheBehaviorPerPathProperty {
Behavior = "behavior",
Path = "path"
} },
CacheBehaviorSettings = new CacheSettingsProperty {
AllowedHttpMethods = "allowedHttpMethods",
CachedHttpMethods = "cachedHttpMethods",
DefaultTtl = 123,
ForwardedCookies = new CookieObjectProperty {
CookiesAllowList = new [] { "cookiesAllowList" },
Option = "option"
},
ForwardedHeaders = new HeaderObjectProperty {
HeadersAllowList = new [] { "headersAllowList" },
Option = "option"
},
ForwardedQueryStrings = new QueryStringObjectProperty {
Option = false,
QueryStringsAllowList = new [] { "queryStringsAllowList" }
},
MaximumTtl = 123,
MinimumTtl = 123
},
CertificateName = "certificateName",
IpAddressType = "ipAddressType",
IsEnabled = false,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
| CfnDistribution(Construct, string, ICfnDistributionProps) | Create a new |
Properties
| AttrAbleToUpdateBundle | Indicates whether you can update the distribution’s current bundle to another bundle. |
| AttrDistributionArn | The Amazon Resource Name (ARN) of the distribution. |
| AttrStatus | The status of the distribution. |
| BundleId | The ID of the bundle applied to the distribution. |
| CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
| CacheBehaviorSettings | An object that describes the cache behavior settings of the distribution. |
| CacheBehaviors | An array of objects that describe the per-path cache behavior of the distribution. |
| CertificateName | The name of the SSL/TLS certificate attached to the distribution. |
| CfnProperties | The |
| DefaultCacheBehavior | An object that describes the default cache behavior of the distribution. |
| DistributionName | The name of the distribution. |
| DistributionRef | A reference to a Distribution resource. |
| IpAddressType | The IP address type of the distribution. |
| IsEnabled | A Boolean value indicating whether the distribution is enabled. |
| Origin | An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. |
| Tags | Tag Manager which manages the tags for this resource. |
| TagsRaw | An array of key-value pairs to apply to this resource. |
Methods
| ArnForDistribution(IDistributionRef) | The |
| Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
| IsCfnDistribution(object) | Checks whether the given object is a CfnDistribution. |
| RenderProperties(IDictionary<string, object>) | The |
Constructors
CfnDistribution(Construct, string, ICfnDistributionProps)
Create a new AWS::Lightsail::Distribution.
public CfnDistribution(Construct scope, string id, ICfnDistributionProps props)
Parameters
- scope Construct
Scope in which this resource is defined.
- id string
Construct identifier for this resource (unique in its scope).
- props ICfnDistributionProps
Resource properties.
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated
Properties
AttrAbleToUpdateBundle
Indicates whether you can update the distribution’s current bundle to another bundle.
public virtual IResolvable AttrAbleToUpdateBundle { get; }
Property Value
Remarks
CloudformationAttribute: AbleToUpdateBundle
AttrDistributionArn
The Amazon Resource Name (ARN) of the distribution.
public virtual string AttrDistributionArn { get; }
Property Value
Remarks
CloudformationAttribute: DistributionArn
AttrStatus
The status of the distribution.
public virtual string AttrStatus { get; }
Property Value
Remarks
CloudformationAttribute: Status
BundleId
The ID of the bundle applied to the distribution.
public virtual string BundleId { get; set; }
Property Value
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated
CacheBehaviorSettings
An object that describes the cache behavior settings of the distribution.
public virtual object? CacheBehaviorSettings { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnDistribution.ICacheSettingsProperty
CacheBehaviors
An array of objects that describe the per-path cache behavior of the distribution.
public virtual object? CacheBehaviors { get; set; }
Property Value
Remarks
Type union: either IResolvable or (either IResolvable or CfnDistribution.ICacheBehaviorPerPathProperty)[]
CertificateName
The name of the SSL/TLS certificate attached to the distribution.
public virtual string? CertificateName { get; set; }
Property Value
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated
CfnProperties
The AWS::Lightsail::Distribution resource specifies a content delivery network (CDN) distribution.
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated
DefaultCacheBehavior
An object that describes the default cache behavior of the distribution.
public virtual object DefaultCacheBehavior { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnDistribution.ICacheBehaviorProperty
DistributionName
The name of the distribution.
public virtual string DistributionName { get; set; }
Property Value
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated
DistributionRef
A reference to a Distribution resource.
public virtual IDistributionReference DistributionRef { get; }
Property Value
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated
IpAddressType
The IP address type of the distribution.
public virtual string? IpAddressType { get; set; }
Property Value
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated
IsEnabled
A Boolean value indicating whether the distribution is enabled.
public virtual object? IsEnabled { get; set; }
Property Value
Remarks
Type union: either bool or IResolvable
Origin
An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer.
public virtual object Origin { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnDistribution.IInputOriginProperty
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated
TagsRaw
An array of key-value pairs to apply to this resource.
public virtual ICfnTag[]? TagsRaw { get; set; }
Property Value
ICfnTag[]
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated
Methods
ArnForDistribution(IDistributionRef)
The AWS::Lightsail::Distribution resource specifies a content delivery network (CDN) distribution.
public static string ArnForDistribution(IDistributionRef resource)
Parameters
- resource IDistributionRef
Returns
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lightsail;
var cfnDistribution = new CfnDistribution(this, "MyCfnDistribution", new CfnDistributionProps {
BundleId = "bundleId",
DefaultCacheBehavior = new CacheBehaviorProperty {
Behavior = "behavior"
},
DistributionName = "distributionName",
Origin = new InputOriginProperty {
Name = "name",
ProtocolPolicy = "protocolPolicy",
RegionName = "regionName"
},
// the properties below are optional
CacheBehaviors = new [] { new CacheBehaviorPerPathProperty {
Behavior = "behavior",
Path = "path"
} },
CacheBehaviorSettings = new CacheSettingsProperty {
AllowedHttpMethods = "allowedHttpMethods",
CachedHttpMethods = "cachedHttpMethods",
DefaultTtl = 123,
ForwardedCookies = new CookieObjectProperty {
CookiesAllowList = new [] { "cookiesAllowList" },
Option = "option"
},
ForwardedHeaders = new HeaderObjectProperty {
HeadersAllowList = new [] { "headersAllowList" },
Option = "option"
},
ForwardedQueryStrings = new QueryStringObjectProperty {
Option = false,
QueryStringsAllowList = new [] { "queryStringsAllowList" }
},
MaximumTtl = 123,
MinimumTtl = 123
},
CertificateName = "certificateName",
IpAddressType = "ipAddressType",
IsEnabled = false,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated
IsCfnDistribution(object)
Checks whether the given object is a CfnDistribution.
public static bool IsCfnDistribution(object x)
Parameters
- x object
Returns
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
The AWS::Lightsail::Distribution resource specifies a content delivery network (CDN) distribution.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
You can create distributions only in the us-east-1 AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
CloudformationResource: AWS::Lightsail::Distribution
ExampleMetadata: fixture=_generated