interface RealtimeLogConfigProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CloudFront.RealtimeLogConfigProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#RealtimeLogConfigProps |
![]() | software.amazon.awscdk.services.cloudfront.RealtimeLogConfigProps |
![]() | aws_cdk.aws_cloudfront.RealtimeLogConfigProps |
![]() | aws-cdk-lib » aws_cloudfront » RealtimeLogConfigProps |
Properties for defining a RealtimeLogConfig resource.
Example
// Adding realtime logs config to a Cloudfront Distribution on default behavior.
import * as kinesis from 'aws-cdk-lib/aws-kinesis';
declare const stream: kinesis.Stream;
const realTimeConfig = new cloudfront.RealtimeLogConfig(this, 'realtimeLog', {
endPoints: [
cloudfront.Endpoint.fromKinesisStream(stream),
],
fields: [
'timestamp',
'c-ip',
'time-to-first-byte',
'sc-status',
],
realtimeLogConfigName: 'my-delivery-stream',
samplingRate: 100,
});
new cloudfront.Distribution(this, 'myCdn', {
defaultBehavior: {
origin: new origins.HttpOrigin('www.example.com'),
realtimeLogConfig: realTimeConfig,
},
});
Properties
Name | Type | Description |
---|---|---|
end | Endpoint [] | Contains information about the Amazon Kinesis data stream where you are sending real-time log data for this real-time log configuration. |
fields | string[] | A list of fields that are included in each real-time log record. |
sampling | number | The sampling rate for this real-time log configuration. |
realtime | string | The unique name of this real-time log configuration. |
endPoints
Type:
Endpoint
[]
Contains information about the Amazon Kinesis data stream where you are sending real-time log data for this real-time log configuration.
fields
Type:
string[]
A list of fields that are included in each real-time log record.
samplingRate
Type:
number
The sampling rate for this real-time log configuration.
realtimeLogConfigName?
Type:
string
(optional, default: the unique construct ID)
The unique name of this real-time log configuration.