Creates a repository for a Container Registry 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 CreateChartRepository

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

InstanceId String Yes cri-xkx6vujuhay0****

The ID of the Container Registry instance.

RegionId String Yes cn-shanghai

The ID of the region.

RepoName String Yes repo01

The name of the repository that you want to create.

RepoNamespaceName String Yes namespace01

The namespace to which the repository belongs.

RepoType String Yes PUBLIC

The default repository type. Valid values:

  • PUBLIC
  • PRIVATE
Summary String No summary

The summary about the repository.

Response parameters

Parameter Type Example Description
Code String success

The return value.

IsSuccess Boolean true

Indicates whether the API call is successful. Valid values:

  • true: successful
  • false: failed
RepoId String crcr-2micxey5ewj4****

The ID of the repository.

RequestId String 60390244-A483-491A-B41D-F866C95380A1

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateChartRepository
&InstanceId=cri-xkx6vujuhay0****
&RegionId=cn-shanghai
&RepoName=repo01
&RepoNamespaceName=namespace01
&RepoType=PUBLIC
&<Common request parameters>

Sample success responses

XML format

<IsSuccess>true</IsSuccess>
<RequestId>60390244-A483-491A-B41D-F866C95380A1</RequestId>
<RepoId>crcr-2micxey5ewj4****</RepoId>
<Code>success</Code>

JSON format

{
    "IsSuccess": true,
    "RequestId": "60390244-A483-491A-B41D-F866C95380A1",
    "RepoId": "crcr-2micxey5ewj4****",
    "Code": "success"
}

Error codes

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