Class CfnRoute.Builder

java.lang.Object
software.amazon.awscdk.services.ec2.CfnRoute.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRoute>
Enclosing class:
CfnRoute

@Stability(Stable) public static final class CfnRoute.Builder extends Object implements software.amazon.jsii.Builder<CfnRoute>
A fluent builder for CfnRoute.
  • Method Details

    • create

      @Stability(Stable) public static CfnRoute.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnRoute.Builder.
    • routeTableId

      @Stability(Stable) public CfnRoute.Builder routeTableId(String routeTableId)
      The ID of the route table for the route.

      Parameters:
      routeTableId - The ID of the route table for the route. This parameter is required.
      Returns:
      this
    • carrierGatewayId

      @Stability(Stable) public CfnRoute.Builder carrierGatewayId(String 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.

      Parameters:
      carrierGatewayId - The ID of the carrier gateway. This parameter is required.
      Returns:
      this
    • destinationCidrBlock

      @Stability(Stable) public CfnRoute.Builder destinationCidrBlock(String 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 specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 .

      Parameters:
      destinationCidrBlock - The IPv4 CIDR address block used for the destination match. This parameter is required.
      Returns:
      this
    • destinationIpv6CidrBlock

      @Stability(Stable) public CfnRoute.Builder destinationIpv6CidrBlock(String destinationIpv6CidrBlock)
      The IPv6 CIDR block used for the destination match.

      Routing decisions are based on the most specific match.

      Parameters:
      destinationIpv6CidrBlock - The IPv6 CIDR block used for the destination match. This parameter is required.
      Returns:
      this
    • egressOnlyInternetGatewayId

      @Stability(Stable) public CfnRoute.Builder egressOnlyInternetGatewayId(String egressOnlyInternetGatewayId)
      [IPv6 traffic only] The ID of an egress-only internet gateway.

      Parameters:
      egressOnlyInternetGatewayId - [IPv6 traffic only] The ID of an egress-only internet gateway. This parameter is required.
      Returns:
      this
    • gatewayId

      @Stability(Stable) public CfnRoute.Builder gatewayId(String gatewayId)
      The ID of an internet gateway or virtual private gateway attached to your VPC.

      Parameters:
      gatewayId - The ID of an internet gateway or virtual private gateway attached to your VPC. This parameter is required.
      Returns:
      this
    • instanceId

      @Stability(Stable) public CfnRoute.Builder instanceId(String 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.

      Parameters:
      instanceId - The ID of a NAT instance in your VPC. This parameter is required.
      Returns:
      this
    • localGatewayId

      @Stability(Stable) public CfnRoute.Builder localGatewayId(String localGatewayId)
      The ID of the local gateway.

      Parameters:
      localGatewayId - The ID of the local gateway. This parameter is required.
      Returns:
      this
    • natGatewayId

      @Stability(Stable) public CfnRoute.Builder natGatewayId(String natGatewayId)
      [IPv4 traffic only] The ID of a NAT gateway.

      Parameters:
      natGatewayId - [IPv4 traffic only] The ID of a NAT gateway. This parameter is required.
      Returns:
      this
    • networkInterfaceId

      @Stability(Stable) public CfnRoute.Builder networkInterfaceId(String networkInterfaceId)
      The ID of a network interface.

      Parameters:
      networkInterfaceId - The ID of a network interface. This parameter is required.
      Returns:
      this
    • transitGatewayId

      @Stability(Stable) public CfnRoute.Builder transitGatewayId(String transitGatewayId)
      The ID of a transit gateway.

      Parameters:
      transitGatewayId - The ID of a transit gateway. This parameter is required.
      Returns:
      this
    • vpcEndpointId

      @Stability(Stable) public CfnRoute.Builder vpcEndpointId(String vpcEndpointId)
      The ID of a VPC endpoint.

      Supported for Gateway Load Balancer endpoints only.

      Parameters:
      vpcEndpointId - The ID of a VPC endpoint. This parameter is required.
      Returns:
      this
    • vpcPeeringConnectionId

      @Stability(Stable) public CfnRoute.Builder vpcPeeringConnectionId(String vpcPeeringConnectionId)
      The ID of a VPC peering connection.

      Parameters:
      vpcPeeringConnectionId - The ID of a VPC peering connection. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnRoute build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnRoute>
      Returns:
      a newly built instance of CfnRoute.