Membuat Instans Pusat Registrasi Nacos.
Deskripsi operasi
The operation is not provided in Nacos SDKs. For information about Nacos SDKs, see the official documentation.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:CreateNacosInstance |
create |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID Instans. |
mse-cn-123456 |
| ServiceName |
string |
Yes |
Nama layanan. |
hello_service |
| GroupName |
string |
Yes |
Nama kelompok. |
DEFAULT_GROUP |
| NamespaceId |
string |
No |
ID namespace. |
9e78a671-4b9b-4dd4-99c1-0b9da87**** |
| ClusterName |
string |
No |
Nama Instans Pusat Registrasi Nacos. |
DEFAULT |
| Ip |
string |
Yes |
Alamat IP Instans Pusat Registrasi Nacos. |
1.2.xx.xx |
| Port |
integer |
Yes |
Nomor Port Instans Pusat Registrasi Nacos. |
12281 |
| Ephemeral |
boolean |
Yes |
Apakah akan menandai Instans sebagai node sementara. |
false |
| Weight |
string |
Yes |
Bobot. Nilai valid: 0 hingga 10000. Nilai harus berupa bilangan bulat. Nilai yang lebih besar menunjukkan frekuensi yang lebih tinggi saat Instans diakses. |
1 |
| Enabled |
boolean |
Yes |
Apakah akan mengaktifkan layanan untuk Instans. |
true |
| Metadata |
string |
No |
Metadata node Instans. |
{\"grayversion\":\"1.0\",\"preserved.register.source\":\"SPRING_CLOUD\",\"management.context-path\":\"\"} |
| AcceptLanguage |
string |
No |
Bahasa tanggapan. Nilai valid:
|
zh |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The data structure. |
||
| HttpStatusCode |
integer |
The HTTP status code returned. |
200 |
| RequestId |
string |
The ID of the request. |
9e78a671-4b9b-4dd4-99c1-0b9da87d3dec |
| Message |
string |
The message returned. |
The request is successfully processed. |
| Code |
integer |
The response code returned. |
200 |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| Data |
string |
The result returned. |
ok |
Contoh
Respons sukses
JSONformat
{
"HttpStatusCode": 200,
"RequestId": "9e78a671-4b9b-4dd4-99c1-0b9da87d3dec",
"Message": "The request is successfully processed.\n",
"Code": 200,
"Success": true,
"Data": "ok"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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.