Interface AddRouteOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
AddRouteOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:38.372Z")
@Stability(Stable)
public interface AddRouteOptions
extends software.amazon.jsii.JsiiSerializable
Options for adding a new route to a subnet.
Example:
Vpc vpc = Vpc.Builder.create(this, "VPC")
.subnetConfiguration(List.of(SubnetConfiguration.builder()
.subnetType(SubnetType.PUBLIC)
.name("Public")
.build(), SubnetConfiguration.builder()
.subnetType(SubnetType.PRIVATE_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());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forAddRouteOptionsstatic final classAn implementation forAddRouteOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic AddRouteOptions.Builderbuilder()default StringIPv4 range this route applies to.default StringIPv6 range this route applies to.default BooleanWhether this route will enable internet connectivity.The ID of the router.What type of router to route this traffic to.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getRouterId
The ID of the router.Can be an instance ID, gateway ID, etc, depending on the router type.
-
getRouterType
What type of router to route this traffic to. -
getDestinationCidrBlock
IPv4 range this route applies to.Default: '0.0.0.0/0'
-
getDestinationIpv6CidrBlock
IPv6 range this route applies to.Default: - Uses IPv6
-
getEnablesInternetConnectivity
Whether this route will enable internet connectivity.If true, this route will be added before any AWS resources that depend on internet connectivity in the VPC will be created.
Default: false
-
builder
- Returns:
- a
AddRouteOptions.BuilderofAddRouteOptions
-