VpnAttachment
This class encapsulates and extends the ROS resource type ALIYUN::VPC::VpnAttachment
, which is used to create an IPsec-VPN connection.
After you create the IPsec-VPN connection, you can associate the IPsec-VPN connection with a transit router.
Initializers
import com.aliyun.ros.cdk.vpc.VpnAttachment;
VpnAttachment.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.customerGatewayId(java.lang.String)
.customerGatewayId(IResolvable)
.localSubnet(java.lang.String)
.localSubnet(IResolvable)
.remoteSubnet(java.lang.String)
.remoteSubnet(IResolvable)
// .autoConfigRoute(java.lang.Boolean)
// .autoConfigRoute(IResolvable)
// .bgpConfig(IResolvable)
// .bgpConfig(BgpConfigProperty)
// .effectImmediately(java.lang.Boolean)
// .effectImmediately(IResolvable)
// .enableDpd(java.lang.Boolean)
// .enableDpd(IResolvable)
// .enableNatTraversal(java.lang.Boolean)
// .enableNatTraversal(IResolvable)
// .healthCheckConfig(IResolvable)
// .healthCheckConfig(HealthCheckConfigProperty)
// .ikeConfig(IResolvable)
// .ikeConfig(IkeConfigProperty)
// .ipsecConfig(IResolvable)
// .ipsecConfig(IpsecConfigProperty)
// .name(java.lang.String)
// .name(IResolvable)
// .networkType(java.lang.String)
// .networkType(IResolvable)
// .remoteCaCert(java.lang.String)
// .remoteCaCert(IResolvable)
.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. |
customerGatewayId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property customerGatewayId: The ID of the user gateway. |
localSubnet |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property localSubnet: A network segment on the VPC side that needs to be interconnected with the local IDC for the second phase negotiation. |
remoteSubnet |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property remoteSubnet: The network segment of the local IDC is used for the second phase negotiation. |
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. |
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. |
healthCheckConfig |
com.aliyun.ros.cdk.core.IResolvable OR HealthCheckConfigProperty |
Property healthCheckConfig: Whether to enable the health check configuration. |
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 connection. |
networkType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property networkType: The network type of the IPsec connection. |
remoteCaCert |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property remoteCaCert: The peer CA certificate when a ShangMi (SM) VPN gateway is used to establish the IPsec-VPN connection. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
customerGatewayId
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property customerGatewayId: The ID of the user gateway.
localSubnet
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property localSubnet: A network segment on the VPC side that needs to be interconnected with the local IDC for the second phase negotiation.
Multiple network segments are separated by commas, for example: 192.168.1.0/24, 192.168.2.0/24.
remoteSubnet
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property remoteSubnet: The network segment of the local IDC is used for the second phase negotiation.
Multiple network segments are separated by commas, for example: 192.168.3.0/24, 192.168.4.0/24.
autoConfigRoute
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property autoConfigRoute: Specifies whether to automatically configure routes.
Valid values: true (default) false
bgpConfig
Optional
- 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.
effectImmediately
Optional
- 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.
enableDpd
Optional
- 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.
enableNatTraversal
Optional
- 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
healthCheckConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR HealthCheckConfigProperty
Property healthCheckConfig: Whether to enable the health check configuration.
ikeConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR IkeConfigProperty
Property ikeConfig: Configuration information for the first phase of negotiation.
ipsecConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR IpsecConfigProperty
Property ipsecConfig: Configuration information for the second phase negotiation.
name
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property name: The name of the IPsec connection.
The length is 2-128 characters and must start with a letter or Chinese. It can contain numbers, periods (.), underscores (_) and dashes (-), but cannot start with http:// or https:// .
networkType
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property networkType: The network type of the IPsec connection.
Value: public|private.
remoteCaCert
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property remoteCaCert: 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.
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. |
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
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.VpnAttachment;
VpnAttachment.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. |
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. |
attrInternetIp |
com.aliyun.ros.cdk.core.IResolvable |
Attribute InternetIp: The gateway IP address of the IPsec connection. |
attrPeerVpnAttachmentConfig |
com.aliyun.ros.cdk.core.IResolvable |
Attribute PeerVpnAttachmentConfig: Peer vpc Attachment config. |
attrVpnAttachmentId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute VpnAttachmentId: ID of the IPsec attachment. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrInternetIp
Required
public IResolvable getAttrInternetIp();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute InternetIp: The gateway IP address of the IPsec connection.
attrPeerVpnAttachmentConfig
Required
public IResolvable getAttrPeerVpnAttachmentConfig();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute PeerVpnAttachmentConfig: Peer vpc Attachment config.
attrVpnAttachmentId
Required
public IResolvable getAttrVpnAttachmentId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute VpnAttachmentId: ID of the IPsec attachment.