class CfnDistributionPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.CloudFront.Mixins.CfnDistributionPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awscloudfront/mixins#CfnDistributionPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.cloudfront.mixins.CfnDistributionPropsMixin |
Python | aws_cdk.mixins_preview.aws_cloudfront.mixins.CfnDistributionPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_cloudfront » mixins » CfnDistributionPropsMixin |
Implements
IMixin
Extends
Mixin
A distribution tells CloudFront where you want content to be delivered from, and the details about how to track and manage content delivery.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as cloudfront_mixins } from '@aws-cdk/mixins-preview/aws-cloudfront';
const cfnDistributionPropsMixin = new cloudfront_mixins.CfnDistributionPropsMixin({
distributionConfig: {
aliases: ['aliases'],
anycastIpListId: 'anycastIpListId',
cacheBehaviors: [{
allowedMethods: ['allowedMethods'],
cachedMethods: ['cachedMethods'],
cachePolicyId: 'cachePolicyId',
compress: false,
defaultTtl: 123,
fieldLevelEncryptionId: 'fieldLevelEncryptionId',
forwardedValues: {
cookies: {
forward: 'forward',
whitelistedNames: ['whitelistedNames'],
},
headers: ['headers'],
queryString: false,
queryStringCacheKeys: ['queryStringCacheKeys'],
},
functionAssociations: [{
eventType: 'eventType',
functionArn: 'functionArn',
}],
grpcConfig: {
enabled: false,
},
lambdaFunctionAssociations: [{
eventType: 'eventType',
includeBody: false,
lambdaFunctionArn: 'lambdaFunctionArn',
}],
maxTtl: 123,
minTtl: 123,
originRequestPolicyId: 'originRequestPolicyId',
pathPattern: 'pathPattern',
realtimeLogConfigArn: 'realtimeLogConfigArn',
responseHeadersPolicyId: 'responseHeadersPolicyId',
smoothStreaming: false,
targetOriginId: 'targetOriginId',
trustedKeyGroups: ['trustedKeyGroups'],
trustedSigners: ['trustedSigners'],
viewerProtocolPolicy: 'viewerProtocolPolicy',
}],
cnamEs: ['cnamEs'],
comment: 'comment',
connectionFunctionAssociation: {
id: 'id',
},
connectionMode: 'connectionMode',
continuousDeploymentPolicyId: 'continuousDeploymentPolicyId',
customErrorResponses: [{
errorCachingMinTtl: 123,
errorCode: 123,
responseCode: 123,
responsePagePath: 'responsePagePath',
}],
customOrigin: {
dnsName: 'dnsName',
httpPort: 123,
httpsPort: 123,
originProtocolPolicy: 'originProtocolPolicy',
originSslProtocols: ['originSslProtocols'],
},
defaultCacheBehavior: {
allowedMethods: ['allowedMethods'],
cachedMethods: ['cachedMethods'],
cachePolicyId: 'cachePolicyId',
compress: false,
defaultTtl: 123,
fieldLevelEncryptionId: 'fieldLevelEncryptionId',
forwardedValues: {
cookies: {
forward: 'forward',
whitelistedNames: ['whitelistedNames'],
},
headers: ['headers'],
queryString: false,
queryStringCacheKeys: ['queryStringCacheKeys'],
},
functionAssociations: [{
eventType: 'eventType',
functionArn: 'functionArn',
}],
grpcConfig: {
enabled: false,
},
lambdaFunctionAssociations: [{
eventType: 'eventType',
includeBody: false,
lambdaFunctionArn: 'lambdaFunctionArn',
}],
maxTtl: 123,
minTtl: 123,
originRequestPolicyId: 'originRequestPolicyId',
realtimeLogConfigArn: 'realtimeLogConfigArn',
responseHeadersPolicyId: 'responseHeadersPolicyId',
smoothStreaming: false,
targetOriginId: 'targetOriginId',
trustedKeyGroups: ['trustedKeyGroups'],
trustedSigners: ['trustedSigners'],
viewerProtocolPolicy: 'viewerProtocolPolicy',
},
defaultRootObject: 'defaultRootObject',
enabled: false,
httpVersion: 'httpVersion',
ipv6Enabled: false,
logging: {
bucket: 'bucket',
includeCookies: false,
prefix: 'prefix',
},
originGroups: {
items: [{
failoverCriteria: {
statusCodes: {
items: [123],
quantity: 123,
},
},
id: 'id',
members: {
items: [{
originId: 'originId',
}],
quantity: 123,
},
selectionCriteria: 'selectionCriteria',
}],
quantity: 123,
},
origins: [{
connectionAttempts: 123,
connectionTimeout: 123,
customOriginConfig: {
httpPort: 123,
httpsPort: 123,
ipAddressType: 'ipAddressType',
originKeepaliveTimeout: 123,
originProtocolPolicy: 'originProtocolPolicy',
originReadTimeout: 123,
originSslProtocols: ['originSslProtocols'],
},
domainName: 'domainName',
id: 'id',
originAccessControlId: 'originAccessControlId',
originCustomHeaders: [{
headerName: 'headerName',
headerValue: 'headerValue',
}],
originPath: 'originPath',
originShield: {
enabled: false,
originShieldRegion: 'originShieldRegion',
},
responseCompletionTimeout: 123,
s3OriginConfig: {
originAccessIdentity: 'originAccessIdentity',
originReadTimeout: 123,
},
vpcOriginConfig: {
originKeepaliveTimeout: 123,
originReadTimeout: 123,
ownerAccountId: 'ownerAccountId',
vpcOriginId: 'vpcOriginId',
},
}],
priceClass: 'priceClass',
restrictions: {
geoRestriction: {
locations: ['locations'],
restrictionType: 'restrictionType',
},
},
s3Origin: {
dnsName: 'dnsName',
originAccessIdentity: 'originAccessIdentity',
},
staging: false,
tenantConfig: {
parameterDefinitions: [{
definition: {
stringSchema: {
comment: 'comment',
defaultValue: 'defaultValue',
required: false,
},
},
name: 'name',
}],
},
viewerCertificate: {
acmCertificateArn: 'acmCertificateArn',
cloudFrontDefaultCertificate: false,
iamCertificateId: 'iamCertificateId',
minimumProtocolVersion: 'minimumProtocolVersion',
sslSupportMethod: 'sslSupportMethod',
},
viewerMtlsConfig: {
mode: 'mode',
trustStoreConfig: {
advertiseTrustStoreCaNames: false,
ignoreCertificateExpiry: false,
trustStoreId: 'trustStoreId',
},
},
webAclId: 'webAclId',
},
tags: [{
key: 'key',
value: 'value',
}],
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnDistributionPropsMixin(props: CfnDistributionMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Distribution Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::CloudFront::Distribution.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript