Overview
You can call this API to modify a read-only replica of a tenant.
API details
Constraints
The caller must have an AccessKey for accessing APIs. 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 |
|---|---|---|---|---|
| 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 to perform. Valid values:
|
CREATE |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| data | Object | The returned data. | |
| operation | String | The operation to perform. | CREATE |
| readonlyZone | String | The ID of the zone. | ap-beijing-3-ro-z0 |
| success | Boolean | Indicates whether the call was successful. | true |
| tenantId | String | The ID of the tenant. | txxx |
Examples
Request example
curl --digest -u 'ak:sk' \
-X POST \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/readonlyReplica' \
--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 }