Queries VPN Gateways.

Debug

By using API Explorer, you can easily debug APIs, automatically generate SDK code examples, and quickly search for APIs.

Request parameters

Parameter Type Required? Example value Description
Action String Yes DescribeVpnGateways

The name of this action. Value:

DescribeVpnGateways

RegionId String Yes cn-hangzhou

The ID of the region to which the VPN Gateway belongs.

To query the region ID, call DescribeRegions.

BusinessStatus String No Normal The status of the VPN Gateway. Valid values:

Normal | FinancialLocked

PageNumber Integer No 1

The number of pages to return. Default value: 1.

PageSize Integer No 10

The number of rows per page. Maximum value: 50. Default value: 10.

Status String No init The status of the VPN Gateway. Valid values:
  • init
  • provisioning
  • active
  • updating
  • deleting
VpcId String No vpc-bp1ub1yt9cvakoelj1y9c

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

VpnGatewayId String No vpn-bp1q8bgx4xnkm2ogj0fiu

The ID of the VPN Gateway.

Response parameters

Parameter Type Example value Description
VpnGateways N/A N//A

A list of VPN Gateways.

 └VpnGatewayId String vpn-bp1q8bgx4xnkm2ogj0fiu

The ID of the VPN Gateway.

 └VpcId String vpc-bp1ub1yt9cvakoelj1y9c

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

 └VSwitchId String vsw-bp1y9ovl1cu9ou4tvma0l

The ID of the VSwitch to which the VPN Gateway belongs.

 └InternetIp String 116.62.69.xxx

The public IP address of the VPN Gateway.

 └CreateTime Long 1515383700000

The time at which the VPN Gateway was created.

 └EndTime Long 1518105600000

The time at which the VPN Gateway is to expire.

 └Spec String 5M

The peak bandwidth of the VPN Gateway.

 └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 business status of the VPN Gateway.

 └ChargeType String Prepay

The billing type.

 └IpsecVpn String enable

Indicates whether the IPSec-VPN function is enabled.

 └SslMaxConnections Long 5

The maximum number of SSL-VPN clients allowed to connect.

 └SslVpn String enable

Indicates whether the SSL-VPN function is enabled.

TotalCount Integer 1

The number of queries entries.

PageNumber Integer 1

The current page number.

PageSize Integer 10

The number of entries per page.

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

The ID of the request.

Examples

Request example


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

    <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.xxx</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,
    	"PageSize":10,
    	"VpnGateways":{
    		"VpnGateway":[
    			{
    				"Status":"active",
    				"VpnGatewayId":"vpn-bp1q8bgx4xnkm2ogj0fiu",
    				"Spec":"5M",
    				"BusinessStatus":"Normal",
    				"CreateTime":1492753580000,
    				"InternetIp":"116.62.69.xxx",
    				"EndTime":1495382400000,
    				"VSwitchId":"vsw-bp1y9ovl1cu9ou4tvma0l",
    				"VpcId":"vpc-bp1ub1yt9cvakoelj1y9c"
    			}
    		]
    	},
    	"RequestId":"B2CD1315-CA2B-47B1-9DA5-8F1D69C48E82"
    }

Error codes

HTTP status code 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. You are not authorized to operate on this resource. Please apply for the permission and try again.
403 Forbidden User not authorized to operate on the specified resource. You are not authorized to operate on this resource. For more information, open a ticket.

See common error codes