Creates a namespace for an image repository.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cr:CreateNamespace |
create |
*Namespace
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
cri-xkx6vujuhay0**** |
| NamespaceName |
string |
Yes |
The name of the namespace. The name must be 2 to 120 characters in length and can contain lowercase letters and digits. The following separators are supported: underscores (_), hyphens (-), and periods (.). A separator cannot be placed at the beginning or end of the name. |
namespace1 |
| AutoCreateRepo |
boolean |
No |
Specifies whether automatic creation of an image repository is enabled. |
true |
DefaultRepoType
deprecated
|
string |
No |
The default repository type for automatic creation. Valid values:
|
PUBLIC |
| DefaultRepoConfiguration | RepoConfiguration |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The return value. |
success |
| IsSuccess |
boolean |
Indicates whether the request is successful. |
true |
| RequestId |
string |
The request ID. |
BC648259-91A7-4502-BED3-EDF64361FA83 |
Examples
Success response
JSON format
{
"Code": "success",
"IsSuccess": true,
"RequestId": "BC648259-91A7-4502-BED3-EDF64361FA83"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | SystemError | Unknown error. | |
| 403 | NoPrivilege | Access denied for this user. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.