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

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

InstanceId String Yes cri-xkx6vujuhay0****

The ID of the Container Registry instance.

NamespaceName String Yes namespace01

The name of the namespace that you want to create.

RegionId String Yes cn-shanghai

The ID of the region.

AutoCreateRepo Boolean No true

Specifies whether to automatically create repositories in the namespace. Valid values:

- true: automatically creates repositories in the namespace.

- false: does not automatically create repositories in the namespace.

DefaultRepoType String No PUBLIC

The default repository type. Valid values:

  • PUBLIC
  • PRIVATE

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
RequestId String 724402D0-75CD-4794-BC20-7D3720823AE0

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateChartNamespace
&InstanceId=cri-xkx6vujuhay0****
&NamespaceName=namespace01
&RegionId=cn-shanghai
&<Common request parameters>

Sample success responses

XML format

<IsSuccess>true</IsSuccess>
<RequestId>724402D0-75CD-4794-BC20-7D3720823AE0</RequestId>
<Code>success</Code>

JSON format

{
    "IsSuccess": true,
    "RequestId": "724402D0-75CD-4794-BC20-7D3720823AE0",
    "Code": "success"
}

Error codes

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