Show / Hide Table of Contents

Class RealtimeLogConfigProps

Properties for defining a RealtimeLogConfig resource.

Inheritance
object
RealtimeLogConfigProps
Implements
IRealtimeLogConfigProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RealtimeLogConfigProps : IRealtimeLogConfigProps
Syntax (vb)
Public Class RealtimeLogConfigProps Implements IRealtimeLogConfigProps
Remarks

ExampleMetadata: infused

Examples
// Adding realtime logs config to a Cloudfront Distribution on default behavior.
            using Amazon.CDK.AWS.Kinesis;

            Stream stream;


            var realTimeConfig = new RealtimeLogConfig(this, "realtimeLog", new RealtimeLogConfigProps {
                EndPoints = new [] { Endpoint.FromKinesisStream(stream) },
                Fields = new [] { "timestamp", "c-ip", "time-to-first-byte", "sc-status" },
                RealtimeLogConfigName = "my-delivery-stream",
                SamplingRate = 100
            });

            new Distribution(this, "myCdn", new DistributionProps {
                DefaultBehavior = new BehaviorOptions {
                    Origin = new HttpOrigin("www.example.com"),
                    RealtimeLogConfig = realTimeConfig
                }
            });

Synopsis

Constructors

RealtimeLogConfigProps()

Properties for defining a RealtimeLogConfig resource.

Properties

EndPoints

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.

RealtimeLogConfigName

The unique name of this real-time log configuration.

SamplingRate

The sampling rate for this real-time log configuration.

Constructors

RealtimeLogConfigProps()

Properties for defining a RealtimeLogConfig resource.

public RealtimeLogConfigProps()
Remarks

ExampleMetadata: infused

Examples
// Adding realtime logs config to a Cloudfront Distribution on default behavior.
            using Amazon.CDK.AWS.Kinesis;

            Stream stream;


            var realTimeConfig = new RealtimeLogConfig(this, "realtimeLog", new RealtimeLogConfigProps {
                EndPoints = new [] { Endpoint.FromKinesisStream(stream) },
                Fields = new [] { "timestamp", "c-ip", "time-to-first-byte", "sc-status" },
                RealtimeLogConfigName = "my-delivery-stream",
                SamplingRate = 100
            });

            new Distribution(this, "myCdn", new DistributionProps {
                DefaultBehavior = new BehaviorOptions {
                    Origin = new HttpOrigin("www.example.com"),
                    RealtimeLogConfig = realTimeConfig
                }
            });

Properties

EndPoints

Contains information about the Amazon Kinesis data stream where you are sending real-time log data for this real-time log configuration.

public Endpoint[] EndPoints { get; set; }
Property Value

Endpoint[]

Remarks

ExampleMetadata: infused

Fields

A list of fields that are included in each real-time log record.

public string[] Fields { get; set; }
Property Value

string[]

Remarks

See: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-fields

RealtimeLogConfigName

The unique name of this real-time log configuration.

public string? RealtimeLogConfigName { get; set; }
Property Value

string

Remarks

Default: - the unique construct ID

SamplingRate

The sampling rate for this real-time log configuration.

public double SamplingRate { get; set; }
Property Value

double

Remarks

ExampleMetadata: infused

Implements

IRealtimeLogConfigProps
Back to top Generated by DocFX