Overview
You can call this API to query the information of a specified tenant in a specified cluster, including the list of all read-only replicas or read-only columnar replicas, such as the replica status and specifications.
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
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase Cloud instance. | ob317v4uif**** |
| tenantId | String | Yes | The ID of the tenant. | ob2mr3oae0**** |
| requestId | String | Yes | The request ID for tracking. | dc302d76-66b5-48d8-ab53-a035******* |
Response parameters
| Name | 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. | 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 ID of the virtual private cloud (VPC). If no suitable VPC is available, create one as prompted. For more information, see What is a VPC. | vpc-bp1d2q3mhg9i23ofi**** |
| status | String | The status of the tenant.
|
ONLINE |
| cpu | Object | 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 of each unit, in GiB. | 32 |
| unitNum | Integer | The number of units of the tenant. | 1 |
| gmtCreate | The creation time of the tenant. | 2021-09-20 12:00:00 | |
| tenantZones | Array of TenantZones | The zones of the tenant.
|
ReadWrite |
Examples
Request example
curl --digest -u '<Your ak:sk>' \
--request GET \
--url https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}?requestId={requestId} \
-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-wulanchabu-c",
"status": "ONLINE",
"cpu": 4,
"mem": 8,
"unitCpu": 4,
"unitNum": 2,
"unitMem": 8,
"tenantMode": "MySQL",
"tenantName": "t34vln14hlv5s",
"tenantZones": [{
"name": "cn-wulanchabu-c",
"role": "ReadWrite"
}],
"vpcId": "vpc-0jlw84wpoywc2y7ozrtos"
},
"requestId": "a0a16ff1-e8f3-4cf2-83f0-ba58bcd79d18",
"success": true
}
