Class: AWSCDK::EC2::FlowLogDestinationConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::FlowLogDestinationConfig
- Defined in:
- ec2/flow_log_destination_config.rb
Overview
Flow Log Destination configuration.
Instance Attribute Summary collapse
-
#delivery_stream ⇒ AWSCDK::Interfaces::AWSKinesisfirehose::IDeliveryStreamRef?
readonly
The Amazon Data Firehose delivery stream to publish the flow logs to.
-
#delivery_stream_arn ⇒ String?
readonly
deprecated
Deprecated.
use deliveryStream
-
#destination_options ⇒ AWSCDK::EC2::DestinationOptions?
readonly
Options for writing flow logs to a supported destination.
-
#iam_role ⇒ AWSCDK::IAM::IRole?
readonly
The IAM role that allows Amazon EC2 to publish flow logs to the log destination.
-
#key_prefix ⇒ String?
readonly
S3 bucket key prefix to publish the flow logs to.
-
#log_destination_type ⇒ AWSCDK::EC2::FlowLogDestinationType
readonly
The type of destination to publish the flow logs to.
-
#log_group ⇒ AWSCDK::Interfaces::AWSLogs::ILogGroupRef?
readonly
The CloudWatch Logs Log Group to publish the flow logs to.
-
#s3_bucket ⇒ AWSCDK::S3::IBucket?
readonly
S3 bucket to publish the flow logs to.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(log_destination_type:, delivery_stream: nil, delivery_stream_arn: nil, destination_options: nil, iam_role: nil, key_prefix: nil, log_group: nil, s3_bucket: nil) ⇒ FlowLogDestinationConfig
constructor
A new instance of FlowLogDestinationConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(log_destination_type:, delivery_stream: nil, delivery_stream_arn: nil, destination_options: nil, iam_role: nil, key_prefix: nil, log_group: nil, s3_bucket: nil) ⇒ FlowLogDestinationConfig
Returns a new instance of FlowLogDestinationConfig.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'ec2/flow_log_destination_config.rb', line 15 def initialize(log_destination_type:, delivery_stream: nil, delivery_stream_arn: nil, destination_options: nil, iam_role: nil, key_prefix: nil, log_group: nil, s3_bucket: nil) @log_destination_type = log_destination_type Jsii::Type.check_type(@log_destination_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkZsb3dMb2dEZXN0aW5hdGlvblR5cGUifQ==")), "logDestinationType") @delivery_stream = delivery_stream Jsii::Type.check_type(@delivery_stream, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19raW5lc2lzZmlyZWhvc2UuSURlbGl2ZXJ5U3RyZWFtUmVmIn0=")), "deliveryStream") unless @delivery_stream.nil? @delivery_stream_arn = delivery_stream_arn Jsii::Type.check_type(@delivery_stream_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deliveryStreamArn") unless @delivery_stream_arn.nil? @destination_options = .is_a?(Hash) ? ::AWSCDK::EC2::DestinationOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@destination_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkRlc3RpbmF0aW9uT3B0aW9ucyJ9")), "destinationOptions") unless @destination_options.nil? @iam_role = iam_role Jsii::Type.check_type(@iam_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "iamRole") unless @iam_role.nil? @key_prefix = key_prefix Jsii::Type.check_type(@key_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyPrefix") unless @key_prefix.nil? @log_group = log_group Jsii::Type.check_type(@log_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sb2dzLklMb2dHcm91cFJlZiJ9")), "logGroup") unless @log_group.nil? @s3_bucket = s3_bucket Jsii::Type.check_type(@s3_bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "s3Bucket") unless @s3_bucket.nil? end |
Instance Attribute Details
#delivery_stream ⇒ AWSCDK::Interfaces::AWSKinesisfirehose::IDeliveryStreamRef? (readonly)
Default: - undefined
The Amazon Data Firehose delivery stream to publish the flow logs to.
43 44 45 |
# File 'ec2/flow_log_destination_config.rb', line 43 def delivery_stream @delivery_stream end |
#delivery_stream_arn ⇒ String? (readonly)
use deliveryStream
Default: - undefined
The ARN of Amazon Data Firehose delivery stream to publish the flow logs to.
49 50 51 |
# File 'ec2/flow_log_destination_config.rb', line 49 def delivery_stream_arn @delivery_stream_arn end |
#destination_options ⇒ AWSCDK::EC2::DestinationOptions? (readonly)
Default: - undefined
Options for writing flow logs to a supported destination.
54 55 56 |
# File 'ec2/flow_log_destination_config.rb', line 54 def @destination_options end |
#iam_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - default IAM role is created for you if the destination type is CloudWatch logs
The IAM role that allows Amazon EC2 to publish flow logs to the log destination.
Required if the destination type is CloudWatch logs, or if the destination type is Amazon Data Firehose delivery stream and the delivery stream and the VPC are in different accounts.
61 62 63 |
# File 'ec2/flow_log_destination_config.rb', line 61 def iam_role @iam_role end |
#key_prefix ⇒ String? (readonly)
Default: - undefined
S3 bucket key prefix to publish the flow logs to.
66 67 68 |
# File 'ec2/flow_log_destination_config.rb', line 66 def key_prefix @key_prefix end |
#log_destination_type ⇒ AWSCDK::EC2::FlowLogDestinationType (readonly)
Default: - CLOUD_WATCH_LOGS
The type of destination to publish the flow logs to.
38 39 40 |
# File 'ec2/flow_log_destination_config.rb', line 38 def log_destination_type @log_destination_type end |
#log_group ⇒ AWSCDK::Interfaces::AWSLogs::ILogGroupRef? (readonly)
Default: - default log group is created for you
The CloudWatch Logs Log Group to publish the flow logs to.
71 72 73 |
# File 'ec2/flow_log_destination_config.rb', line 71 def log_group @log_group end |
#s3_bucket ⇒ AWSCDK::S3::IBucket? (readonly)
Default: - undefined
S3 bucket to publish the flow logs to.
76 77 78 |
# File 'ec2/flow_log_destination_config.rb', line 76 def s3_bucket @s3_bucket end |
Class Method Details
.jsii_properties ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'ec2/flow_log_destination_config.rb', line 78 def self.jsii_properties { :log_destination_type => "logDestinationType", :delivery_stream => "deliveryStream", :delivery_stream_arn => "deliveryStreamArn", :destination_options => "destinationOptions", :iam_role => "iamRole", :key_prefix => "keyPrefix", :log_group => "logGroup", :s3_bucket => "s3Bucket", } end |
Instance Method Details
#to_jsii ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'ec2/flow_log_destination_config.rb', line 91 def to_jsii result = {} result.merge!({ "logDestinationType" => @log_destination_type, "deliveryStream" => @delivery_stream, "deliveryStreamArn" => @delivery_stream_arn, "destinationOptions" => @destination_options, "iamRole" => @iam_role, "keyPrefix" => @key_prefix, "logGroup" => @log_group, "s3Bucket" => @s3_bucket, }) result.compact end |