Initiates a task for analyzing network reachability.
Operation description
You can call this operation to initiate a task for analyzing network reachability by specifying only the information about the source and destination. You do not need to create a network path for reachability analysis. The analysis result is not recorded in the system. If you want to record the path parameters and analysis result in the Network Intelligence Service (NIS) console, we recommend that you call the createNetworkReachableAnalysis operation.
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:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is 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 |
---|---|---|---|---|
nis:CreateAndAnalyzeNetworkPath | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
SourceId | string | Yes | The ID of the source resource. | i-uf62y8khhbkbdrp6**** |
SourceIpAddress | string | No | The source IP address. | 192.168.XX.XX |
TargetIpAddress | string | No | The destination IP address. | 172.50.XX.XX |
SourceType | string | Yes | The type of the source resource. Valid values:
| ecs |
SourcePort | string | No | The source port. | 0 |
TargetId | string | No | The ID of the destination resource. | i-m5eactvw7wtpktv5**** |
TargetType | string | No | The type of the destination resource. Valid values:
| ecs |
TargetPort | string | No | The destination port. | 80 |
Protocol | string | No | The protocol type. Valid values:
| tcp |
RegionId | string | No | The ID of the region for which you want to initiate a task for analyzing network reachability. | cn-shanghai |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "D5E98683-355B-5867-8D3D-A24755F6895B",
"NetworkReachableAnalysisId": "nra-dfe9e53d2b524568****",
"SourceId": "i-uf62y8khhbkbdrp6****\n",
"TargetId": "i-m5eactvw7wtpktv5****\n",
"SourceType": "ecs",
"TargetType": "ecs",
"SourcePort": "0",
"TargetPort": "80",
"Protocol": "tcp",
"SourceIpAddress": "192.168.XX.XX\n",
"TargetIpAddress": "172.50.XX.XX\n"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | IllegalParam.InternetIP | The specified IP address (%s) is not an internet IP address. | The specified IP address (%s) is not a public IP address. The IP address must not fall within the following ranges: 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, or 192.168.0.0 to 192.168.255.255. |
400 | IllegalParam.IP | The specified IP address (%s) is invalid. | The specified IP address (%s) is invalid. |
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. | Reachability Analyzer does not support the scenario in which the public IP addresses of the source and destination are associated with the ECS instance (%s and %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. | Both the source and destination are IP addresses, but not Alibaba Cloud public IP addresses. Reachability Analyzer supports only Alibaba Cloud public IP addresses. |
400 | IllegalParam.SourcePort | The specified SourcePort(%s) value is invalid. The value must be within the range of (0,65536]. | The value of SourcePort is invalid. Valid values: 0 to 65536. |
400 | IllegalParam.TargetPort | The specified TargetPort(%s) value is invalid. The value must be within the range of (0,65536]. | The value of TargetPort is invalid. Valid values: 0 to 65536. |
400 | IllegalParam.SourceId | The specified SourceId(%s) may be not exist. | The specified instance (%s) may not exist. Check the spelling. |
400 | IllegalParam.TargetId | The specified TargetId(%s) may be not exist. | The specified instance (%s) may not exist. Check the spelling. |
400 | IllegalParam.SourceIp | Please enter a valid source IP. | Please enter a valid source IP |
400 | IllegalParam.SourceType | The specified source type (%s) is invalid. | - |
400 | IllegalParam.Protocol | The specified Protocol(%s) is invalid. | The Protocol(%s) parameter is invalid. |
400 | IllegalParam.TargetType | The specified target type (%s) is invalid. | The specified destination type () is invalid. |
400 | IllegalParam.TargetIp | The specified target ip (%s) is invalid. | The specified destination IP() is not in the correct format. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-04-23 | The Error code has changed | View Change Details |
2024-04-09 | The Error code has changed | View Change Details |
2024-03-22 | The Error code has changed | View Change Details |
2023-12-12 | The Error code has changed | View Change Details |
2023-09-04 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-08-31 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-06-05 | The Error code has changed | View Change Details |
2023-06-02 | The Error code has changed | View Change Details |