VPN

VPC VPC

  • API Reference
    • ACL-Related Interfaces
      • Add ACL rule
      • Delete ACL rules
      • Query ACL rules
      • Query ACL
      • Update ACL rules
    • API function release records
    • API Overview
    • Appendix
    • Common Headers and Error Responses
    • Dedicated Gateway-Related Interfaces
      • Bind physical dedicated line
      • Create dedicated gateway
      • Create health check for dedicated gateway
      • Query dedicated gateway details
      • Query dedicated gateway list
      • Release dedicated gateway
      • Unbind physical dedicated line
      • Update dedicated gateway
    • Elastic Network Interface-Related Interfaces
      • Add intranet IP to elastic network interface in batches
      • Add Secondary IP Address of Elastic Network Interface
      • Create elastic network interface
      • Delete elastic network interface
      • Delete Intranet IP from elastic network interface in batches
      • Delete Secondary IP Address of Elastic Network Interface
      • Elastic network interface binds to EIP
      • Elastic Network Interface Mounts Cloud Product Instance
      • Elastic network interface unbinds from EIP
      • Elastic Network Interface Unmounts Cloud Product Instance
      • Query elastic network interface list
      • Query elastic network interface status
      • Query the specified elastic network interface
      • Update elastic network interface with enterprise security group
      • Update elastic network interface with regular security group
      • Update elastic network interface
    • Gateway Bandwidth Limiting Rule Related Interfaces
      • Create gateway bandwidth limiting rules
      • Delete Gateway Bandwidth Limiting Rule
      • Modify Gateway Bandwidth Limiting Rule
      • View Gateway Bandwidth Limiting Rule
    • General Description
    • High-Availability Virtual IP Address(HAVIP) Related Interfaces
      • Bind EIP to high-availability virtual IP address
      • Bind instance to high-availability virtual IP address
      • Create high-availability virtual IP address
      • Delete high-availability virtual IP address
      • Query high-availability virtual IP address list
      • Query the specified high-availability virtual IP address
      • Unbind EIP from high-availability virtual IP address
      • Unbind instance from high-availability virtual IP address
      • Update high-availability virtual IP address
    • Interface Overview
    • IPv6 Gateway-Related Interfaces
      • Add IPv6 egress-only policy
      • Bandwidth resizing for IPv6 gateway
      • Create IPv6 gateway bandwidth limiting policy
      • Create IPv6 gateway
      • Delete IPv6 gateway bandwidth limiting policy
      • Delete IPv6 Gateway
      • Delete the IPv6 egress-only policy
      • Query IPv6 gateway bandwidth limiting policy list
      • Query IPv6 gateway
      • Query the IPv6 egress-only policy list
      • Update IPv6 gateway bandwidth limiting policy
      • Update the IPv6 gateway release protection switch
    • NAT Gateway-Related Interfaces
      • Bind DNAT EIP to the NAT gateway
      • Bind SNAT EIP to the NAT gateway
      • Create DNAT rules in batches
      • Create DNAT rules
      • Create NAT gateway
      • Create SNAT rules in batches
      • Create SNAT rules
      • Delete DNAT rules
      • Delete SNAT rules
      • NAT Gateway Binds EIP
      • NAT gateway renewal
      • NAT Gateway Resize
      • NAT Gateway Unbinds EIP
      • Query DNAT rules
      • Query NAT gateway details
      • Query NAT gateway list
      • Query SNAT rules
      • Release NAT gateway
      • Unbind DNAT EIP from the NAT gateway
      • Unbind SNAT EIP from the NAT gateway
      • Update DNAT rules
      • Update NAT Delete Protection Switch
      • Update NAT gateway name
      • Update SNAT rules
    • Network Detection Related Interfaces
      • Create Network Probe
      • Delete network probe
      • Query network probe details
      • Query network probe list.
      • Update probe
    • Parameter Template-Related Interfaces
      • Add IP addresses to the IP address family
      • Add IP addresses to the IP address group
      • Create IP address family
      • Create IP address set
      • Delete IP address family
      • Delete IP address from IP address group
      • Delete IP address set
      • Query IP address family list
      • Query IP address group list
      • Query specified IP address family
      • Query specified IP address group
      • Remove IP address group from IP address family
      • Update IP address family
      • Update IP address set
    • Peering Connections-Related Interfaces
      • Application to process the peering connection
      • Bandwidth resizing for peering connections
      • Create peering connections
      • Disable DNS synchronization for the peering connections.
      • Enable DNS synchronization for the peering connections
      • List of peering connections to be queried.
      • Peering connection renewal
      • Release peering connections
      • Update the local API name and remarks for peering connections
      • Update the peering connection release protection switch
      • View details of peering connection
    • Route Table Related Interfaces
      • Create route rules
      • Delete route rules
      • Primary-standby switch
      • Query route table
      • Query routing rules
      • Update route rules
    • Security Group Related Interfaces
      • Enterprise security group
        • Authorize enterprise security group rules
        • Create enterprise security group
        • Delete enterprise security group rules
        • Delete enterprise security group
        • Query enterprise security group list
        • Update enterprise security group rules
      • Regular security group
        • Authorize regular security group rules
        • Create regular security group
        • Delete regular security group rules
        • Delete regular security group
        • Query regular security group list
        • Revoke regular security group rules
        • Update regular security group rules
        • View security group details
    • Service domain
    • Service Network Interface Card (SNIC)-Related Interfaces
      • Create service network interface card
      • Delete service network interface card
      • Query mountable public services
      • Query service network interface card details
      • Query service network interface card list
      • Update regular security group for service network interface card
      • Update service network interface card with enterprise security group
      • Update the service network interface card
    • Subnet-Related Interfaces
      • Create reserved network segment
      • Create subnet
      • Delete reserved network segment
      • Delete subnet
      • Query specified subnet
      • Query subnet list
      • Query the reserved network segment list
      • Update subnet
    • VPC-Related Interfaces
      • Create VPC
      • Delete VPC
      • Open VPC relay
      • Query IP Usage by Products in VPC
      • Query specified VPC
      • Query VPC intranet IP
      • Query VPC list
      • Shut down VPC relay
      • Update VPC
    • VPN-Related Interfaces
      • Bind EIP
      • Create SSL VPN server
      • Create SSL VPN users in batches
      • Create VPN tunnel
      • Create VPN
      • Delete SSL VPN server
      • Delete SSL VPN user
      • Delete VPN tunnel
      • Query SSL-VPN server
      • Query SSL-VPN user
      • Query VPN details
      • Query VPN List
      • Query VPN tunnels
      • Release VPN
      • Unbind EIP
      • Update SSL VPN server
      • Update SSL VPN user
      • Update VPN release protection switch
      • Update VPN tunnel
      • Update VPN
      • VPN gateway renewal
    • High-Availability Virtual IP Address (HAVIP) Related Interfaces
      • Bind EIP to high-availability virtual IP address
      • Bind instance to high-availability virtual IP address
      • Create high-availability virtual IP address
      • Delete high-availability virtual IP address
      • Query high-availability virtual IP address list
      • Query the specified high-availability virtual IP address
      • Unbind EIP from high-availability virtual IP address
      • Unbind instance from high-availability virtual IP address
      • Update high-availability virtual IP address
  • FAQs
    • Common Questions Overview
    • NAT FAQs
    • Route Table FAQs
    • Service Network Interface Card(SNIC) Common Questions
    • VPC FAQs
    • VPN FAQs
    • Service Network Interface Card (SNIC) Common Questions
  • Function Release Records
  • Operation guide
    • Access control
      • ACL
      • Parameter Template
      • Security group
    • Identity and access management
    • Monitor and Operations
      • NAT Gateway Instance Diagnosis
    • Network Connection
      • Dedicated gateway
      • IPv6 gateway
      • Layer 2 Gateway
      • NAT Gateway
        • Private Network NAT(Network Address Translation) Gateway
        • Public Network NAT(Network Address Translation) Gateway
        • Private Network NAT (Network Address Translation) Gateway
        • Public Network NAT (Network Address Translation) Gateway
      • Peering Connections
      • VPN Gateway
        • GRE VPN Gateway
        • IPsec VPN Gateway
        • SSL VPN Gateway
    • Network Diagnostics
      • Flow log
      • Gateway bandwidth limiting
      • Network probe
      • Path analysis
      • Port verification
      • Traffic monitor
    • Network interface card
      • Elastic network interface
      • High-availability virtual IP address (HAVIP)
      • Service network interface card
    • Network topology
    • Route table
    • Subnet
    • Tag Management
    • Using IPv6
    • VPC
  • Product Description
    • Application scenarios
    • Product advantages
    • Product features
    • Product Introduction
    • Related concepts
    • Usage restrictions
  • Product pricing
  • SDK
    • Go-SDK
      • ACL
      • Dedicated gateway
      • Elastic network interface
      • Exception handling
      • High-availability virtual IP address (HAVIP)
      • Initialization
      • Install the SDK Package
      • IPv6Gateway
      • NAT
      • Network probe
      • Overview
      • Peering Connections
      • Route
      • Security group
        • Enterprise security group
        • Regular security group
      • Service network interface card
      • Subnet
      • VPC
      • VPN
    • Java-SDK
      • ACL
      • Dedicated gateway
      • Elastic network interface
      • Enterprise security group
      • High-availability virtual IP address (HAVIP)
      • Install the SDK Package
      • IPv6 gateway
      • NAT
      • Network probe
      • Overview
      • Parameter Template
      • Peering Connections
      • Regular security group
      • Route
      • Service network interface card
      • Subnet
      • Version history
      • vpc
      • VPN
    • PHP-SDK
      • ACL
      • Install the SDK Package
      • NAT
      • Overview
      • Peering Connections
      • Route
      • Security group
      • Subnet
      • Version history
      • vpc
    • Python-SDK
      • ACL
      • Dedicated gateway
      • Elastic network interface
      • Enterprise security group
      • High-availability virtual IP address (HAVIP)
      • Install the SDK Package
      • IPv6Gateway
      • NAT
      • Network probe
      • Overview
      • Peering Connections
      • Route
      • Security group
      • Service network interface card
      • Subnet
      • Version history
      • VPC
      • VPN
  • Service Level Agreement (SLA)
    • IPv6 Gateway Service Level Agreement SLA
    • NAT(Network Address Translation) Gateway Service Level Agreement SLA
    • Peering Connections Service Level Agreement SLA
    • Service Network Interface Card(SNIC) Service Level Agreement SLA
    • VPN Gateway Service Level Agreement SLA
    • NAT (Network Address Translation) Gateway Service Level Agreement SLA
    • Service Network Interface Card (SNIC) Service Level Agreement SLA
  • Typical Practices
    • Configure Custom Service and Use Service Network Interface Card(SNIC) to Provide Service for Other VPCs
    • HAVIP Combined with Keepalived to Achieve Master-Backup Multi-Machine High Availability
    • Layer 2 Gateway Combined with Dedicated Line Access ET to Build Large Layer 2 Network Between IDC and Cloud VPC
    • Network Layer Security Description
    • Peering Connections Typical Practice
    • Security Group Configuration Practice (Advanced Level)
    • Security Group Configuration Practice (Beginner Level)
    • Typical Practice of Managing Elastic Network Interface Using Terraform
    • Typical Practice of Managing IPsec VPN Gateway Using Terraform
    • Using Keepalived in VPC to Achieve High-Availability Architecture
    • VPC Custom Route Table to Achieve Secure Traffic Mutual Access
    • Windows Using HAVIP to Configure Master-Backup Multi-Machine
    • Configure Custom Service and Use Service Network Interface Card (SNIC) to Provide Service for Other VPCs
  • VPC CLI
    • Configure BCE-CLI
    • Install BCE-CLI
    • Route Table Related Operations
    • Subnet Related Operations
    • Using VPC Service via CLI
    • Version Change Records
    • VPC Related Operations
