Obtain a list of unit specifications

2024-08-23 10:14:19  Updated

Description

You can call this operation to obtain a list of unit specifications from OceanBase Cloud Platform (OCP).

Call description

Prerequisites

You have passed the authentication for the OCP application service.

Request path

GET /api/v2/ob/unitSpecs

Request parameters

Parameter Type Required Example value Description
name String No S1 The name of the unit specification.
type String No SYSTEM The type of the unit specification. Valid values:
  • SYSTEM: a system default type.
  • CUSTOM: a custom type.
  • Response parameters

    Basic data structure

    Parameter Type Description
    data Object The information about the unit specification. For more information, see the following table.
    successful Boolean Indicates whether the request is successful.
    timestamp Datetime The timestamp when the server completes the request.
    duration Integer The time taken by the server to process the request, in milliseconds.
    status Integer The HTTP status code.
    traceId String The trace ID of the request. This trace ID is used for troubleshooting.
    server String The address of the application server that responds to the request.

    Data structure of UnitSpec


    Parameter Type Description
    id Integer The ID of the unit specification.
    name String The name of the unit specification.
    type String The type of the unit specification. Valid values:
  • SYSTEM: a system default type.
  • CUSTOM: a custom type.
  • maxCpuCoreCount Number The maximum number of CPU cores.
    minCpuCoreCount Number The minimum number of CPU cores.
    maxMemorySize Integer The maximum memory size of the unit, in GB.
    minMemorySize Integer The minimum memory size of the unit, in GB.

    Examples

    Sample request

    GET /api/v2/ob/unitSpecs

    Sample response

    {
      "data": {
        "contents": [
          {
            "id": 5,
            "maxCpuCoreCount": 1.5,
            "maxMemorySize": 6,
            "minCpuCoreCount": 1.5,
            "minMemorySize": 6,
            "name": "S1",
            "type": "SYSTEM"
          },
          {
            "id": 1000001,
            "maxCpuCoreCount": 2,
            "maxMemorySize": 7,
            "minCpuCoreCount": 2,
            "minMemorySize": 7,
            "name": "C1",
            "type": "CUSTOM"
          }
        ],
        "page": {
          "number": 1,
          "size": 10,
          "totalElements": 2,
          "totalPages": 1
        }
      },
      "duration": 284,
      "server": "xxx.xxx.xxx.xxx",
      "status": 200,
      "successful": true,
      "timestamp": "2022-08-08T16:45:18.674+08:00",
      "traceId": "7b2030b217b84eac"
    }
    

    Contact Us