Queries the one-click diagnostic result of a VPN gateway instance by calling the GetVpnGatewayDiagnoseResult operation.
Operation description
When you call the GetVpnGatewayDiagnoseResult operation, you must specify at least one of the DiagnoseId and VpnGatewayId parameters in addition to the required parameters.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:GetVpnGatewayDiagnoseResult |
get |
*VpnGateway
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the VPN gateway instance. You can call the DescribeRegions operation to query the region ID. |
cn-qingdao |
| DiagnoseId |
string |
No |
The diagnostic ID. The diagnostic ID is returned when you call the DiagnoseVpnGateway operation. |
vpndgn-uf6kuxbe3iv028k3s**** |
| VpnGatewayId |
string |
No |
The VPN gateway instance ID. |
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. Note
If you do not specify this parameter, the system uses the RequestId of the API request as the client token. The RequestId may be different for each API request. |
02fb3da4-130e-11e9-8e44-001**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| BeginTime |
string |
The time when the diagnostic started. The time is displayed in UTC in the |
2022-12-15T05:28:57Z |
| DiagnoseId |
string |
The diagnostic ID. |
vpndgn-uf6sgneym02lxyuv4**** |
| DiagnoseResult |
array<object> |
The list of diagnostic items. |
|
|
object |
The diagnostic item information. |
||
| DiagnoseName |
string |
The diagnostic item.
For more information about each diagnostic item, see One-click diagnostics background information. |
RouteEntryConflict |
| DiagnoseResultDescription |
string |
The diagnostic result of the diagnostic item. The operation returns different information for each diagnostic item:
|
{\"targetIp\":\"192.168.0.1\",\"srcIp\":\"192.168.1.1\",\"rtt\":-1.0,\"lossRate\":100.0} |
| DiagnoseResultLevel |
string |
The diagnostic result level of the diagnostic item.
For more information about the diagnostic result levels of each diagnostic item, see One-click diagnostics background information. |
normal |
| FinishTime |
string |
The time when the diagnostic ended. The time is displayed in UTC in the |
2022-12-15T05:29:08Z |
| FinishedCount |
integer |
The number of diagnostic items that have been completed. |
7 |
| RequestId |
string |
The request ID. |
312C4D5A-6563-5FC6-8C6E-A43A5A316FEB |
| ResourceInstanceId |
string |
The ID of the diagnosed resource. |
vco-uf6huqsu63azl7mdp**** |
| ResourceType |
string |
The type of the diagnosed resource. Valid values: IPsec, which indicates an IPsec-VPN connection. |
IPsec |
| TotalCount |
integer |
The total number of diagnostic items. |
7 |
| VpnGatewayId |
string |
The VPN gateway instance ID. |
vpn-uf6fzwp0ck3frwtbk**** |
Examples
Success response
JSON format
{
"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. | |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.