Creates a repository namespace.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cr:CreateNamespace |
create |
*Repository
|
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 long and can contain only lowercase letters, digits, and the following separators: underscores (_), hyphens (-), and periods (.). A separator cannot be used as the first or last character. |
namespace1 |
| AutoCreateRepo |
boolean |
No |
Specifies whether a repository is automatically created when an image is pushed to a repository that does not yet exist in the namespace. |
true |
DefaultRepoType
deprecated
|
string |
No |
The default type of automatically created repositories. Valid values:
|
PUBLIC |
| DefaultRepoConfiguration |
RepoConfiguration |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The response code. The value |
success |
| IsSuccess |
boolean |
Indicates whether the request was 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.