Show / Hide Table of Contents

Class CfnDistributionProps

Properties for defining a CfnDistribution.

Inheritance
object
CfnDistributionProps
Implements
ICfnDistributionProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.Lightsail
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnDistributionProps : ICfnDistributionProps
Syntax (vb)
Public Class CfnDistributionProps Implements ICfnDistributionProps
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html

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 cfnDistributionProps = 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

CfnDistributionProps()

Properties for defining a CfnDistribution.

Properties

BundleId

The ID of the bundle applied to the distribution.

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.

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

An array of key-value pairs to apply to this resource.

Constructors

CfnDistributionProps()

Properties for defining a CfnDistribution.

public CfnDistributionProps()
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html

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 cfnDistributionProps = 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"
                 } }
             };

Properties

BundleId

The ID of the bundle applied to the distribution.

public string BundleId { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-bundleid

CacheBehaviorSettings

An object that describes the cache behavior settings of the distribution.

public object? CacheBehaviorSettings { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-cachebehaviorsettings

CacheBehaviors

An array of objects that describe the per-path cache behavior of the distribution.

public object? CacheBehaviors { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-cachebehaviors

CertificateName

The name of the SSL/TLS certificate attached to the distribution.

public string? CertificateName { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-certificatename

DefaultCacheBehavior

An object that describes the default cache behavior of the distribution.

public object DefaultCacheBehavior { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-defaultcachebehavior

DistributionName

The name of the distribution.

public string DistributionName { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-distributionname

IpAddressType

The IP address type of the distribution.

public string? IpAddressType { get; set; }
Property Value

string

Remarks

The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-ipaddresstype

IsEnabled

A Boolean value indicating whether the distribution is enabled.

public object? IsEnabled { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-isenabled

Origin

An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer.

public object Origin { get; set; }
Property Value

object

Remarks

The distribution pulls, caches, and serves content from the origin.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-origin

Tags

An array of key-value pairs to apply to this resource.

public ICfnTag[]? Tags { get; set; }
Property Value

ICfnTag[]

Remarks

For more information, see Tag in the AWS CloudFormation User Guide .

The <code>Value</code> of <code>Tags</code> is optional for Lightsail resources.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html#cfn-lightsail-distribution-tags

Implements

ICfnDistributionProps
Back to top Generated by DocFX