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 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 OceanBase cluster. | obcluster-***** |
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******** |
Header
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| X-Ob-Project-Id | String | Yes | The ID of the project. | hxq3ztx3377nby3v87ry**** |
Body
Parameter |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| readonlyInstanceId | String | Yes | The ID of the read-only replica instance. | obxxx |
| targetInstanceClass | String | Yes | The target specification. | 4C16G |
| dryRun | Boolean | No | Specifies whether to perform a pre-check. | 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 pre-check. | NL25******** |
| dryRunResult | Boolean | The result of the pre-check. | NL25******** |
Examples
Request example
curl --digest -u '<Your ak:sk>' \
-X PUT \
-H 'X-Ob-Project-Id: {X-Ob-Project-Id}' \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/readonlyInstance/spec?requestId={requestId}' \
--data '{
"readonlyInstanceId": "obxxx",
"targetInstanceClass": "4C16G",
"dryRun": true
}'
Response example
JSON format
{
"data":{
"instanceId":"ob********",
"orderId":"NL25********"
},
"requestId":"f257f51e-****-****-8fba-ec1b9554cc78",
"success":true
}
