VpnConnection
- Implements: IVpnConnection
This class encapsulates and extends the ROS resource type ALIYUN::VPC::VpnConnection, which is used to create an IPsec-VPN connection.
Initializers
import com.aliyun.ros.cdk.vpc.VpnConnection;
VpnConnection.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.localSubnet(java.lang.String)
.localSubnet(IResolvable)
.remoteSubnet(java.lang.String)
.remoteSubnet(IResolvable)
.vpnGatewayId(java.lang.String)
.vpnGatewayId(IResolvable)
// .autoConfigRoute(java.lang.Boolean)
// .autoConfigRoute(IResolvable)
// .bgpConfig(IResolvable)
// .bgpConfig(BgpConfigProperty)
// .customerGatewayId(java.lang.String)
// .customerGatewayId(IResolvable)
// .effectImmediately(java.lang.Boolean)
// .effectImmediately(IResolvable)
// .enableDpd(java.lang.Boolean)
// .enableDpd(IResolvable)
// .enableNatTraversal(java.lang.Boolean)
// .enableNatTraversal(IResolvable)
// .enableTunnelsBgp(java.lang.Boolean)
// .enableTunnelsBgp(IResolvable)
// .healthCheckConfig(IResolvable)
// .healthCheckConfig(HealthCheckConfigProperty)
// .ikeConfig(IResolvable)
// .ikeConfig(IkeConfigProperty)
// .ipsecConfig(IResolvable)
// .ipsecConfig(IpsecConfigProperty)
// .name(java.lang.String)
// .name(IResolvable)
// .remoteCaCertificate(java.lang.String)
// .remoteCaCertificate(IResolvable)
// .tunnelOptionsSpecification(IResolvable)
// .tunnelOptionsSpecification(java.util.List<IResolvable)
// .tunnelOptionsSpecification(TunnelOptionsSpecificationProperty>)
.build();
| Name | Type | Description |
|---|---|---|
scope | com.aliyun.ros.cdk.core.Construct | No description. |
id | java.lang.String | No description. |
enableResourcePropertyConstraint | java.lang.Boolean | No description. |
localSubnet | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property localSubnet: The CIDR block of the virtual private cloud (VPC) that needs to communicate with the on-premises database. |
remoteSubnet | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property remoteSubnet: The CIDR block of the on-premises database that needs to communicate with the VPC. |
vpnGatewayId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vpnGatewayId: ID of the VPN gateway. |
autoConfigRoute | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property autoConfigRoute: Specifies whether to automatically configure routes. |
bgpConfig | com.aliyun.ros.cdk.core.IResolvable OR BgpConfigProperty | Property bgpConfig: The Border Gateway Protocol (BGP) configuration. |
customerGatewayId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property customerGatewayId: The ID of the user gateway. |
effectImmediately | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property effectImmediately: Whether to delete the currently negotiated IPsec tunnel and re-initiate the negotiation. |
enableDpd | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property enableDpd: Specifies whether to enable the dead peer detection (DPD) feature. |
enableNatTraversal | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property enableNatTraversal: Specifies whether to enable NAT traversal. |
enableTunnelsBgp | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property enableTunnelsBgp: Specifies whether to enable the BGP feature for the tunnel. |
healthCheckConfig | com.aliyun.ros.cdk.core.IResolvable OR HealthCheckConfigProperty | Property healthCheckConfig: This parameter is available if you create an IPsec-VPN connection in single-tunnel mode. |
ikeConfig | com.aliyun.ros.cdk.core.IResolvable OR IkeConfigProperty | Property ikeConfig: Configuration information for the first phase of negotiation. |
ipsecConfig | com.aliyun.ros.cdk.core.IResolvable OR IpsecConfigProperty | Property ipsecConfig: Configuration information for the second phase negotiation. |
name | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property name: The name of the IPsec-VPN connection. |
remoteCaCertificate | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property remoteCaCertificate: The peer CA certificate when a ShangMi (SM) VPN gateway is used to establish the IPsec-VPN connection. |
tunnelOptionsSpecification | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property tunnelOptionsSpecification: TunnelOptionsSpecification parameters are supported by dual-tunnel IPsec-VPN gateways. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
localSubnetRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property localSubnet: The CIDR block of the virtual private cloud (VPC) that needs to communicate with the on-premises database.
The CIDR block is used in Phase 2 negotiations. Separate multiple CIDR blocks with commas (,). Example: 192.168.1.0/24,192.168.2.0/24. The following routing modes are supported:
- If you set LocalSubnet and RemoteSubnet to 0.0.0.0/0, the routing mode of the IPsec-VPN connection is set to Destination Routing Mode.
- If you set LocalSubnet and RemoteSubnet to specific CIDR blocks, the routing mode of the IPsec-VPN connection is set to Protected Data Flows.
remoteSubnetRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property remoteSubnet: The CIDR block of the on-premises database that needs to communicate with the VPC.
The CIDR block is used in Phase 2 negotiations. Separate multiple CIDR blocks with commas (,). Example: 192.168.3.0/24,192.168.4.0/24. The following routing modes are supported:
- If you set LocalSubnet and RemoteSubnet to 0.0.0.0/0...
vpnGatewayIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpnGatewayId: ID of the VPN gateway.
autoConfigRouteOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property autoConfigRoute: Specifies whether to automatically configure routes.
Valid values: true (default) false
bgpConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR BgpConfigProperty
Property bgpConfig: The Border Gateway Protocol (BGP) configuration.
This parameter is required when the VPN gateway has dynamic BGP enabled. Before you configure BGP, we recommend that you learn about how BGP works and its limits. For more information, see VPN Gateway supports BGP dynamic routing. We recommend that you use a private ASN to establish a connection with Alibaba Cloud over BGP. Refer to the relevant documentation for the private ASN range.
customerGatewayIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property customerGatewayId: The ID of the user gateway.
effectImmediatelyOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property effectImmediately: Whether to delete the currently negotiated IPsec tunnel and re-initiate the negotiation.
Value: True: Negotiate immediately after the configuration is complete. False (default): Negotiate when traffic enters.
enableDpdOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property enableDpd: Specifies whether to enable the dead peer detection (DPD) feature.
Valid values: true (default) The initiator of the IPsec-VPN connection sends DPD packets to verify the existence and availability of the peer. If no response is received from the peer within a specified period of time, the connection fails. ISAKMP SAs and IPsec SAs are deleted. The IPsec tunnel is also deleted. false: disables DPD. The IPsec initiator does not send DPD packets.
enableNatTraversalOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property enableNatTraversal: Specifies whether to enable NAT traversal.
Valid values: true (default) After NAT traversal is enabled, the initiator does not check the UDP ports during IKE negotiations and can automatically discover NAT gateway devices along the VPN tunnel. false
enableTunnelsBgpOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property enableTunnelsBgp: Specifies whether to enable the BGP feature for the tunnel.
Valid values: true and false. Default value: false.
healthCheckConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR HealthCheckConfigProperty
Property healthCheckConfig: This parameter is available if you create an IPsec-VPN connection in single-tunnel mode.
The health check configuration:
- HealthCheckConfig.enable: ... Default value: false.
- HealthCheckConfig.dip / sip / interval (Default: 3) / retry (Default: 3) / Policy (revoke_route default / reserve_route).
ikeConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR IkeConfigProperty
Property ikeConfig: Configuration information for the first phase of negotiation.
ipsecConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR IpsecConfigProperty
Property ipsecConfig: Configuration information for the second phase negotiation.
nameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property name: The name of the IPsec-VPN connection.
The name must be 1 to 100 characters in length and cannot start with http:\/\/ or https:\/\/.
remoteCaCertificateOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property remoteCaCertificate: The peer CA certificate when a ShangMi (SM) VPN gateway is used to establish the IPsec-VPN connection.
This parameter is required when an SM VPN gateway is used to establish the IPsec-VPN connection. You can ignore this parameter when a standard VPN gateway is used to create the IPsec-VPN connection.
tunnelOptionsSpecificationOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
TunnelOptionsSpecificationProperty>
Property tunnelOptionsSpecification: TunnelOptionsSpecification parameters are supported by dual-tunnel IPsec-VPN gateways.
You can modify both the active and standby tunnels of the IPsec-VPN connection.
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of this construct. |
synthesize | Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition | No description. |
addCount | No description. |
addDependency | No description. |
addResourceDesc | No description. |
applyRemovalPolicy | No description. |
fetchCondition | No description. |
fetchDependency | No description. |
fetchResourceDesc | No description. |
getAtt | No description. |
setMetadata | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
fetchCondition
public RosCondition fetchCondition()
fetchDependency
public java.util.List<java.lang.String> fetchDependency()
fetchResourceDesc
public java.lang.String fetchResourceDesc()
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
| Name | Description |
|---|---|
isConstruct | Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.vpc.VpnConnection;
VpnConnection.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node | com.aliyun.ros.cdk.core.ConstructNode | The construct tree node associated with this construct. |
env | com.aliyun.ros.cdk.core.IResourceEnvironment | The environment this resource belongs to. |
ref | java.lang.String | No description. |
stack | com.aliyun.ros.cdk.core.Stack | The stack in which this resource is defined. |
resource | com.aliyun.ros.cdk.core.RosResource | No description. |
attrPeerVpnConnectionConfig | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute PeerVpnConnectionConfig: Peer vpc connection config. |
attrStatus | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Status: Status of the IPsec connection. |
attrVpnConnectionId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VpnConnectionId: ID of the IPsec connection. |
props | VpnConnectionProps | No description. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
envRequired
public IResourceEnvironment getEnv();
- Type: com.aliyun.ros.cdk.core.IResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
refRequired
public java.lang.String getRef();
- Type: java.lang.String
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrPeerVpnConnectionConfigRequired
public java.lang.Object getAttrPeerVpnConnectionConfig();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute PeerVpnConnectionConfig: Peer vpc connection config.
attrStatusRequired
public java.lang.Object getAttrStatus();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Status: Status of the IPsec connection.
attrVpnConnectionIdRequired
public java.lang.Object getAttrVpnConnectionId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute VpnConnectionId: ID of the IPsec connection.
propsRequired
public VpnConnectionProps getProps();
- Type: VpnConnectionProps