Queries the one-click diagnosis result of a VPN gateway instance.
Operation description
When you call the GetVpnGatewayDiagnoseResult operation, in addition to the required parameters, you must specify at least one of the DiagnoseId and VpnGatewayId 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 diagnosis ID. When you call the DiagnoseVpnGateway operation, the system returns the corresponding diagnosis ID. |
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 ClientToken. 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 diagnosis started. The time is displayed in UTC in the |
2022-12-15T05:28:57Z |
| DiagnoseId |
string |
The diagnosis ID. |
vpndgn-uf6sgneym02lxyuv4**** |
| DiagnoseResult |
array<object> |
The list of diagnosis items. |
|
|
object |
The diagnosis item information. |
||
| DiagnoseName |
string |
The diagnosis item.
For more information about each diagnosis item, see Background information about one-click diagnosis. |
RouteEntryConflict |
| DiagnoseResultDescription |
string |
The diagnosis result of the diagnosis item. The operation returns different information for each diagnosis item:
|
{\"targetIp\":\"192.168.0.1\",\"srcIp\":\"192.168.1.1\",\"rtt\":-1.0,\"lossRate\":100.0} |
| DiagnoseResultLevel |
string |
The diagnosis result level of the diagnosis item.
For more information about the diagnosis result levels of each diagnosis item, see Background information about one-click diagnosis. |
normal |
| FinishTime |
string |
The time when the diagnosis ended. The time is displayed in UTC in the |
2022-12-15T05:29:08Z |
| FinishedCount |
integer |
The number of diagnosis 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 diagnosis 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.