Overview
You can call this API to modify the list of zones for a read-only replica of a tenant.
API details
Constraints
The caller must have an AccessKey for accessing the APIs of OceanBase Cloud. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
POST /api/v2/instances/{instanceId}/tenants/{tenantId}/readonlyReplica
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 |
|---|---|---|---|---|
| requestId | String | Yes | The ID of the request. This parameter is used for tracing. | dc302d76-66b5-48d8-ab53-a035******** |
Body
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| readonlyZone | String | Yes | The ID of the zone. | ap-beijing-3-ro-z0 |
| readOnlyReplicaType | String | Yes | The type of the read-only replica. Valid values:
|
ROW_STORE |
| operation | String | Yes | The operation type. Valid values:
|
CREATE |
| customUnitConfig | Object | No | The custom unit configuration. | - |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| data | Object | The data returned. | |
| operation | String | The operation type. | CREATE |
| readonlyZone | String | The ID of the zone. | ap-beijing-3-ro-z0 |
| success | Boolean | Indicates whether the operation succeeded. | true |
| tenantId | String | The ID of the tenant. | txxx |
Examples
Request example
curl --digest -u '<Your AccessKey ID:AccessKey secret>' \
-X POST \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/readonlyReplica?requestId={requestId}' \
-H 'Content-Type: application/json' \
--data '{
"readonlyZone": "ap-beijing-3-ro-z1",
"readOnlyReplicaType": "ROW_STORE",
"operation": "CREATE"
}'
Response example
JSON format
{
"data":{
"instanceId":"obxxx",
"operation":"CREATE",
"readonlyZone":"ap-beijing-3-ro-z1",
"success":true,
"tenantId":"txxx"
},
"requestId":"c69b9b89-a553-4e95-9bc7-6cbc04b309fc",
"success":true
}
