Crée un chemin réseau pour l'analyse d'accessibilité.
Description de l'opération
-
Vous pouvez appeler l'opération CreateNetworkPath pour créer des chemins réseau dans plusieurs scénarios de mise en réseau et entre plusieurs ressources. Une fois un chemin créé, ses paramètres sont enregistrés pour des analyses ultérieures.
-
Vous pouvez créer jusqu'à 100 chemins réseau au sein d'un même compte Alibaba Cloud.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
nis:CreateNetworkPath |
create |
*NetworkPath
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| RegionId |
string |
Non |
L'identifiant de la région du chemin réseau que vous souhaitez créer. |
cn-hangzhou |
| NetworkPathName |
string |
Oui |
Le nom du chemin réseau. |
ecs2PublicIp |
| SourceId |
string |
Oui |
L'identifiant de la ressource source. |
i-2zef4ngqfarepyun**** |
| SourceType |
string |
Oui |
Le type de la ressource source. Valeurs valides :
|
ecs |
| SourceIpAddress |
string |
Non |
L'adresse IP source. |
172.17.XX.XX |
| SourcePort |
integer |
Non |
Le port source. |
443 |
| TargetId |
string |
Non |
L'identifiant de la ressource de destination. |
i-bp13d0e064gubm**** |
| TargetType |
string |
Non |
Le type de la ressource de destination. Valeurs valides :
|
ecs |
| TargetIpAddress |
string |
Non |
L'adresse IP de destination. |
192.168.XX.XX |
| TargetPort |
integer |
Non |
Le port de destination. |
80 |
| Protocol |
string |
Non |
Le type de protocole. Valeurs valides :
|
tcp |
| NetworkPathDescription |
string |
Non |
La description du chemin réseau. |
Analyse du chemin ECS vers ECS |
| Tag |
array<object> |
Non |
Les balises à ajouter à la ressource. |
|
|
object |
Non |
|||
| Key |
string |
Non |
La clé de la balise N à ajouter à la ressource. La clé de balise peut contenir jusqu'à 128 caractères et ne peut pas contenir Vous pouvez ajouter jusqu'à 20 balises lors de chaque appel. |
role |
| Value |
string |
Non |
La valeur de la balise N à ajouter à la ressource. Vous pouvez spécifier jusqu'à 20 valeurs de balise. La valeur de la balise peut être une chaîne vide. La valeur de la balise peut contenir jusqu'à 128 caractères et ne peut pas contenir |
ops |
| ResourceGroupId |
string |
Non |
L'identifiant du groupe de ressources. |
rg-acfm27qsxjj**** |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
|||
| NetworkPathId |
string |
L'identifiant du chemin réseau. |
np-4cbf598673d14d27**** |
| RequestId |
string |
L'identifiant de la requête. |
92DD9FFB-06FB-56F7-83EF-5CEF98F5562A |
Exemples
JSON format
{
"NetworkPathId": "np-4cbf598673d14d27****",
"RequestId": "92DD9FFB-06FB-56F7-83EF-5CEF98F5562A"
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
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 | QuotaExceeded.NetworkPath | The quota of %s is exceeded, usage %s/%s. | The specified number of network paths exceeds the upper limit. Usage: %s/%s. |
| 400 | ResourceAlreadyExist.NetworkPath | The specified resource of %s already exists. | The specified network path configuration %s already exists. |
| 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 | MissingParameter.TagValue | You must specify Tag.N.Value. | |
| 400 | NumberExceed.Tags | The maximum number of Tags is exceeded. | |
| 400 | Duplicate.TagKey | The Tag.N.Key contains duplicate keys. | |
| 400 | MissingParameter.TagKey | You must specify Tag.N.Key. | |
| 400 | InvalidParameter.TagKey | The Tag.N.Key parameter is invalid. | |
| 400 | InvalidParameter.TagValue | The Tag.N.Value parameter is invalid. | |
| 400 | IllegalParam.SourceIp | Please enter a valid source IP. | Please enter a valid source IP |
| 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.SourceType | The specified source type (%s) is invalid. | |
| 400 | IllegalParam.TargetIp | The specified target ip (%s) is invalid. | The specified destination IP() is not in the correct format. |
| 400 | IllegalParam.NotSupportHaVpn | The specified VPN(%s), which is not currently supported for such instances. | The specified VPN(), which is not currently supported for such instances. |
| 400 | IllegalParam.SourceNotBound | Elastic public network IP(%s) is not bound to resources, and analysis is not supported for the time being. | Elastic public network IP() is not bound to resources, and analysis is not supported for the time being. |
| 400 | IllegalParam.TargetNotBound | Elastic public network IP(%s) is not bound to resources, and analysis is not supported for the time being. | |
| 400 | IllegalParam.NotPublicIp | The specified (%s) is invalid. | The specified parameter is illegal. |
| 400 | IllegalParam.SourceEqualTarget | The specified source and destination are identical, which is not supported for analysis. | The specified source and destination are the same, and analysis is not supported. |
| 400 | IllegalParam.TypeAndIdMismatch | The specified instanceId (%s) and type do not match. | The specified instanceId and its type do not match. |
| 403 | Forbidden.NetworkPath | The current user has not activated NIS and is not authorized to use the path analysis interface. | The current user has not activated NIS and is not authorized to use the path analysis interface. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.