This topic describes how to query the information of a specified resource specification.
Request
URI
GET /api/v1/unit/config/:name
Response
| Parameter | Type | Description |
|---|---|---|
| successful | bool | Indicates whether the request is successful. |
| timestamp | time.Time | The timestamp when the server completes the request. |
| duration | int | The time (in milliseconds) that the server processes the request. |
| status | int | The HTTP status code. |
| traceId | string | The trace ID of the request. |
| data | DbaObUnitConfig | The detailed information about the resource specification. For more information, see the Data structure of DbaObUnitConfig section. |
| error | ApiError | The error generated during the request, which contains the following information:
|
The data structure of DbaObUnitConfig is as follows:
| Parameter | Type | Description |
|---|---|---|
| unit_config_id | int | The ID of the resource specification. |
| name | string | The name of the resource specification. |
| max_cpu | float64 | The upper limit of the CPU specification. |
| min_cpu | float64 | The lower limit of the CPU specification. |
| memory_size | int | The memory specification. |
| log_disk_size | int | The size of the log disk space. |
| max_iops | uint | The upper limit of IOPS. |
| min_iops | uint | The lower limit of IOPS. |
| create_time | time.Time | The creation time of the resource specification. |
| modify_time | time.Time | The modification time of the resource specification. |
Examples
Request example
GET 10.10.10.1:2886/api/v1/unit/config/s1
Response example
{
"successful": true,
"timestamp": "2024-10-14T15:38:47.840091518+08:00",
"duration": 5,
"status": 200,
"traceId": "93050d8f34a63e06",
"data": {
"unit_config_id": 1001,
"name": "s1",
"max_cpu": 2,
"min_cpu": 2,
"memory_size": 2147483648,
"log_disk_size": 6442450944,
"max_iops": 9223372036854775807,
"min_iops": 9223372036854775807,
"create_time": "2024-10-14T10:26:41.286401+08:00",
"modify_time": "2024-10-14T10:26:41.286401+08:00"
}
}
References
You can also call the API by using SDK methods.
For more information about how to call the API by using obshell-sdk-python, see Query the information of a specified resource specification.
For more information about how to call the API by using obshell-sdk-go, see Query the information of a specified resource specification.