Overview
You can call this API to modify the disk size of a read-only replica.
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/diskSize
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 request ID for tracking. |
dc302d76-66b5-48d8-ab53-a035******** |
| Parameter |
Type |
Required |
Description |
Example value |
| X-Ob-Project-Id |
String |
Yes |
The project ID. |
hxq3ztx3377nby3v87ry**** |
Body
| Parameter |
Type |
Required |
Description |
Example value |
| readonlyInstanceId |
String |
Yes |
The ID of the read-only instance. |
obxxx |
| targetDiskSize |
Integer |
Yes |
The target disk size, in GB. |
70 |
| dryRun |
Boolean |
No |
Specifies whether to perform a dry run. |
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 dry run. |
NL25******** |
| dryRunResult |
Boolean |
The result of the dry run. |
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/diskSize?requestId={requestId}' \
--data '{
"readonlyInstanceId": "obxxx",
"targetDiskSize": 70,
"dryRun": false
}'
Response example
JSON format
{
"data":{
"instanceId":"ob********",
"orderId":"NL25********"
},
"requestId":"f257f51e-****-****-8fba-ec1b9554cc78",
"success":true
}