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 headers

This operation does not have operation-specific request headers and uses only common request headers. For more information, see Common request and response headers.

Request syntax

PUT /pop/v1/paas/namespace HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
NamespaceId String Query No cn-beijing:test

The long ID of the namespace. If you configure this parameter, the long ID take effects and the value of the NameSpaceShortId parameter is ignored. To ensure compatibility, we recommend that you specify a short namespace ID. You must specify a long namespace ID in the <RegionId>:<NamespaceId> format. The NamespaceId variable can contain only lowercase letters and digits. Example: cn-beijing:test. The value of the NamespaceId variable cannot exceed 32 characters in length. For more information about RegionId, you can call the DescribeRegions operation to obtain the IDs of regions supported by SAE.

NamespaceName String Query Yes name

The name of the namespace. The name cannot exceed 64 characters in length.

NamespaceDescription String Query No desc

The description of the namespace. The description cannot exceed 100 characters in length.

NameSpaceShortId String Query No test

The short ID of the namespace. You do not need to specify a region ID. We recommend that you configure this parameter. The value of this parameter can be up to 20 characters in length and can contain only lowercase letters and digits.

EnableMicroRegistration Boolean Query No true

Specifies whether to enable the SAE built-in registry. Valid values:

  • true
  • false

If you set this parameter to true, a shared registry is created for the namespace. The registry cannot be disabled after it is created.

Response parameters

Parameter Type Example Description
RequestId String 91F93257-7A4A-4BD3-9A7E-2F6EAE6D****

The request ID.

Message String success

The returned message.

TraceId String 0a98a02315955564772843261e****

The trace ID that is used to query the details of the request.

Data Object

The information of the namespace.

NamespaceDescription String desc

The description of the namespace.

NamespaceId String cn-beijing:test

The namespace ID.

NamespaceName String name

The name of the namespace.

RegionId String cn-beijing

The region where the namespace resides.

NameSpaceShortId String test

The short ID of the namespace.

EnableMicroRegistration Boolean true

Indicates whether the SAE built-in registry is enabled. Valid values:

  • true
  • false
ErrorCode String Null

The error code. Valid values:

  • If the call is successful, the ErrorCode parameter is not returned.
  • If the call fails, the ErrorCode parameter is returned. For more information, see the "Error codes" section in this topic.
Code String 200

The HTTP status code. Valid values:

  • 2xx: The call was successful.
  • 3xx: The call was redirected.
  • 4xx: The call failed.
  • 5xx: A server error occurred.
Success Boolean true

Indicates whether the namespace was updated. Valid values:

  • true: The namespace was updated.
  • false: The namespace failed to be updated.

Examples

Sample requests

PUT /pop/v1/paas/namespace?NamespaceId=cn-beijing:test&NamespaceName=name&NamespaceDescription=desc&NameSpaceShortId=test&EnableMicroRegistration=true HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UpdateNamespaceResponse>
    <RequestId>91F93257-7A4A-4BD3-9A7E-2F6EAE6D****</RequestId>
    <Message>success</Message>
    <TraceId>0a98a02315955564772843261e****</TraceId>
    <Data>
        <NamespaceDescription>desc</NamespaceDescription>
        <NamespaceId>cn-beijing:test</NamespaceId>
        <NamespaceName>name</NamespaceName>
        <RegionId>cn-beijing</RegionId>
        <NameSpaceShortId>test</NameSpaceShortId>
        <EnableMicroRegistration>true</EnableMicroRegistration>
    </Data>
    <Code>200</Code>
    <Success>true</Success>
</UpdateNamespaceResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
  "Message" : "success",
  "TraceId" : "0a98a02315955564772843261e****",
  "Data" : {
    "NamespaceDescription" : "desc",
    "NamespaceId" : "cn-beijing:test",
    "NamespaceName" : "name",
    "RegionId" : "cn-beijing",
    "NameSpaceShortId" : "test",
    "EnableMicroRegistration" : true
  },
  "Code" : "200",
  "Success" : true
}

Error codes

HTTP status code Error code Error message Description
400 InvalidNamespaceName.Format The specified NamespaceName is invalid. The name of the namespace cannot exceed 63 characters in length. The specified namespace name is invalid. A namespace name cannot exceed 63 characters in length.
400 System.Upgrading The system is being upgraded. Please try again later. The system is being upgraded. Try again later.
400 Exceed.Namespace Too many namespaces have been created. The number of namespaces has reached the upper limit.
400 InvalidNamespaceId.Format The specified NamespaceId is invalid. The specified namespace ID is invalid. The namespace ID must be in the [Region ID]:[Namespace ID] format. Example: cn-beijing:test. The namespace ID cannot exceed 32 characters in length.
404 InvalidNamespaceId.NotFound The specified NamespaceId does not exist. The specified namespace ID does not exist.

For a list of error codes, see Service error codes.