Class CfnRouteProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnRouteProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRouteProps>
- Enclosing interface:
- CfnRouteProps
@Stability(Stable)
public static final class CfnRouteProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRouteProps>
A builder for
CfnRouteProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.carrierGatewayId
(String carrierGatewayId) Sets the value ofCfnRouteProps.getCarrierGatewayId()
destinationCidrBlock
(String destinationCidrBlock) Sets the value ofCfnRouteProps.getDestinationCidrBlock()
destinationIpv6CidrBlock
(String destinationIpv6CidrBlock) Sets the value ofCfnRouteProps.getDestinationIpv6CidrBlock()
egressOnlyInternetGatewayId
(String egressOnlyInternetGatewayId) Sets the value ofCfnRouteProps.getEgressOnlyInternetGatewayId()
Sets the value ofCfnRouteProps.getGatewayId()
instanceId
(String instanceId) Sets the value ofCfnRouteProps.getInstanceId()
localGatewayId
(String localGatewayId) Sets the value ofCfnRouteProps.getLocalGatewayId()
natGatewayId
(String natGatewayId) Sets the value ofCfnRouteProps.getNatGatewayId()
networkInterfaceId
(String networkInterfaceId) Sets the value ofCfnRouteProps.getNetworkInterfaceId()
routeTableId
(String routeTableId) Sets the value ofCfnRouteProps.getRouteTableId()
transitGatewayId
(String transitGatewayId) Sets the value ofCfnRouteProps.getTransitGatewayId()
vpcEndpointId
(String vpcEndpointId) Sets the value ofCfnRouteProps.getVpcEndpointId()
vpcPeeringConnectionId
(String vpcPeeringConnectionId) Sets the value ofCfnRouteProps.getVpcPeeringConnectionId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
routeTableId
Sets the value ofCfnRouteProps.getRouteTableId()
- Parameters:
routeTableId
- The ID of the route table for the route. This parameter is required.- Returns:
this
-
carrierGatewayId
Sets the value ofCfnRouteProps.getCarrierGatewayId()
- Parameters:
carrierGatewayId
- The ID of the carrier gateway. You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone.- Returns:
this
-
destinationCidrBlock
Sets the value ofCfnRouteProps.getDestinationCidrBlock()
- Parameters:
destinationCidrBlock
- The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify100.68.0.18/18
, we modify it to100.68.0.0/18
.- Returns:
this
-
destinationIpv6CidrBlock
@Stability(Stable) public CfnRouteProps.Builder destinationIpv6CidrBlock(String destinationIpv6CidrBlock) Sets the value ofCfnRouteProps.getDestinationIpv6CidrBlock()
- Parameters:
destinationIpv6CidrBlock
- The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.- Returns:
this
-
egressOnlyInternetGatewayId
@Stability(Stable) public CfnRouteProps.Builder egressOnlyInternetGatewayId(String egressOnlyInternetGatewayId) Sets the value ofCfnRouteProps.getEgressOnlyInternetGatewayId()
- Parameters:
egressOnlyInternetGatewayId
- [IPv6 traffic only] The ID of an egress-only internet gateway.- Returns:
this
-
gatewayId
Sets the value ofCfnRouteProps.getGatewayId()
- Parameters:
gatewayId
- The ID of an internet gateway or virtual private gateway attached to your VPC.- Returns:
this
-
instanceId
Sets the value ofCfnRouteProps.getInstanceId()
- Parameters:
instanceId
- The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.- Returns:
this
-
localGatewayId
Sets the value ofCfnRouteProps.getLocalGatewayId()
- Parameters:
localGatewayId
- The ID of the local gateway.- Returns:
this
-
natGatewayId
Sets the value ofCfnRouteProps.getNatGatewayId()
- Parameters:
natGatewayId
- [IPv4 traffic only] The ID of a NAT gateway.- Returns:
this
-
networkInterfaceId
Sets the value ofCfnRouteProps.getNetworkInterfaceId()
- Parameters:
networkInterfaceId
- The ID of a network interface.- Returns:
this
-
transitGatewayId
Sets the value ofCfnRouteProps.getTransitGatewayId()
- Parameters:
transitGatewayId
- The ID of a transit gateway.- Returns:
this
-
vpcEndpointId
Sets the value ofCfnRouteProps.getVpcEndpointId()
- Parameters:
vpcEndpointId
- The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.- Returns:
this
-
vpcPeeringConnectionId
@Stability(Stable) public CfnRouteProps.Builder vpcPeeringConnectionId(String vpcPeeringConnectionId) Sets the value ofCfnRouteProps.getVpcPeeringConnectionId()
- Parameters:
vpcPeeringConnectionId
- The ID of a VPC peering connection.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnRouteProps>
- Returns:
- a new instance of
CfnRouteProps
- Throws:
NullPointerException
- if any required attribute was not provided
-