Class: AWSCDK::EC2::AclTraffic
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::EC2::AclTraffic
- Defined in:
- ec2/acl_traffic.rb
Overview
The traffic that is configured using a Network ACL entry.
Class Method Summary collapse
-
.all_traffic ⇒ AWSCDK::EC2::AclTraffic
Apply the ACL entry to all traffic.
-
.icmp(props) ⇒ AWSCDK::EC2::AclTraffic
Apply the ACL entry to ICMP traffic of given type and code.
-
.icmpv6(props) ⇒ AWSCDK::EC2::AclTraffic
Apply the ACL entry to ICMPv6 traffic of given type and code.
- .jsii_overridable_methods ⇒ Object
-
.tcp_port(port) ⇒ AWSCDK::EC2::AclTraffic
Apply the ACL entry to TCP traffic on a given port.
-
.tcp_port_range(start_port, end_port) ⇒ AWSCDK::EC2::AclTraffic
Apply the ACL entry to TCP traffic on a given port range.
-
.udp_port(port) ⇒ AWSCDK::EC2::AclTraffic
Apply the ACL entry to UDP traffic on a given port.
-
.udp_port_range(start_port, end_port) ⇒ AWSCDK::EC2::AclTraffic
Apply the ACL entry to UDP traffic on a given port range.
Instance Method Summary collapse
-
#initialize ⇒ AclTraffic
constructor
A new instance of AclTraffic.
- #to_traffic_config ⇒ AWSCDK::EC2::AclTrafficConfig
Constructor Details
#initialize ⇒ AclTraffic
Returns a new instance of AclTraffic.
8 9 10 |
# File 'ec2/acl_traffic.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.all_traffic ⇒ AWSCDK::EC2::AclTraffic
Apply the ACL entry to all traffic.
21 22 23 |
# File 'ec2/acl_traffic.rb', line 21 def self.all_traffic() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ec2.AclTraffic", "allTraffic", []) end |
.icmp(props) ⇒ AWSCDK::EC2::AclTraffic
Apply the ACL entry to ICMP traffic of given type and code.
29 30 31 32 33 |
# File 'ec2/acl_traffic.rb', line 29 def self.icmp(props) props = props.is_a?(Hash) ? ::AWSCDK::EC2::AclIcmp.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkFjbEljbXAifQ==")), "props") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ec2.AclTraffic", "icmp", [props]) end |
.icmpv6(props) ⇒ AWSCDK::EC2::AclTraffic
Apply the ACL entry to ICMPv6 traffic of given type and code.
Requires an IPv6 CIDR block.
41 42 43 44 45 |
# File 'ec2/acl_traffic.rb', line 41 def self.icmpv6(props) props = props.is_a?(Hash) ? ::AWSCDK::EC2::AclIcmp.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkFjbEljbXAifQ==")), "props") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ec2.AclTraffic", "icmpv6", [props]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 |
# File 'ec2/acl_traffic.rb', line 12 def self.jsii_overridable_methods { :to_traffic_config => { kind: :method, name: "toTrafficConfig", is_optional: false }, } end |
.tcp_port(port) ⇒ AWSCDK::EC2::AclTraffic
Apply the ACL entry to TCP traffic on a given port.
51 52 53 54 |
# File 'ec2/acl_traffic.rb', line 51 def self.tcp_port(port) Jsii::Type.check_type(port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ec2.AclTraffic", "tcpPort", [port]) end |
.tcp_port_range(start_port, end_port) ⇒ AWSCDK::EC2::AclTraffic
Apply the ACL entry to TCP traffic on a given port range.
61 62 63 64 65 |
# File 'ec2/acl_traffic.rb', line 61 def self.tcp_port_range(start_port, end_port) Jsii::Type.check_type(start_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "startPort") Jsii::Type.check_type(end_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "endPort") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ec2.AclTraffic", "tcpPortRange", [start_port, end_port]) end |
.udp_port(port) ⇒ AWSCDK::EC2::AclTraffic
Apply the ACL entry to UDP traffic on a given port.
71 72 73 74 |
# File 'ec2/acl_traffic.rb', line 71 def self.udp_port(port) Jsii::Type.check_type(port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ec2.AclTraffic", "udpPort", [port]) end |
.udp_port_range(start_port, end_port) ⇒ AWSCDK::EC2::AclTraffic
Apply the ACL entry to UDP traffic on a given port range.
81 82 83 84 85 |
# File 'ec2/acl_traffic.rb', line 81 def self.udp_port_range(start_port, end_port) Jsii::Type.check_type(start_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "startPort") Jsii::Type.check_type(end_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "endPort") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_ec2.AclTraffic", "udpPortRange", [start_port, end_port]) end |
Instance Method Details
#to_traffic_config ⇒ AWSCDK::EC2::AclTrafficConfig
88 89 90 |
# File 'ec2/acl_traffic.rb', line 88 def to_traffic_config() jsii_call_method("toTrafficConfig", []) end |