Creates a namespace in a Nacos instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:CreateEngineNamespace |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
No |
The ID of the instance. |
mse-98s**** |
| Name |
string |
Yes |
The display name of the namespace. |
dev |
| Desc |
string |
No |
The description of the namespace. |
Development environment |
| InstanceId |
string |
No |
The ID of the instance. |
mse-cn-st21ri2**** |
| ServiceCount |
integer |
No |
The maximum number of services that can run in the namespace. |
100 |
| Id |
string |
No |
The custom ID of the namespace. If not specified, a UUID is automatically generated. |
f4fa5b81-2f26-4900-833a-7516b315ebb2 |
| AcceptLanguage |
string |
No |
The language of the response. Valid values:
|
zh |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data structure. |
||
| Message |
string |
The message returned. |
The request is successfully processed. |
| RequestId |
string |
The ID of the request. |
F6092602-C357-4750-89D9-E572FBEA**** |
| ClusterId |
string |
The ID of the instance. |
mse-892k**** |
| Data |
object |
The namespace details. |
|
| Type |
integer |
The type of the namespace. Valid values:
|
1 |
| NamespaceShowName |
string |
The display name of the namespace. |
dev |
| Quota |
integer |
The quota of configurations. |
1 |
| Namespace |
string |
The ID of the namespace. |
f4fa5b81-2f26-4900-833a-7516b315ebb2 |
| NamespaceDesc |
string |
The description of the namespace. |
mytest |
| ConfigCount |
integer |
The number of configurations. |
1 |
| ServiceCount |
integer |
The number of active services. |
3 |
| ErrorCode |
string |
The error code returned if the request failed. |
mse-100-000 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"Message": "The request is successfully processed.\n",
"RequestId": "F6092602-C357-4750-89D9-E572FBEA****",
"ClusterId": "mse-892k****",
"Data": {
"Type": 1,
"NamespaceShowName": "dev",
"Quota": 1,
"Namespace": "f4fa5b81-2f26-4900-833a-7516b315ebb2",
"NamespaceDesc": "mytest",
"ConfigCount": 1,
"ServiceCount": 3
},
"ErrorCode": "mse-100-000",
"Success": true
}
Error codes
|
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 |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.