All documents
menu
No results found, please re-enter

VPC VPC

  • API Reference
    • ACL-Related Interfaces
      • Add ACL rule
      • Delete ACL rules
      • Query ACL rules
      • Query ACL
      • Update ACL rules
    • API function release records
    • API Overview
    • Appendix
    • Common Headers and Error Responses
    • Dedicated Gateway-Related Interfaces
      • Bind physical dedicated line
      • Create dedicated gateway
      • Create health check for dedicated gateway
      • Query dedicated gateway details
      • Query dedicated gateway list
      • Release dedicated gateway
      • Unbind physical dedicated line
      • Update dedicated gateway
    • Elastic Network Interface-Related Interfaces
      • Add intranet IP to elastic network interface in batches
      • Add Secondary IP Address of Elastic Network Interface
      • Create elastic network interface
      • Delete elastic network interface
      • Delete Intranet IP from elastic network interface in batches
      • Delete Secondary IP Address of Elastic Network Interface
      • Elastic network interface binds to EIP
      • Elastic Network Interface Mounts Cloud Product Instance
      • Elastic network interface unbinds from EIP
      • Elastic Network Interface Unmounts Cloud Product Instance
      • Query elastic network interface list
      • Query elastic network interface status
      • Query the specified elastic network interface
      • Update elastic network interface with enterprise security group
      • Update elastic network interface with regular security group
      • Update elastic network interface
    • Gateway Bandwidth Limiting Rule Related Interfaces
      • Create gateway bandwidth limiting rules
      • Delete Gateway Bandwidth Limiting Rule
      • Modify Gateway Bandwidth Limiting Rule
      • View Gateway Bandwidth Limiting Rule
    • General Description
    • High-Availability Virtual IP Address(HAVIP) Related Interfaces
      • Bind EIP to high-availability virtual IP address
      • Bind instance to high-availability virtual IP address
      • Create high-availability virtual IP address
      • Delete high-availability virtual IP address
      • Query high-availability virtual IP address list
      • Query the specified high-availability virtual IP address
      • Unbind EIP from high-availability virtual IP address
      • Unbind instance from high-availability virtual IP address
      • Update high-availability virtual IP address
    • Interface Overview
    • IPv6 Gateway-Related Interfaces
      • Add IPv6 egress-only policy
      • Bandwidth resizing for IPv6 gateway
      • Create IPv6 gateway bandwidth limiting policy
      • Create IPv6 gateway
      • Delete IPv6 gateway bandwidth limiting policy
      • Delete IPv6 Gateway
      • Delete the IPv6 egress-only policy
      • Query IPv6 gateway bandwidth limiting policy list
      • Query IPv6 gateway
      • Query the IPv6 egress-only policy list
      • Update IPv6 gateway bandwidth limiting policy
      • Update the IPv6 gateway release protection switch
    • NAT Gateway-Related Interfaces
      • Bind DNAT EIP to the NAT gateway
      • Bind SNAT EIP to the NAT gateway
      • Create DNAT rules in batches
      • Create DNAT rules
      • Create NAT gateway
      • Create SNAT rules in batches
      • Create SNAT rules
      • Delete DNAT rules
      • Delete SNAT rules
      • NAT Gateway Binds EIP
      • NAT gateway renewal
      • NAT Gateway Resize
      • NAT Gateway Unbinds EIP
      • Query DNAT rules
      • Query NAT gateway details
      • Query NAT gateway list
      • Query SNAT rules
      • Release NAT gateway
      • Unbind DNAT EIP from the NAT gateway
      • Unbind SNAT EIP from the NAT gateway
      • Update DNAT rules
      • Update NAT Delete Protection Switch
      • Update NAT gateway name
      • Update SNAT rules
    • Network Detection Related Interfaces
      • Create Network Probe
      • Delete network probe
      • Query network probe details
      • Query network probe list.
      • Update probe
    • Parameter Template-Related Interfaces
      • Add IP addresses to the IP address family
      • Add IP addresses to the IP address group
      • Create IP address family
      • Create IP address set
      • Delete IP address family
      • Delete IP address from IP address group
      • Delete IP address set
      • Query IP address family list
      • Query IP address group list
      • Query specified IP address family
      • Query specified IP address group
      • Remove IP address group from IP address family
      • Update IP address family
      • Update IP address set
    • Peering Connections-Related Interfaces
      • Application to process the peering connection
      • Bandwidth resizing for peering connections
      • Create peering connections
      • Disable DNS synchronization for the peering connections.
      • Enable DNS synchronization for the peering connections
      • List of peering connections to be queried.
      • Peering connection renewal
      • Release peering connections
      • Update the local API name and remarks for peering connections
      • Update the peering connection release protection switch
      • View details of peering connection
    • Route Table Related Interfaces
      • Create route rules
      • Delete route rules
      • Primary-standby switch
      • Query route table
      • Query routing rules
      • Update route rules
    • Security Group Related Interfaces
      • Enterprise security group
        • Authorize enterprise security group rules
        • Create enterprise security group
        • Delete enterprise security group rules
        • Delete enterprise security group
        • Query enterprise security group list
        • Update enterprise security group rules
      • Regular security group
        • Authorize regular security group rules
        • Create regular security group
        • Delete regular security group rules
        • Delete regular security group
        • Query regular security group list
        • Revoke regular security group rules
        • Update regular security group rules
        • View security group details
    • Service domain
    • Service Network Interface Card (SNIC)-Related Interfaces
      • Create service network interface card
      • Delete service network interface card
      • Query mountable public services
      • Query service network interface card details
      • Query service network interface card list
      • Update regular security group for service network interface card
      • Update service network interface card with enterprise security group
      • Update the service network interface card
    • Subnet-Related Interfaces
      • Create reserved network segment
      • Create subnet
      • Delete reserved network segment
      • Delete subnet
      • Query specified subnet
      • Query subnet list
      • Query the reserved network segment list
      • Update subnet
    • VPC-Related Interfaces
      • Create VPC
      • Delete VPC
      • Open VPC relay
      • Query IP Usage by Products in VPC
      • Query specified VPC
      • Query VPC intranet IP
      • Query VPC list
      • Shut down VPC relay
      • Update VPC
    • VPN-Related Interfaces
      • Bind EIP
      • Create SSL VPN server
      • Create SSL VPN users in batches
      • Create VPN tunnel
      • Create VPN
      • Delete SSL VPN server
      • Delete SSL VPN user
      • Delete VPN tunnel
      • Query SSL-VPN server
      • Query SSL-VPN user
      • Query VPN details
      • Query VPN List
      • Query VPN tunnels
      • Release VPN
      • Unbind EIP
      • Update SSL VPN server
      • Update SSL VPN user
      • Update VPN release protection switch
      • Update VPN tunnel
      • Update VPN
      • VPN gateway renewal
    • High-Availability Virtual IP Address (HAVIP) Related Interfaces
      • Bind EIP to high-availability virtual IP address
      • Bind instance to high-availability virtual IP address
      • Create high-availability virtual IP address
      • Delete high-availability virtual IP address
      • Query high-availability virtual IP address list
      • Query the specified high-availability virtual IP address
      • Unbind EIP from high-availability virtual IP address
      • Unbind instance from high-availability virtual IP address
      • Update high-availability virtual IP address
  • FAQs
    • Common Questions Overview
    • NAT FAQs
    • Route Table FAQs
    • Service Network Interface Card(SNIC) Common Questions
    • VPC FAQs
    • VPN FAQs
    • Service Network Interface Card (SNIC) Common Questions
  • Function Release Records
  • Operation guide
    • Access control
      • ACL
      • Parameter Template
      • Security group
    • Identity and access management
    • Monitor and Operations
      • NAT Gateway Instance Diagnosis
    • Network Connection
      • Dedicated gateway
      • IPv6 gateway
      • Layer 2 Gateway
      • NAT Gateway
        • Private Network NAT(Network Address Translation) Gateway
        • Public Network NAT(Network Address Translation) Gateway
        • Private Network NAT (Network Address Translation) Gateway
        • Public Network NAT (Network Address Translation) Gateway
      • Peering Connections
      • VPN Gateway
        • GRE VPN Gateway
        • IPsec VPN Gateway
        • SSL VPN Gateway
    • Network Diagnostics
      • Flow log
      • Gateway bandwidth limiting
      • Network probe
      • Path analysis
      • Port verification
      • Traffic monitor
    • Network interface card
      • Elastic network interface
      • High-availability virtual IP address (HAVIP)
      • Service network interface card
    • Network topology
    • Route table
    • Subnet
    • Tag Management
    • Using IPv6
    • VPC
  • Product Description
    • Application scenarios
    • Product advantages
    • Product features
    • Product Introduction
    • Related concepts
    • Usage restrictions
  • Product pricing
  • SDK
    • Go-SDK
      • ACL
      • Dedicated gateway
      • Elastic network interface
      • Exception handling
      • High-availability virtual IP address (HAVIP)
      • Initialization
      • Install the SDK Package
      • IPv6Gateway
      • NAT
      • Network probe
      • Overview
      • Peering Connections
      • Route
      • Security group
        • Enterprise security group
        • Regular security group
      • Service network interface card
      • Subnet
      • VPC
      • VPN
    • Java-SDK
      • ACL
      • Dedicated gateway
      • Elastic network interface
      • Enterprise security group
      • High-availability virtual IP address (HAVIP)
      • Install the SDK Package
      • IPv6 gateway
      • NAT
      • Network probe
      • Overview
      • Parameter Template
      • Peering Connections
      • Regular security group
      • Route
      • Service network interface card
      • Subnet
      • Version history
      • vpc
      • VPN
    • PHP-SDK
      • ACL
      • Install the SDK Package
      • NAT
      • Overview
      • Peering Connections
      • Route
      • Security group
      • Subnet
      • Version history
      • vpc
    • Python-SDK
      • ACL
      • Dedicated gateway
      • Elastic network interface
      • Enterprise security group
      • High-availability virtual IP address (HAVIP)
      • Install the SDK Package
      • IPv6Gateway
      • NAT
      • Network probe
      • Overview
      • Peering Connections
      • Route
      • Security group
      • Service network interface card
      • Subnet
      • Version history
      • VPC
      • VPN
  • Service Level Agreement (SLA)
    • IPv6 Gateway Service Level Agreement SLA
    • NAT(Network Address Translation) Gateway Service Level Agreement SLA
    • Peering Connections Service Level Agreement SLA
    • Service Network Interface Card(SNIC) Service Level Agreement SLA
    • VPN Gateway Service Level Agreement SLA
    • NAT (Network Address Translation) Gateway Service Level Agreement SLA
    • Service Network Interface Card (SNIC) Service Level Agreement SLA
  • Typical Practices
    • Configure Custom Service and Use Service Network Interface Card(SNIC) to Provide Service for Other VPCs
    • HAVIP Combined with Keepalived to Achieve Master-Backup Multi-Machine High Availability
    • Layer 2 Gateway Combined with Dedicated Line Access ET to Build Large Layer 2 Network Between IDC and Cloud VPC
    • Network Layer Security Description
    • Peering Connections Typical Practice
    • Security Group Configuration Practice (Advanced Level)
    • Security Group Configuration Practice (Beginner Level)
    • Typical Practice of Managing Elastic Network Interface Using Terraform
    • Typical Practice of Managing IPsec VPN Gateway Using Terraform
    • Using Keepalived in VPC to Achieve High-Availability Architecture
    • VPC Custom Route Table to Achieve Secure Traffic Mutual Access
    • Windows Using HAVIP to Configure Master-Backup Multi-Machine
    • Configure Custom Service and Use Service Network Interface Card (SNIC) to Provide Service for Other VPCs
  • VPC CLI
    • Configure BCE-CLI
    • Install BCE-CLI
    • Route Table Related Operations
    • Subnet Related Operations
    • Using VPC Service via CLI
    • Version Change Records
    • VPC Related Operations
  • Document center
  • arrow
  • VPCVPC
  • arrow
  • SDK
  • arrow
  • Python-SDK
  • arrow
  • VPN
