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.CloudFront
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-cloudfront-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.CloudFront;

             var cfnDistributionProps = new CfnDistributionProps {
                 DistributionConfig = new DistributionConfigProperty {
                     DefaultCacheBehavior = new DefaultCacheBehaviorProperty {
                         TargetOriginId = "targetOriginId",
                         ViewerProtocolPolicy = "viewerProtocolPolicy",

                         // the properties below are optional
                         AllowedMethods = new [] { "allowedMethods" },
                         CachedMethods = new [] { "cachedMethods" },
                         CachePolicyId = "cachePolicyId",
                         Compress = false,
                         DefaultTtl = 123,
                         FieldLevelEncryptionId = "fieldLevelEncryptionId",
                         ForwardedValues = new ForwardedValuesProperty {
                             QueryString = false,

                             // the properties below are optional
                             Cookies = new CookiesProperty {
                                 Forward = "forward",

                                 // the properties below are optional
                                 WhitelistedNames = new [] { "whitelistedNames" }
                             },
                             Headers = new [] { "headers" },
                             QueryStringCacheKeys = new [] { "queryStringCacheKeys" }
                         },
                         FunctionAssociations = new [] { new FunctionAssociationProperty {
                             EventType = "eventType",
                             FunctionArn = "functionArn"
                         } },
                         GrpcConfig = new GrpcConfigProperty {
                             Enabled = false
                         },
                         LambdaFunctionAssociations = new [] { new LambdaFunctionAssociationProperty {
                             EventType = "eventType",
                             IncludeBody = false,
                             LambdaFunctionArn = "lambdaFunctionArn"
                         } },
                         MaxTtl = 123,
                         MinTtl = 123,
                         OriginRequestPolicyId = "originRequestPolicyId",
                         RealtimeLogConfigArn = "realtimeLogConfigArn",
                         ResponseHeadersPolicyId = "responseHeadersPolicyId",
                         SmoothStreaming = false,
                         TrustedKeyGroups = new [] { "trustedKeyGroups" },
                         TrustedSigners = new [] { "trustedSigners" }
                     },
                     Enabled = false,

                     // the properties below are optional
                     Aliases = new [] { "aliases" },
                     AnycastIpListId = "anycastIpListId",
                     CacheBehaviors = new [] { new CacheBehaviorProperty {
                         PathPattern = "pathPattern",
                         TargetOriginId = "targetOriginId",
                         ViewerProtocolPolicy = "viewerProtocolPolicy",

                         // the properties below are optional
                         AllowedMethods = new [] { "allowedMethods" },
                         CachedMethods = new [] { "cachedMethods" },
                         CachePolicyId = "cachePolicyId",
                         Compress = false,
                         DefaultTtl = 123,
                         FieldLevelEncryptionId = "fieldLevelEncryptionId",
                         ForwardedValues = new ForwardedValuesProperty {
                             QueryString = false,

                             // the properties below are optional
                             Cookies = new CookiesProperty {
                                 Forward = "forward",

                                 // the properties below are optional
                                 WhitelistedNames = new [] { "whitelistedNames" }
                             },
                             Headers = new [] { "headers" },
                             QueryStringCacheKeys = new [] { "queryStringCacheKeys" }
                         },
                         FunctionAssociations = new [] { new FunctionAssociationProperty {
                             EventType = "eventType",
                             FunctionArn = "functionArn"
                         } },
                         GrpcConfig = new GrpcConfigProperty {
                             Enabled = false
                         },
                         LambdaFunctionAssociations = new [] { new LambdaFunctionAssociationProperty {
                             EventType = "eventType",
                             IncludeBody = false,
                             LambdaFunctionArn = "lambdaFunctionArn"
                         } },
                         MaxTtl = 123,
                         MinTtl = 123,
                         OriginRequestPolicyId = "originRequestPolicyId",
                         RealtimeLogConfigArn = "realtimeLogConfigArn",
                         ResponseHeadersPolicyId = "responseHeadersPolicyId",
                         SmoothStreaming = false,
                         TrustedKeyGroups = new [] { "trustedKeyGroups" },
                         TrustedSigners = new [] { "trustedSigners" }
                     } },
                     CnamEs = new [] { "cnamEs" },
                     Comment = "comment",
                     ConnectionFunctionAssociation = new ConnectionFunctionAssociationProperty {
                         Id = "id"
                     },
                     ConnectionMode = "connectionMode",
                     ContinuousDeploymentPolicyId = "continuousDeploymentPolicyId",
                     CustomErrorResponses = new [] { new CustomErrorResponseProperty {
                         ErrorCode = 123,

                         // the properties below are optional
                         ErrorCachingMinTtl = 123,
                         ResponseCode = 123,
                         ResponsePagePath = "responsePagePath"
                     } },
                     CustomOrigin = new LegacyCustomOriginProperty {
                         DnsName = "dnsName",
                         OriginProtocolPolicy = "originProtocolPolicy",
                         OriginSslProtocols = new [] { "originSslProtocols" },

                         // the properties below are optional
                         HttpPort = 123,
                         HttpsPort = 123
                     },
                     DefaultRootObject = "defaultRootObject",
                     HttpVersion = "httpVersion",
                     Ipv6Enabled = false,
                     Logging = new LoggingProperty {
                         Bucket = "bucket",
                         IncludeCookies = false,
                         Prefix = "prefix"
                     },
                     OriginGroups = new OriginGroupsProperty {
                         Quantity = 123,

                         // the properties below are optional
                         Items = new [] { new OriginGroupProperty {
                             FailoverCriteria = new OriginGroupFailoverCriteriaProperty {
                                 StatusCodes = new StatusCodesProperty {
                                     Items = new [] { 123 },
                                     Quantity = 123
                                 }
                             },
                             Id = "id",
                             Members = new OriginGroupMembersProperty {
                                 Items = new [] { new OriginGroupMemberProperty {
                                     OriginId = "originId"
                                 } },
                                 Quantity = 123
                             },

                             // the properties below are optional
                             SelectionCriteria = "selectionCriteria"
                         } }
                     },
                     Origins = new [] { new OriginProperty {
                         DomainName = "domainName",
                         Id = "id",

                         // the properties below are optional
                         ConnectionAttempts = 123,
                         ConnectionTimeout = 123,
                         CustomOriginConfig = new CustomOriginConfigProperty {
                             OriginProtocolPolicy = "originProtocolPolicy",

                             // the properties below are optional
                             HttpPort = 123,
                             HttpsPort = 123,
                             IpAddressType = "ipAddressType",
                             OriginKeepaliveTimeout = 123,
                             OriginMtlsConfig = new OriginMtlsConfigProperty {
                                 ClientCertificateArn = "clientCertificateArn"
                             },
                             OriginReadTimeout = 123,
                             OriginSslProtocols = new [] { "originSslProtocols" }
                         },
                         OriginAccessControlId = "originAccessControlId",
                         OriginCustomHeaders = new [] { new OriginCustomHeaderProperty {
                             HeaderName = "headerName",
                             HeaderValue = "headerValue"
                         } },
                         OriginPath = "originPath",
                         OriginShield = new OriginShieldProperty {
                             Enabled = false,
                             OriginShieldRegion = "originShieldRegion"
                         },
                         ResponseCompletionTimeout = 123,
                         S3OriginConfig = new S3OriginConfigProperty {
                             OriginAccessIdentity = "originAccessIdentity",
                             OriginReadTimeout = 123
                         },
                         VpcOriginConfig = new VpcOriginConfigProperty {
                             VpcOriginId = "vpcOriginId",

                             // the properties below are optional
                             OriginKeepaliveTimeout = 123,
                             OriginReadTimeout = 123,
                             OwnerAccountId = "ownerAccountId"
                         }
                     } },
                     PriceClass = "priceClass",
                     Restrictions = new RestrictionsProperty {
                         GeoRestriction = new GeoRestrictionProperty {
                             RestrictionType = "restrictionType",

                             // the properties below are optional
                             Locations = new [] { "locations" }
                         }
                     },
                     S3Origin = new LegacyS3OriginProperty {
                         DnsName = "dnsName",

                         // the properties below are optional
                         OriginAccessIdentity = "originAccessIdentity"
                     },
                     Staging = false,
                     TenantConfig = new TenantConfigProperty {
                         ParameterDefinitions = new [] { new ParameterDefinitionProperty {
                             Definition = new DefinitionProperty {
                                 StringSchema = new StringSchemaProperty {
                                     Required = false,

                                     // the properties below are optional
                                     Comment = "comment",
                                     DefaultValue = "defaultValue"
                                 }
                             },
                             Name = "name"
                         } }
                     },
                     ViewerCertificate = new ViewerCertificateProperty {
                         AcmCertificateArn = "acmCertificateArn",
                         CloudFrontDefaultCertificate = false,
                         IamCertificateId = "iamCertificateId",
                         MinimumProtocolVersion = "minimumProtocolVersion",
                         SslSupportMethod = "sslSupportMethod"
                     },
                     ViewerMtlsConfig = new ViewerMtlsConfigProperty {
                         Mode = "mode",
                         TrustStoreConfig = new TrustStoreConfigProperty {
                             TrustStoreId = "trustStoreId",

                             // the properties below are optional
                             AdvertiseTrustStoreCaNames = false,
                             IgnoreCertificateExpiry = false
                         }
                     },
                     WebAclId = "webAclId"
                 },

                 // the properties below are optional
                 Tags = new [] { new CfnTag {
                     Key = "key",
                     Value = "value"
                 } }
             };

