Queries VPN gateways in a specified 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. Valid values: 1 to 50. Default value: 10.

IncludeReservationData Boolean No false

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

  • false (default): no
  • true: yes
Tag.N.Key String No FinanceDept

The tag key. The tag key cannot be an empty string.

The tag key can be at most 64 characters in length, and cannot contain http:// or https://. The tag key cannot start with aliyun or acs:.

You can specify at most 20 tag keys in each call.

Tag.N.Value String No FinanceJoshua

The tag value.

The tag value can be an empty string and cannot exceed 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

Each tag key corresponds to one tag value. You can specify at most 20 tag values in each call.

Response parameters

Parameter Type Example Description
PageSize Integer 10

The number of entries returned on each page.

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

The ID of the request.

PageNumber Integer 1

The number of the returned page.

TotalCount Integer 1

The number of entries returned.

VpnGateways Array of VpnGateway

The list of VPN gateways.

VpnGateway
VpnType String Normal

The type of the VPN gateway.

  • Normal: standard VPN gateway
  • NationalStandard: ShangMi (SM) VPN gateway
Status String Active

The status of the VPN gateway.

  • 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.
VpcId String vpc-bp1m3i0kn1nd4wiw9****

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

SslMaxConnections Long 5

The number of SSL-VPN connections supported by the VPN gateway.

Spec String 5M

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

InternetIp String 47.12.XX.XX

The public IP address of the VPN gateway.

CreateTime Long 1515383700000

The timestamp that indicates when the VPN gateway was created.

AutoPropagate Boolean true

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

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

The billing method of the VPN gateway.

The value is set to POSTPAY, which indicates the pay-as-you-go billing method.

VpnGatewayId String vpn-bp17lofy9fd0dnvzv****

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 IPsec-VPN is enabled for the VPN gateway.

  • enable: enabled
  • disable: disabled
EndTime Long 1518105600000

The timestamp that indicates when the VPN gateway expires.

VSwitchId String vsw-bp15lbk8sgtr6r5b0****

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

Description String test

The description of the VPN gateway.

EnableBgp Boolean true

The BGP status of the VPN gateway.

  • true: enabled
  • false: disabled
BusinessStatus String Normal

The payment status of the VPN gateway.

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

Indicates whether SSL-VPN is enabled for the VPN gateway.

  • enable: enabled
  • disable: disabled
Name String test

The name of the VPN gateway.

NetworkType String public

The network type of the VPN gateway.

  • public: public VPN gateway
  • private: private VPN gateway
Tags Array of Tag

The list of tags added to the VPN gateway.

Tag
Key String FinanceDept

The key of the tag.

Value String FinanceJoshua

The value of the tag.

ReservationData Object

The information about the pending orders.

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

The status of the pending order.

  • 1: indicates that the order for renewal or the order for renewal with a specification change has not taken effect.
  • 2: indicates that the order for a temporary upgrade has taken effect. After the temporary upgrade expires, the system restores the VPN gateway to its previous specifications. In this case, ReservationIpsec, ReservationMaxConnections, ReservationSpec, and ReservationSsl indicate the previous specifications.
ReservationOrderType String TEMP_UPGRADE

The type of the pending order.

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

The IPsec-VPN status of the pending order.

  • 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.

  • enable: enabled
  • disable: disabled
ReservationMaxConnections Integer 5

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

ReservationEndTime String 2021-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 (renewal with an upgrade or a downgrade) or RENEW (renewal), this parameter indicates the time when the renewal or renewal with an upgrade or a downgrade takes effect.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeVpnGateways
&RegionId=cn-hangzhou
&VpcId=vpc-bp1m3i0kn1nd4wiw9****
&VpnGatewayId=vpn-bp17lofy9fd0dnvzv****
&Status=init
&BusinessStatus=Normal
&PageNumber=1
&PageSize=10
&IncludeReservationData=false
&Tag=[{"Key":"FinanceDept","Value":"FinanceJoshua"}]
&<Common request parameters>

Sample success responses

XML format

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

