Queries the detailed information of a VPN Gateway.

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 DescribeVpnGateway

The name of this action. Value:

DescribeVpnGateways

RegionId String Yes cn-shanghai

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

To query the region ID, call DescribeRegions.

VpnGatewayId String Yes vpn-bp1q8bgx4xnkm2ogj0fiu

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

Response parameters

Parameter Type Example value Description
VpnGatewayId String vpn-bp1q8bgx4xnkm2ogj0fiu

The ID of the VPN Gateway.

VpcId String vpc-23rsxdfxxxxxxxxxxxxxx

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

The public IP address.

CreateTime Long 1495382400000

The time at which the VPN Gateway was created.

EndTime Long 1495382400000

The time at which the VPN Gateway is to expire.

Spec String 5

The specification of the VPN Gateway.

Name String vpngatewayname

The name of the VPN Gateway.

Description String vpngatewaydescription

The description of the VPN Gateway.

Status String init

The status of the VPN Gateway.

BusinessStatus String Normal

The business status of the VPN Gateway.

ChargeType String PayByTraffic

The payment type.

IpsecVpn String enable

Indicates whether the IPsec-VPN function is enabled.

RequestId String DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6

The ID of the request.

SslMaxConnections Long 5

The maximum number of concurrent SSL-VPN connections.

SslVpn String enable

Indicates whether the SSL-VPN function is enabled.

Examples

Request example


https://vpc.aliyuncs.com/?Action=DescribeVpnGateway
&RegionId=cn-shanghai
&VpnGatewayId=vpn-bp1q8bgx4xnkm2ogj0fiu
&<CommonParameters>
Response example
  • XML format

    <DescribeVpnGatewayResponse>
      <Status>active</Status>
      <VpnGatewayId>vpn-bp1q8bgx4xnkm2ogj0fiu</VpnGatewayId>
      <Spec>5M</Spec>
      <BusinessStatus>Normal</BusinessStatus>
      <RequestId>98C99F30-A3D2-42E1-AC75-0C882FBE92F7</RequestId>
      <CreateTime>1492753580000</CreateTime>
      <InternetIp>116.62.69.64</InternetIp>
      <EndTime>1495382400000</EndTime>
      <VSwitchId>vsw-bp1y9ovl1cu9ou4tvma0l</VSwitchId>
      <VpcId>vpc-bp1ub1yt9cvakoelj1y9c</VpcId>
    </DescribeVpnGatewayResponse>
    
  • JSON format

    {
    	"Status":"active",
    	"VpnGatewayId":"vpn-bp1q8bgx4xnkm2ogj0fiu",
    	"Spec":"5M",
    	"BusinessStatus":"Normal",
    	"RequestId":"E98A9651-7098-40C7-8F85-C818D1EBBA85",
    	"CreateTime":1492753580000,
    	"InternetIp":"116.62.69.64",
    	"EndTime":1495382400000,
    	"VSwitchId":"vsw-bp1y9ovl1cu9ou4tvma0l",
    	"VpcId":"vpc-bp1ub1yt9cvakoelj1y9c"
    }

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.
404 InvalidVpnGatewayInstanceId.NotFound The specified vpn gateway instance id does not exist. The specified VPN connection does not exist. Check if the VPN link is correct.

See common error codes