Creates an image repository.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateRepository

The operation that you want to perform. Set the value to CreateRepository.

InstanceId String Yes cri-xkx6vujuhay0****

The ID of the instance.

RegionId String Yes cn-shanghai

The ID of the region.

RepoName String Yes repo1

The name of the image repository.

RepoNamespaceName String Yes namespace01

The name of the namespace to which the image repository belongs.

RepoType String Yes PRIVATE

The type of the repository. Valid values:

Summary String Yes repo1

The summary of the repository.

Detail String No repo1

The description of the repository.

TagImmutability Boolean No true

Specifies whether the repository is immutable. Valid values:

  • true: The repository is immutable.
  • false: The image tag is mutable.

Response parameters

Parameter Type Example Description
Code String success

The return value.

IsSuccess Boolean true

Indicates whether the operation is successful.

RepoId String crr-xwvi3osiy4ff****

The ID of the image repository.

RequestId String 886FB272-15C3-44FC-AA54-F4ABD5B93A28

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format

    "IsSuccess": true,
    "RequestId": "886FB272-15C3-44FC-AA54-F4ABD5B93A28",
    "RepoId": "crr-xwvi3osiy4ff****",
    "Code": "success"

Error codes

For a list of error codes, visit the API Error Center.