调用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. | 弹性公网IP(%s)未绑定资源,暂不支持分析。 |
| 400 | IllegalParam.TargetNotBound | Elastic public network IP(%s) is not bound to resources, and analysis is not supported for the time being. | 弹性公网IP(%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,无权限使用路径分析接口。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。