Class: AWSCDK::EC2::FlowLogProps
- Inherits:
-
FlowLogOptions
- Object
- FlowLogOptions
- AWSCDK::EC2::FlowLogProps
- Defined in:
- ec2/flow_log_props.rb
Overview
Properties of a VPC Flow Log.
Instance Attribute Summary collapse
-
#destination ⇒ AWSCDK::EC2::FlowLogDestination?
readonly
Specifies the type of destination to which the flow log data is to be published.
-
#flow_log_name ⇒ String?
readonly
The name of the FlowLog.
-
#log_format ⇒ Array<AWSCDK::EC2::LogFormat>?
readonly
The fields to include in the flow log record, in the order in which they should appear.
-
#max_aggregation_interval ⇒ AWSCDK::EC2::FlowLogMaxAggregationInterval?
readonly
The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record.
-
#resource_type ⇒ AWSCDK::EC2::FlowLogResourceType
readonly
The type of resource for which to create the flow log.
-
#traffic_type ⇒ AWSCDK::EC2::FlowLogTrafficType?
readonly
The type of traffic to log.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(destination: nil, log_format: nil, max_aggregation_interval: nil, traffic_type: nil, resource_type:, flow_log_name: nil) ⇒ FlowLogProps
constructor
A new instance of FlowLogProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(destination: nil, log_format: nil, max_aggregation_interval: nil, traffic_type: nil, resource_type:, flow_log_name: nil) ⇒ FlowLogProps
Returns a new instance of FlowLogProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'ec2/flow_log_props.rb', line 13 def initialize(destination: nil, log_format: nil, max_aggregation_interval: nil, traffic_type: nil, resource_type:, flow_log_name: nil) @destination = destination Jsii::Type.check_type(@destination, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkZsb3dMb2dEZXN0aW5hdGlvbiJ9")), "destination") unless @destination.nil? @log_format = log_format Jsii::Type.check_type(@log_format, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuTG9nRm9ybWF0In0sImtpbmQiOiJhcnJheSJ9fQ==")), "logFormat") unless @log_format.nil? @max_aggregation_interval = max_aggregation_interval Jsii::Type.check_type(@max_aggregation_interval, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkZsb3dMb2dNYXhBZ2dyZWdhdGlvbkludGVydmFsIn0=")), "maxAggregationInterval") unless @max_aggregation_interval.nil? @traffic_type = traffic_type Jsii::Type.check_type(@traffic_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkZsb3dMb2dUcmFmZmljVHlwZSJ9")), "trafficType") unless @traffic_type.nil? @resource_type = resource_type Jsii::Type.check_type(@resource_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkZsb3dMb2dSZXNvdXJjZVR5cGUifQ==")), "resourceType") @flow_log_name = flow_log_name Jsii::Type.check_type(@flow_log_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "flowLogName") unless @flow_log_name.nil? end |
Instance Attribute Details
#destination ⇒ AWSCDK::EC2::FlowLogDestination? (readonly)
Default: FlowLogDestinationType.toCloudWatchLogs()
Specifies the type of destination to which the flow log data is to be published.
Flow log data can be published to CloudWatch Logs or Amazon S3
34 35 36 |
# File 'ec2/flow_log_props.rb', line 34 def destination @destination end |
#flow_log_name ⇒ String? (readonly)
Default: CDK generated name
The name of the FlowLog.
Since the FlowLog resource doesn't support providing a physical name, the value provided here will be recorded in the Name tag.
73 74 75 |
# File 'ec2/flow_log_props.rb', line 73 def flow_log_name @flow_log_name end |
#log_format ⇒ Array<AWSCDK::EC2::LogFormat>? (readonly)
Default: - default log format is used.
The fields to include in the flow log record, in the order in which they should appear.
If multiple fields are specified, they will be separated by spaces. For full control over the literal log format
string, pass a single field constructed with LogFormat.custom().
See https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records
44 45 46 |
# File 'ec2/flow_log_props.rb', line 44 def log_format @log_format end |
#max_aggregation_interval ⇒ AWSCDK::EC2::FlowLogMaxAggregationInterval? (readonly)
Default: - FlowLogMaxAggregationInterval.ONE_MINUTES if creating flow logs for Transit Gateway, otherwise FlowLogMaxAggregationInterval.TEN_MINUTES.
The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record.
When creating flow logs for a Transit Gateway or Transit Gateway Attachment, this property must be ONE_MINUTES.
53 54 55 |
# File 'ec2/flow_log_props.rb', line 53 def max_aggregation_interval @max_aggregation_interval end |
#resource_type ⇒ AWSCDK::EC2::FlowLogResourceType (readonly)
The type of resource for which to create the flow log.
66 67 68 |
# File 'ec2/flow_log_props.rb', line 66 def resource_type @resource_type end |
#traffic_type ⇒ AWSCDK::EC2::FlowLogTrafficType? (readonly)
Default: ALL
The type of traffic to log.
You can log traffic that the resource accepts or rejects, or all traffic.
When the target is either TransitGateway or TransitGatewayAttachment, setting the traffic type is not possible.
62 63 64 |
# File 'ec2/flow_log_props.rb', line 62 def traffic_type @traffic_type end |
Class Method Details
.jsii_properties ⇒ Object
75 76 77 78 79 80 81 82 83 84 |
# File 'ec2/flow_log_props.rb', line 75 def self.jsii_properties { :destination => "destination", :log_format => "logFormat", :max_aggregation_interval => "maxAggregationInterval", :traffic_type => "trafficType", :resource_type => "resourceType", :flow_log_name => "flowLogName", } end |
Instance Method Details
#to_jsii ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'ec2/flow_log_props.rb', line 86 def to_jsii result = {} result.merge!(super) result.merge!({ "destination" => @destination, "logFormat" => @log_format, "maxAggregationInterval" => @max_aggregation_interval, "trafficType" => @traffic_type, "resourceType" => @resource_type, "flowLogName" => @flow_log_name, }) result.compact end |