Description
Adds a host region.
Call instructions
Interface constraints
The caller must have the HOST_MANAGER permission.
Request path
POST /api/v2/compute/regions
Request parameters
body:
Parameter |
Type |
Required |
Example Value |
Description |
|---|---|---|---|---|
| name | String | Yes | Beijing | The name of the region. |
| description | String | No | Beijing | The description of the region. |
Return result
Basic data structure
Parameter |
Type |
Description |
|---|---|---|
| data | Object | An array of Region objects. For more information, see Region data structure. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | An HTTP status code that conforms to the HTTP status code standard. |
| traceId | String | The Trace ID of the request, which is used to troubleshoot issues. |
| server | String | The address of the application service that responded to the request. |
Region data structure
Parameter |
Type |
Description |
|---|---|---|
| id | Integer | The ID of the region. |
| name | String | The name of the region. |
| description | String | The description of the region. |
| createTime | String | The creation time of the region information. |
| updateTime | String | The modification time of the region information. |
Examples
Request example
POST /api/v2/compute/regions' -H 'Content-Type: application/json' --data-raw '{"name":"shanghai","description":"Shanghai"}'
Return example
{
"data": {
"createTime": null,
"description": "region1 description",
"id": 2000002,
"idcs": null,
"name": "region1",
"updateTime": null
},
"duration": 67,
"server": "b3b6d90167",
"status": 200,
"successful": true,
"timestamp": "2022-04-25T14:02:51.31+08:00",
"traceId": "9032ce344d5e60a0"
}