Table of contents on this page
  • Retrieve Endpoint
  • Retrieve AK/SK
  • Create VPN client
  • Create VPN gateway
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • List VPN gateways
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Query VPN details
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Bind EIP to VPN gateway
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Unbind EIP from VPN gateway
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Modify VPN gateway
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Release VPN gateway
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • VPN gateway renewal
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Create IPSEC tunnel
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • List IPSECs
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Modify IPSEC tunnel
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Delete IPSEC tunnel
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Create SSL-VPN service
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • List SSLVPN service
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Modify SSL-VPN service
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Delete SSL VPN service
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Create SSL VPN users in batches
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • List SSL-VPN users
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Modify SSL-VPN user
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Delete SSL-VPN user
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Update VPN release protection switch
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example

VPN

Updated at:2025-10-16

Retrieve Endpoint

Before configuring the endpoint for SDK use, please refer to the developer guide section on VPC Service domain names to familiarize yourself with endpoint-related concepts. Baidu AI Cloud currently supports multiple regions. For details, refer to the VPC section in the Region Selection Guide.

Note: The VPN API supports both HTTP and HTTPS invocation methods. To enhance data security, it is recommended to call via HTTPS.

Retrieve AK/SK

To use the subnets of Baidu AI Cloud, you must have a valid AK (Access Key ID) and SK (Secret Access Key) for signature authentication. AK/SK are system-generated strings that verify users and ensure secure access to services. You can obtain and manage your AK/SK using the following steps:

  1. Register a Baidu AI Cloud account
  2. Create AK/SK

