LoggingConfiguration Struct
Logging configuration for incoming requests.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudfront as cloudfront } from 'aws-cdk-lib';
import { aws_s3 as s3 } from 'aws-cdk-lib';
declare const bucket: s3.Bucket;
const loggingConfiguration: cloudfront.LoggingConfiguration = {
bucket: bucket,
includeCookies: false,
prefix: 'prefix',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudfront as cloudfront
from aws_cdk import aws_s3 as s3
# bucket: s3.Bucket
logging_configuration = cloudfront.LoggingConfiguration(
bucket=bucket,
include_cookies=False,
prefix="prefix"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudfront.*;
import software.amazon.awscdk.services.s3.*;
Bucket bucket;
LoggingConfiguration loggingConfiguration = LoggingConfiguration.builder()
.bucket(bucket)
.includeCookies(false)
.prefix("prefix")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudFront;
using Amazon.CDK.AWS.S3;
Bucket bucket;
var loggingConfiguration = new LoggingConfiguration {
Bucket = bucket,
IncludeCookies = false,
Prefix = "prefix"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var bucket Bucket
loggingConfiguration := &LoggingConfiguration{
Bucket: bucket,
IncludeCookies: jsii.Boolean(false),
Prefix: jsii.String("prefix"),
}
Properties
bucketoptionalIBucketbucketoptionalIBucketbucketoptionalIBucketBucketoptionalIBucketBucketoptionalIBucket#Bucket to log requests to.
Default: A logging bucket is automatically created.
includeCookiesoptionalbooleaninclude_cookiesoptionalboolincludeCookiesoptionalBooleanIncludeCookiesoptionalboolIncludeCookiesoptional*bool= false#Whether to include the cookies in the logs.
Where in the bucket to store logs.
Default: No prefix.