Creates an image repository.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cr:CreateRepository |
create |
*Repository
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the instance. |
cri-xkx6vujuhay0**** |
| RepoName |
string |
Yes |
The name of the image repository. |
repo1 |
| RepoNamespaceName |
string |
Yes |
The name of the namespace to which the image repository belongs. |
namespace01 |
| RepoType |
string |
Yes |
The type of the repository. Valid values:
|
PRIVATE |
| Summary |
string |
Yes |
The summary about the repository. |
repo1 |
| Detail |
string |
No |
The description of the repository. |
repo1 |
| TagImmutability |
boolean |
No |
Specifies whether to enable the feature of image tag immutability. Valid values:
|
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The return value. |
success |
| RepoId |
string |
The ID of the image repository. |
crr-xwvi3osiy4ff**** |
| IsSuccess |
boolean |
Indicates whether the request is successful. |
true |
| RequestId |
string |
The ID of the request. |
886FB272-15C3-44FC-AA54-F4ABD5B93A28 |
Examples
Success response
JSON format
{
"Code": "success",
"RepoId": "crr-xwvi3osiy4ff****",
"IsSuccess": true,
"RequestId": "886FB272-15C3-44FC-AA54-F4ABD5B93A28"
}
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.