Create VPN client

The VpnClient functions as the interface for subnet services, providing developers with methods to interact with ACL services. To create a VpnClient, first set up a BCE client configuration instance (config) using endpoint, AK, and SK. Then use this config instance to configure the VpnClient. The specific configuration steps are as follows:

Plain Text
1from baidubce.auth.bce_credentials import BceCredentials
2from baidubce.bce_client_configuration import BceClientConfiguration
3from baidubce.services.vpn.vpn_client import VpnClient
4if __name__ == "__main__":
5    config = BceClientConfiguration(
6        credentials=BceCredentials(
7 access_key_id='', # User's AK
8 secret_access_key='' # User's SK
9        ),
10 endpoint='bcc.bj.baidubce.com' # Requested domain information
11    )
12    vpn_client = VpnClient(config)

Create VPN gateway

Function declaration

Python
1def create_vpn(self, vpc_id, vpn_name, billing,
2                   vpn_type=None, max_connections=None,
3                   client_token=None, description=None,
4                   eip=None, config=None, subnetId=None,
5                   tags=None, resourceGroupId=None, deleteProtect=False):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/tk2y913ko

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...}, # Public description information
3    "vpnId": "vpn-ku4cxya6nisq"
4}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_create_vpn.py

Creating a VPN gateway is an asynchronous process. The completion of the create_vpn operation does not immediately indicate the successful creation of the VPN gateway. At this stage, the gateway status will be "building." Wait for up to 3 minutes until the VPN gateway status updates to "unconfigured" before starting its configuration.

