# CfnRealtimeLogConfigProps

Properties for defining a `CfnRealtimeLogConfig`.

Used as props by: [CfnRealtimeLogConfig](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.CfnRealtimeLogConfig.html)

- Source: Generated at build time

## Example

TypeScript:

```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';
const cfnRealtimeLogConfigProps: cloudfront.CfnRealtimeLogConfigProps = {
  endPoints: [{
    kinesisStreamConfig: {
      roleArn: 'roleArn',
      streamArn: 'streamArn',
    },
    streamType: 'streamType',
  }],
  fields: ['fields'],
  name: 'name',
  samplingRate: 123,
};
```

Python:

```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

cfn_realtime_log_config_props = cloudfront.CfnRealtimeLogConfigProps(
    end_points=[cloudfront.CfnRealtimeLogConfig.EndPointProperty(
        kinesis_stream_config=cloudfront.CfnRealtimeLogConfig.KinesisStreamConfigProperty(
            role_arn="roleArn",
            stream_arn="streamArn"
        ),
        stream_type="streamType"
    )],
    fields=["fields"],
    name="name",
    sampling_rate=123
)
```

Java:

```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.*;

CfnRealtimeLogConfigProps cfnRealtimeLogConfigProps = CfnRealtimeLogConfigProps.builder()
        .endPoints(List.of(EndPointProperty.builder()
                .kinesisStreamConfig(KinesisStreamConfigProperty.builder()
                        .roleArn("roleArn")
                        .streamArn("streamArn")
                        .build())
                .streamType("streamType")
                .build()))
        .fields(List.of("fields"))
        .name("name")
        .samplingRate(123)
        .build();
```

C# / .NET:

```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;

var cfnRealtimeLogConfigProps = new CfnRealtimeLogConfigProps {
    EndPoints = new [] { new EndPointProperty {
        KinesisStreamConfig = new KinesisStreamConfigProperty {
            RoleArn = "roleArn",
            StreamArn = "streamArn"
        },
        StreamType = "streamType"
    } },
    Fields = new [] { "fields" },
    Name = "name",
    SamplingRate = 123
};
```

Golang:

```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"

cfnRealtimeLogConfigProps := &CfnRealtimeLogConfigProps{
	EndPoints: []interface{}{
		&EndPointProperty{
			KinesisStreamConfig: &KinesisStreamConfigProperty{
				RoleArn: jsii.String("roleArn"),
				StreamArn: jsii.String("streamArn"),
			},
			StreamType: jsii.String("streamType"),
		},
	},
	Fields: []*string{
		jsii.String("fields"),
	},
	Name: jsii.String("name"),
	SamplingRate: jsii.Number(123),
}
```

## Properties

- `endPoints`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnRealtimeLogConfig.EndPointProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.CfnRealtimeLogConfig.EndPointProperty.html)[] (required) — Contains information about the Amazon Kinesis data stream where you are sending real-time log data for this real-time log configuration.

- `fields`: string[] (required) — A list of fields that are included in each real-time log record.

  In an API response, the fields are provided in the same order in which they are sent to the Amazon Kinesis data stream.

  For more information about fields, see [Real-time log configuration fields](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-fields) in the *Amazon CloudFront Developer Guide* .

- `name`: string (required) — The unique name of this real-time log configuration.

- `samplingRate`: number (required) — The sampling rate for this real-time log configuration.

  The sampling rate determines the percentage of viewer requests that are represented in the real-time log data. The sampling rate is an integer between 1 and 100, inclusive.
