interface CfnDistributionConnectionLogsLogGroupProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.CloudFront.Mixins.CfnDistributionConnectionLogsLogGroupProps |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awscloudfront/mixins#CfnDistributionConnectionLogsLogGroupProps |
Java | software.amazon.awscdk.mixins.preview.services.cloudfront.mixins.CfnDistributionConnectionLogsLogGroupProps |
Python | aws_cdk.mixins_preview.aws_cloudfront.mixins.CfnDistributionConnectionLogsLogGroupProps |
TypeScript | @aws-cdk/mixins-preview ยป aws_cloudfront ยป mixins ยป CfnDistributionConnectionLogsLogGroupProps |
Example
import * as cloudfrontMixins from '@aws-cdk/mixins-preview/aws-cloudfront/mixins';
// Create CloudFront distribution
declare const origin: s3.IBucket;
const distribution = new cloudfront.Distribution(scope, 'Distribution', {
defaultBehavior: {
origin: origins.S3BucketOrigin.withOriginAccessControl(origin),
},
});
// Create log destination
const logGroup = new logs.LogGroup(scope, 'DeliveryLogGroup');
// Configure log delivery using the mixin
distribution
.with(cloudfrontMixins.CfnDistributionLogsMixin.CONNECTION_LOGS.toLogGroup(logGroup, {
outputFormat: cloudfrontMixins.CfnDistributionConnectionLogsOutputFormat.LogGroup.JSON,
recordFields: [
cloudfrontMixins.CfnDistributionConnectionLogsRecordFields.CONNECTIONSTATUS,
cloudfrontMixins.CfnDistributionConnectionLogsRecordFields.CLIENTIP,
cloudfrontMixins.CfnDistributionConnectionLogsRecordFields.SERVERIP,
cloudfrontMixins.CfnDistributionConnectionLogsRecordFields.TLSPROTOCOL,
],
}));
Properties
| Name | Type | Description |
|---|---|---|
| output | Log | Format for log output, options are plain,json. |
| record | Cfn[] | Record fields that can be provided to a log delivery. |
outputFormat?
Type:
Log
(optional)
Format for log output, options are plain,json.
recordFields?
Type:
Cfn[]
(optional)
Record fields that can be provided to a log delivery.

.NET
Go
Java
Python
TypeScript