Overview
You can call this API to query the basic information of read-only replicas.
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}/tenants/{tenantId}/availableRoZones
Request parameters
Path
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the instance. | obxxx |
| tenantId | String | Yes | The ID of the tenant. | obxxx |
Query
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| cpu | Integer | No | The number of CPU cores. | 4 |
| memory | Integer | No | The size of memory. | 16 |
| logDisk | Integer | No | The size of the log disk. | 60 |
| unitNum | Integer | No | The number of nodes. | 2 |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| data | Object | The returned data. | - |
| zonesInfo | Array | The information about read-only replicas. | - |
| availableZoneId | String | The logical zone ID of the read-only replica. | ap-beijing-3-ro-z0 |
| cpu | Integer | The number of CPU cores. | 4.0 |
| cpuUsed | Integer | The number of CPU cores that have been used. | 0.0 |
| enableCreate | Boolean | Indicates whether to allow you to create a read-only replica. | true |
| memory | Integer | The size of memory. | 16.0 |
| memoryUsed | Integer | The size of memory that has been used. | 0.0 |
| permission | Object | Indicates whether to allow you to perform operations. | - |
| permitted | Boolean | Indicates whether you have the permission. | true |
| reason | String | The reason. | NULL |
| message | String | The information. | - |
| readOnlyReplicaType | String | The type of the read-only replica. Valid values:
|
ROW_STORE |
| realZoneId | String | The physical zone ID. | ap-beijing-3 |
| replicaAliasName | String | The name of the read-only replica. | 3-1 |
| roCreated | Boolean | Indicates whether a read-only replica has been created. | false |
| serverCount | Integer | The number of nodes. | 2 |
| zoneCopyId | Integer | The ID of the read-only replica. | 1 |
| zoneReplicaType | String | The type of the zone replica. | READONLY |
Examples
Request example
curl --digest -u 'ak:sk' \
-X GET \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/availableRoZones'
Response example
JSON format
{
"data": {
"zonesInfo": [
{
"availableZoneId": "ap-beijing-3-ro-z0",
"cpu": 4.0,
"cpuUsed": 0.0,
"enableCreate": true,
"memory": 16.0,
"memoryUsed": 0.0,
"permission": {
"permitted": true,
"reason": "NULL"
},
"readOnlyReplicaType": "ROW_STORE",
"realZoneId": "ap-beijing-3",
"replicaAliasName": "3-1",
"roCreated": false,
"serverCount": 2,
"zoneCopyId": 1,
"zoneReplicaType": "READONLY"
}
]
},
"requestId": "5e65c5ce-9fda-4483-ac4c-d36781b734ef",
"success": true
}