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 false

Specifies whether to return information about pending orders. Valid values:

  • false (default): no
  • true: yes

Response parameters

Parameter Type Example Description
VpnType String Normal

The type of the VPN gateway. Valid values:

  • Normal: standard
  • NationalStandard: ShangMi (SM)
Status String init

The status of the VPN gateway. Valid values:

  • init: being initialized
  • provisioning : being prepared
  • active: active
  • updating: being updated
  • Deleting: being deleted
VpcId String vpc-bp19m2yx1m5q0avyq****

The ID of the virtual private cloud (VPC) to which the VPN gateway belongs.

SslMaxConnections Long 5

The maximum number of concurrent SSL-VPN connections.

Spec String 5

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

InternetIp String 47.22.XX.XX

The public IP address of the VPN gateway.

CreateTime Long 1495382400000

The timestamp when the VPN gateway was created.

AutoPropagate Boolean true

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

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

The billing method. Valid values:

POSTPAY: pay-as-you-go

VpnGatewayId String vpn-bp1r3v1xqkl0w519g****

The ID of the VPN gateway.

Tag String {\"VpnNewImage\":\"true\",\"VpnVersion\":\"v1.2.2\"}

The automatically generated tag of the VPN gateway.

IpsecVpn String enable

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

  • enable: enabled
  • disable: disabled
EndTime Long 1495382400000

The timestamp to be generated when the VPN gateway expires.

VSwitchId String vsw-bp1dmzugdikc6hdgx****

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

RequestId String 27E4E088-8DE0-4672-BF5C-0A412389DB9E

The ID of the request.

Description String vpngatewaydescription

The description of the VPN gateway.

EnableBgp Boolean true

The BGP status of the VPN gateway. Valid values:

  • true: enabled
  • false: disabled
BusinessStatus String Normal

The payment status of the VPN gateway. Valid values:

  • Normal: normal
  • FinancialLocked: locked due to overdue payments
SslVpn String enable

The status of the SSL-VPN feature. Valid values:

  • enable: enabled
  • disable: disabled
Name String vpngatewayname

The name of the VPN gateway.

ReservationData Object

The information about pending orders.

Note This parameter is returned only when IncludeReservationData is set to true.
Status String 1

The status of the pending order. Valid values:

  • 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.
ReservationOrderType String TEMP_UPGRADE

The type of the pending order. Valid values:

  • RENEWCHANGE: renewal with upgrade or downgrade
  • TEMP_UPGRADE: temporary upgrade
  • RENEW: renewal
ReservationIpsec String enable

The IPsec-VPN status of the pending order. Valid values:

  • enable: enabled
  • disable: disabled
ReservationSpec String 5

The bandwidth specification of the pending order. Unit: Mbit/s.

ReservationSsl String enable

The SSL-VPN status of the pending order. Valid values:

  • enable: enabled
  • disable: disabled
ReservationMaxConnections Integer 5

The maximum number of concurrent SSL-VPN connections for the pending order.

ReservationEndTime String 2020-07-20T16:00:00Z

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

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

Tags Array of Tag

The custom tag of the VPN gateway.

Tag
Key String aaa

The key of the tag.

Value String bbb

The value of the tag.

Examples

Sample requests

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

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeVpnGatewayResponse>
    <VpnType>Normal</VpnType>
    <Status>init</Status>
    <VpcId>vpc-bp19m2yx1m5q0avyq****</VpcId>
    <SslMaxConnections>5</SslMaxConnections>
    <Spec>5</Spec>
    <InternetIp>47.22.XX.XX</InternetIp>
    <CreateTime>1495382400000</CreateTime>
    <AutoPropagate>true</AutoPropagate>
    <ChargeType>Example value for Alibaba Cloud China Site: PREPAY. Example value for Alibaba Cloud International Site: POSTPAY.</ChargeType>
    <VpnGatewayId>vpn-bp1r3v1xqkl0w519g****</VpnGatewayId>
    <Tag>{\"VpnNewImage\":\"true\",\"VpnVersion\":\"v1.2.2\"}</Tag>
    <IpsecVpn>enable</IpsecVpn>
    <EndTime>1495382400000</EndTime>
    <VSwitchId>vsw-bp1dmzugdikc6hdgx****</VSwitchId>
    <RequestId>27E4E088-8DE0-4672-BF5C-0A412389DB9E</RequestId>
    <Description>vpngatewaydescription</Description>
    <EnableBgp>true</EnableBgp>
    <BusinessStatus>Normal</BusinessStatus>
    <SslVpn>enable</SslVpn>
    <Name>vpngatewayname</Name>
    <ReservationData>
        <Status>1</Status>
        <ReservationOrderType>TEMP_UPGRADE</ReservationOrderType>
        <ReservationIpsec>enable</ReservationIpsec>
        <ReservationSpec>5</ReservationSpec>
        <ReservationSsl>enable</ReservationSsl>
        <ReservationMaxConnections>5</ReservationMaxConnections>
        <ReservationEndTime>2020-07-20T16:00:00Z</ReservationEndTime>
    </ReservationData>
    <Tags>
        <Key>aaa</Key>
        <Value>bbb</Value>
    </Tags>
</DescribeVpnGatewayResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "VpnType" : "Normal",
  "Status" : "init",
  "VpcId" : "vpc-bp19m2yx1m5q0avyq****",
  "SslMaxConnections" : 5,
  "Spec" : "5",
  "InternetIp" : "47.22.XX.XX",
  "CreateTime" : 1495382400000,
  "AutoPropagate" : true,
  "ChargeType": Example value for Alibaba Cloud China Site: PREPAY. Example value for Alibaba Cloud International Site: POSTPAY.
  "VpnGatewayId" : "vpn-bp1r3v1xqkl0w519g****",
  "Tag" : "{\\\"VpnNewImage\\\":\\\"true\\\",\\\"VpnVersion\\\":\\\"v1.2.2\\\"}",
  "IpsecVpn" : "enable",
  "EndTime" : 1495382400000,
  "VSwitchId" : "vsw-bp1dmzugdikc6hdgx****",
  "RequestId" : "27E4E088-8DE0-4672-BF5C-0A412389DB9E",
  "Description" : "vpngatewaydescription",
  "EnableBgp" : true,
  "BusinessStatus" : "Normal",
  "SslVpn" : "enable",
  "Name" : "vpngatewayname",
  "ReservationData" : {
    "Status" : "1",
    "ReservationOrderType" : "TEMP_UPGRADE",
    "ReservationIpsec" : "enable",
    "ReservationSpec" : "5",
    "ReservationSsl" : "enable",
    "ReservationMaxConnections" : 5,
    "ReservationEndTime" : "2020-07-20T16:00:00Z"
  },
  "Tags" : [ {
    "Key" : "aaa",
    "Value" : "bbb"
  } ]
}

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. 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. Apply for the required permissions and try again.
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 specified VPN gateway is valid.

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