<DescribeVpnGatewaysResponse>
    <PageSize>10</PageSize>
    <RequestId>DF11D6F6-E35A-41C3-9B20-6FC8A901FE65</RequestId>
    <PageNumber>1</PageNumber>
    <TotalCount>1</TotalCount>
    <VpnGateways>
        <VpnType>Normal</VpnType>
        <Status>Active</Status>
        <VpcId>vpc-bp1m3i0kn1nd4wiw9****</VpcId>
        <SslMaxConnections>5</SslMaxConnections>
        <Spec>5M</Spec>
        <InternetIp>47.12.XX.XX</InternetIp>
        <CreateTime>1515383700000</CreateTime>
        <AutoPropagate>true</AutoPropagate>
        <ChargeType>Example value for Alibaba Cloud China Site: Prepay. Example value for Alibaba Cloud International Site: POSTPAY.</ChargeType>
        <VpnGatewayId>vpn-bp17lofy9fd0dnvzv****</VpnGatewayId>
        <Tag>{\"VpnNewImage\":\"true\",\"VpnVersion\":\"v1.2.2\"}</Tag>
        <IpsecVpn>enable</IpsecVpn>
        <EndTime>1518105600000</EndTime>
        <VSwitchId>vsw-bp15lbk8sgtr6r5b0****</VSwitchId>
        <Description>test</Description>
        <EnableBgp>true</EnableBgp>
        <BusinessStatus>Normal</BusinessStatus>
        <SslVpn>enable</SslVpn>
        <Name>test</Name>
        <Tags>
            <Key>FinanceDept</Key>
            <Value>FinanceJoshua</Value>
        </Tags>
        <ReservationData>
            <Status>1</Status>
            <ReservationOrderType>TEMP_UPGRADE</ReservationOrderType>
            <ReservationIpsec>enable</ReservationIpsec>
            <ReservationSpec>5</ReservationSpec>
            <ReservationSsl>enable</ReservationSsl>
            <ReservationMaxConnections>5</ReservationMaxConnections>
            <ReservationEndTime>2021-07-20T16:00:00Z</ReservationEndTime>
        </ReservationData>
    </VpnGateways>
</DescribeVpnGatewaysResponse>

JSON format

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

{
  "PageSize" : 10,
  "RequestId" : "DF11D6F6-E35A-41C3-9B20-6FC8A901FE65",
  "PageNumber" : 1,
  "TotalCount" : 1,
  "VpnGateways" : [ {
    "VpnType" : "Normal",
    "Status" : "Active",
    "VpcId" : "vpc-bp1m3i0kn1nd4wiw9****",
    "SslMaxConnections" : 5,
    "Spec" : "5M",
    "InternetIp" : "47.12.XX.XX",
    "CreateTime" : 1515383700000,
    "AutoPropagate" : true,
    "ChargeType": Example value for Alibaba Cloud China Site: Prepay. Example value for Alibaba Cloud International Site: POSTPAY.
    "VpnGatewayId" : "vpn-bp17lofy9fd0dnvzv****",
    "Tag" : "{\\\"VpnNewImage\\\":\\\"true\\\",\\\"VpnVersion\\\":\\\"v1.2.2\\\"}",
    "IpsecVpn" : "enable",
    "EndTime" : 1518105600000,
    "VSwitchId" : "vsw-bp15lbk8sgtr6r5b0****",
    "Description" : "test",
    "EnableBgp" : true,
    "BusinessStatus" : "Normal",
    "SslVpn" : "enable",
    "Name" : "test",
    "Tags" : [ {
      "Key" : "FinanceDept",
      "Value" : "FinanceJoshua"
    } ],
    "ReservationData" : {
      "Status" : "1",
      "ReservationOrderType" : "TEMP_UPGRADE",
      "ReservationIpsec" : "enable",
      "ReservationSpec" : "5",
      "ReservationSsl" : "enable",
      "ReservationMaxConnections" : 5,
      "ReservationEndTime" : "2021-07-20T16:00:00Z"
    }
  } ]
}

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 the operation on the specified resource. Acquire the required permissions and try again.

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