List VPN gateways

Function declaration

Python
1def list_vpns(self, vpc_id, eip=None, marker=None, max_Keys=None, config=None, vpn_type=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/zk2ydcivt

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...}, # Public description information
3    "nextMarker": "vpn-xktdeMSf",
4    "marker": "vpn-IyWRtII7",
5    "maxKeys": 1,
6    "isTruncated": true,
7    "vpns": [
8        {
9            "status": "active",
10            "eip": "10.12.34.32",
11            "vpnId": "vpn-IyWRtII7",
12            "vpcId": "83edd0d2-8a68-4ce5-a396-9d2917d58a57",
13            "description": "",
14            "expiredTime": null,
15            "productType": "postpay",
16            "vpnConnNum": 0,
17            "bandwidthInMbps": 10,
18            "vpnConns": [],
19            "sslVpnServer": null,
20            "type": "IPSec",
21            "maxConnection": null,
22            "vpnName": "VPN_aoko_2",
23            "createTime": "2021-04-25 17:22:34"
24        }
25    ]
26}  

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_list_vpn.py

Query VPN details

Function declaration

Python
1def get_vpn(self, vpn_id, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/Xk2ydminh

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...}, # Public description information
3    "status": "active",
4    "eip": "",
5    "vpnId": "vpn-shkgan7et1vx",
6    "vpcId": "83edd0d2-8a68-4ce5-a396-9d2917d58a57",
7    "description": "",
8    "expiredTime": null,
9    "paymentTiming": "Postpaid",
10    "vpnConnNum": 0,
11    "bandwidthInMbps": 0,
12    "vpnConns": [],
13    "ssl_vpn_server": null,
14    "vpnName": "VPN_aoko_2",
15    "createTime": "2021-04-25 17:22:34",
16    "deleteProtect": true,
17    "tags": [
18        {
19          "tagKey": "hikwnf",
20          "tagValue": "nwklwmflk"
21        },
22        {
23          "tagKey": "whfooef",
24          "tagValue": "haiwnwejf"
25        }
26    ]
27}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_show_vpn.py

