Overview
You can call this API to query the memory constraints for creating a tenant in an OceanBase cluster.
API details
Constraints
The caller must have an AccessKey for accessing the multi-cloud API. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
GET /api/v2/instances/{instanceId}/tenantCreateMemConstraints
Request parameters
Query
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase cluster. | ob317v4uif**** |
| tenantId | String | Yes | The ID of the tenant. | t33h8y08k**** |
| unitNum | Integer | Yes | The number of units for the tenant. | 1 |
| cpu | Integer | Yes | The number of CPU cores for the tenant. | 2 |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| data | object | The memory information. | |
| cpu | Integer | The number of CPU cores for the tenant. | 10 |
| maxMem | long | The maximum memory size that can be applied for a single unit, in GiB. | 55 |
| minMem | long | The minimum memory size that must be applied for a single unit, in GiB. | 20 |
| unitNum | Integer | The number of units for the tenant. | 1 |
Examples
Request example
curl -v --location \
--digest -u 'xxx:xxx' \
--request GET \
--url https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenantCreateMemConstraints
-H 'X-Ob-Project-Id: <Project ID>'
Note
- A project ID uniquely identifies a project. For information about how to obtain the project ID of an instance, see Manage projects.
- Make sure that the project ID corresponding to the specified instanceId is consistent with the specified project ID.
Response example
JSON format
{
"data":{
"cpu":10,
"maxMem":55,
"minMem":20,
"unitNum":1
},
"requestId":"fdcdc581-9f6d-4aae-8448-xxxfdsad",
"success":true
}