Creates or edits a custom 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 uses only the common request header. For more information, see Common request parameters.

Request syntax

POST /pop/v5/user_region_def HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
RegionName String Yes test_region

The name of the namespace.

RegionTag String Yes cn-beijing:test

The ID of the namespace.

  • The ID of a custom namespace is in the region ID:namespace identifier format. An example is cn-beijing:tdy218.
  • The ID of the default namespace is in the region ID format. An example is cn-beijing.
Description String No test

The description of the namespace.

Id Long No 0

If the parameter is left empty or is set to 0, a namespace will be created. Otherwise, the namespace will be edited.

DebugEnable Boolean No true

Specifies whether to enable remote debugging. Valid values:

  • true: enables remote debugging.
  • false: disables remote debugging.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

Message String success

The returned message.

RequestId String 37793352-C568-4A5A-BF69-4DC8539D2E20

The ID of the request.

UserDefineRegionEntity Struct

The information about the custom namespace.

BelongRegion String cn-beijing

The ID of the region to which the namespace belongs.

DebugEnable Boolean false

Indicates whether remote debugging was enabled. Valid values:

  • true: Remote debugging was enabled.
  • false: Remote debugging was disabled.
Description String Logical region

The description of the namespace.

Id Long 15160

If the parameter is left empty or is set to 0, a namespace is created. Otherwise, the namespace is edited.

RegionId String cn-beijing:test

The ID of the namespace.

  • The ID of a custom namespace is in the region ID:namespace identifier format. An example is cn-beijing:tdy218.
  • The ID of the default namespace is in the region ID format. An example is cn-beijing.
RegionName String test_region

The name of the namespace.

UserId String edas_****_test@aliyun-****.com

The ID of the Alibaba Cloud account to which the namespace belongs.

Examples

Sample requests

POST /pop/v5/user_region_def HTTP/1.1
Common request header
{
  "RegionName": "test_region"
  "RegionTag": "cn-beijing:test"
}

Sample success responses

XML format

<Message>success</Message>
<RequestId>37793352-C568-4A5A-BF69-4DC8539D2E20</RequestId>
<UserDefineRegionEntity>
    <RegionName>doctest</RegionName>
    <UserId>edas_****_test@aliyun-****.com</UserId>
    <DebugEnable>false</DebugEnable>
    <Id>15160</Id>
    <RegionId>cn-beijing:doctest</RegionId>
    <BelongRegion>cn-beijing</BelongRegion>
</UserDefineRegionEntity>
<Code>200</Code>

JSON format

{
	"Message": "success",
	"RequestId": "37793352-C568-4A5A-BF69-4DC8539D2E20",
	"UserDefineRegionEntity": {
		"RegionName": "doctest",
		"UserId": "edas_****_test@aliyun-****.com",
		"DebugEnable": false,
		"Id": 15160,
		"RegionId": "cn-beijing:doctest",
		"BelongRegion": "cn-beijing"
	},
	"Code": 200
}

Error codes

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