Class: AWSCDK::EC2::CfnNetworkInsightsAnalysis::AnalysisAclRuleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnNetworkInsightsAnalysis::AnalysisAclRuleProperty
- Defined in:
- ec2/cfn_network_insights_analysis.rb
Overview
Describes a network access control (ACL) rule.
Instance Attribute Summary collapse
-
#cidr ⇒ String?
readonly
The IPv4 address range, in CIDR notation.
-
#egress ⇒ Boolean, ...
readonly
Indicates whether the rule is an outbound rule.
-
#port_range ⇒ AWSCDK::IResolvable, ...
readonly
The range of ports.
-
#protocol ⇒ String?
readonly
The protocol.
-
#rule_action ⇒ String?
readonly
Indicates whether to allow or deny traffic that matches the rule.
-
#rule_number ⇒ Numeric?
readonly
The rule number.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cidr: nil, egress: nil, port_range: nil, protocol: nil, rule_action: nil, rule_number: nil) ⇒ AnalysisAclRuleProperty
constructor
A new instance of AnalysisAclRuleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cidr: nil, egress: nil, port_range: nil, protocol: nil, rule_action: nil, rule_number: nil) ⇒ AnalysisAclRuleProperty
Returns a new instance of AnalysisAclRuleProperty.
790 791 792 793 794 795 796 797 798 799 800 801 802 803 |
# File 'ec2/cfn_network_insights_analysis.rb', line 790 def initialize(cidr: nil, egress: nil, port_range: nil, protocol: nil, rule_action: nil, rule_number: nil) @cidr = cidr Jsii::Type.check_type(@cidr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cidr") unless @cidr.nil? @egress = egress Jsii::Type.check_type(@egress, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "egress") unless @egress.nil? @port_range = port_range.is_a?(Hash) ? ::AWSCDK::EC2::CfnNetworkInsightsAnalysis::PortRangeProperty.new(**port_range.transform_keys(&:to_sym)) : port_range Jsii::Type.check_type(@port_range, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTmV0d29ya0luc2lnaHRzQW5hbHlzaXMuUG9ydFJhbmdlUHJvcGVydHkifV19fQ==")), "portRange") unless @port_range.nil? @protocol = protocol Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protocol") unless @protocol.nil? @rule_action = rule_action Jsii::Type.check_type(@rule_action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ruleAction") unless @rule_action.nil? @rule_number = rule_number Jsii::Type.check_type(@rule_number, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "ruleNumber") unless @rule_number.nil? end |
Instance Attribute Details
#cidr ⇒ String? (readonly)
The IPv4 address range, in CIDR notation.
809 810 811 |
# File 'ec2/cfn_network_insights_analysis.rb', line 809 def cidr @cidr end |
#egress ⇒ Boolean, ... (readonly)
Indicates whether the rule is an outbound rule.
814 815 816 |
# File 'ec2/cfn_network_insights_analysis.rb', line 814 def egress @egress end |
#port_range ⇒ AWSCDK::IResolvable, ... (readonly)
The range of ports.
819 820 821 |
# File 'ec2/cfn_network_insights_analysis.rb', line 819 def port_range @port_range end |
#protocol ⇒ String? (readonly)
The protocol.
824 825 826 |
# File 'ec2/cfn_network_insights_analysis.rb', line 824 def protocol @protocol end |
#rule_action ⇒ String? (readonly)
Indicates whether to allow or deny traffic that matches the rule.
829 830 831 |
# File 'ec2/cfn_network_insights_analysis.rb', line 829 def rule_action @rule_action end |
#rule_number ⇒ Numeric? (readonly)
The rule number.
834 835 836 |
# File 'ec2/cfn_network_insights_analysis.rb', line 834 def rule_number @rule_number end |
Class Method Details
.jsii_properties ⇒ Object
836 837 838 839 840 841 842 843 844 845 |
# File 'ec2/cfn_network_insights_analysis.rb', line 836 def self.jsii_properties { :cidr => "cidr", :egress => "egress", :port_range => "portRange", :protocol => "protocol", :rule_action => "ruleAction", :rule_number => "ruleNumber", } end |
Instance Method Details
#to_jsii ⇒ Object
847 848 849 850 851 852 853 854 855 856 857 858 |
# File 'ec2/cfn_network_insights_analysis.rb', line 847 def to_jsii result = {} result.merge!({ "cidr" => @cidr, "egress" => @egress, "portRange" => @port_range, "protocol" => @protocol, "ruleAction" => @rule_action, "ruleNumber" => @rule_number, }) result.compact end |