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. Maximum value: 50. Default value: 10.

IncludeReservationData Boolean No false

Specifies whether to return the pending orders. Valid values:

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

The key of the tag that is added to the resource. Valid values of N: 1 to 20. 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:.

Tag.N.Value String No FinanceJoshua

The value of the tag that is added to the resource. 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 acs: or aliyun. The tag value cannot contain http:// or https://.

Response parameters

Parameter Type Example Description
PageSize Integer 10

The number of entries returned per page.

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

The ID of the request.

PageNumber Integer 1

The page number of the returned page.

TotalCount Integer 1

The total number of entries returned.

VpnGateways Array of VpnGateway

The detailed information about the VPN gateways.

VpnGateway
VpnType String Normal

The type of the VPN gateway. Valid values:

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

The status of the VPN gateway.

VpcId String vpc-bp1m3i0kn1nd4wiw9****

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

SslMaxConnections Long 5

The maximum number of concurrent SSL-VPN connections.

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 China site (aliyun.com): Prepay. International site (alibabacloud.com): POSTPAY.

The billing method of the VPN gateway. Valid values:

  • POSTPAY: pay-as-you-go
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 the IPsec-VPN feature is enabled. Valid values:

  • 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. Valid values:

  • true: enabled
  • false: disabled
BusinessStatus String Normal

The payment status of the VPN gateway.

SslVpn String enable

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

  • enable: enabled
  • disable: disabled
Name String test

The name of the VPN gateway.

Tags Array of Tag

The custom tags of 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 is an order for renewal or renewal with upgrade or downgrade and the order has not taken effect.
  • 2: indicates that the order is an order for temporary upgrade and the order 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. 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 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 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 upgrade or downgrade) or RENEW (renewal), this parameter indicates the time when the renewal or renewal with upgrade or downgrade takes effect.

Examples

Sample request

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 China site (aliyun.com): Prepay. Example value for International site (alibabacloud.com): 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  China site (aliyun.com): Prepay. Example value for International site (alibabacloud.com): 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.