調用CreateAndAnalyzeNetworkPath介面,發起網路可達性分析任務。
介面說明
該介面根據輸入的源和目的資訊,無需建立網路分析路徑,直接發起可達性分析任務。返回分析結果後,將不在系統中記錄,如需在 NIS 中留存網路路徑或可達性分析任務結果,建議使用 createNetworkReachableAnalysis 介面。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
nis:CreateAndAnalyzeNetworkPath |
create |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| SourceId |
string |
是 |
源資源 ID。 |
i-uf62y8khhbkbdrp6**** |
| SourceIpAddress |
string |
否 |
源 IP 位址。 |
192.168.XX.XX |
| TargetIpAddress |
string |
否 |
目的 IP 位址。 |
172.50.XX.XX |
| SourceType |
string |
是 |
源資源類型。
|
ecs |
| SourcePort |
integer |
否 |
源連接埠。 |
0 |
| TargetId |
string |
否 |
目的資源 ID。 說明
調用該 API 時,TargetId 參數必須輸入。 |
i-m5eactvw7wtpktv5**** |
| TargetType |
string |
否 |
目的資源類型。
說明
調用該 API 時,TargetType 參數必須輸入。 |
ecs |
| TargetPort |
integer |
否 |
目的連接埠。 |
80 |
| Protocol |
string |
否 |
協議類型。取值:
說明
調用該 API 時,Protocol 參數必須輸入。 |
tcp |
| RegionId |
string |
否 |
要發起網路可達性分析任務的地區 ID。 |
cn-shanghai |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
請求 ID。 |
D5E98683-355B-5867-8D3D-A24755F6895B |
| NetworkReachableAnalysisId |
string |
發起的網路可達性分析任務 ID。 |
nra-dfe9e53d2b524568**** |
| SourceId |
string |
源資源 ID。 |
i-uf62y8khhbkbdrp6**** |
| TargetId |
string |
目的資源 ID。 |
i-m5eactvw7wtpktv5**** |
| SourceType |
string |
源資源類型。 |
ecs |
| TargetType |
string |
目的資源類型。 |
ecs |
| SourcePort |
string |
源連接埠。 |
0 |
| TargetPort |
string |
目的連接埠。 |
80 |
| Protocol |
string |
協議類型。 |
tcp |
| SourceIpAddress |
string |
源 IP 位址。 |
192.168.XX.XX |
| TargetIpAddress |
string |
目的 IP 位址。 |
172.50.XX.XX |
樣本
正常返回樣本
JSON格式
{
"RequestId": "D5E98683-355B-5867-8D3D-A24755F6895B",
"NetworkReachableAnalysisId": "nra-dfe9e53d2b524568****",
"SourceId": "i-uf62y8khhbkbdrp6****",
"TargetId": "i-m5eactvw7wtpktv5****",
"SourceType": "ecs",
"TargetType": "ecs",
"SourcePort": "0",
"TargetPort": "80",
"Protocol": "tcp",
"SourceIpAddress": "192.168.XX.XX",
"TargetIpAddress": "172.50.XX.XX"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | IllegalParam.InternetIP | The specified IP address (%s) is not an internet IP address. | 指定的IP(%s)不是公網地址。即IP地址不能在10.0.0.0~10.255.255.255、172.16.0.0 ~172.31.255.255、192.168.0.0~192.168.255.255 這3個位址區段內。 |
| 400 | IllegalParam.IP | The specified IP address (%s) is invalid. | 指定的IP地址(%s)無效。 |
| 400 | Mismatch.SourceIdAndTargetId | Reachability Analyzer does not support the scenario in which source and target Internet IP addresses and ECS instance ID (%s and %s) are bound. | 路徑分析不支援源與目的的公網IP和ECS執行個體ID(%s和%s)具有綁定關係。 |
| 400 | IllegalParam.SourceAndTargetInternetIp | Both source ID and target ID are IP addresses, but are not Internet IP addresses. Reachability Analyzer does not support the scenario. | 源與目的都是IP,但都不是阿里雲公網IP,路徑分析不支援這種情境。 |
| 400 | IllegalParam.SourcePort | The specified SourcePort(%s) value is invalid. The value must be within the range of (0,65536]. | SourcePort參數不合法,必須介於0到65536(含)之間。 |
| 400 | IllegalParam.TargetPort | The specified TargetPort(%s) value is invalid. The value must be within the range of (0,65536]. | TargetPort參數不合法,必須介於0到65536(含)之間。 |
| 400 | IllegalParam.SourceId | The specified SourceId(%s) may be not exist. | 指定的執行個體(%s)可能不存在,請檢查是否拼字錯誤。 |
| 400 | IllegalParam.TargetId | The specified TargetId(%s) may be not exist. | 指定的執行個體(%s)可能不存在,請檢查是否拼字錯誤。 |
| 400 | IllegalParam.SourceIp | Please enter a valid source IP. | 請輸入合法的源IP |
| 400 | IllegalParam.SourceType | The specified source type (%s) is invalid. | 指定的源類型(%s)無效。 |
| 400 | IllegalParam.Protocol | The specified Protocol(%s) is invalid. | 指定的Protocol(%s)參數不合法。 |
| 400 | IllegalParam.TargetType | The specified target type (%s) is invalid. | 指定的目的類型(%s)無效。 |
| 400 | IllegalParam.TargetIp | The specified target ip (%s) is invalid. | 指定的目的IP(%s)格式不正確。 |
| 400 | IllegalParam.NotSupportHaVpn | The specified VPN(%s), which is not currently supported for such instances. | 指定的VPN(%s)是HaVpn,此類執行個體目前尚不支援。 |
| 400 | IllegalParam.SourceNotBound | Elastic public network IP(%s) is not bound to resources, and analysis is not supported for the time being. | Elastic IP Address(%s)未綁定資源,暫不支援分析。 |
| 400 | IllegalParam.TargetNotBound | Elastic public network IP(%s) is not bound to resources, and analysis is not supported for the time being. | Elastic IP Address(%s)未綁定資源,暫不支援分析。 |
| 400 | IllegalParam.NotPublicIp | The specified (%s) is invalid. | 指定的參數 (%s) 不是公網IP。 |
| 400 | IllegalParam.SourceEqualTarget | The specified source and destination are identical, which is not supported for analysis. | 指定的源和目的相同,不支援分析。 |
| 400 | IllegalParam.TypeAndIdMismatch | The specified instanceId (%s) and type do not match. | 指定的執行個體 (%s) 和執行個體類型不符。 |
| 403 | Forbidden.NetworkPath | The current user has not activated NIS and is not authorized to use the path analysis interface. | 目前使用者未開通NIS,無許可權使用路徑分析介面。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。