Updates a namespace.

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 UpdateNamespace

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

InstanceId String Yes cri-kmsiwlxxdcva****

The ID of the instance.

NamespaceName String Yes test

The name of the namespace.

RegionId String Yes cn-shanghai

The ID of the region.

AutoCreateRepo Boolean No true

Specifies whether to automatically create a repository when an image is pushed to the namespace.

DefaultRepoType String No PRIVATE

The default type of the repository. Valid values:

  • PUBLIC
  • PRIVATE

Response parameters

Parameter Type Example Description
Code String success

The return value.

IsSuccess Boolean true

Indicates whether the operation is successful.

RequestId String 90B8475C-C066-4B92-946E-4D0DECB514E8

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

<IsSuccess>true</IsSuccess>
<RequestId>90B8475C-C066-4B92-946E-4D0DECB514E8</RequestId>
<Code>success</Code>

JSON format

{
    "IsSuccess":true,
    "RequestId":"90B8475C-C066-4B92-946E-4D0DECB514E8",
    "Code":"success"
}

Error codes

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