Overview
You can call this API to modify the specification of a read-only replica instance.
API details
Constraints
The caller must have an AccessKey for accessing the APIs. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
PUT api/v2/instances/{instanceId}/readonlyInstance/spec
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 |
|---|---|---|---|---|
| readonlyInstanceId | String | Yes | The ID of the read-only instance. | obxxx |
| targetInstanceClass | String | Yes | The target specification. | 4C16G |
| 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 instance ID. | 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 PUT \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/readonlyInstance/spec' \
--data '{
"readonlyInstanceId":"ROW_STORE",
"targetInstanceClass":"4C16G",
"dryRun":true
}'
Response example
JSON format
{
"data": {
"instanceId": "ob********",
"orderId": "NL25********"
},
"requestId": "f257f51e-****-****-8fba-ec1b9554cc78",
"success": true
}