Class: AWSCDK::EC2::S3DestinationOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/s3_destination_options.rb

Overview

Options for writing logs to a S3 destination.

Direct Known Subclasses

DestinationOptions

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_format: nil, hive_compatible_partitions: nil, per_hour_partition: nil) ⇒ S3DestinationOptions

Returns a new instance of S3DestinationOptions.

Parameters:

  • file_format (AWSCDK::EC2::FlowLogFileFormat, nil) (defaults to: nil)

    The format for the flow log.

  • hive_compatible_partitions (Boolean, nil) (defaults to: nil)

    Use Hive-compatible prefixes for flow logs stored in Amazon S3.

  • per_hour_partition (Boolean, nil) (defaults to: nil)

    Partition the flow log per hour.



10
11
12
13
14
15
16
17
# File 'ec2/s3_destination_options.rb', line 10

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_formatAWSCDK::EC2::FlowLogFileFormat? (readonly)

Note:

Default: FlowLogFileFormat.PLAIN_TEXT

The format for the flow log.



23
24
25
# File 'ec2/s3_destination_options.rb', line 23

def file_format
  @file_format
end

#hive_compatible_partitionsBoolean? (readonly)

Note:

Default: false

Use Hive-compatible prefixes for flow logs stored in Amazon S3.

Returns:

  • (Boolean, nil)


28
29
30
# File 'ec2/s3_destination_options.rb', line 28

def hive_compatible_partitions
  @hive_compatible_partitions
end

#per_hour_partitionBoolean? (readonly)

Note:

Default: false

Partition the flow log per hour.

Returns:

  • (Boolean, nil)


33
34
35
# File 'ec2/s3_destination_options.rb', line 33

def per_hour_partition
  @per_hour_partition
end

Class Method Details

.jsii_propertiesObject



35
36
37
38
39
40
41
# File 'ec2/s3_destination_options.rb', line 35

def self.jsii_properties
  {
    :file_format => "fileFormat",
    :hive_compatible_partitions => "hiveCompatiblePartitions",
    :per_hour_partition => "perHourPartition",
  }
end

Instance Method Details

#to_jsiiObject



43
44
45
46
47
48
49
50
51
# File 'ec2/s3_destination_options.rb', line 43

def to_jsii
  result = {}
  result.merge!({
    "fileFormat" => @file_format,
    "hiveCompatiblePartitions" => @hive_compatible_partitions,
    "perHourPartition" => @per_hour_partition,
  })
  result.compact
end