Query the created VPN Gateways.

Request parameters

Name Type Required Description
Action String Yes

The action to perform. Valid value:

DescribeVpnGateways

RegionId String Yes

The region of the VPN gateway.

You can obtain the region ID by calling the DescribeRegions API.

VpcId String No

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

Status String No The status of the VPN gateway. Valid value:
  • init
  • provisioning
  • active
  • updating
  • deleting
BusinessStatus String No The payment status of the NAT gateway, valid value:

Normal | FinancialLocked

PageNumber Integer No

The number of pages to return. The default value is 1.

PageSize Integer No

The number of rows per page. The maximum value is 50 and the the default value is 10.

Response parameters

Name Type Description
RequestId String The ID of the request.
TotalCount Integer  The number of queried entries.
PageNumber Integer The current page number.
PageSize Integer The number of entries on the current page.
VpnGateways List A list of VPN gateways.
Table 1. VpnGateway
Name Type Description
VpnGatewayId String The ID of the VPN gateway.
VpcId String The ID of the VPC to which the VPN gateway belongs.
VSwitchId String The ID of the VSwitch to which the VPN gateway belongs.
InternetIp String The public IP address.
CreateTime Long The time when the VPN gateway was created.
EndTime Long The time when the VPN gateway expires.
Spec String The specification of the VPN gateway.
Name String The name of the VPN gateway.
Description String The description of the VPN gateway.
Status String The status of the VPN gateway. 
BusinessStatus String The business status of the VPN gateway.

Examples

Request example

https://vpc.aliyuncs.com/?Action=DescribeVpnGateways
&RegionID=cn-hangzhou
&CommonParameters
Response example
  • XML format

    <? xml version="1.0" encoding="UTF-8"? >
    <DescribeVpnGatewaysResponse>
        <PageNumber>1</PageNumber>
        <TotalCount>1</TotalCount>
        <PageSize>10</PageSize>
        <VpnGateways>
            <VpnGateway>
                <Status>active</Status>
                <VpnGatewayId>vpn-bp1q8bgx4xnkm2ogj0fiu</VpnGatewayId>
                <BusinessStatus>Normal</BusinessStatus>
                <Spec>5M</Spec>
                <CreateTime>1492753580000</CreateTime>
                <InternetIp>116.62.69.64</InternetIp>
                <EndTime>1495382400000</EndTime>
                <VSwitchId>vsw-bp1y9ovl1cu9ou4tvma0l</VSwitchId>
                <VpcId>vpc-bp1ub1yt9cvakoelj1y9c</VpcId>
            </VpnGateway>
        </VpnGateways>
        <RequestId>DF11D6F6-E35A-41C3-9B20-6FC8A901FE65</RequestId>
    </DescribeVpnGatewaysResponse>
  • JSON format

    {
        "PageNumber": 1, 
        "TotalCount": 1, 
        "VpnGateways": {
            "VpnGateway": [
                {
                    "Status": "active", 
                    "VpnGatewayId": "vpn-bp1q8bgx4xnkm2ogj0fiu", 
                    "BusinessStatus": "Normal", 
                    "Spec": "5M", 
                    "CreateTime": 1492753580000, 
                    "InternetIp": "116.62.69.64", 
                    "EndTime": 1495382400000, 
                    "VSwitchId": "vsw-bp1y9ovl1cu9ou4tvma0l", 
                    "VpcId": "vpc-bp1ub1yt9cvakoelj1y9c"
                }
            ]
        }, 
        "PageSize": 10, 
        "RequestId": "B2CD1315-CA2B-47B1-9DA5-8F1D69C48E82"
    }