edit-icon download-icon

DescribeVpnGateways

Last Updated: Apr 12, 2018

Description

Query the list of 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 business status of the VPN 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 default value is 10.

Response parameters

Name Type Description
RequestId String The ID of the request.
VpnGateways JSON string The list of queried VPN gateways.
TotalCount Integer The number of queried entries.
PageNumber Integer The current page number.
PageSize Integer The number of entries on the current page.
VpnGateways objects
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 creation time of the VPN gateway.
EndTime Long The expiration time of the VPN gateway.
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.

Error codes

See VPC API Error Center.

Examples

Request example

  1. https://vpc.aliyuncs.com/?Action=DescribeVpnGateways
  2. &RegionID=cn-hangzhou
  3. &<CommonParameters>

Response example

XML format

  1. <DescribeVpnGatewaysResponse>
  2. <PageNumber>1</PageNumber>
  3. <TotalCount>1</TotalCount>
  4. <PageSize>10</PageSize>
  5. <VpnGateways>
  6. <VpnGateway>
  7. <Status>active</Status>
  8. <VpnGatewayId>vpn-bp1q8bgx4xnkm2ogj0fiu</VpnGatewayId>
  9. <BusinessStatus>Normal</BusinessStatus>
  10. <Spec>5M</Spec>
  11. <CreateTime>1492753580000</CreateTime>
  12. <InternetIp>116.62.69.64</InternetIp>
  13. <EndTime>1495382400000</EndTime>
  14. <VSwitchId>vsw-bp1y9ovl1cu9ou4tvma0l</VSwitchId>
  15. <VpcId>vpc-bp1ub1yt9cvakoelj1y9c</VpcId>
  16. </VpnGateway>
  17. </VpnGateways>
  18. <RequestId>DF11D6F6-E35A-41C3-9B20-6FC8A901FE65</RequestId>
  19. </DescribeVpnGatewaysResponse>

JSON format

  1. {
  2. "PageNumber":1,
  3. "TotalCount":1,
  4. "VpnGateways":{
  5. "VpnGateway":[
  6. {
  7. "Status":"active",
  8. "VpnGatewayId":"vpn-bp1q8bgx4xnkm2ogj0fiu",
  9. "BusinessStatus":"Normal",
  10. "Spec":"5M",
  11. "CreateTime":1492753580000,
  12. "InternetIp":"116.62.69.64",
  13. "EndTime":1495382400000,
  14. "VSwitchId":"vsw-bp1y9ovl1cu9ou4tvma0l",
  15. "VpcId":"vpc-bp1ub1yt9cvakoelj1y9c"
  16. }
  17. ]
  18. },
  19. "PageSize":10,
  20. "RequestId":"B2CD1315-CA2B-47B1-9DA5-8F1D69C48E82"
  21. }
Thank you! We've received your feedback.