Class: AWSCDK::CXAPI::VPCSubnet Deprecated
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CXAPI::VPCSubnet
- Defined in:
- cxapi/vpc_subnet.rb
Overview
Deprecated.
The definition of this type has moved to @aws-cdk/cloud-assembly-api.
A subnet representation that the VPC provider uses.
Instance Attribute Summary collapse
-
#availability_zone ⇒ String
readonly
The code of the availability zone this subnet is in (for example, 'us-west-2a').
-
#cidr ⇒ String?
readonly
CIDR range of the subnet.
-
#route_table_id ⇒ String
readonly
The identifier of the route table for this subnet.
-
#subnet_id ⇒ String
readonly
The identifier of the subnet.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(availability_zone:, route_table_id:, subnet_id:, cidr: nil) ⇒ VPCSubnet
constructor
A new instance of VPCSubnet.
- #to_jsii ⇒ Object
Constructor Details
#initialize(availability_zone:, route_table_id:, subnet_id:, cidr: nil) ⇒ VPCSubnet
Returns a new instance of VPCSubnet.
13 14 15 16 17 18 19 20 21 22 |
# File 'cxapi/vpc_subnet.rb', line 13 def initialize(availability_zone:, route_table_id:, subnet_id:, cidr: nil) @availability_zone = availability_zone Jsii::Type.check_type(@availability_zone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "availabilityZone") @route_table_id = route_table_id Jsii::Type.check_type(@route_table_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "routeTableId") @subnet_id = subnet_id Jsii::Type.check_type(@subnet_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subnetId") @cidr = cidr Jsii::Type.check_type(@cidr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cidr") unless @cidr.nil? end |
Instance Attribute Details
#availability_zone ⇒ String (readonly)
The code of the availability zone this subnet is in (for example, 'us-west-2a').
27 28 29 |
# File 'cxapi/vpc_subnet.rb', line 27 def availability_zone @availability_zone end |
#cidr ⇒ String? (readonly)
Note:
Default: - CIDR information not available
CIDR range of the subnet.
40 41 42 |
# File 'cxapi/vpc_subnet.rb', line 40 def cidr @cidr end |
#route_table_id ⇒ String (readonly)
The identifier of the route table for this subnet.
31 32 33 |
# File 'cxapi/vpc_subnet.rb', line 31 def route_table_id @route_table_id end |
#subnet_id ⇒ String (readonly)
The identifier of the subnet.
35 36 37 |
# File 'cxapi/vpc_subnet.rb', line 35 def subnet_id @subnet_id end |
Class Method Details
.jsii_properties ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'cxapi/vpc_subnet.rb', line 42 def self.jsii_properties { :availability_zone => "availabilityZone", :route_table_id => "routeTableId", :subnet_id => "subnetId", :cidr => "cidr", } end |
Instance Method Details
#to_jsii ⇒ Object
51 52 53 54 55 56 57 58 59 60 |
# File 'cxapi/vpc_subnet.rb', line 51 def to_jsii result = {} result.merge!({ "availabilityZone" => @availability_zone, "routeTableId" => @route_table_id, "subnetId" => @subnet_id, "cidr" => @cidr, }) result.compact end |