Creates a namespace for 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

Name Type Required Example Description
Action String Yes CreateNamespace

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

RegionId String Yes cn-shanghai

The region ID of the namespace.

InstanceId String Yes cri-xkx6vujuhay0****

The ID of the instance.

NamespaceName String Yes namespace1

The name of the namespace.

AutoCreateRepo Boolean No true

Specifies whether to automatically create an image repository.

DefaultRepoType String No PUBLIC

The default type of the repository that is automatically created. Valid values:


Response parameters

Name Type Example Description
Code String success

The return value.

IsSuccess Boolean true

Indicates whether the API call is successful.

RequestId String BC648259-91A7-4502-BED3-EDF64361FA83

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "IsSuccess" : true,
  "RequestId" : "BC648259-91A7-4502-BED3-EDF64361FA83",
  "Code" : "success"

Error codes

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