Class: AWSCDK::EC2::FlowLogDestination
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::EC2::FlowLogDestination
- Defined in:
- ec2/flow_log_destination.rb
Overview
The destination type for the flow log.
Class Method Summary collapse
- .jsii_overridable_methods ⇒ Object
-
.to_cloud_watch_logs(log_group = nil, iam_role = nil) ⇒ AWSCDK::EC2::FlowLogDestination
Use CloudWatch logs as the destination.
-
.to_firehose(delivery_stream, iam_role = nil) ⇒ AWSCDK::EC2::FlowLogDestination
Use Amazon Data Firehose as the destination.
-
.to_kinesis_data_firehose_destination(delivery_stream_arn) ⇒ AWSCDK::EC2::FlowLogDestination
deprecated
Deprecated.
use
toFirehose -
.to_s3(bucket = nil, key_prefix = nil, options = nil) ⇒ AWSCDK::EC2::FlowLogDestination
Use S3 as the destination.
Instance Method Summary collapse
-
#bind(scope, flow_log) ⇒ AWSCDK::EC2::FlowLogDestinationConfig
Generates a flow log destination configuration.
-
#initialize ⇒ FlowLogDestination
constructor
A new instance of FlowLogDestination.
Constructor Details
#initialize ⇒ FlowLogDestination
Returns a new instance of FlowLogDestination.
8 9 10 |
# File 'ec2/flow_log_destination.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 |
# File 'ec2/flow_log_destination.rb', line 12 def self.jsii_overridable_methods { :bind => { kind: :method, name: "bind", is_optional: false }, } end |
.to_cloud_watch_logs(log_group = nil, iam_role = nil) ⇒ AWSCDK::EC2::FlowLogDestination
Use CloudWatch logs as the destination.
23 24 25 26 27 |
# File 'ec2/flow_log_destination.rb', line 23 def self.to_cloud_watch_logs(log_group = nil, iam_role = nil) Jsii::Type.check_type(log_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sb2dzLklMb2dHcm91cFJlZiJ9")), "logGroup") unless log_group.nil? Jsii::Type.check_type(iam_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "iamRole") unless iam_role.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ec2.FlowLogDestination", "toCloudWatchLogs", [log_group, iam_role]) end |
.to_firehose(delivery_stream, iam_role = nil) ⇒ AWSCDK::EC2::FlowLogDestination
Use Amazon Data Firehose as the destination.
If the delivery stream and the VPC are in different account, you must specify iam_role.
37 38 39 40 41 |
# File 'ec2/flow_log_destination.rb', line 37 def self.to_firehose(delivery_stream, iam_role = nil) Jsii::Type.check_type(delivery_stream, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19raW5lc2lzZmlyZWhvc2UuSURlbGl2ZXJ5U3RyZWFtUmVmIn0=")), "deliveryStream") Jsii::Type.check_type(iam_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "iamRole") unless iam_role.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ec2.FlowLogDestination", "toFirehose", [delivery_stream, iam_role]) end |
.to_kinesis_data_firehose_destination(delivery_stream_arn) ⇒ AWSCDK::EC2::FlowLogDestination
Deprecated.
use toFirehose
Use Amazon Data Firehose as the destination.
48 49 50 51 |
# File 'ec2/flow_log_destination.rb', line 48 def self.to_kinesis_data_firehose_destination(delivery_stream_arn) Jsii::Type.check_type(delivery_stream_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deliveryStreamArn") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ec2.FlowLogDestination", "toKinesisDataFirehoseDestination", [delivery_stream_arn]) end |
.to_s3(bucket = nil, key_prefix = nil, options = nil) ⇒ AWSCDK::EC2::FlowLogDestination
Use S3 as the destination.
59 60 61 62 63 64 65 |
# File 'ec2/flow_log_destination.rb', line 59 def self.to_s3(bucket = nil, key_prefix = nil, = nil) Jsii::Type.check_type(bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket") unless bucket.nil? Jsii::Type.check_type(key_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyPrefix") unless key_prefix.nil? = .is_a?(Hash) ? ::AWSCDK::EC2::S3DestinationOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlMzRGVzdGluYXRpb25PcHRpb25zIn0=")), "options") unless .nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ec2.FlowLogDestination", "toS3", [bucket, key_prefix, ]) end |
Instance Method Details
#bind(scope, flow_log) ⇒ AWSCDK::EC2::FlowLogDestinationConfig
Generates a flow log destination configuration.
72 73 74 75 76 |
# File 'ec2/flow_log_destination.rb', line 72 def bind(scope, flow_log) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(flow_log, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkZsb3dMb2cifQ==")), "flowLog") jsii_call_method("bind", [scope, flow_log]) end |