Queries the 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-zhangjiakou

The region ID of the VPN gateway.

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

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.

The value is set to Normal, which indicates a standard NAT gateway.

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 that indicates when the VPN gateway was created. Unit: milliseconds.

This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

AutoPropagate Boolean true

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

  • true: yes
  • false: no
ChargeType String China site (aliyun.com): Prepay. International site (alibabacloud.com): POSTPAY.

The billing method of the VPN gateway. Valid values:

Only POSTPAY is returned, which indicates the pay-as-you-go billing method.

VpnGatewayId String vpn-bp1r3v1xqkl0w519g****

The ID of the VPN gateway.

Tag String {\"VpnEnableBgp\":\"true\",\"VisuallySsl\":\"true\",\"PbrPriority\":\"true\",\"VpnNewImage\":\"true\",\"description\":\"forwarding1.3.7\",\"VpnVersion\":\"v1.2.4\"}

The automatically generated tag of the VPN gateway.

  • VpnEnableBgp: indicates whether the VPN gateway supports BGP. Valid values:
    • true: yes
    • false: no
  • VisuallySsl: indicates whether the VPN gateway allows you to view information about connected SSL clients.
    • true: yes
    • false: no
  • PbrPriority: indicates whether the VPN gateway allows you to configure priorities for policy-based routes.
    • true: yes
    • false: no
  • VpnNewImage: indicates whether the VPN gateway is upgraded.
    • true: yes
    • false: no
  • description: the description of the VPN gateway. This parameter is for internal system use only.
  • VpnVersion: the version of the VPN gateway.
IpsecVpn String enable

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

  • enable: enabled
  • disable: disabled
EndTime Long 1544666102000

The timestamp that indicates when the VPN gateway expires. Unit: milliseconds.

This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

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

Indicates whether BGP is enabled for the VPN gateway. Valid values:

  • true: yes
  • false: no
BusinessStatus String Normal

The payment status of the VPN gateway. Valid values:

  • Normal: The VPN gateway is normal.
  • FinancialLocked: The VPN gateway is 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 specifications.
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 tag key

Value String bbb

The tag value.

NetworkType String public

The network type of the VPN gateway.

  • public: public VPN gateway
  • private: private VPN gateway

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeVpnGateway
&RegionId=cn-zhangjiakou
&VpnGatewayId=vpn-bp1r3v1xqkl0w519g****
&IncludeReservationData=true
&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>{\"VpnEnableBgp\":\"true\",\"VisuallySsl\":\"true\",\"PbrPriority\":\"true\",\"VpnNewImage\":\"true\",\"description\":\"forwarding1.3.7\",\"VpnVersion\":\"v1.2.4\"}</Tag>
    <IpsecVpn>enable</IpsecVpn>
    <EndTime>1544666102000</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>
    <NetworkType>public</NetworkType>
</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" : "{\\\"VpnEnableBgp\\\":\\\"true\\\",\\\"VisuallySsl\\\":\\\"true\\\",\\\"PbrPriority\\\":\\\"true\\\",\\\"VpnNewImage\\\":\\\"true\\\",\\\"description\\\":\\\"forwarding1.3.7\\\",\\\"VpnVersion\\\":\\\"v1.2.4\\\"}",
  "IpsecVpn" : "enable",
  "EndTime" : 1544666102000,
  "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"
  } ],
  "NetworkType" : "public"
}

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. Acquire 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. Acquire 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, see Service error codes.