Class: AWSCDK::EC2::AllocatedSubnet
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::AllocatedSubnet
- Defined in:
- ec2/allocated_subnet.rb
Overview
CIDR Allocated Subnet.
Instance Attribute Summary collapse
-
#cidr ⇒ String
readonly
IPv4 CIDR Allocations for a Subnet.
-
#ipv6_cidr ⇒ String?
readonly
IPv6 CIDR Allocations for a Subnet.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cidr:, ipv6_cidr: nil) ⇒ AllocatedSubnet
constructor
A new instance of AllocatedSubnet.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cidr:, ipv6_cidr: nil) ⇒ AllocatedSubnet
Returns a new instance of AllocatedSubnet.
9 10 11 12 13 14 |
# File 'ec2/allocated_subnet.rb', line 9 def initialize(cidr:, ipv6_cidr: nil) @cidr = cidr Jsii::Type.check_type(@cidr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cidr") @ipv6_cidr = ipv6_cidr Jsii::Type.check_type(@ipv6_cidr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipv6Cidr") unless @ipv6_cidr.nil? end |
Instance Attribute Details
#cidr ⇒ String (readonly)
IPv4 CIDR Allocations for a Subnet.
Note this is specific to the IPv4 CIDR.
21 22 23 |
# File 'ec2/allocated_subnet.rb', line 21 def cidr @cidr end |
#ipv6_cidr ⇒ String? (readonly)
Note:
Default: - no IPV6 CIDR
IPv6 CIDR Allocations for a Subnet.
Note this is specific to the IPv6 CIDR.
28 29 30 |
# File 'ec2/allocated_subnet.rb', line 28 def ipv6_cidr @ipv6_cidr end |
Class Method Details
.jsii_properties ⇒ Object
30 31 32 33 34 35 |
# File 'ec2/allocated_subnet.rb', line 30 def self.jsii_properties { :cidr => "cidr", :ipv6_cidr => "ipv6Cidr", } end |
Instance Method Details
#to_jsii ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'ec2/allocated_subnet.rb', line 37 def to_jsii result = {} result.merge!({ "cidr" => @cidr, "ipv6Cidr" => @ipv6_cidr, }) result.compact end |