Queries VPN gateways in a region.

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 DescribeVpnGateways

The operation that you want to perform.

Set the value to DescribeVpnGateways.

RegionId String Yes cn-hangzhou

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

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

VpcId String No vpc-bp1m3i0kn1nd4wiw9****

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

VpnGatewayId String No vpn-bp17lofy9fd0dnvzv****

The ID of the VPN gateway.

Status String No 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 No Normal

The payment status of the VPN gateway. Valid values:

  • Normal: normal
  • FinancialLocked: locked due to overdue payments
PageNumber Integer No 1

The number of the page to return. Default value: 1.

PageSize Integer No 10

The number of entries to return on each page. Maximum value: 50. Default value: 10.

IncludeReservationData Boolean No false

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

  • false (default): Information about orders that have not taken effect is not returned.
  • true: Information about orders that have not taken effect is returned.
Tag.N.Key String No aaa

The tag key. Valid values of N: 1 to 20.

The tag key cannot be an empty string. The tag key cannot exceed 64 characters in length, and cannot start with http:// or https://.

Tag.N.Value String No bbb

The tag value. Valid values of N: 1 to 20.

The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with http:// or https://.

Response parameters

Parameter Type Example Description
VpnGateways Array of VpnGateway

Detailed information about the VPN gateways.

VpnGateway
VpnGatewayId String vpn-bp17lofy9fd0dnvzv****

The ID of the VPN gateway.

VpcId String vpc-bp1m3i0kn1nd4wiw9****

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

VSwitchId String vsw-bp15lbk8sgtr6r5b0****

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

InternetIp String 47.XX.XX.246

The public IP address of the VPN gateway.

CreateTime Long 1515383700000

The timestamp when the VPN gateway was created.

EndTime Long 1518105600000

The timestamp to be generated when the VPN gateway expires.

Spec String 5M

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

Name String test

The name of the VPN gateway.

Description String test

The description of the VPN gateway.

Status String active

The status of the VPN gateway.

BusinessStatus String Normal

The payment status of the VPN gateway.

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.

  • true: enabled
  • false: disabled
IpsecVpn String enable

Indicates whether the IPsec-VPN feature is enabled.

  • enable: enabled
  • disable: disabled
ReservationData Struct

The information about 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

Indicates whether the SSL-VPN feature is enabled.

  • 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
TotalCount Integer 1

The total number of entries returned.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries returned on the current page.

RequestId String DF11D6F6-E35A-41C3-9B20-6FC8A901FE65

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeVpnGateways
&IncludeReservationData=false
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<DescribeVpnGatewaysResponse>
  <TotalCount>1</TotalCount>
  <RequestId>0349784A-B54B-4ED9-9EEA-E6DE0DF4F0EC</RequestId>
  <PageSize>10</PageSize>
  <PageNumber>1</PageNumber>
  <VpnGateways>
        <VpnGateway>
              <Status>active</Status>
              <IpsecVpn>enable</IpsecVpn>
              <SslVpn>enable</SslVpn>
              <VpnType>Normal</VpnType>
              <EnableBgp>false</EnableBgp>
              <EndTime>1623081600000</EndTime>
              <VSwitchId>vsw-bp15lbk8sgtr6r5b0****</VSwitchId>
              <CreateTime>1612685370000</CreateTime>
              <BusinessStatus>Normal</BusinessStatus>
              <Name></Name>
              <VpcId>vpc-bp1m3i0kn1nd4wiw9****</VpcId>
              <InternetIp>47.XX.XX.246</InternetIp>
              <VpnGatewayId>vpn-bp17lofy9fd0dnvzv****</VpnGatewayId>
              <ChargeType>Prepay</ChargeType>
              <Tag>{"VpnNewImage":"true","VpnVersion":"v1.2.2"}</Tag>
              <Spec>5M</Spec>
              <SslMaxConnections>10</SslMaxConnections>
              <ReservationData></ReservationData>
        </VpnGateway>
  </VpnGateways>
</DescribeVpnGatewaysResponse>

JSON format

{
  "TotalCount": 1,
  "RequestId": "0349784A-B54B-4ED9-9EEA-E6DE0DF4F0EC",
  "PageSize": 10,
  "PageNumber": 1,
  "VpnGateways": {
    "VpnGateway": [
      {
        "Status": "active",
        "IpsecVpn": "enable",
        "SslVpn": "enable",
        "VpnType": "Normal",
        "EnableBgp": false,
        "EndTime": 1623081600000,
        "VSwitchId": "vsw-bp15lbk8sgtr6r5b0****",
        "CreateTime": 1612685370000,
        "BusinessStatus": "Normal",
        "Name": "",
        "VpcId": "vpc-bp1m3i0kn1nd4wiw9****",
        "InternetIp": "47.XX.XX.246",
        "VpnGatewayId": "vpn-bp17lofy9fd0dnvzv****",
        "ChargeType": "Prepay",
        "Tag": "{\"VpnNewImage\":\"true\",\"VpnVersion\":\"v1.2.2\"}",
        "Spec": "5M",
        "SslMaxConnections": 10,
        "ReservationData": {}
      }
    ]
  }
}

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 the operation on the specified resource. To acquire the required permissions, submit a ticket.

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