Class: AWSCDK::EC2::SelectedSubnets
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::SelectedSubnets
- Defined in:
- ec2/selected_subnets.rb
Overview
Result of selecting a subset of subnets from a VPC.
Instance Attribute Summary collapse
-
#availability_zones ⇒ Array<String>
readonly
The respective AZs of each subnet.
-
#has_public ⇒ Boolean
readonly
Whether any of the given subnets are from the VPC's public subnets.
-
#internet_connectivity_established ⇒ Constructs::IDependable
readonly
Dependency representing internet connectivity for these subnets.
-
#is_pending_lookup ⇒ Boolean?
readonly
The subnet selection is not actually real yet.
-
#subnet_ids ⇒ Array<String>
readonly
The subnet IDs.
-
#subnets ⇒ Array<AWSCDK::EC2::ISubnet>
readonly
Selected subnet objects.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(availability_zones:, has_public:, internet_connectivity_established:, subnet_ids:, subnets:, is_pending_lookup: nil) ⇒ SelectedSubnets
constructor
A new instance of SelectedSubnets.
- #to_jsii ⇒ Object
Constructor Details
#initialize(availability_zones:, has_public:, internet_connectivity_established:, subnet_ids:, subnets:, is_pending_lookup: nil) ⇒ SelectedSubnets
Returns a new instance of SelectedSubnets.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'ec2/selected_subnets.rb', line 13 def initialize(availability_zones:, has_public:, internet_connectivity_established:, subnet_ids:, subnets:, is_pending_lookup: nil) @availability_zones = availability_zones Jsii::Type.check_type(@availability_zones, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "availabilityZones") @has_public = has_public Jsii::Type.check_type(@has_public, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "hasPublic") @internet_connectivity_established = internet_connectivity_established Jsii::Type.check_type(@internet_connectivity_established, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklEZXBlbmRhYmxlIn0=")), "internetConnectivityEstablished") @subnet_ids = subnet_ids Jsii::Type.check_type(@subnet_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "subnetIds") @subnets = subnets Jsii::Type.check_type(@subnets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVN1Ym5ldCJ9LCJraW5kIjoiYXJyYXkifX0=")), "subnets") @is_pending_lookup = is_pending_lookup Jsii::Type.check_type(@is_pending_lookup, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "isPendingLookup") unless @is_pending_lookup.nil? end |
Instance Attribute Details
#availability_zones ⇒ Array<String> (readonly)
The respective AZs of each subnet.
31 32 33 |
# File 'ec2/selected_subnets.rb', line 31 def availability_zones @availability_zones end |
#has_public ⇒ Boolean (readonly)
Whether any of the given subnets are from the VPC's public subnets.
35 36 37 |
# File 'ec2/selected_subnets.rb', line 35 def has_public @has_public end |
#internet_connectivity_established ⇒ Constructs::IDependable (readonly)
Dependency representing internet connectivity for these subnets.
39 40 41 |
# File 'ec2/selected_subnets.rb', line 39 def internet_connectivity_established @internet_connectivity_established end |
#is_pending_lookup ⇒ Boolean? (readonly)
Default: false
The subnet selection is not actually real yet.
If this value is true, don't validate anything about the subnets. The count or identities are not known yet, and the validation will most likely fail which will prevent a successful lookup.
56 57 58 |
# File 'ec2/selected_subnets.rb', line 56 def is_pending_lookup @is_pending_lookup end |
#subnet_ids ⇒ Array<String> (readonly)
The subnet IDs.
43 44 45 |
# File 'ec2/selected_subnets.rb', line 43 def subnet_ids @subnet_ids end |
#subnets ⇒ Array<AWSCDK::EC2::ISubnet> (readonly)
Selected subnet objects.
47 48 49 |
# File 'ec2/selected_subnets.rb', line 47 def subnets @subnets end |
Class Method Details
.jsii_properties ⇒ Object
58 59 60 61 62 63 64 65 66 67 |
# File 'ec2/selected_subnets.rb', line 58 def self.jsii_properties { :availability_zones => "availabilityZones", :has_public => "hasPublic", :internet_connectivity_established => "internetConnectivityEstablished", :subnet_ids => "subnetIds", :subnets => "subnets", :is_pending_lookup => "isPendingLookup", } end |
Instance Method Details
#to_jsii ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'ec2/selected_subnets.rb', line 69 def to_jsii result = {} result.merge!({ "availabilityZones" => @availability_zones, "hasPublic" => @has_public, "internetConnectivityEstablished" => @internet_connectivity_established, "subnetIds" => @subnet_ids, "subnets" => @subnets, "isPendingLookup" => @is_pending_lookup, }) result.compact end |