Class VpnConnection.Builder

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

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

    • create

      @Stability(Stable) public static VpnConnection.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of VpnConnection.Builder.
    • ip

      @Stability(Stable) public VpnConnection.Builder ip(String ip)
      The ip address of the customer gateway.

      Parameters:
      ip - The ip address of the customer gateway. This parameter is required.
      Returns:
      this
    • asn

      @Stability(Stable) public VpnConnection.Builder asn(Number asn)
      The ASN of the customer gateway.

      Default: 65000

      Parameters:
      asn - The ASN of the customer gateway. This parameter is required.
      Returns:
      this
    • staticRoutes

      @Stability(Stable) public VpnConnection.Builder staticRoutes(List<String> staticRoutes)
      The static routes to be routed from the VPN gateway to the customer gateway.

      Default: Dynamic routing (BGP)

      Parameters:
      staticRoutes - The static routes to be routed from the VPN gateway to the customer gateway. This parameter is required.
      Returns:
      this
    • tunnelOptions

      @Stability(Stable) public VpnConnection.Builder tunnelOptions(List<? extends VpnTunnelOption> tunnelOptions)
      The tunnel options for the VPN connection.

      At most two elements (one per tunnel). Duplicates not allowed.

      Default: Amazon generated tunnel options

      Parameters:
      tunnelOptions - The tunnel options for the VPN connection. This parameter is required.
      Returns:
      this
    • vpc

      @Stability(Stable) public VpnConnection.Builder vpc(IVpc vpc)
      The VPC to connect to.

      Parameters:
      vpc - The VPC to connect to. This parameter is required.
      Returns:
      this
    • build

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