Overview
You can call this API to query the list of zones where a tenant can change the 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
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase cluster. | obcluster-***** |
| tenantId | String | Yes | The ID of the tenant. | t4louaeei**** |
Query
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| requestId | String | Yes | The ID of the request, which is used for tracing. | dc302d76-66b5-48d8-ab53-a035******** |
| openRequest | unknown | Yes | The open request parameter. | N/A |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| data | Object | The returned data. | - |
| zonesInfo | Array | The information about the 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 the creation of read-only replicas. | 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 operations. | - |
| permitted | Boolean | Indicates whether you have the required permissions. | 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 '<Your ak:sk>' \
-X GET \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/availableRoZones?requestId={requestId}&openRequest={openRequest}'
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
}
