Interface ICfnDistributionProps
Properties for defining a CfnDistribution
.
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnDistributionProps
Syntax (vb)
Public Interface ICfnDistributionProps
Remarks
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",
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,
OriginKeepaliveTimeout = 123,
OriginReadTimeout = 123,
OriginSslProtocols = new [] { "originSslProtocols" }
},
OriginAccessControlId = "originAccessControlId",
OriginCustomHeaders = new [] { new OriginCustomHeaderProperty {
HeaderName = "headerName",
HeaderValue = "headerValue"
} },
OriginPath = "originPath",
OriginShield = new OriginShieldProperty {
Enabled = false,
OriginShieldRegion = "originShieldRegion"
},
S3OriginConfig = new S3OriginConfigProperty {
OriginAccessIdentity = "originAccessIdentity"
},
VpcOriginConfig = new VpcOriginConfigProperty {
VpcOriginId = "vpcOriginId",
// the properties below are optional
OriginKeepaliveTimeout = 123,
OriginReadTimeout = 123
}
} },
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,
ViewerCertificate = new ViewerCertificateProperty {
AcmCertificateArn = "acmCertificateArn",
CloudFrontDefaultCertificate = false,
IamCertificateId = "iamCertificateId",
MinimumProtocolVersion = "minimumProtocolVersion",
SslSupportMethod = "sslSupportMethod"
},
WebAclId = "webAclId"
},
// the properties below are optional
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
Synopsis
Properties
DistributionConfig | The distribution's configuration. |
Tags | A complex type that contains zero or more |
Properties
DistributionConfig
The distribution's configuration.
object DistributionConfig { get; }
Property Value
System.Object
Remarks
Tags
A complex type that contains zero or more Tag
elements.
virtual ICfnTag[] Tags { get; }
Property Value
ICfnTag[]