Overview
You can call this API to query the information about a tenant in a 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}/tenants/{tenantId}
Request parameters
Query
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase cluster. | ob317v4uif**** |
| tenantId | String | Yes | The ID of the tenant. | ob2mr3oae0**** |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| data | Object | The information about the tenant. | |
| tenantId | String | The ID of the tenant. | t33h8y08k**** |
| tenant | Object | The information about the tenant. | |
| tenantName | String | The name of the tenant. Fuzzy match is supported when you search for tenants by name. |
pay_**** |
| description | String | The description of the tenant. | PayCore business database |
| primaryZone | String | The primary zone of the tenant. | cn-hangzhou-i |
| tenantMode | String | The mode of the tenant. Valid values:
|
Oracle |
| vpcId | String | The Virtual Private Cloud (VPC) ID of the tenant. If no suitable VPC is available, create a VPC as prompted. For more information, see What is a VPC. | vpc-bp1d2q3mhg9i23ofi**** |
| status | String | The status of the tenant. Valid values:
|
ONLINE |
| CPU | Object | The information about the CPU resources of the cluster. | |
| unitCpu | Long | The number of CPU cores of each replica node in the cluster. | 10 |
| unitMem | Float | The size of memory for each unit of the tenant, in GiB. | 32 |
| unitNum | Integer | The number of resource units for the tenant. | 1 |
| gmtCreate | The time when the tenant was created. | 2021-09-20 12:00:00 | |
| tenantZones | Array of TenantZones | The information about the zones of the tenant.
|
ReadWrite |
Examples
Request example
curl --digest -u 'ak:sk' \
--request GET \
--url https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}
-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": {
"deployType": "single",
"description": "my test tenant 1",
"gmtCreate": "2021-10-13 19:59:15.0",
"primaryZone": "cn-hangzhou-i",
"status": "ONLINE",
"cpu": 4,
"mem": 8,
"unitCpu": 4,
"unitNum": 2,
"unitMem": 8,
"tenantMode": "MySQL",
"tenantName": "t34vln14hlv5s",
"tenantZones": [{
"name": "cn-hangzhou-i",
"role": "ReadWrite"
}],
"vpcId": "vpc-0jlw84wpoywc2y7ozrtos"
},
"requestId": "a0a16ff1-e8f3-4cf2-83f0-ba58bcd79d18",
"success": true
}