Queries detailed information about a VPN gateway.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeVpnGateway

The operation that you want to perform. Set the value to DescribeVpnGateway.

RegionId String Yes cn-shanghai

The ID of the region where the VPN gateway is created.

You can call the DescribeRegions operation to query the most recent region list.

VpnGatewayId String Yes vpn-bp1r3v1xqkl0w519g****

The ID of the VPN gateway.

IncludeReservationData Boolean No true

Specify whether to return information about orders that have not taken effect. Valid values:

  • false: Information about orders that have not taken effect is not returned. This is the default value.
  • true: Information about orders that have not taken effect is returned.

Response parameters

Parameter Type Example Description
VpnGatewayId String vpn-bp1r3v1xqkl0w519g****

The ID of the VPN gateway.

VpcId String vpc-bp19m2yx1m5q0avyq****

The ID of the VPC to which the VPN gateway belongs.

VSwitchId String vsw-bp1dmzugdikc6hdgx****

The ID of the vSwitch to which the VPN gateway is attached.

InternetIp String 47.XX.XX.22

The public IP address of the VPN gateway.

CreateTime Long 1495382400000

The timestamp when the VPN gateway was created.

EndTime Long 1495382400000

The timestamp to be generated when the VPN gateway expires.

Spec String 5

The maximum bandwidth of the VPN gateway. Unit: Mbit/s.

Name String vpngatewayname

The name of the VPN gateway.

Description String vpngatewaydescription

The description of the VPN gateway.

Status String init

The status of the VPN gateway. Valid values:

  • init: The VPN gateway is being initialized.
  • provisioning: The VPN gateway is being prepared.
  • active: The VPN gateway is running as expected.
  • updating: The VPN gateway is being updated.
  • Deleting: The VPN gateway is being deleted.
BusinessStatus String Normal

The payment status of the VPN gateway. Valid values:

  • Normal: The VPN gateway is running as expected.
  • FinancialLocked: The VPN gateway is locked due to overdue payments
AutoPropagate Boolean true

Indicates whether BGP routes are automatically advertised to VPCs. Valid values:

  • true: yes
  • false: no
ChargeType String Alibaba Cloud China Site: PREPAY. Alibaba Cloud International Site: POSTPAY.

The billing method. Valid values:

POSTPAY: pay-as-you-go

EnableBgp Boolean true

The BGP status of the VPN gateway. Valid values:

  • true: enabled
  • false: disabled
IpsecVpn String enable

Indicates whether the IPsec-VPN feature is enabled. Valid values:

  • Enable: enabled
  • Disable : disabled
RequestId String 27E4E088-8DE0-4672-BF5C-0A412389DB9E

The ID of the request.

ReservationData Struct

The information about the orders that have not taken effect.

Note This parameter is returned only when IncludeReservationData is set to true.
ReservationEndTime String 2020-07-20T16:00:00Z

If the order type is TEMP_UPGRADE (temporary upgrade), this parameter specifies the time when the temporary upgrade expires.

If the order type is RENEWCHANGE (specification change) or RENEW (renewal), this parameter specifies the time when the renewal or specification change takes effect.

ReservationIpsec String enable

The IPsec-VPN status of the order that has not taken effect. Valid values:

  • Enable: enabled
  • Disable : disabled
ReservationMaxConnections Integer 5

The maximum number of concurrent SSL-VPN connections for the order that has not taken effect.

ReservationOrderType String TEMP_UPGRADE

The type of the order that has not taken effect. Valid values:

  • RENEWCHANGE: specification change
  • TEMP_UPGRADE: temporary upgrade
  • RENEW: renewal
ReservationSpec String 5

The bandwidth specification of the order that has not taken effect. Unit: Mbit/s.

ReservationSsl String enable

The SSL-VPN status of the order that has not taken effect. Valid values:

  • enable: enabled
  • disable: disabled
Status String 1

The status of the order that has not taken effect.

  • 1: indicates that the order of the renewal or specification change has not taken effect.
  • 2: indicates that the order of the temporary upgrade has taken effect. After the temporary upgrade expires, the system restores the VPN gateway to its previous specification. In this case, ReservationIpsec, ReservationMaxConnections, ReservationSpec, and ReservationSsl indicate the previous specification.
SslMaxConnections Long 5

The maximum number of concurrent SSL-VPN connections.

SslVpn String enable

The status of the SSL-VPN feature.

  • Enable: enabled
  • Disable : disabled
Tag String {\"VpnNewImage\":\"true\",\"VpnVersion\":\"v1.2.2\"}

The automatically generated tag of the VPN gateway.

Tags Array of Tag

The custom tag of the VPN gateway.

Tag
Key String aaa

The tag key.

Value String bbb

The tag value.

VpnType String Normal

The type of the VPN gateway. Valid values:

  • Normal: standard
  • NationalStandard: China certification

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeVpnGateway
&RegionId=cn-shanghai
&VpnGatewayId=vpn-bp1r3v1xqkl0w519g****
&<Common request parameters>

Sample success responses

XML format

<DescribeVpnGatewayResponse>
  <Status>active</Status>
  <IpsecVpn>enable</IpsecVpn>
  <SslVpn>disable</SslVpn>
  <VpnType>Normal</VpnType>
  <EnableBgp>false</EnableBgp>
  <RequestId>27E4E088-8DE0-4672-BF5C-0A412389DB9E</RequestId>
  <EndTime>1616428800000</EndTime>
  <VSwitchId>vsw-bp1dmzugdikc6hdgx****</VSwitchId>
  <CreateTime>1613974090000</CreateTime>
  <BusinessStatus>Normal</BusinessStatus>
  <Name></Name>
  <VpcId>vpc-bp19m2yx1m5q0avyq****</VpcId>
  <InternetIp>47.XX.XX.22</InternetIp>
  <VpnGatewayId>vpn-bp1r3v1xqkl0w519g****</VpnGatewayId>
  <ChargeType>Prepay</ChargeType>
  <Tag>{"VpnNewImage":"true","VpnVersion":"v1.2.2"}</Tag>
  <Spec>5M</Spec>
</DescribeVpnGatewayResponse>

JSON format

{
  "Status": "active",
  "IpsecVpn": "enable",
  "SslVpn": "disable",
  "VpnType": "Normal",
  "EnableBgp": false,
  "RequestId": "27E4E088-8DE0-4672-BF5C-0A412389DB9E",
  "EndTime": 1616428800000,
  "VSwitchId": "vsw-bp1dmzugdikc6hdgx****",
  "CreateTime": 1613974090000,
  "BusinessStatus": "Normal",
  "Name": "",
  "VpcId": "vpc-bp19m2yx1m5q0avyq****",
  "InternetIp": "47.XX.XX.22",
  "VpnGatewayId": "vpn-bp1r3v1xqkl0w519g****",
  "ChargeType": "Prepay",
  "Tag": "{\"VpnNewImage\":\"true\",\"VpnVersion\":\"v1.2.2\"}",
  "Spec": "5M"
}

Error codes

HttpCode Error code Error message Description
403 Forbbiden.SubUser User not authorized to operate on the specified resource as your account is created by another user. The error message returned because you are unauthorized to perform this operation on the specified resource. You can apply for the required permissions and try again.
403 Forbidden User not authorized to operate on the specified resource. The error message returned because you are unauthorized to perform this operation on the specified resource. To acquire the required permissions, submit a ticket.
404 InvalidVpnGatewayInstanceId.NotFound The specified vpn gateway instance id does not exist. The error message returned because the specified VPN gateway does not exist. Check whether the configuration of the VPN gateway is valid.

For a list of error codes, visit the API Error Center.