Queries VPN gateways in a specified 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 | cn-hangzhou |
The ID of the region where 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 | init |
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. Maximum value: 50. Default value: 10. |
IncludeReservationData | Boolean | No | false |
Specifies whether to return the pending orders. Valid values:
|
Tag.N.Key | String | No | FinanceDept |
The key of the tag that is added to the resource. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be at most 64 characters in length, and cannot contain |
Tag.N.Value | String | No | FinanceJoshua |
The value of the tag that is added to the resource. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PageSize | Integer | 10 |
The number of entries returned per page. |
RequestId | String | DF11D6F6-E35A-41C3-9B20-6FC8A901FE65 |
The ID of the request. |
PageNumber | Integer | 1 |
The page number of the returned page. |
TotalCount | Integer | 1 |
The total number of entries returned. |
VpnGateways | Array of VpnGateway |
The detailed information about the VPN gateways. |
|
VpnGateway | |||
VpnType | String | Normal |
The type of the VPN gateway. Valid values:
|
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 maximum number of concurrent SSL-VPN connections. |
Spec | String | 5M |
The maximum bandwidth of the VPN gateway. Unit: Mbit/s. |
InternetIp | String | 47.12.XX.XX |
The public IP address of the VPN gateway. |
CreateTime | Long | 1515383700000 |
The timestamp that indicates when the VPN gateway was created. |
AutoPropagate | Boolean | true |
Indicates whether BGP routes are automatically advertised to the VPC. Valid values:
|
ChargeType | String | China site (aliyun.com): Prepay. International site (alibabacloud.com): POSTPAY. |
The billing method of the VPN gateway. Valid values:
|
VpnGatewayId | String | vpn-bp17lofy9fd0dnvzv**** |
The ID of the VPN gateway. |
Tag | String | {\"VpnNewImage\":\"true\",\"VpnVersion\":\"v1.2.2\"} |
The automatically generated tag of the VPN gateway. |
IpsecVpn | String | enable |
Indicates whether the IPsec-VPN feature is enabled. Valid values:
|
EndTime | Long | 1518105600000 |
The timestamp that indicates when the VPN gateway expires. |
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. Valid values:
|
BusinessStatus | String | Normal |
The payment status of the VPN gateway. |
SslVpn | String | enable |
Indicates whether the SSL-VPN feature is enabled. Valid values:
|
Name | String | test |
The name of the VPN gateway. |
Tags | Array of Tag |
The custom tags of the VPN gateway. |
|
Tag | |||
Key | String | FinanceDept |
The key of the tag. |
Value | String | FinanceJoshua |
The value of the tag. |
ReservationData | Object |
The information about the 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 pending order. Valid values:
|
ReservationIpsec | String | enable |
The IPsec-VPN status of the pending order. Valid values:
|
ReservationSpec | String | 5 |
The bandwidth of the pending order. Unit: Mbit/s. |
ReservationSsl | String | enable |
The SSL-VPN status of the pending order. 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 indicates the time when the temporary upgrade expires. If the order type is RENEWCHANGE (renewal with upgrade or downgrade) or RENEW (renewal), this parameter indicates the time when the renewal or renewal with upgrade or downgrade takes effect. |
Examples
Sample request
http(s)://[Endpoint]/?Action=DescribeVpnGateways
&RegionId=cn-hangzhou
&VpcId=vpc-bp1m3i0kn1nd4wiw9****
&VpnGatewayId=vpn-bp17lofy9fd0dnvzv****
&Status=init
&BusinessStatus=Normal
&PageNumber=1
&PageSize=10
&IncludeReservationData=false
&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>{\"VpnNewImage\":\"true\",\"VpnVersion\":\"v1.2.2\"}</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>
<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" : "{\\\"VpnNewImage\\\":\\\"true\\\",\\\"VpnVersion\\\":\\\"v1.2.2\\\"}",
"IpsecVpn" : "enable",
"EndTime" : 1518105600000,
"VSwitchId" : "vsw-bp15lbk8sgtr6r5b0****",
"Description" : "test",
"EnableBgp" : true,
"BusinessStatus" : "Normal",
"SslVpn" : "enable",
"Name" : "test",
"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 |
---|---|---|---|
403 | Forbbiden.SubUser | User not authorized to operate on the specified resource as your account is created by another user. | The error message returned because you are unauthorized to perform this operation on the specified resource. Acquire the required permissions and try again. |
403 | Forbidden | User not authorized to operate on the specified resource. | The error message returned because you are unauthorized to perform the operation on the specified resource. Acquire the required permissions and try again. |
For a list of error codes, visit the API Error Center.