Class SelectedSubnets.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.SelectedSubnets.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<SelectedSubnets>
- Enclosing interface:
- SelectedSubnets
@Stability(Stable)
public static final class SelectedSubnets.Builder
extends Object
implements software.amazon.jsii.Builder<SelectedSubnets>
A builder for
SelectedSubnets
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavailabilityZones
(List<String> availabilityZones) Sets the value ofSelectedSubnets.getAvailabilityZones()
build()
Builds the configured instance.Sets the value ofSelectedSubnets.getHasPublic()
internetConnectivityEstablished
(IDependable internetConnectivityEstablished) Sets the value ofSelectedSubnets.getInternetConnectivityEstablished()
isPendingLookup
(Boolean isPendingLookup) Sets the value ofSelectedSubnets.getIsPendingLookup()
Sets the value ofSelectedSubnets.getSubnetIds()
Sets the value ofSelectedSubnets.getSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
availabilityZones
Sets the value ofSelectedSubnets.getAvailabilityZones()
- Parameters:
availabilityZones
- The respective AZs of each subnet. This parameter is required.- Returns:
this
-
hasPublic
Sets the value ofSelectedSubnets.getHasPublic()
- Parameters:
hasPublic
- Whether any of the given subnets are from the VPC's public subnets. This parameter is required.- Returns:
this
-
internetConnectivityEstablished
@Stability(Stable) public SelectedSubnets.Builder internetConnectivityEstablished(IDependable internetConnectivityEstablished) Sets the value ofSelectedSubnets.getInternetConnectivityEstablished()
- Parameters:
internetConnectivityEstablished
- Dependency representing internet connectivity for these subnets. This parameter is required.- Returns:
this
-
subnetIds
Sets the value ofSelectedSubnets.getSubnetIds()
- Parameters:
subnetIds
- The subnet IDs. This parameter is required.- Returns:
this
-
subnets
Sets the value ofSelectedSubnets.getSubnets()
- Parameters:
subnets
- Selected subnet objects. This parameter is required.- Returns:
this
-
isPendingLookup
Sets the value ofSelectedSubnets.getIsPendingLookup()
- Parameters:
isPendingLookup
- 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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<SelectedSubnets>
- Returns:
- a new instance of
SelectedSubnets
- Throws:
NullPointerException
- if any required attribute was not provided
-