Queries the diagnostic result of a VPN gateway.
Operation description
When you call the GetVpnGatewayDiagnoseResult operation, you must specify one of DiagnoseId and VpnGatewayId.
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:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis 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:GetVpnGatewayDiagnoseResult | get | *VpnGateway acs:vpc:{#regionId}:{#accountId}:vpngateway/{#VpnInstanceId} |
| 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-qingdao |
| DiagnoseId | string | No | The ID of the diagnostic operation. When you call the DiagnoseVpnGateway operation, the system returns a corresponding ID. | vpndgn-uf6kuxbe3iv028k3s**** |
| VpnGatewayId | string | No | The ID of the VPN gateway. | vpn-uf6fzwp0ck3frwtbk**** |
| ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The client token can contain only ASCII characters. ** Description If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request. | 02fb3da4-130e-11e9-8e44-001**** |
Response parameters
Examples
Sample success responses
JSONformat
{
"BeginTime": "2022-12-15T05:28:57Z",
"DiagnoseId": "vpndgn-uf6sgneym02lxyuv4****",
"DiagnoseResult": [
{
"DiagnoseName": "RouteEntryConflict",
"DiagnoseResultDescription": "{\\\"targetIp\\\":\\\"192.168.0.1\\\",\\\"srcIp\\\":\\\"192.168.1.1\\\",\\\"rtt\\\":-1.0,\\\"lossRate\\\":100.0}",
"DiagnoseResultLevel": "normal"
}
],
"FinishTime": "2022-12-15T05:29:08Z",
"FinishedCount": 7,
"RequestId": "312C4D5A-6563-5FC6-8C6E-A43A5A316FEB",
"ResourceInstanceId": "vco-uf6huqsu63azl7mdp****",
"ResourceType": "IPsec",
"TotalCount": 7,
"VpnGatewayId": "vpn-uf6fzwp0ck3frwtbk****"
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | param_error | The param is must be in ... | - |
| 400 | MissingParam.DiagnoseInfo | The VPN gateway ID and diagnose ID cannot be empty at the same time. | - |
| 400 | VpnGateway.Configuring | The specified service is configuring. | The service is being configured. Try again later. |
| 400 | IncorrectStatus.DiagnoseTimeout | Diagnose failed because of timeout. | - |
| 400 | IncorrectStatus.VpnConnectionDeleted | Diagnose failed because the VPN connection has been deleted. | - |
| 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. |
| 404 | InvalidDiagnoseId.NotFound | The specified diagnose ID [%s] does not exist. | - |
| 404 | InvalidVpnGatewayId.NotFound | The specified VPN gateway [%s] does not have any diagnoses. | - |
| 404 | InvalidVpnGatewayInstanceId.NotFound | The specified vpn gateway instance id does not exist. | The specified VPN gateway does not exist. Check whether the specified VPN gateway is valid. |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2025-05-23 | The Error code has changed | View Change Details |
