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, ITaggable
Syntax (vb)
Public Class CfnDistribution
Inherits CfnResource
Implements IInspectable, 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(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnDistribution(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnDistribution(Construct, String, ICfnDistributionProps) |
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. |
CacheBehaviors | An array of objects that describe the per-path cache behavior of the distribution. |
CacheBehaviorSettings | An object that describes the cache behavior settings of the distribution. |
CertificateName | The name of the SSL/TLS certificate attached to the distribution. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
DefaultCacheBehavior | An object that describes the default cache behavior of the distribution. |
DistributionName | The name of the distribution. |
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
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnDistribution(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnDistribution(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnDistribution(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnDistribution(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnDistribution(Construct, String, ICfnDistributionProps)
public CfnDistribution(Construct scope, string id, ICfnDistributionProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnDistributionProps
Resource properties.
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
System.String
Remarks
CloudformationAttribute: DistributionArn
AttrStatus
The status of the distribution.
public virtual string AttrStatus { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Status
BundleId
The ID of the bundle applied to the distribution.
public virtual string BundleId { get; set; }
Property Value
System.String
CacheBehaviors
An array of objects that describe the per-path cache behavior of the distribution.
public virtual object CacheBehaviors { get; set; }
Property Value
System.Object
CacheBehaviorSettings
An object that describes the cache behavior settings of the distribution.
public virtual object CacheBehaviorSettings { get; set; }
Property Value
System.Object
CertificateName
The name of the SSL/TLS certificate attached to the distribution.
public virtual string CertificateName { get; set; }
Property Value
System.String
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
DefaultCacheBehavior
An object that describes the default cache behavior of the distribution.
public virtual object DefaultCacheBehavior { get; set; }
Property Value
System.Object
DistributionName
The name of the distribution.
public virtual string DistributionName { get; set; }
Property Value
System.String
IpAddressType
The IP address type of the distribution.
public virtual string IpAddressType { get; set; }
Property Value
System.String
IsEnabled
A Boolean value indicating whether the distribution is enabled.
public virtual object IsEnabled { get; set; }
Property Value
System.Object
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
System.Object
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
An array of key-value pairs to apply to this resource.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
Methods
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.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>