Creates an image repository in an instance.

Debugging

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-xkx6vujuhay0tqea

The ID of the instance.

RegionId String Yes cn-shanghai

The ID of the region where the instance resides.

RepoName String Yes repo1

The name of the image repository.

RepoNamespaceName String Yes namespace01

The name of the namespace to which the repository belongs.

RepoType String Yes PRIVATE

The type of the repository. Valid values: PUBLIC and PRIVATE.

Summary String Yes repo1

The summary of the repository.

Detail String No repo1

The description of the repository.

Response parameters

Parameter Type Example Description
IsSuccess Boolean true

Indicates whether the operation is successful.

Code String success

The code returned for the request.

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

The ID of the request.

RepoId String crr-xwvi3osiy4fforqq

The ID of the image repository.

Examples

Sample requests

http(s)://[Endpoint]/? Action=CreateRepository
&InstanceId=cri-xkx6vujuhay0tqea
&RegionId=cn-shanghai
&RepoName=repo1
&RepoNamespaceName=namespace01
&RepoType=PRIVATE
&Summary=repo1
&<Common request parameters>

Sample success responses

JSON format

{
    "IsSuccess":true,
    "RequestId":"886FB272-15C3-44FC-AA54-F4ABD5B93A28",
    "RepoId":"crr-xwvi3osiy4fforqq",
    "Code":"success"
}

XML format

<IsSuccess>true</IsSuccess>
<RequestId>886FB272-15C3-44FC-AA54-F4ABD5B93A28</RequestId>
<RepoId>crr-xwvi3osiy4fforqq</RepoId>
<Code>success</Code>

Error codes

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