VpnGateway
- Implements: IVpnGateway
This class encapsulates and extends the ROS resource type ALIYUN::VPC::VpnGatewayThe , which resource creates a vpn gateway.
Initializers
import com.aliyun.ros.cdk.vpc.VpnGateway;
VpnGateway.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.bandwidth(java.lang.Number)
.bandwidth(IResolvable)
.vpcId(java.lang.String)
.vpcId(IResolvable)
// .autoPay(java.lang.Boolean)
// .autoPay(IResolvable)
// .description(java.lang.String)
// .description(IResolvable)
// .disasterRecoveryVSwitchId(java.lang.String)
// .disasterRecoveryVSwitchId(IResolvable)
// .enableIpsec(java.lang.Boolean)
// .enableIpsec(IResolvable)
// .enableSsl(java.lang.Boolean)
// .enableSsl(IResolvable)
// .instanceChargeType(java.lang.String)
// .instanceChargeType(IResolvable)
// .name(java.lang.String)
// .name(IResolvable)
// .networkType(java.lang.String)
// .networkType(IResolvable)
// .period(java.lang.Number)
// .period(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .sslConnections(java.lang.Number)
// .sslConnections(IResolvable)
// .tags(java.util.List<TagsProperty>)
// .vpnType(java.lang.String)
// .vpnType(IResolvable)
// .vSwitchId(java.lang.String)
// .vSwitchId(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. |
bandwidth | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property bandwidth: The maximum bandwidth of the VPN gateway. |
vpcId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vpcId: VPC ID to which the VPN gateway belongs. |
autoPay | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property autoPay: Specifies whether to enable automatic payment. |
description | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property description: Description of the VPN gateway. |
disasterRecoveryVSwitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property disasterRecoveryVSwitchId: The second vSwitch with which you want to associate the VPN gateway. |
enableIpsec | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property enableIpsec: Whether to enable IPsec-VPN. |
enableSsl | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property enableSsl: Enable the SSL-VPN function. |
instanceChargeType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property instanceChargeType: The billing method of the VPN gateway. |
name | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property name: Name of the VPN gateway. |
networkType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property networkType: The network type of the VPN gateway. |
period | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property period: Purchase time, value: 1~9|12|24|36. |
resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: The ID of the resource group to which the VPN gateway belongs. |
sslConnections | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property sslConnections: The maximum number of clients that can be connected at the same time. |
tags | java.util.List<TagsProperty> | Property tags: Tags to attach to instance. |
vpnType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vpnType: The type of the VPN gateway. |
vSwitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vSwitchId: The vSwitch with which you want to associate the VPN gateway. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
bandwidthRequired
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property bandwidth: The maximum bandwidth of the VPN gateway.
Unit: Mbit/s.
- If you want to create a public VPN gateway, valid values are 10, 100, 200, 500, and 1000.
- If you want to create a private VPN gateway, valid values are 200 and 1000.
The maximum bandwidth supported by VPN gateways in some regions is 500 Mbit/s.
vpcIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpcId: VPC ID to which the VPN gateway belongs.
autoPayOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property autoPay: Specifies whether to enable automatic payment.
Valid values:
- true
- false (default)
To create a VPN gateway, we recommend that you enable automatic payment. If you disable automatic payment, you must manually pay the bill to create the VPN gateway.
descriptionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: Description of the VPN gateway.
The length is 2-256 characters and must start with a letter or Chinese, but cannot start with http:// or https://.
disasterRecoveryVSwitchIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property disasterRecoveryVSwitchId: The second vSwitch with which you want to associate the VPN gateway.
If you call this operation in a region that supports the dual-tunnel mode, this parameter is required. You need to specify two vSwitches in different zones from the VPC associated with the VPN gateway to implement disaster recovery across zones. For a region that supports only one zone, disaster recovery across zones is not supported. We recommend that you specify two vSwitches in the zone to implement high availability. You can specify the same vSwitch. For more information about the regions and zones that support the dual-tunnel mode, see Upgrade a VPN gateway to enable the dual-tunnel mode.
enableIpsecOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property enableIpsec: Whether to enable IPsec-VPN.
The IPsec-VPN feature provides a site-to-site connection. You can securely connect your local data center network to a private network or two proprietary networks by creating an IPsec tunnel. Value: True (default): Enables the IPsec-VPN feature. False: The IPsec-VPN function is not enabled.
enableSslOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property enableSsl: Enable the SSL-VPN function.
Provide point-to-site VPN connection, no need to configure customer gateway, terminal directly access. Value: True: Enable SSL-VPN. False (default): Does not enable SSL-VPN.
instanceChargeTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceChargeType: The billing method of the VPN gateway.
Set the value to POSTPAY, which specifies the pay-as-you-go billing method.
nameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property name: Name of the VPN gateway.
The default value is the ID of the VPN gateway. The length is 2~100 English or Chinese characters. It must start with a large or small letter or Chinese. It can contain numbers, underscores (_) and dashes (-). It cannot start with http:// or https://.
networkTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property networkType: The network type of the VPN gateway.
Valid values:
- public (default)
- private
periodOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property period: Purchase time, value: 1~9|12|24|36.
When the value of the InstanceChargeType parameter is PREPAY, this parameter is mandatory.
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: The ID of the resource group to which the VPN gateway belongs.
- If you do not specify a resource group ID, the VPN gateway will belong to the default resource group after creation.
- After the VPN gateway is created, if you create SSL server, SSL client certificate, IPsec server, or IPsec connection (in the scenario where the IPsec connection is bound to the VPN gateway), these resources will directly belong to the resource group of the VPN gateway and cannot be modified.
If you change the resource group of the VPN gateway, the resource group of the above resources will also be changed.
sslConnectionsOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property sslConnections: The maximum number of clients that can be connected at the same time.
Valid values: 5 (default), 10, 20, 50, 100, 200, 500, and 1000.
tagsOptional
- Type: java.util.List<TagsProperty>
Property tags: Tags to attach to instance.
Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.
vpnTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpnType: The type of the VPN gateway.
Valid values: Set the value to Normal (default), which specifies a standard NAT gateway.
vSwitchIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vSwitchId: The vSwitch with which you want to associate the VPN gateway.
- If you call this operation in a region that supports the IPsec-VPN connections in dual-tunnel mode, this parameter is required. You must specify a vSwitch and specify DisasterRecoveryVSwitchId.
- If you call this operation in a region that supports the IPsec-VPN connections in single-tunnel mode and do not specify a vSwitch, the system automatically specifies a vSwitch.
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.VpnGateway;
VpnGateway.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. |
attrArn | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Arn: The Alibaba Cloud Resource Name (ARN). |
attrDisasterRecoveryInternetIp | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute DisasterRecoveryInternetIp: The second IP address assigned by the system to create an IPsec-VPN connection.This attribute is returned only when the VPN gateway supports the dual-tunnel mode. |
attrDisasterRecoveryVSwitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute DisasterRecoveryVSwitchId: The ID of the second vSwitch associated with the VPN gateway.This attribute is returned only when the VPN gateway supports the dual-tunnel mode. |
attrInternetIp | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InternetIp: The public IP address of the VPN gateway. |
attrOrderId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute OrderId: The order ID. |
attrSpec | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Spec: The specification of the VPN gateway. |
attrSslMaxConnections | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute SslMaxConnections: The maximum number of concurrent SSL-VPN connections. |
attrSslVpnInternetIp | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute SslVpnInternetIp: The IP address of the SSL-VPN connection.This attribute is returned only when the VPN gateway is a public VPN gateway and supports only the single-tunnel mode. In addition, the VPN gateway must have the SSL-VPN feature enabled. |
attrVpcId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VpcId: The ID of the virtual private cloud (VPC) to which the VPN gateway belongs. |
attrVpnGatewayId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VpnGatewayId: ID of the VPN gateway. |
attrVpnType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VpnType: The type of the VPN gateway. |
attrVSwitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VSwitchId: The ID of the vSwitch to which the VPN gateway belongs. |
props | VpnGatewayProps | 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
attrArnRequired
public java.lang.Object getAttrArn();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Arn: The Alibaba Cloud Resource Name (ARN).
attrDisasterRecoveryInternetIpRequired
public java.lang.Object getAttrDisasterRecoveryInternetIp();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute DisasterRecoveryInternetIp: The second IP address assigned by the system to create an IPsec-VPN connection.This attribute is returned only when the VPN gateway supports the dual-tunnel mode.
attrDisasterRecoveryVSwitchIdRequired
public java.lang.Object getAttrDisasterRecoveryVSwitchId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute DisasterRecoveryVSwitchId: The ID of the second vSwitch associated with the VPN gateway.This attribute is returned only when the VPN gateway supports the dual-tunnel mode.
attrInternetIpRequired
public java.lang.Object getAttrInternetIp();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InternetIp: The public IP address of the VPN gateway.
attrOrderIdRequired
public java.lang.Object getAttrOrderId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute OrderId: The order ID.
attrSpecRequired
public java.lang.Object getAttrSpec();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Spec: The specification of the VPN gateway.
attrSslMaxConnectionsRequired
public java.lang.Object getAttrSslMaxConnections();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute SslMaxConnections: The maximum number of concurrent SSL-VPN connections.
attrSslVpnInternetIpRequired
public java.lang.Object getAttrSslVpnInternetIp();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute SslVpnInternetIp: The IP address of the SSL-VPN connection.This attribute is returned only when the VPN gateway is a public VPN gateway and supports only the single-tunnel mode. In addition, the VPN gateway must have the SSL-VPN feature enabled.
attrVpcIdRequired
public java.lang.Object getAttrVpcId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute VpcId: The ID of the virtual private cloud (VPC) to which the VPN gateway belongs.
attrVpnGatewayIdRequired
public java.lang.Object getAttrVpnGatewayId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute VpnGatewayId: ID of the VPN gateway.
attrVpnTypeRequired
public java.lang.Object getAttrVpnType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute VpnType: The type of the VPN gateway.
attrVSwitchIdRequired
public java.lang.Object getAttrVSwitchId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute VSwitchId: The ID of the vSwitch to which the VPN gateway belongs.
propsRequired
public VpnGatewayProps getProps();
- Type: VpnGatewayProps