class CfnDistributionLogsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.CloudFront.Mixins.CfnDistributionLogsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awscloudfront/mixins#CfnDistributionLogsMixin |
Java | software.amazon.awscdk.mixins.preview.services.cloudfront.mixins.CfnDistributionLogsMixin |
Python | aws_cdk.mixins_preview.aws_cloudfront.mixins.CfnDistributionLogsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_cloudfront » mixins » CfnDistributionLogsMixin |
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
import '@aws-cdk/mixins-preview/with';
import * as cloudfrontMixins from '@aws-cdk/mixins-preview/aws-cloudfront/mixins';
// Create CloudFront distribution
declare const bucket: s3.Bucket;
const distribution = new cloudfront.Distribution(scope, 'Distribution', {
defaultBehavior: {
origin: origins.S3BucketOrigin.withOriginAccessControl(bucket),
},
});
// Create log destination
const logGroup = new logs.LogGroup(scope, 'DeliveryLogGroup');
// Configure log delivery using the mixin
distribution
.with(cloudfrontMixins.CfnDistributionLogsMixin.CONNECTION_LOGS.toLogGroup(logGroup));
Initializer
new CfnDistributionLogsMixin(logType: string, logDelivery: ILogsDelivery)
Parameters
- logType
string— Type of logs that are getting vended. - logDelivery
ILogs— Object in charge of setting up the delivery source, delivery destination, and delivery connection.Delivery
Create a mixin to enable vended logs for AWS::CloudFront::Distribution.
Properties
| Name | Type | Description |
|---|---|---|
| log | ILogs | |
| log | string | |
| static ACCESS_LOGS | Cfn | |
| static CONNECTION_LOGS | Cfn |
logDelivery
Type:
ILogs
logType
Type:
string
static ACCESS_LOGS
Type:
Cfn
static CONNECTION_LOGS
Type:
Cfn
Methods
| Name | Description |
|---|---|
| apply | Apply vended logs configuration to the construct. |
| supports(construct) | Check if this mixin supports the given construct (has vendedLogs property). |
applyTo(resource)
public applyTo(resource: IConstruct): IConstruct
Parameters
- resource
IConstruct
Returns
Apply vended logs configuration to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct (has vendedLogs property).

.NET
Go
Java
Python
TypeScript