Endpoint

class aws_cdk.aws_cloudfront.Endpoint(*args: Any, **kwargs)

Bases: object

Represents the endpoints available for targetting within a realtime log config resource.

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

Static Methods

classmethod from_kinesis_stream(stream, role=None)

Configure a Kinesis Stream Endpoint for Realtime Log Config.

Parameters:
Default:
  • a role will be created and used across your endpoints

Return type:

Endpoint