Overview
You can call this API to create a read-only replica instance.
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}/readonlyInstance
Request parameters
Path
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the instance. | obxxx |
Body
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| readOnlyReplicaType | String | Yes | The type of the read-only replica. Valid values:
|
ROW_STORE |
| zone | String | Yes | The zone. | ap-beijing-3 |
| instanceClass | String | Yes | The instance specification. | 4C16G |
| diskSize | Integer | No | The disk size. | 70 |
| nodeNum | Integer | No | The number of nodes. | 1 |
| dryRun | Boolean | No | Specifies whether to perform a precheck. | false |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| data | object | The information about the cluster. | |
| orderId | string | The order ID. | NL25******** |
| instanceId | string | The ID of the instance. | ob******** |
| dryRun | Boolean | Specifies whether to perform a precheck. | NL25******** |
| dryRunResult | Boolean | The precheck result | NL25******** |
Examples
Request example
curl --digest -u 'ak:sk' \
-X POST \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/readonlyInstance' \
--data '{
"readOnlyReplicaType":"ROW_STORE",
"zone":"ap-beijing-3",
"instanceClass":"4C16G",
"diskSize":100,
"nodeNum":4,
"dryRun":true
}'
Response example
JSON format
{
"data": {
"instanceId": "ob********",
"orderId": "NL25********"
},
"requestId": "f257f51e-****-****-8fba-ec1b9554cc78",
"success": true
}