Bind EIP to VPN gateway

Only VPN gateways that are not bound to an EIP and are in the 'unconfigured' status can perform EIP binding operations

Function declaration

Python
1def bind_eip(self, vpn_id, eip=None, client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/uk2yh2wy2

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...} # Public description information
3}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_bind_vpn_eip.py

Unbind EIP from VPN gateway

Only VPN gateways bound with EIP can perform this operation

Function declaration

Python
1def unbind_eip(self, vpn_id, client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/lk2yh59e5

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...} # Public description information
3}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_unbind_vpn_eip.py

Modify VPN gateway

Currently, only the name and description of a VPN gateway can be modified; other parameters are not allowed to be modified

Function declaration

Python
1def update_vpn(self, vpn_id, vpn_name=None, description=None, client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/dk2ybo3p4

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...} # Public description information
3}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_update_vpn.py

Release VPN gateway

For IPSEC-VPN gateways, the IPSEC tunnels under the VPN gateway must be deleted first. For SSL-VPN gateways, the SSL-VPN Service under the VPN gateway must be deleted first If an EIP has been bound to the VPN gateway, the binding between the VPN and EIP will be removed first, and the EIP will become available. Only VPN instances with postpay bill type and without shift charge tasks can be released

Function declaration

Python
1def delete_vpn(self, vpn_id, client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/bk2ybhrpv

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...} # Public description information
3}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_delete_vpn.py

