Querying a VPN Server Based on a Specified Gateway ID
Function
This API is used to query a VPN server based on a specified P2C VPN gateway ID.
Calling Method
For details, see Calling APIs.
URI
GET /v5/{project_id}/p2c-vpn-gateways/{p2c_vgw_id}/vpn-servers
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID. |
p2c_vgw_id |
String |
Yes |
Specifies the ID of a P2C VPN gateway instance. |
Request
Response
- Response parameters
Returned status code 200: successful query
Table 2 Parameters in the response body Parameter
Type
Description
vpn_servers
Array of ShowServerResponse
objects
Specifies server list information.
total_count
integer
Specifies the total number of records.
page_info
Specifies pagination query information.
request_id
String
Specifies a request ID.
Table 3 ShowServerResponse Parameter
Type
Description
id
String
- Specifies the ID of a VPN server.
- The value is a UUID containing 36 characters.
p2c_vgw_id
String
- Specifies the ID of a P2C VPN gateway.
- The value is a UUID containing 36 characters.
client_cidr
String
- Specifies a client CIDR block. A virtual IP address on this CIDR block will be assigned to a client for establishing a connection.
- The value is in the format of dotted decimal notation/mask, for example, 192.168.1.0/24.
local_subnets
Array of strings
- Specifies the list of local CIDR blocks.
- The value is in the format of dotted decimal notation/mask, for example, 10.10.1.0/24.
client_auth_type
String
tunnel_protocol
String
server_certificate
server_certificate object
Specifies server certificate information.
client_ca_certificates
Array of QueryClientCaCertificateBody objects
Specifies the list of client CA certificates, which are used to authenticate client certificates.
ssl_options
ssl_options object
Specifies SSL options.
dns_servers
Array of strings
- Specifies the DNS server list.
- The value is in dotted decimal notation, for example, 172.16.1.1.
status
String
created_at
String
- Specifies the creation time.
- The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
updated_at
String
- Specifies the last update time.
- The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
Table 4 server_certificate Parameter
Type
Description
id
String
Specifies a certificate ID, which is the ID of a certificated uploaded in the CCM. This parameter is left empty if the certificate is deleted from the CCM.
name
String
Specifies a certificate name, which is the name of a certificated uploaded in the CCM.
issuer
String
- Specifies the issuer of a certificate.
- The value is a string of 1 to 256 characters.
subject
String
- Specifies the subject of a certificate.
- The value is a string of 1 to 256 characters.
serial_number
String
- Specifies the serial number of a certificate.
- The value is a string of 1 to 64 characters.
expiration_time
String
- Specifies the expiration time.
- The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
signature_algorithm
String
- Specifies the signature algorithm of a certificate.
- The value is a string of 1 to 64 characters.
Table 5 QueryClientCaCertificateBody Parameter
Type
Description
id
String
- Specifies a certificate ID.
- The value is a UUID containing 36 characters.
name
String
- Specifies a certificate name.
- The value is a string of 1 to 64 characters, which can contain digits, letters, underscores (_), and hyphens (-).
issuer
String
- Specifies the issuer of a certificate.
- The value is a string of 1 to 256 characters.
subject
String
- Specifies the subject of a certificate.
- The value is a string of 1 to 256 characters.
serial_number
String
- Specifies the serial number of a CA certificate.
- The value is a string of 1 to 64 characters.
expiration_time
String
- Specifies the expiration time of a certificate.
- The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
signature_algorithm
String
- Specifies the signature algorithm of a certificate.
- The value is a string of 1 to 64 characters.
created_at
String
- Specifies the creation time.
- The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
updated_at
String
- Specifies the last update time.
- The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
Table 6 ssl_options Parameter
Type
Description
protocol
string
- Specifies a protocol.
- Value range: TCP
port
integer
- Specifies a port number.
- Value range:
- 443
- 1194
encryption_algorithm
string
- Specifies an encryption algorithm.
- Value range:
- AES-128-GCM
- AES-256-GCM
authentication_algorithm
string
- Specifies an authentication algorithm.
- Value range:
- SHA256
- SHA384
is_compressed
boolean
- Specifies whether to compress data. By default, data is not compressed.
- Value range:
- true
- false
- Example response
{ "vpn_servers": [ { "id": "2407a20d-0bf7-4530-ba9a-7ffa0cedfa3b", "p2c_vgw_id": "3b5b64e4-2927-4062-acf6-05b0b842bbfe", "client_cidr": "1.1.0.0/16", "local_subnets": [ "192.168.12.0/24", "192.168.1.0/24" ], "client_auth_type": "LOCAL_PASSWORD", "tunnel_protocol": "SSL", "server_certificate": { "id": "scs1716171403922", "name": "lsh-newcert", "issuer": "C=CN,ST=beijing,L=haidian,O=lesaas,OU=root,CN=www.***.com", "subject": "C=CN,ST=beijing,L=haidian,O=server,OU=server,CN=www.***.com", "serial_number": "310325804134830162280305057622726926320418980636", "expiration_time": "2024-06-19T02:15:26Z", "signature_algorithm": "SHA256WITHRSA" }, "client_ca_certificates": [], "ssl_options": { "protocol": "TCP", "port": 443, "encryption_algorithm": "AES-128-GCM", "authentication_algorithm": "SHA256", "is_compressed": false }, "status": "ACTIVE", "created_at": "2024-06-14T01:14:56.802Z", "updated_at": "2024-06-14T08:53:22.855Z" } ], "request_id": "3378c265585ffb8aac68ec39a2db67a1" }
Status Codes
For details, see Status Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.