Synopsis

Constructors

CfnDistributionProps()

Properties for defining a CfnDistribution.

Properties

DistributionConfig

The distribution's configuration.

Tags

A complex type that contains zero or more Tag elements.

Constructors

CfnDistributionProps()

Properties for defining a CfnDistribution.

public CfnDistributionProps()
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-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.CloudFront;

             var cfnDistributionProps = new CfnDistributionProps {
                 DistributionConfig = new DistributionConfigProperty {
                     DefaultCacheBehavior = new DefaultCacheBehaviorProperty {
                         TargetOriginId = "targetOriginId",
                         ViewerProtocolPolicy = "viewerProtocolPolicy",

                         // the properties below are optional
                         AllowedMethods = new [] { "allowedMethods" },
                         CachedMethods = new [] { "cachedMethods" },
                         CachePolicyId = "cachePolicyId",
                         Compress = false,
                         DefaultTtl = 123,
                         FieldLevelEncryptionId = "fieldLevelEncryptionId",
                         ForwardedValues = new ForwardedValuesProperty {
                             QueryString = false,

                             // the properties below are optional
                             Cookies = new CookiesProperty {
                                 Forward = "forward",

                                 // the properties below are optional
                                 WhitelistedNames = new [] { "whitelistedNames" }
                             },
                             Headers = new [] { "headers" },
                             QueryStringCacheKeys = new [] { "queryStringCacheKeys" }
                         },
                         FunctionAssociations = new [] { new FunctionAssociationProperty {
                             EventType = "eventType",
                             FunctionArn = "functionArn"
                         } },
                         GrpcConfig = new GrpcConfigProperty {
                             Enabled = false
                         },
                         LambdaFunctionAssociations = new [] { new LambdaFunctionAssociationProperty {
                             EventType = "eventType",
                             IncludeBody = false,
                             LambdaFunctionArn = "lambdaFunctionArn"
                         } },
                         MaxTtl = 123,
                         MinTtl = 123,
                         OriginRequestPolicyId = "originRequestPolicyId",
                         RealtimeLogConfigArn = "realtimeLogConfigArn",
                         ResponseHeadersPolicyId = "responseHeadersPolicyId",
                         SmoothStreaming = false,
                         TrustedKeyGroups = new [] { "trustedKeyGroups" },
                         TrustedSigners = new [] { "trustedSigners" }
                     },
                     Enabled = false,

                     // the properties below are optional
                     Aliases = new [] { "aliases" },
                     AnycastIpListId = "anycastIpListId",
                     CacheBehaviors = new [] { new CacheBehaviorProperty {
                         PathPattern = "pathPattern",
                         TargetOriginId = "targetOriginId",
                         ViewerProtocolPolicy = "viewerProtocolPolicy",

                         // the properties below are optional
                         AllowedMethods = new [] { "allowedMethods" },
                         CachedMethods = new [] { "cachedMethods" },
                         CachePolicyId = "cachePolicyId",
                         Compress = false,
                         DefaultTtl = 123,
                         FieldLevelEncryptionId = "fieldLevelEncryptionId",
                         ForwardedValues = new ForwardedValuesProperty {
                             QueryString = false,

                             // the properties below are optional
                             Cookies = new CookiesProperty {
                                 Forward = "forward",

                                 // the properties below are optional
                                 WhitelistedNames = new [] { "whitelistedNames" }
                             },
                             Headers = new [] { "headers" },
                             QueryStringCacheKeys = new [] { "queryStringCacheKeys" }
                         },
                         FunctionAssociations = new [] { new FunctionAssociationProperty {
                             EventType = "eventType",
                             FunctionArn = "functionArn"
                         } },
                         GrpcConfig = new GrpcConfigProperty {
                             Enabled = false
                         },
                         LambdaFunctionAssociations = new [] { new LambdaFunctionAssociationProperty {
                             EventType = "eventType",
                             IncludeBody = false,
                             LambdaFunctionArn = "lambdaFunctionArn"
                         } },
                         MaxTtl = 123,
                         MinTtl = 123,
                         OriginRequestPolicyId = "originRequestPolicyId",
                         RealtimeLogConfigArn = "realtimeLogConfigArn",
                         ResponseHeadersPolicyId = "responseHeadersPolicyId",
                         SmoothStreaming = false,
                         TrustedKeyGroups = new [] { "trustedKeyGroups" },
                         TrustedSigners = new [] { "trustedSigners" }
                     } },
                     CnamEs = new [] { "cnamEs" },
                     Comment = "comment",
                     ConnectionFunctionAssociation = new ConnectionFunctionAssociationProperty {
                         Id = "id"
                     },
                     ConnectionMode = "connectionMode",
                     ContinuousDeploymentPolicyId = "continuousDeploymentPolicyId",
                     CustomErrorResponses = new [] { new CustomErrorResponseProperty {
                         ErrorCode = 123,

                         // the properties below are optional
                         ErrorCachingMinTtl = 123,
                         ResponseCode = 123,
                         ResponsePagePath = "responsePagePath"
                     } },
                     CustomOrigin = new LegacyCustomOriginProperty {
                         DnsName = "dnsName",
                         OriginProtocolPolicy = "originProtocolPolicy",
                         OriginSslProtocols = new [] { "originSslProtocols" },

                         // the properties below are optional
                         HttpPort = 123,
                         HttpsPort = 123
                     },
                     DefaultRootObject = "defaultRootObject",
                     HttpVersion = "httpVersion",
                     Ipv6Enabled = false,
                     Logging = new LoggingProperty {
                         Bucket = "bucket",
                         IncludeCookies = false,
                         Prefix = "prefix"
                     },
                     OriginGroups = new OriginGroupsProperty {
                         Quantity = 123,

                         // the properties below are optional
                         Items = new [] { new OriginGroupProperty {
                             FailoverCriteria = new OriginGroupFailoverCriteriaProperty {
                                 StatusCodes = new StatusCodesProperty {
                                     Items = new [] { 123 },
                                     Quantity = 123
                                 }
                             },
                             Id = "id",
                             Members = new OriginGroupMembersProperty {
                                 Items = new [] { new OriginGroupMemberProperty {
                                     OriginId = "originId"
                                 } },
                                 Quantity = 123
                             },

                             // the properties below are optional
                             SelectionCriteria = "selectionCriteria"
                         } }
                     },
                     Origins = new [] { new OriginProperty {
                         DomainName = "domainName",
                         Id = "id",

                         // the properties below are optional
                         ConnectionAttempts = 123,
                         ConnectionTimeout = 123,
                         CustomOriginConfig = new CustomOriginConfigProperty {
                             OriginProtocolPolicy = "originProtocolPolicy",

                             // the properties below are optional
                             HttpPort = 123,
                             HttpsPort = 123,
                             IpAddressType = "ipAddressType",
                             OriginKeepaliveTimeout = 123,
                             OriginMtlsConfig = new OriginMtlsConfigProperty {
                                 ClientCertificateArn = "clientCertificateArn"
                             },
                             OriginReadTimeout = 123,
                             OriginSslProtocols = new [] { "originSslProtocols" }
                         },
                         OriginAccessControlId = "originAccessControlId",
                         OriginCustomHeaders = new [] { new OriginCustomHeaderProperty {
                             HeaderName = "headerName",
                             HeaderValue = "headerValue"
                         } },
                         OriginPath = "originPath",
                         OriginShield = new OriginShieldProperty {
                             Enabled = false,
                             OriginShieldRegion = "originShieldRegion"
                         },
                         ResponseCompletionTimeout = 123,
                         S3OriginConfig = new S3OriginConfigProperty {
                             OriginAccessIdentity = "originAccessIdentity",
                             OriginReadTimeout = 123
                         },
                         VpcOriginConfig = new VpcOriginConfigProperty {
                             VpcOriginId = "vpcOriginId",

                             // the properties below are optional
                             OriginKeepaliveTimeout = 123,
                             OriginReadTimeout = 123,
                             OwnerAccountId = "ownerAccountId"
                         }
                     } },
                     PriceClass = "priceClass",
                     Restrictions = new RestrictionsProperty {
                         GeoRestriction = new GeoRestrictionProperty {
                             RestrictionType = "restrictionType",

                             // the properties below are optional
                             Locations = new [] { "locations" }
                         }
                     },
                     S3Origin = new LegacyS3OriginProperty {
                         DnsName = "dnsName",

                         // the properties below are optional
                         OriginAccessIdentity = "originAccessIdentity"
                     },
                     Staging = false,
                     TenantConfig = new TenantConfigProperty {
                         ParameterDefinitions = new [] { new ParameterDefinitionProperty {
                             Definition = new DefinitionProperty {
                                 StringSchema = new StringSchemaProperty {
                                     Required = false,

                                     // the properties below are optional
                                     Comment = "comment",
                                     DefaultValue = "defaultValue"
                                 }
                             },
                             Name = "name"
                         } }
                     },
                     ViewerCertificate = new ViewerCertificateProperty {
                         AcmCertificateArn = "acmCertificateArn",
                         CloudFrontDefaultCertificate = false,
                         IamCertificateId = "iamCertificateId",
                         MinimumProtocolVersion = "minimumProtocolVersion",
                         SslSupportMethod = "sslSupportMethod"
                     },
                     ViewerMtlsConfig = new ViewerMtlsConfigProperty {
                         Mode = "mode",
                         TrustStoreConfig = new TrustStoreConfigProperty {
                             TrustStoreId = "trustStoreId",

                             // the properties below are optional
                             AdvertiseTrustStoreCaNames = false,
                             IgnoreCertificateExpiry = false
                         }
                     },
                     WebAclId = "webAclId"
                 },

                 // the properties below are optional
                 Tags = new [] { new CfnTag {
                     Key = "key",
                     Value = "value"
                 } }
             };

Properties

DistributionConfig

The distribution's configuration.

public object DistributionConfig { get; set; }
Property Value

object

Remarks

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

Type union: either IResolvable or CfnDistribution.IDistributionConfigProperty

Tags

A complex type that contains zero or more Tag elements.

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

ICfnTag[]

Remarks

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

Implements

ICfnDistributionProps
Back to top Generated by DocFX