RealtimeLogConfigProps
- class aws_cdk.aws_cloudfront.RealtimeLogConfigProps(*, end_points, fields, sampling_rate, realtime_log_config_name=None)
Bases:
object
Properties for defining a RealtimeLogConfig resource.
- Parameters:
end_points (
Sequence
[Endpoint
]) – Contains information about the Amazon Kinesis data stream where you are sending real-time log data for this real-time log configuration.fields (
Sequence
[str
]) – A list of fields that are included in each real-time log record.sampling_rate (
Union
[int
,float
]) – The sampling rate for this real-time log configuration.realtime_log_config_name (
Optional
[str
]) – The unique name of this real-time log configuration. Default: - the unique construct ID
- ExampleMetadata:
infused
Example:
# Adding realtime logs config to a Cloudfront Distribution on default behavior. import aws_cdk.aws_kinesis as kinesis # stream: kinesis.Stream real_time_config = cloudfront.RealtimeLogConfig(self, "realtimeLog", end_points=[ cloudfront.Endpoint.from_kinesis_stream(stream) ], fields=["timestamp", "c-ip", "time-to-first-byte", "sc-status" ], realtime_log_config_name="my-delivery-stream", sampling_rate=100 ) cloudfront.Distribution(self, "myCdn", default_behavior=cloudfront.BehaviorOptions( origin=origins.HttpOrigin("www.example.com"), realtime_log_config=real_time_config ) )
Attributes
- end_points
Contains information about the Amazon Kinesis data stream where you are sending real-time log data for this real-time log configuration.
- fields
A list of fields that are included in each real-time log record.
- realtime_log_config_name
The unique name of this real-time log configuration.
- Default:
the unique construct ID
- sampling_rate
The sampling rate for this real-time log configuration.