Overview
You can call this API to modify the resource specifications of an OceanBase cluster instance, including the number of nodes, CPU, memory, and disk size.
API details
Constraints
The caller must have an AccessKey for accessing the multi-cloud API. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
PUT /api/v2/instances/{instanceId}/spec
Request parameters
Path
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | string | Yes | The ID of the OceanBase Cloud instance. | obcluster-***** |
Query
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| requestId | string | Yes | The request ID for tracking. | dc302d76-66b5-48d8-ab53-a035******** |
Header
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| X-Ob-Project-Id | string | Yes | The project ID. | hxq3ztx3377nby3v87ry**** |
Body
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceClass | string | Yes | The specifications of the OceanBase cluster instance. | 8C32GB |
| diskSize | integer | No | The disk size of the OceanBase cluster.
NoteShared instances of the transaction type do not support disk expansion. Therefore, you do not need to specify this parameter when you call this API. |
150 |
| dryRun | Boolean | Yes | Specifies whether to perform a dry run. | true |
Response parameters
| Name | 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 dry run. | NL25******** |
| dryRunResult | Boolean | The result of the dry run. | NL25******** |
Examples
Request example
curl --digest -u '<your ak:sk>' \
-X PUT \
--url 'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/spec?requestId={requestId}' \
-H 'X-Ob-Project-Id: {X-Ob-Project-Id}' \
-H 'Content-Type: application/json' \
--data '{
"instanceClass": "8C32GB",
"diskSize": 150,
"dryRun": true
}'
Note
- A project ID uniquely identifies a project. For information about how to obtain the project ID of an instance, see Manage projects.
- Make sure that the project ID corresponding to the specified instanceId is consistent with the specified project ID.
Response example
JSON format
{
"data": {
"instanceId": "ob********",
"orderId": "NL25********"
},
"requestId": "f257f51e-****-****-8fba-ec1b9554cc78",
"success": true
}
