Mengambil detail layanan Nacos.
Deskripsi operasi
OpenAPI ini bukan API SDK Nacos. Untuk informasi lebih lanjut tentang API SDK Nacos, lihat dokumentasi resmi.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:ListAnsServices |
list |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ServiceName |
string |
No |
Nama layanan. |
name |
| GroupName |
string |
No |
Nama grup kontak. |
name |
| NamespaceId |
string |
No |
ID namespace. |
12233**** |
| ClusterName |
string |
No |
Parameter yang diperlukan untuk mengambil daftar instance dalam cluster tertentu dari suatu layanan. |
DEFAULT |
| HasIpCount |
string |
No |
Menentukan apakah akan mengambil jumlah instance layanan. Valid values:
|
true |
ClusterId
deprecated
|
string |
No |
ID cluster. Catatan
Anda harus menentukan parameter ini atau InstanceId. |
mse-09k1q11**** |
| InstanceId |
string |
No |
ID instance. Catatan
Anda harus menentukan parameter ini atau ClusterId. |
mse-cn-st21v5**** |
| PageNum |
integer |
Yes |
Nomor halaman. |
1 |
| PageSize |
integer |
Yes |
Jumlah instance yang ditampilkan di setiap halaman. |
10 |
| RegionId |
string |
No |
Region. |
cn-hangzhou |
| RequestPars |
string |
No |
Parameter permintaan tambahan dalam format JSON. |
{} |
| AcceptLanguage |
string |
No |
Bahasa respons. Nilai yang valid:
|
zh |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Struktur data. |
||
| HttpCode |
string |
Kode status HTTP. |
202 |
| TotalCount |
integer |
Total jumlah instance. |
7 |
| RequestId |
string |
ID permintaan. |
52BA6DA6-A702-4362-A32F-DFF79655**** |
| Message |
string |
Pesan yang dikembalikan. |
请求处理成功 |
| PageSize |
integer |
Jumlah instance yang ditampilkan per halaman. |
10 |
| PageNumber |
integer |
Nomor halaman. |
1 |
| Data |
array<object> |
Ringkasan data. |
|
|
object |
Struktur data. |
||
| HealthyInstanceCount |
integer |
Total jumlah instance layanan dengan heartbeat yang sehat. |
1 |
| GroupName |
string |
Nama grup kontak. |
name |
| IpCount |
integer |
Total jumlah instance dari layanan saat ini. |
1 |
| Name |
string |
Nama layanan. |
name |
| ClusterCount |
integer |
Total jumlah cluster. |
1 |
| Source |
string |
Jenis layanan. Nilai yang valid:
|
console |
| ErrorCode |
string |
Kode kesalahan. |
mse-100-000 |
| Success |
boolean |
Hasil permintaan. Nilai yang valid:
|
true |
Contoh
Respons sukses
JSONformat
{
"HttpCode": "202",
"TotalCount": 7,
"RequestId": "52BA6DA6-A702-4362-A32F-DFF79655****",
"Message": "请求处理成功",
"PageSize": 10,
"PageNumber": 1,
"Data": [
{
"HealthyInstanceCount": 1,
"GroupName": "name",
"IpCount": 1,
"Name": "name",
"ClusterCount": 1,
"Source": "console"
}
],
"ErrorCode": "mse-100-000",
"Success": true
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationNotSupport | The current cluster does not support this operation, %s. | The current cluster does not support this operation |
| 400 | IllegalRequest | Invalid request:%s | Invalid request: %s |
| 400 | InvalidParameter | Parameter error:%s | Request parameter error: %s |
| 500 | InternalError | Console error. Try again later:%s | Console error. Try again later: %s |
| 403 | NoPermission | You are not authorized to perform this operation:%s | You do not have the permission to use this interface:%s |
| 404 | NotFound | Not found:%s | The resource does not exist:%s |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.