Queries VPN gateways in a region.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:DescribeVpnGateways | list |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the VPN gateway. You can call the DescribeRegions operation to query the most recent region list. | cn-zhangjiakou |
VpcId | string | No | The ID of the virtual private cloud (VPC) to which the VPN gateway belongs. | vpc-bp1m3i0kn1nd4wiw9**** |
VpnGatewayId | string | No | The ID of the VPN gateway. | vpn-bp17lofy9fd0dnvzv**** |
Status | string | No | The status of the VPN gateway. Valid values:
| active |
BusinessStatus | string | No | The payment status of the VPN gateway. Valid values:
| Normal |
PageNumber | integer | No | The page number. Default value: 1. | 1 |
PageSize | integer | No | The number of entries per page. Valid values: 1 to 50. Default value: 10. | 10 |
IncludeReservationData | boolean | No | Specifies whether to return information about pending orders. Valid values:
| true |
Tag | array<object> | No | The value of tag N to add to the resource. The value of this parameter 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 at most 20 tag values in each call. | |
object | No | |||
Key | string | No | The tag key. The tag key cannot be an empty string. It can be at most 64 characters in length, and cannot contain You can specify at most 20 tag keys in each call. | FinanceDept |
Value | string | No | The tag value. 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 at most 20 tag values in each call. | FinanceJoshua |
ResourceGroupId | string | No | The ID of the resource group to which the VPN gateway belongs. You can call the ListResourceGroups operation to query the resource group list. | rg-acfmzs372yg**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"PageSize": 10,
"RequestId": "DF11D6F6-E35A-41C3-9B20-6FC8A901FE65",
"PageNumber": 1,
"TotalCount": 1,
"VpnGateways": {
"VpnGateway": [
{
"VpnType": "Normal",
"Status": "active",
"VpcId": "vpc-bp1m3i0kn1nd4wiw9****",
"SslMaxConnections": 5,
"Spec": "5M",
"InternetIp": "47.12.XX.XX",
"CreateTime": 1515383700000,
"AutoPropagate": true,
"ChargeType": "Example value for the China site (aliyun.com): Prepay. Example value for the 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",
"Tags": {
"Tag": [
{
"Key": "FinanceDept",
"Value": "FinanceJoshua"
}
]
},
"ReservationData": {
"Status": "1",
"ReservationOrderType": "TEMP_UPGRADE",
"ReservationIpsec": "enable",
"ReservationSpec": "5",
"ReservationSsl": "enable",
"ReservationMaxConnections": 5,
"ReservationEndTime": "2021-07-20T16:00:00Z"
},
"DisasterRecoveryInternetIp": "47.91.XX.XX",
"DisasterRecoveryVSwitchId": "vsw-p0w95ql6tmr2ludkt****",
"SslVpnInternetIp": "47.74.XX.XX",
"ResourceGroupId": "rg-acfmzs372yg****",
"EniInstanceIds": {
"EniInstanceId": [
"eni-7xvcxgmd4y2ypibn****"
]
}
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameter.TagKey | The specified parameter TagKey is invalid. | The error message returned because the specified tag key is invalid. |
400 | InvalidParameter.TagValue | The specified parameter TagValue is invalid. | The error message returned because the specified tag value is invalid. |
400 | Duplicated.TagKey | The specified parameter TagKey is duplicated. | The error message returned because the specified tag key already exists. |
400 | InternalError | The request processing has failed due to some unknown error, exception or failure. | An internal error occurred. |
403 | Forbidden.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. | You do not have the permissions to manage the specified resource. Apply for the permissions and try again. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-05-06 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-10-19 | API Description Update. The API operation is not deprecated.. The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2023-06-30 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-05-04 | The Error code has changed | View Change Details |