VpnGateway
- Implements: IVpnGateway
This class encapsulates and extends the ROS resource type ALIYUN::VPC::VpnGatewayThe , which resource creates a vpn gateway.
Initializers
import ros_cdk_vpc
ros_cdk_vpc.VpnGateway(
scope: Construct,
id: str,
bandwidth: typing.Union[typing.Union[int, float], IResolvable],
vpc_id: typing.Union[str, IResolvable],
auto_pay: typing.Union[bool, IResolvable] = None,
description: typing.Union[str, IResolvable] = None,
disaster_recovery_v_switch_id: typing.Union[str, IResolvable] = None,
enable_ipsec: typing.Union[bool, IResolvable] = None,
enable_ssl: typing.Union[bool, IResolvable] = None,
instance_charge_type: typing.Union[str, IResolvable] = None,
name: typing.Union[str, IResolvable] = None,
network_type: typing.Union[str, IResolvable] = None,
period: typing.Union[typing.Union[int, float], IResolvable] = None,
resource_group_id: typing.Union[str, IResolvable] = None,
ssl_connections: typing.Union[typing.Union[int, float], IResolvable] = None,
tags: typing.List[TagsProperty] = None,
vpn_type: typing.Union[str, IResolvable] = None,
v_switch_id: typing.Union[str, IResolvable] = None,
enable_resource_property_constraint: bool = None
)
| Name | Type | Description |
|---|---|---|
scope | ros_cdk_core.Construct | No description. |
id | str | No description. |
bandwidth | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property bandwidth: The public network bandwidth of the VPN gateway, in Mbps. |
vpc_id | typing.Union[str, ros_cdk_core.IResolvable] | Property vpcId: VPC ID to which the VPN gateway belongs. |
auto_pay | typing.Union[bool, ros_cdk_core.IResolvable] | Property autoPay: Whether to automatically pay the bill of the VPN gateway, the value: true: Automatically pays the bill for the VPN gateway. |
description | typing.Union[str, ros_cdk_core.IResolvable] | Property description: Description of the VPN gateway. |
disaster_recovery_v_switch_id | typing.Union[str, ros_cdk_core.IResolvable] | Property disasterRecoveryVSwitchId: The second vSwitch with which you want to associate the VPN gateway. |
enable_ipsec | typing.Union[bool, ros_cdk_core.IResolvable] | Property enableIpsec: Whether to enable IPsec-VPN. |
enable_ssl | typing.Union[bool, ros_cdk_core.IResolvable] | Property enableSsl: Enable the SSL-VPN function. |
instance_charge_type | typing.Union[str, ros_cdk_core.IResolvable] | Property instanceChargeType: Accounting type of the VPN gateway, the value is: PREPAY, POSTPAY. |
name | typing.Union[str, ros_cdk_core.IResolvable] | Property name: Name of the VPN gateway. |
network_type | typing.Union[str, ros_cdk_core.IResolvable] | Property networkType: The network type of the VPN gateway. |
period | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property period: Purchase time, value: 1~9|12|24|36. |
resource_group_id | typing.Union[str, ros_cdk_core.IResolvable] | Property resourceGroupId: The ID of the resource group to which the VPN gateway belongs. |
ssl_connections | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property sslConnections: The maximum number of clients allowed to connect at the same time. |
tags | typing.List[TagsProperty] | Property tags: Tags to attach to instance. |
vpn_type | typing.Union[str, ros_cdk_core.IResolvable] | Property vpnType: VPN gateway type. |
v_switch_id | typing.Union[str, ros_cdk_core.IResolvable] | Property vSwitchId: The ID of the VSwitch to which the VPN gateway belongs. |
enable_resource_property_constraint | bool | No description. |
scopeRequired
- Type: ros_cdk_core.Construct
idRequired
- Type: str
bandwidthRequired
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property bandwidth: The public network bandwidth of the VPN gateway, in Mbps.
Value: 5|10|20|50|100|200.
vpc_idRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vpcId: VPC ID to which the VPN gateway belongs.
auto_payOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property autoPay: Whether to automatically pay the bill of the VPN gateway, the value: true: Automatically pays the bill for the VPN gateway.
false: Does not automatically pay the bill for the VPN gateway. Default true.
descriptionOptional
- Type: typing.Union[str, 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://.
disaster_recovery_v_switch_idOptional
- Type: typing.Union[str, 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.
enable_ipsecOptional
- Type: typing.Union[bool, 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.
enable_sslOptional
- Type: typing.Union[bool, 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.
instance_charge_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property instanceChargeType: Accounting type of the VPN gateway, the value is: PREPAY, POSTPAY.
nameOptional
- Type: typing.Union[str, 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://.
network_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property networkType: The network type of the VPN gateway.
Valid values: public|private
periodOptional
- Type: typing.Union[typing.Union[int, float], 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.
resource_group_idOptional
- Type: typing.Union[str, 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.
ssl_connectionsOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property sslConnections: The maximum number of clients allowed to connect at the same time.
tagsOptional
- Type: typing.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.
vpn_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vpnType: VPN gateway type.
v_switch_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vSwitchId: The ID of the VSwitch to which the VPN gateway belongs.
enable_resource_property_constraintOptional
- Type: bool
Methods
| Name | Description |
|---|---|
to_string | Returns a string representation of this construct. |
synthesize | Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition | No description. |
add_count | No description. |
add_dependency | No description. |
add_resource_desc | No description. |
apply_removal_policy | No description. |
fetch_condition | No description. |
fetch_dependency | No description. |
fetch_resource_desc | No description. |
get_att | No description. |
set_metadata | No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
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: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
fetch_condition
def fetch_condition() -> RosCondition
fetch_dependency
def fetch_dependency() -> typing.List[str]
fetch_resource_desc
def fetch_resource_desc() -> str
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
| Name | Description |
|---|---|
is_construct | Return whether the given object is a Construct. |
is_construct
import ros_cdk_vpc
ros_cdk_vpc.VpnGateway.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
| Name | Type | Description |
|---|---|---|
node | ros_cdk_core.ConstructNode | The construct tree node associated with this construct. |
env | ros_cdk_core.IResourceEnvironment | The environment this resource belongs to. |
ref | str | No description. |
stack | ros_cdk_core.Stack | The stack in which this resource is defined. |
resource | ros_cdk_core.RosResource | No description. |
attr_arn | typing.Union[str, ros_cdk_core.IResolvable] | Attribute Arn: The Alibaba Cloud Resource Name (ARN). |
attr_disaster_recovery_internet_ip | typing.Union[str, 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. |
attr_disaster_recovery_v_switch_id | typing.Union[str, 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. |
attr_internet_ip | typing.Union[str, ros_cdk_core.IResolvable] | Attribute InternetIp: The public IP address of the VPN gateway. |
attr_order_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute OrderId: The order ID. |
attr_spec | typing.Union[str, ros_cdk_core.IResolvable] | Attribute Spec: The specification of the VPN gateway. |
attr_ssl_max_connections | typing.Union[str, ros_cdk_core.IResolvable] | Attribute SslMaxConnections: The maximum number of concurrent SSL-VPN connections. |
attr_ssl_vpn_internet_ip | typing.Union[str, 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. |
attr_vpc_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute VpcId: The ID of the virtual private cloud (VPC) to which the VPN gateway belongs. |
attr_vpn_gateway_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute VpnGatewayId: ID of the VPN gateway. |
attr_vpn_type | typing.Union[str, ros_cdk_core.IResolvable] | Attribute VpnType: The type of the VPN gateway. |
attr_v_switch_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute VSwitchId: The ID of the vSwitch to which the VPN gateway belongs. |
props | VpnGatewayProps | No description. |
nodeRequired
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
envRequired
env: IResourceEnvironment
- Type: 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
ref: str
- Type: str
stackRequired
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resourceOptional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_arnRequired
attr_arn: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute Arn: The Alibaba Cloud Resource Name (ARN).
attr_disaster_recovery_internet_ipRequired
attr_disaster_recovery_internet_ip: typing.Union[str, IResolvable]
- Type: typing.Union[str, 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.
attr_disaster_recovery_v_switch_idRequired
attr_disaster_recovery_v_switch_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, 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.
attr_internet_ipRequired
attr_internet_ip: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute InternetIp: The public IP address of the VPN gateway.
attr_order_idRequired
attr_order_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute OrderId: The order ID.
attr_specRequired
attr_spec: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute Spec: The specification of the VPN gateway.
attr_ssl_max_connectionsRequired
attr_ssl_max_connections: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute SslMaxConnections: The maximum number of concurrent SSL-VPN connections.
attr_ssl_vpn_internet_ipRequired
attr_ssl_vpn_internet_ip: typing.Union[str, IResolvable]
- Type: typing.Union[str, 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.
attr_vpc_idRequired
attr_vpc_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute VpcId: The ID of the virtual private cloud (VPC) to which the VPN gateway belongs.
attr_vpn_gateway_idRequired
attr_vpn_gateway_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute VpnGatewayId: ID of the VPN gateway.
attr_vpn_typeRequired
attr_vpn_type: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute VpnType: The type of the VPN gateway.
attr_v_switch_idRequired
attr_v_switch_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute VSwitchId: The ID of the vSwitch to which the VPN gateway belongs.
propsRequired
props: VpnGatewayProps
- Type: VpnGatewayProps