Class VpnConnectionProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.VpnConnectionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<VpnConnectionProps>
- Enclosing interface:
VpnConnectionProps
@Stability(Stable)
public static final class VpnConnectionProps.Builder
extends Object
implements software.amazon.jsii.Builder<VpnConnectionProps>
A builder for
VpnConnectionProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofVpnConnectionOptions.getAsn()
build()
Builds the configured instance.Sets the value ofVpnConnectionOptions.getIp()
staticRoutes
(List<String> staticRoutes) Sets the value ofVpnConnectionOptions.getStaticRoutes()
tunnelOptions
(List<? extends VpnTunnelOption> tunnelOptions) Sets the value ofVpnConnectionOptions.getTunnelOptions()
Sets the value ofVpnConnectionProps.getVpc()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
vpc
Sets the value ofVpnConnectionProps.getVpc()
- Parameters:
vpc
- The VPC to connect to. This parameter is required.- Returns:
this
-
ip
Sets the value ofVpnConnectionOptions.getIp()
- Parameters:
ip
- The ip address of the customer gateway. This parameter is required.- Returns:
this
-
asn
Sets the value ofVpnConnectionOptions.getAsn()
- Parameters:
asn
- The ASN of the customer gateway.- Returns:
this
-
staticRoutes
Sets the value ofVpnConnectionOptions.getStaticRoutes()
- Parameters:
staticRoutes
- The static routes to be routed from the VPN gateway to the customer gateway.- Returns:
this
-
tunnelOptions
@Stability(Stable) public VpnConnectionProps.Builder tunnelOptions(List<? extends VpnTunnelOption> tunnelOptions) Sets the value ofVpnConnectionOptions.getTunnelOptions()
- Parameters:
tunnelOptions
- The tunnel options for the VPN connection. At most two elements (one per tunnel). Duplicates not allowed.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<VpnConnectionProps>
- Returns:
- a new instance of
VpnConnectionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-