All Products
Search
Document Center

Network Intelligence Service:CreateAndAnalyzeNetworkPath

Last Updated:Jun 10, 2026

Memulai tugas untuk menganalisis keterjangkauan jaringan.

Deskripsi operasi

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.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

nis:CreateAndAnalyzeNetworkPath

create

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

SourceId

string

Yes

ID sumber daya sumber.

i-uf62y8khhbkbdrp6****

SourceIpAddress

string

No

Alamat IP sumber.

192.168.XX.XX

TargetIpAddress

string

No

Alamat IP tujuan.

172.50.XX.XX

SourceType

string

Yes

Jenis sumber daya sumber. Nilai valid:

  • ecs: Instance ECS

  • internetIp: Alamat IP publik

  • vsw: vSwitch

  • vpn: Gateway VPN

  • vbr: Virtual border router (VBR).

ecs

SourcePort

integer

No

Port sumber.

0

TargetId

string

No

ID sumber daya tujuan.

i-m5eactvw7wtpktv5****

TargetType

string

No

Jenis sumber daya tujuan. Nilai valid:

  • ecs: Instance ECS

  • internetIp: Alamat IP publik

  • vsw: vSwitch

  • vpn: Gateway VPN

  • vbr: VBR

  • clb: Instans Classic Load Balancer (CLB).

ecs

TargetPort

integer

No

Port tujuan.

80

Protocol

string

No

Jenis protokol. Nilai valid:

  • tcp: Transmission Control Protocol (TCP)

  • udp: User Datagram Protocol (UDP)

  • icmp: Internet Control Message Protocol (ICMP).

tcp

RegionId

string

No

ID wilayah tempat Anda ingin memulai tugas untuk menganalisis keterjangkauan jaringan.

cn-shanghai

Elemen respons

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

D5E98683-355B-5867-8D3D-A24755F6895B

NetworkReachableAnalysisId

string

The ID of the task for analyzing network reachability that you initiated.

nra-dfe9e53d2b524568****

SourceId

string

The ID of the source resource.

i-uf62y8khhbkbdrp6****

TargetId

string

The ID of the destination resource.

i-m5eactvw7wtpktv5****

SourceType

string

The type of the source resource.

ecs

TargetType

string

The type of the destination resource.

ecs

SourcePort

string

The source port.

0

TargetPort

string

The destination port.

80

Protocol

string

The protocol type.

tcp

SourceIpAddress

string

The source IP address.

192.168.XX.XX

TargetIpAddress

string

The destination IP address.

172.50.XX.XX

Contoh

Respons sukses

JSONformat

{
  "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"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 IllegalParam.InternetIP The specified IP address (%s) is not an internet IP address.
400 IllegalParam.IP 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.
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.
400 IllegalParam.SourcePort The specified SourcePort(%s) value is invalid. The value must be within the range of (0,65536].
400 IllegalParam.TargetPort The specified TargetPort(%s) value is invalid. The value must be within the range of (0,65536].
400 IllegalParam.SourceId The specified SourceId(%s) may be not exist.
400 IllegalParam.TargetId The specified TargetId(%s) may be not exist.
400 IllegalParam.SourceIp 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.
400 IllegalParam.TargetType The specified target type (%s) is invalid.
400 IllegalParam.TargetIp The specified target ip (%s) is invalid.
400 IllegalParam.NotSupportHaVpn The specified VPN(%s), 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.
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.
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.
403 Forbidden.NetworkPath The current user has not activated NIS and is not authorized to use the path analysis interface.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.