Queries VPN gateways in a region.
Debugging
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 | ap-southeast-2 | The ID of the region in which 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 | active | The status of the VPN gateway. Valid values:
|
BusinessStatus | String | No | Normal | The payment status of the VPN gateway. Valid values:
|
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. Valid values: 1 to 50. Default value: 10. |
IncludeReservationData | Boolean | No | true | Specifies whether to return information about the pending orders. Valid values:
|
Tag.N.Key | String | No | FinanceDept | The key of tag N. The tag key cannot be an empty string. It can be up to 64 characters in length, and cannot contain You can specify up to 20 tag keys in each call. |
Tag.N.Value | String | No | FinanceJoshua | The value of tag N. The tag value can be an empty string and cannot exceed 128 characters in length. It cannot start with Each tag key corresponds to one tag value. You can specify up to 20 tag values in each call. |
Response parameters
Parameter | Type | Example | Description |
PageSize | Integer | 10 | The number of entries returned per page. |
RequestId | String | DF11D6F6-E35A-41C3-9B20-6FC8A901FE65 | The request ID. |
PageNumber | Integer | 1 | The number of the returned page. |
TotalCount | Integer | 1 | The number of entries returned. |
VpnGateways | Array of VpnGateway | The list of VPN gateways. | |
VpnGateway | |||
VpnType | String | Normal | The type of the VPN gateway. The value is set to Normal, which indicates a standard NAT 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 number of SSL-VPN connections supported by the VPN gateway. |
Spec | String | 5M | The maximum bandwidth of the VPN gateway. M indicates Mbit/s. |
InternetIp | String | 47.12.XX.XX |
|
CreateTime | Long | 1515383700000 | The timestamp when the VPN gateway was created. Unit: milliseconds. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. |
AutoPropagate | Boolean | true | Indicates whether BGP routes are automatically advertised to the VPC. Valid values:
|
ChargeType | String | Example value for the China site (aliyun.com): Prepay. Example value for the International site (alibabacloud.com): POSTPAY. | The billing method of the VPN gateway. Only POSTPAY may be returned, which indicates the pay-as-you-go billing method. |
VpnGatewayId | String | vpn-bp17lofy9fd0dnvzv**** | The ID of the VPN gateway. |
Tag | String | {\"VpnEnableBgp\":\"true\",\"VisuallySsl\":\"true\",\"PbrPriority\":\"true\",\"VpnNewImage\":\"true\",\"description\":\"forwarding1.3.7\",\"VpnVersion\":\"v1.2.4\"} | The automatically generated tag of the VPN gateway.
|
IpsecVpn | String | enable | Indicates whether IPsec-VPN is enabled for the VPN gateway.
|
EndTime | Long | 1518105600000 | The timestamp when the VPN gateway expires. Unit: milliseconds. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. |
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.
|
BusinessStatus | String | Normal | The payment status of the VPN gateway.
|
SslVpn | String | enable | Indicates whether SSL-VPN is enabled for the VPN gateway.
|
Name | String | test | The name of the VPN gateway. |
NetworkType | String | public | The network type of the VPN gateway.
|
Tags | Array of Tag | The list of tags added to the VPN gateway. | |
Tag | |||
Key | String | FinanceDept | The tag key. |
Value | String | FinanceJoshua | The tag value. |
ReservationData | Object | The information about pending orders. Note This parameter is returned only when IncludeReservationData is set to true. | |
Status | String | 1 | The status of the pending order.
|
ReservationOrderType | String | TEMP_UPGRADE | The type of the order that has not taken effect. Valid values:
|
ReservationIpsec | String | enable | The IPsec-VPN status of the order that has not taken effect. Valid values:
|
ReservationSpec | String | 5 | The bandwidth of the pending order. Unit: Mbit/s. |
ReservationSsl | String | enable | The SSL-VPN status of the order that has not taken effect. Valid values:
|
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 specifies the time when the temporary upgrade expires. If the order type is RENEWCHANGE (renewal with a specification change) or RENEW (renewal), this parameter indicates the time when the renewal or renewal with a specification change takes effect. |
DisasterRecoveryInternetIp | String | 47.91.XX.XX | The second IP address assigned by the system to create an IPsec-VPN connection. This parameter is returned only when the VPN gateway supports the dual-tunnel mode. |
DisasterRecoveryVSwitchId | String | vsw-p0w95ql6tmr2ludkt**** | The ID of the second vSwitch associated with the VPN gateway. This parameter is returned only when the VPN gateway supports the dual-tunnel mode. |
SslVpnInternetIp | String | 47.74.XX.XX | The IP address of the SSL-VPN connection. This parameter is returned only when the VPN gateway is a public VPN gateway and supports only the single-tunnel mode. In addition, the VPN gateway must have the SSL-VPN feature enabled. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeVpnGateways
&RegionId=ap-southeast-2
&VpcId=vpc-bp1m3i0kn1nd4wiw9****
&VpnGatewayId=vpn-bp17lofy9fd0dnvzv****
&Status=active
&BusinessStatus=Normal
&PageNumber=1
&PageSize=10
&IncludeReservationData=true
&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>{\"VpnEnableBgp\":\"true\",\"VisuallySsl\":\"true\",\"PbrPriority\":\"true\",\"VpnNewImage\":\"true\",\"description\":\"forwarding1.3.7\",\"VpnVersion\":\"v1.2.4\"}</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>
<NetworkType>public</NetworkType>
<DisasterRecoveryVSwitchId>vsw-p0w95ql6tmr2ludkt****</DisasterRecoveryVSwitchId>
<DisasterRecoveryInternetIp>47.91.XX.XX</DisasterRecoveryInternetIp>
<SslVpnInternetIp>47.74.XX.XX</SslVpnInternetIp>
<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" : "{\"VpnEnableBgp\":\"true\",\"VisuallySsl\":\"true\",\"PbrPriority\":\"true\",\"VpnNewImage\":\"true\",\"description\":\"forwarding1.3.7\",\"VpnVersion\":\"v1.2.4\"}",
"IpsecVpn" : "enable",
"EndTime" : 1518105600000,
"VSwitchId" : "vsw-bp15lbk8sgtr6r5b0****",
"Description" : "test",
"EnableBgp" : true,
"BusinessStatus" : "Normal",
"SslVpn" : "enable",
"Name" : "test",
"NetworkType" : "public",
"DisasterRecoveryVSwitchId" : "vsw-p0w95ql6tmr2ludkt****",
"DisasterRecoveryInternetIp" : "47.91.XX.XX",
"SslVpnInternetIp" : "47.74.XX.XX",
"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 |
400 | InvalidParameter.TagKey | The specified parameter TagKey is invalid. | The specified tag key is invalid. |
400 | InvalidParameter.TagValue | The specified parameter TagValue is invalid. | The specified tag value is invalid. |
400 | Duplicated.TagKey | The specified parameter TagKey is duplicated. | The specified tag key already exists. |
400 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error has occurred. |
403 | Forbidden.SubUser | User not authorized to operate on the specified resource as your account is created by another user. | You are unauthorized to perform this operation on the specified resource. You can apply for the required permissions and try again. |
403 | Forbidden | User not authorized to operate on the specified resource. | You are unauthorized to perform this operation on the specified resource. Acquire the required permissions and try again. |
For a list of error codes, see Service error codes.