Skip to content

CloudFront  >  Operations  >  create_realtime_log_config

create_realtime_log_config

Operation

create_realtime_log_config async

create_realtime_log_config(input: CreateRealtimeLogConfigInput, plugins: list[Plugin] | None = None) -> CreateRealtimeLogConfigOutput

Creates a real-time log configuration.

After you create a real-time log configuration, you can attach it to one or more cache behaviors to send real-time log data to the specified Amazon Kinesis data stream.

For more information about real-time log configurations, see Real-time logs in the Amazon CloudFront Developer Guide.

Parameters:

Name Type Description Default
input CreateRealtimeLogConfigInput

An instance of CreateRealtimeLogConfigInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreateRealtimeLogConfigOutput

An instance of CreateRealtimeLogConfigOutput.

Input

CreateRealtimeLogConfigInput dataclass

Bases: _SerdeShape

Dataclass for CreateRealtimeLogConfigInput structure.

Attributes

end_points class-attribute instance-attribute
end_points: list[EndPoint] | None = ...

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

fields class-attribute instance-attribute
fields: list[str] | None = ...

A list of fields to include in each real-time log record.

For more information about fields, see Real-time log configuration fields in the Amazon CloudFront Developer Guide.

name class-attribute instance-attribute
name: str | None = ...

A unique name to identify this real-time log configuration.

sampling_rate class-attribute instance-attribute
sampling_rate: int | None = ...

The sampling rate for this real-time log configuration. You can specify a whole number between 1 and 100 (inclusive) to determine the percentage of viewer requests that are represented in the real-time log data.

Output

CreateRealtimeLogConfigOutput dataclass

Bases: _SerdeShape

Dataclass for CreateRealtimeLogConfigOutput structure.

Attributes

realtime_log_config class-attribute instance-attribute
realtime_log_config: RealtimeLogConfig | None = ...

A real-time log configuration.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.