Overview
You can call this API to query the constraints for creating a tenant in an OceanBase cluster.
API details
Constraints
The caller must have an AccessKey for accessing APIs of OceanBase Cloud. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
GET /api/v2/instances/{instanceId}/tenantCreateConstraints
Request parameters
Query
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase instance. | ob317v4uif**** |
| tenantId | String | Yes | The ID of the tenant. | t33h8y08k**** |
| tenantModel | string | Yes | The tenant mode. Currently, Oracle mode (Oracle) and MySQL mode (MySQL) are supported. |
Oracle |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| data | object | The information about the tenant. | |
| charsetList | List |
The name of the supported character set (such as utf8mb4 and gbk). | utf8 |
| defaultTimeZone | String | The default time zone. | Shanghai |
| tenantModeList | List |
The tenant compatibility mode string (such as MySQL and Oracle). | Oracle |
| timeZoneList | List |
The list of available time zones. | |
| timeZone | String | The ID of the time zone (such as UTC+8 and Asia/Shanghai). | Africa/Addis_Ababa |
| description | String | The text description of the time zone. | (GMT+3:00) Africa/Addis_Ababa |
| zoneList | List |
The available primary zone. | |
| name | String | The name or ID of the zone. | cn-hangzhou-h |
| replicaType | String | The replica type (such as FULL for a full-featured replica and READONLY for a read-only replica). | FULL |
| region | String | The region to which the zone belongs. | cn-hangzhou |
| role | String | The role of the zone (such as ReadWrite for a read/write zone and ReadOnly for a read-only zone). | ReadWrite |
| tenantZoneReplicas | List |
The details of the zone replicas. | |
| zoneReplicaType | String | The specific replica type. | FULL |
| zoneNodes | Integer | The number of nodes in the zone. | 1 |
| logicZoneName | String | The name of the logic zone. | cn-hangzhou-h |
| readOnlyReplicaType | String | The specific sub-type of the read-only replica (such as COLUMNAR for a columnar replica). | COLUMNAR |
| unitInfoList | List |
The details of the resource units (Units). | [ { "name": "unit1", "cpu": 2, "memory": 4 } ] |
Examples
Request example
--digest -u 'xxx:xxx' \
--request GET \
--url https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenantCreateConstraints
-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":{
"charsetList":[
"utf8mb4",
"gbk"
],
"defaultTimeZone":"Asia/Shanghai",
"tenantModeList":[
"Oracle",
"MySQL"
],
"timeZoneList":[
{
"description":"(GMT0:00) Africa/Abidjan",
"timeZone":"Africa/Abidjan"
},
{
"description":"(GMT0:00) Africa/Accra",
"timeZone":"Africa/Accra"
},
{
"description":"(GMT+3:00) Africa/Addis_Ababa",
"timeZone":"Africa/Addis_Ababa"
}
],
"zoneList":[
{
"name":"cn-hangzhou-h",
"replicaType":"FULL"
}
]
},
"requestId":"d17468e6-acb5-481f-924b-5b7705899221",
"success":true
}
