Description
Adds an IDC.
Call description
Interface constraints
The caller must have the HOST_MANAGER permission.
Request path
POST /api/v2/compute/idcs
Request parameters
body:
Parameter |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| name | String | Yes | idc-bj | The name of the IDC. |
| description | String | No | Beijing IDC | The description of the IDC. |
| regionId | Long | Yes | 100 | The region ID. |
Return result
Basic data structure
Parameter |
Type |
Description |
|---|---|---|
| data | Object | An array of IDCs. For more information, see Idc data structure. |
| successful | Boolean | Specifies whether the request was successful. |
| timestamp | Datetime | The timestamp when the server finishes processing the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code that conforms to the HTTP standard. |
| traceId | String | The Trace ID of the request, which is used to troubleshoot issues. |
| server | String | The address of the application service that responds to the request. |
Idc data structure
Parameter |
Type |
Description |
|---|---|---|
| id | Long | The ID of the IDC. |
| name | String | The name of the IDC. |
| description | String | The description of the IDC. |
| regionId | Long | The ID of the region to which the IDC is associated. |
| regionName | String | The name of the region to which the IDC is associated. |
| createTime | String | The creation time of the IDC. |
| updateTime | String | The modification time of the IDC. |
Examples
Request example
POST /api/v2/compute/idcs -H 'Content-Type: application/json' --data-raw '{"name":"idc-bj","description":"Beijing IDC","regionId":100}'
Return example
{
"data": {
"createTime": "2021-07-22T20:04:15+08:00",
"description": null,
"id": 1000002,
"name": "test-idc",
"regionId": 1000002,
"regionName": "testregion",
"updateTime": "2021-07-22T20:04:15+08:00"
},
"duration": 41,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-08-25T16:00:19.895+08:00",
"traceId": "c8e610e3b33a4b17"
}
