Class AddRouteOptions.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.AddRouteOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AddRouteOptions>
- Enclosing interface:
- AddRouteOptions
@Stability(Stable)
public static final class AddRouteOptions.Builder
extends Object
implements software.amazon.jsii.Builder<AddRouteOptions>
A builder for
AddRouteOptions-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.destinationCidrBlock(String destinationCidrBlock) Sets the value ofAddRouteOptions.getDestinationCidrBlock()destinationIpv6CidrBlock(String destinationIpv6CidrBlock) Sets the value ofAddRouteOptions.getDestinationIpv6CidrBlock()enablesInternetConnectivity(Boolean enablesInternetConnectivity) Sets the value ofAddRouteOptions.getEnablesInternetConnectivity()Sets the value ofAddRouteOptions.getRouterId()routerType(RouterType routerType) Sets the value ofAddRouteOptions.getRouterType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
routerId
Sets the value ofAddRouteOptions.getRouterId()- Parameters:
routerId- The ID of the router. This parameter is required. Can be an instance ID, gateway ID, etc, depending on the router type.- Returns:
this
-
routerType
Sets the value ofAddRouteOptions.getRouterType()- Parameters:
routerType- What type of router to route this traffic to. This parameter is required.- Returns:
this
-
destinationCidrBlock
Sets the value ofAddRouteOptions.getDestinationCidrBlock()- Parameters:
destinationCidrBlock- IPv4 range this route applies to.- Returns:
this
-
destinationIpv6CidrBlock
@Stability(Stable) public AddRouteOptions.Builder destinationIpv6CidrBlock(String destinationIpv6CidrBlock) Sets the value ofAddRouteOptions.getDestinationIpv6CidrBlock()- Parameters:
destinationIpv6CidrBlock- IPv6 range this route applies to.- Returns:
this
-
enablesInternetConnectivity
@Stability(Stable) public AddRouteOptions.Builder enablesInternetConnectivity(Boolean enablesInternetConnectivity) Sets the value ofAddRouteOptions.getEnablesInternetConnectivity()- Parameters:
enablesInternetConnectivity- 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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<AddRouteOptions>- Returns:
- a new instance of
AddRouteOptions - Throws:
NullPointerException- if any required attribute was not provided
-