VPN gateway renewal

Function declaration

Python
1def renew_vpn(self, vpn_id, billing, client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/rk2yh7kqp

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...} # Public description information
3}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_renew_vpn.py

Create IPSEC tunnel

Creating an IPSEC tunnel requires a considerable number of parameters. According to protocol specifications, the ISAKMP two-phase key negotiation parameters are divided into IKE encryption/authentication algorithms and IPSEC encryption/authentication algorithms.

The SDK only supports policy-based (traffic selector-based) IPSec tunnels.

IKE configuration definition

For the meaning of IKE configuration parameters, refer to IkeConfig

IKE configuration parameter definitions

Parameter name Types Required or not Description
ike_version string Yes IKE Version, v1 or v2
ike_mode string Yes IKE Mode options: main (main mode); aggressive (aggressive mode).
ike_enc_alg string Yes Phase 1 encryption algorithm: aes/aes192/aes256/3des
ike_auth_alg string No Phase 1 certification algorithm: sha1/md5
ike_pfs string Yes DH Group, Diffie-Hellman algorithm strength. Options include group2/group5/group14/group24
ike_lifeTime string No IKE tunnel lifecycle, which must be a multiple of 3,600, with a maximum of 86,400

IPSEC configuration definition

For the meaning of ipsec configuration parameters, refer to IpsecConfig

IPSEC Configuration Parameter Definitions

Parameter name Types Required or not Description
ipsec_enc_alg string Yes Phase 2 encryption algorithm, aes/aes192/aes256/3des
ipsec_auth_alg string Yes Phase 2 certification algorithm, sha1/md5
ipsec_pfs string No Perfect forward secrecy (PFS): group2/group5/group14/group24
ipsec_lifetime string No Phase 2 lifecycle, which must be a multiple of 3,600, not less than ike_lifeTime

Function declaration

Python
1def create_vpn_conn(self, vpn_id,
2                          secret_key,
3                          local_subnets,
4                          remote_ip,
5                          remote_subnets,
6                          vpn_conn_name,
7                          ike_config,
8                          ipsec_config,
9                          description=None,
10                          client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/sk2yngg0t

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...}, # Public description information
3    "vpnConnId": "vpnconn-ku4cxya6nisq"
4}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_create_connection.py

List IPSECs

Function declaration

Python
1def get_vpn_conn(self, vpn_id, client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/Bk2ynne1n

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...}, # Public description information
3    "vpnConns": [
4        {
5            "vpn_id": "vpn-a0314a79a558",
6            "vpn_conn_id": "vpnconn-771763a0da2f",
7            "secretKey": "ddd22@www",
8            "local_ip": null,
9            "localSubnets": ["192.168.100.0/24"],
10            "remoteIp": "10.107.245.188",
11            "remoteSubnets": ["192.168.100.0/24"],
12            "description": "111",
13            "status": "active",
14            "created_time": "2024-12-26T18:58:53+08:00",
15            "health_status": "reachable"
16            "vpnConnName": "vpncon",
17            "ikeConfig":
18                {
19                    "ikeVersion": "v1",
20                    "ikeMode": "main",
21                    "ikeEncAlg": "aes",
22                    "ikeAuthAlg": "sha1",
23                    "ikePfs": "group2",
24                    "ikeLifeTime": "28800s"
25                },
26            "ipsecConfig":
27                {
28                    "ipsecEncAlg": "aes",
29                    "ipsecAuthAlg": "sha1",
30                    "ipsecPfs": "group2",
31                    "ipsecLifetime": "28800s"
32                }       
33         }
34    ]
35}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_list_connection.py

Modify IPSEC tunnel

Modifying IPSEC tunnel parameters involves defining both IKE and IPSEC phase parameters along with traffic selectors, similar to the creation process. The SDK does not allow modification of individual parameters—users must provide all parameters. Details are as follows.

Function declaration

