Overview
You can call this API to modify the specification of an OceanBase cluster.
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
Query
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | string | Yes | The ID of the OceanBase cluster. | ob317v******** |
Body
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceClass | string | Yes | The specification of the OceanBase cluster instance. | 8C32GB |
| diskSize | integer | No | The disk size of the OceanBase cluster.
NoteFor transactional shared instances, you cannot expand the disk size. In this case, you do not need to specify this parameter. |
150 |
| dryRun | Boolean | Yes | Specifies whether to perform a precheck. | true |
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 result of the precheck. | NL25******** |
Examples
Request example
curl --digest -u 'ak:sk' \
-X PUT \
--url https://api-cloud.oceanbase.com/api/v2/instances/ob6wc5k0l4ydk0/spec \
-H 'X-Ob-Project-Id: <Project ID>'
--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
}