VpnAttachment
- Implements: IVpnAttachment
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 ros_cdk_vpc
ros_cdk_vpc.VpnAttachment(
scope: Construct,
id: str,
local_subnet: typing.Union[str, IResolvable],
remote_subnet: typing.Union[str, IResolvable],
auto_config_route: typing.Union[bool, IResolvable] = None,
bgp_config: typing.Union[IResolvable, BgpConfigProperty] = None,
customer_gateway_id: typing.Union[str, IResolvable] = None,
effect_immediately: typing.Union[bool, IResolvable] = None,
enable_dpd: typing.Union[bool, IResolvable] = None,
enable_nat_traversal: typing.Union[bool, IResolvable] = None,
enable_tunnels_bgp: typing.Union[bool, IResolvable] = None,
health_check_config: typing.Union[IResolvable, HealthCheckConfigProperty] = None,
ike_config: typing.Union[IResolvable, IkeConfigProperty] = None,
ipsec_config: typing.Union[IResolvable, IpsecConfigProperty] = None,
name: typing.Union[str, IResolvable] = None,
network_type: typing.Union[str, IResolvable] = None,
remote_ca_cert: typing.Union[str, IResolvable] = None,
resource_group_id: typing.Union[str, IResolvable] = None,
tunnel_bandwidth: typing.Union[str, IResolvable] = None,
tunnel_options_specification: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, TunnelOptionsSpecificationProperty]]] = None,
enable_resource_property_constraint: bool = None
)
| Name | Type | Description |
|---|---|---|
scope | ros_cdk_core.Construct | No description. |
id | str | No description. |
local_subnet | typing.Union[str, 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. |
remote_subnet | typing.Union[str, ros_cdk_core.IResolvable] | Property remoteSubnet: The network segment of the local IDC is used for the second phase negotiation. |
auto_config_route | typing.Union[bool, ros_cdk_core.IResolvable] | Property autoConfigRoute: Specifies whether to automatically configure routes. |
bgp_config | typing.Union[ros_cdk_core.IResolvable, BgpConfigProperty] | Property bgpConfig: The Border Gateway Protocol (BGP) configuration. |
customer_gateway_id | typing.Union[str, ros_cdk_core.IResolvable] | Property customerGatewayId: The ID of the user gateway. |
effect_immediately | typing.Union[bool, ros_cdk_core.IResolvable] | Property effectImmediately: Whether to delete the currently negotiated IPsec tunnel and re-initiate the negotiation. |
enable_dpd | typing.Union[bool, ros_cdk_core.IResolvable] | Property enableDpd: Specifies whether to enable the dead peer detection (DPD) feature. |
enable_nat_traversal | typing.Union[bool, ros_cdk_core.IResolvable] | Property enableNatTraversal: Specifies whether to enable NAT traversal. |
enable_tunnels_bgp | typing.Union[bool, ros_cdk_core.IResolvable] | Property enableTunnelsBgp: Support configuring this parameter when creating dual-tunnel mode IPsec-VPN connections. |
health_check_config | typing.Union[ros_cdk_core.IResolvable, HealthCheckConfigProperty] | Property healthCheckConfig: Whether to enable the health check configuration. |
ike_config | typing.Union[ros_cdk_core.IResolvable, IkeConfigProperty] | Property ikeConfig: Configuration information for the first phase of negotiation. |
ipsec_config | typing.Union[ros_cdk_core.IResolvable, IpsecConfigProperty] | Property ipsecConfig: Configuration information for the second phase negotiation. |
name | typing.Union[str, ros_cdk_core.IResolvable] | Property name: The name of the IPsec connection. |
network_type | typing.Union[str, ros_cdk_core.IResolvable] | Property networkType: The network type of the IPsec connection. |
remote_ca_cert | typing.Union[str, ros_cdk_core.IResolvable] | Property remoteCaCert: The peer CA certificate when a ShangMi (SM) VPN gateway is used to establish the IPsec-VPN connection. |
resource_group_id | typing.Union[str, ros_cdk_core.IResolvable] | Property resourceGroupId: The resource group ID to which the IPsec connection belongs. |
tunnel_bandwidth | typing.Union[str, ros_cdk_core.IResolvable] | Property tunnelBandwidth: Used to indicate the bandwidth specification of a single VPN tunnel, values: Standard (default value): Standard type, default bandwidth 1Gbps Large: Large type, default bandwidth 3Gbps. |
tunnel_options_specification | typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, TunnelOptionsSpecificationProperty]]] | Property tunnelOptionsSpecification: Configuration of tunnels. |
enable_resource_property_constraint | bool | No description. |
scopeRequired
- Type: ros_cdk_core.Construct
idRequired
- Type: str
local_subnetRequired
- Type: typing.Union[str, 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.
remote_subnetRequired
- Type: typing.Union[str, 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.
auto_config_routeOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property autoConfigRoute: Specifies whether to automatically configure routes.
Valid values: true (default) false
bgp_configOptional
- Type: typing.Union[ros_cdk_core.IResolvable, 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.
customer_gateway_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property customerGatewayId: The ID of the user gateway.
effect_immediatelyOptional
- Type: typing.Union[bool, 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.
enable_dpdOptional
- Type: typing.Union[bool, 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.
enable_nat_traversalOptional
- Type: typing.Union[bool, 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
enable_tunnels_bgpOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property enableTunnelsBgp: Support configuring this parameter when creating dual-tunnel mode IPsec-VPN connections.
Whether to enable BGP function for the tunnel. Values: true or false (default value).
Before adding BGP configuration, it is recommended that you first understand the working mechanism and usage limitations of the BGP dynamic routing function. For more information, please see Configuring BGP Dynamic Routing.
health_check_configOptional
- Type: typing.Union[ros_cdk_core.IResolvable, HealthCheckConfigProperty]
Property healthCheckConfig: Whether to enable the health check configuration.
ike_configOptional
- Type: typing.Union[ros_cdk_core.IResolvable, IkeConfigProperty]
Property ikeConfig: Configuration information for the first phase of negotiation.
ipsec_configOptional
- Type: typing.Union[ros_cdk_core.IResolvable, IpsecConfigProperty]
Property ipsecConfig: Configuration information for the second phase negotiation.
nameOptional
- Type: typing.Union[str, 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:// .
network_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property networkType: The network type of the IPsec connection.
Value: public|private.
remote_ca_certOptional
- Type: typing.Union[str, 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.
resource_group_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property resourceGroupId: The resource group ID to which the IPsec connection belongs.
- You can call the ListResourceGroups interface to query the resource group ID.
- If you do not specify a resource group ID, the IPsec connection will belong to the default resource group after creation.
tunnel_bandwidthOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property tunnelBandwidth: Used to indicate the bandwidth specification of a single VPN tunnel, values: Standard (default value): Standard type, default bandwidth 1Gbps Large: Large type, default bandwidth 3Gbps.
tunnel_options_specificationOptional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, TunnelOptionsSpecificationProperty]]]
Property tunnelOptionsSpecification: Configuration of tunnels.
- When creating dual-tunnel mode IPsec-VPN connections, you can configure parameters under TunnelOptionsSpecification array.
- When creating dual-tunnel mode IPsec-VPN connections, you must add two tunnels for the IPsec-VPN connection simultaneously to ensure the IPsec-VPN connection has link redundancy capability. Only two tunnels are supported under an IPsec-VPN connection.
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.VpnAttachment.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_internet_ip | typing.Union[str, ros_cdk_core.IResolvable] | Attribute InternetIp: The gateway IP address of the IPsec connection. |
attr_peer_vpn_attachment_config | typing.Union[str, ros_cdk_core.IResolvable] | Attribute PeerVpnAttachmentConfig: Peer vpc Attachment config. |
attr_vpn_attachment_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute VpnAttachmentId: ID of the IPsec attachment. |
props | VpnAttachmentProps | 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_internet_ipRequired
attr_internet_ip: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute InternetIp: The gateway IP address of the IPsec connection.
attr_peer_vpn_attachment_configRequired
attr_peer_vpn_attachment_config: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute PeerVpnAttachmentConfig: Peer vpc Attachment config.
attr_vpn_attachment_idRequired
attr_vpn_attachment_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute VpnAttachmentId: ID of the IPsec attachment.
propsRequired
props: VpnAttachmentProps
- Type: VpnAttachmentProps