Python
1def update_vpn_conn(self, vpn_conn_id,
2                          vpn_id,
3                          secret_key,
4                          local_subnets,
5                          remote_ip,
6                          remote_subnets,
7                          vpn_conn_name,
8                          ike_config,
9                          ipsec_config,
10                          description=None,
11                          client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/rk2ynjopp

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...} # Public description information
3}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_update_connection.py

Delete IPSEC tunnel

Function declaration

Python
1def delete_vpn_conn(self, vpn_conn_id, client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/dk2ynpyn7

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...} # Public description information
3}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_delete_connection.py

Create SSL-VPN service

Before using this API, ensure an SSL-VPN gateway has already been successfully created under the VPC. Note that only one SSL-VPN service can be created per SSL-VPN gateway.

Function declaration

Python
1def create_vpn_sslservice(self, vpn_id=None,
2                                sslservice_name=None,
3                                local_routes=None,
4                                address_pool=None,
5                                interface_type=None,
6                                client_dns=None,
7                                client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/Jl385fe3r

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...}, # Public description information
3    "sslVpnServerId": "sslvpn-5b2hq4nm40tt"
4}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_create_sslservice.py

List SSLVPN service

Since only one SSL VPN service is available under the VPN gateway, using vpn_id to list SSL-VPN services will yield at most one SSL-VPN service

Function declaration

Python
1def get_vpn_sslservice(self, vpn_id, client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/vl3bat97z

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...}, # Public description information
3   	"vpnId": "vpn-shyt1vzgqc3z",
4    "sslVpnServerId": "sslvpn-5b2hq4nm40tt",
5    "sslVpnServerName": "hzb_1_1",
6    "interfaceType": "tap",
7    "status": "active",
8    "localSubnets": ["192.168.0.0/24"],
9    "remoteSubnet": "172.168.0.0/16",
10    "maxConnection": 10,
11    "clientDns":""
12 }  

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_list_sslservice.py

Modify SSL-VPN service

Modifying the SSL-VPN service will disconnect any clients currently connected to the VPN gateway. Windows and Mac clients will detect the Baidu AI Cloud SSL-VPN disconnection within approximately three minutes and automatically reconnect. However, Linux clients will not reconnect automatically; relevant engineers must manually reboot or reconnect the Linux client. As a result, this operation should be done with caution.

The interface_type of SSLVPN cannot be changed because it also needs to be declared in the client's configuration file. If this parameter is altered, all client configuration files must be updated accordingly. To adjust other settings such as client routing or the client address pool, disconnect and reconnect the client. As a result, modifying the interface_type is not allowed.

Function declaration

Python
1def update_vpn_sslservice(self, vpn_id=None,
2                                sslservice_id=None,
3                                sslservice_name=None,
4                                local_routes=None,
5                                address_pool=None,
6                                client_dns=None,
7                                client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/Gl39u2j5r

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...} # Public description information
3}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_update_sslservice.py

Delete SSL VPN service

Function declaration

Python
1def delete_vpn_sslservice(self, vpn_id, sslservice_id, client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/ll39xiyyp

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...} # Public description information
3}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_delete_sslservice.py

Create SSL VPN users in batches

Function declaration

Python
1def create_vpn_sslusers(self, vpn_id, sslusers, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/Kl3a3l8ga

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...}, # Public description information
3    "sslVpnUserIds":["sslvpn-5b2hq4nm40tt"]
4}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_create_ssluser.py

List SSL-VPN users

Function declaration

Python
1def get_vpn_ssl_user(self, vpn_id, client_token=None, config=None, marker=None, max_keys=None, user_name=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/Sl3b9pzmg

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...}, # Public description information
3    "marker": "vpn-ssl-user-xynkefqf3n5x",
4    "maxKeys": 1,
5    "isTruncated": false,
6    "sslVpnUsers": [
7        {
8            "userId": "vpn-ssl-user-xynkefqf3n5x",
9            "userName": "user",
10            "description": "desc"
11        }
12     ]
13}  

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_list_ssluser.py

Modify SSL-VPN user

Function declaration

Python
1def update_vpn_ssl_user(self, vpn_id, ssluser_id, password=None, description=None, client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/el3b86jjt

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...} # Public description information
3}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_update_ssluser.py

Delete SSL-VPN user

After deleting an SSL-VPN user, if the user is actively connected to SSLVPN, the connection will not be terminated immediately. The user will receive authentication failure information upon their next connection attempt.

Function declaration

Python
1def delete_vpn_ssl_user(self, vpn_id, ssluser_id, client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/Wl3b99ax6

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...} # Public description information
3}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_delete_ssluser.py

Update VPN release protection switch

Function declaration

Python
1def update_vpn_delete_protect(self, vpn_id, delete_protect=False, client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation:https://cloud.baidu.com/doc/VPC/s/Dlzjsmzon

Response value

Operation succeeded:

Plain Text
1{
2 "metadata": {...} # Public description information
3}

Operation failed:

Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_update_vpn_delete_protect.py

Previous
VPC
Next
Service Level Agreement (SLA)