@Generated(value="jsii-pacmak/1.46.0 (build cd08c55)", date="2021-11-25T20:11:06.080Z") @Stability(value=Experimental) public enum SubnetType extends Enum<SubnetType>
Example:
// Example automatically generated from non-compiling source. May contain errors.
Vpc vpc = Vpc.Builder.create(this, "VPC")
.subnetConfiguration(List.of(SubnetConfiguration.builder()
.subnetType(SubnetType.PUBLIC)
.name("Public")
.build(), SubnetConfiguration.builder()
.subnetType(SubnetType.ISOLATED)
.name("Isolated")
.build()))
.build();
((Subnet)vpc.isolatedSubnets[0]).addRoute("StaticRoute", AddRouteOptions.builder()
.routerId(vpc.getInternetGatewayId())
.routerType(RouterType.GATEWAY)
.destinationCidrBlock("8.8.8.8/32")
.build());
| Enum Constant and Description |
|---|
PUBLIC
(experimental) Subnet connected to the Internet.
|
| Modifier and Type | Method and Description |
|---|---|
static SubnetType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SubnetType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Experimental) public static final SubnetType PUBLIC
Instances in a Public subnet can connect to the Internet and can be connected to from the Internet as long as they are launched with public IPs (controlled on the AutoScalingGroup or other constructs that launch instances).
Public subnets route outbound traffic via an Internet Gateway.
public static SubnetType[] values()
for (SubnetType c : SubnetType.values()) System.out.println(c);
public static SubnetType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2021. All rights reserved.