Class: AWSCDK::EC2::DestinationOptions
- Inherits:
-
S3DestinationOptions
- Object
- S3DestinationOptions
- AWSCDK::EC2::DestinationOptions
- Defined in:
- ec2/destination_options.rb
Overview
Options for writing logs to a destination.
TODO: there are other destination options, currently they are only for s3 destinations (not sure if that will change)
Instance Attribute Summary collapse
-
#file_format ⇒ AWSCDK::EC2::FlowLogFileFormat?
readonly
The format for the flow log.
-
#hive_compatible_partitions ⇒ Boolean?
readonly
Use Hive-compatible prefixes for flow logs stored in Amazon S3.
-
#per_hour_partition ⇒ Boolean?
readonly
Partition the flow log per hour.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file_format: nil, hive_compatible_partitions: nil, per_hour_partition: nil) ⇒ DestinationOptions
constructor
A new instance of DestinationOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(file_format: nil, hive_compatible_partitions: nil, per_hour_partition: nil) ⇒ DestinationOptions
Returns a new instance of DestinationOptions.
13 14 15 16 17 18 19 20 |
# File 'ec2/destination_options.rb', line 13 def initialize(file_format: nil, hive_compatible_partitions: nil, per_hour_partition: nil) @file_format = file_format Jsii::Type.check_type(@file_format, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkZsb3dMb2dGaWxlRm9ybWF0In0=")), "fileFormat") unless @file_format.nil? @hive_compatible_partitions = hive_compatible_partitions Jsii::Type.check_type(@hive_compatible_partitions, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "hiveCompatiblePartitions") unless @hive_compatible_partitions.nil? @per_hour_partition = per_hour_partition Jsii::Type.check_type(@per_hour_partition, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "perHourPartition") unless @per_hour_partition.nil? end |
Instance Attribute Details
#file_format ⇒ AWSCDK::EC2::FlowLogFileFormat? (readonly)
Note:
Default: FlowLogFileFormat.PLAIN_TEXT
The format for the flow log.
26 27 28 |
# File 'ec2/destination_options.rb', line 26 def file_format @file_format end |
#hive_compatible_partitions ⇒ Boolean? (readonly)
Note:
Default: false
Use Hive-compatible prefixes for flow logs stored in Amazon S3.
31 32 33 |
# File 'ec2/destination_options.rb', line 31 def hive_compatible_partitions @hive_compatible_partitions end |
#per_hour_partition ⇒ Boolean? (readonly)
Note:
Default: false
Partition the flow log per hour.
36 37 38 |
# File 'ec2/destination_options.rb', line 36 def per_hour_partition @per_hour_partition end |
Class Method Details
.jsii_properties ⇒ Object
38 39 40 41 42 43 44 |
# File 'ec2/destination_options.rb', line 38 def self.jsii_properties { :file_format => "fileFormat", :hive_compatible_partitions => "hiveCompatiblePartitions", :per_hour_partition => "perHourPartition", } end |
Instance Method Details
#to_jsii ⇒ Object
46 47 48 49 50 51 52 53 54 55 |
# File 'ec2/destination_options.rb', line 46 def to_jsii result = {} result.merge!(super) result.merge!({ "fileFormat" => @file_format, "hiveCompatiblePartitions" => @hive_compatible_partitions, "perHourPartition" => @per_hour_partition, }) result.compact end |