Class: AWSCDK::CloudFront::CfnRealtimeLogConfigProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_front/cfn_realtime_log_config_props.rb

Overview

Properties for defining a CfnRealtimeLogConfig.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(end_points:, fields:, name:, sampling_rate:) ⇒ CfnRealtimeLogConfigProps

Returns a new instance of CfnRealtimeLogConfigProps.

Parameters:

  • end_points (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::CloudFront::CfnRealtimeLogConfig::EndPointProperty>)

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

  • fields (Array<String>)

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

  • name (String)

    The unique name of this real-time log configuration.

  • sampling_rate (Numeric)

    The sampling rate for this real-time log configuration.



13
14
15
16
17
18
19
20
21
22
# File 'cloud_front/cfn_realtime_log_config_props.rb', line 13

def initialize(end_points:, fields:, name:, sampling_rate:)
  @end_points = end_points
  Jsii::Type.check_type(@end_points, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWRmcm9udC5DZm5SZWFsdGltZUxvZ0NvbmZpZy5FbmRQb2ludFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "endPoints")
  @fields = fields
  Jsii::Type.check_type(@fields, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "fields")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @sampling_rate = sampling_rate
  Jsii::Type.check_type(@sampling_rate, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "samplingRate")
end

Instance Attribute Details

#end_pointsAWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::CloudFront::CfnRealtimeLogConfig::EndPointProperty> (readonly)

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



28
29
30
# File 'cloud_front/cfn_realtime_log_config_props.rb', line 28

def end_points
  @end_points
end

#fieldsArray<String> (readonly)

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 in the Amazon CloudFront Developer Guide .



37
38
39
# File 'cloud_front/cfn_realtime_log_config_props.rb', line 37

def fields
  @fields
end

#nameString (readonly)

The unique name of this real-time log configuration.



42
43
44
# File 'cloud_front/cfn_realtime_log_config_props.rb', line 42

def name
  @name
end

#sampling_rateNumeric (readonly)

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.



49
50
51
# File 'cloud_front/cfn_realtime_log_config_props.rb', line 49

def sampling_rate
  @sampling_rate
end

Class Method Details

.jsii_propertiesObject



51
52
53
54
55
56
57
58
# File 'cloud_front/cfn_realtime_log_config_props.rb', line 51

def self.jsii_properties
  {
    :end_points => "endPoints",
    :fields => "fields",
    :name => "name",
    :sampling_rate => "samplingRate",
  }
end

Instance Method Details

#to_jsiiObject



60
61
62
63
64
65
66
67
68
69
# File 'cloud_front/cfn_realtime_log_config_props.rb', line 60

def to_jsii
  result = {}
  result.merge!({
    "endPoints" => @end_points,
    "fields" => @fields,
    "name" => @name,
    "samplingRate" => @sampling_rate,
  })
  result.compact
end