Overview
You can call this API to change the specification of a database proxy 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}/proxies
Request parameters
Path
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | string | Yes | The ID of the OceanBase cluster. | ob317v4uif**** |
Query
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| requestId | String | Yes | Request ID | 6e87d618-854e-4ca1-ae1f-babc******** |
Body
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | Instance ID | ob317v4uif**** |
| proxyClusterId | String | Yes | Proxy cluster ID | proxy-6tvgz6z2**** |
| unitNum | Integer | Specification | 1 | |
| mode | String | Proxy mode | k8s_shared, k8s_exclusive | |
| zone | String | ap-beijing-5 | ||
| odpClusterNodeType | String | ODP cluster node type. This parameter is used in one-click POC scenarios. | normal | |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| success | boolean | Indicates whether the operation succeeded. | true/false |
| errorCode | string | Error code | "E001" |
| errorMessage | string | Error message | "The operation was successful." |
| data | object | Business data | {...} |
| cost | integer[int64] | Time consumed (in milliseconds) | 150 |
| server | string | Server address | "xx.xxx.xx.xxx" |
| requestId | string | Request ID | "req_20250811_001" |
| totalCount | integer[int64] | Total number | 100 |
| extra | object | Additional information | {"key1": "value1"} |
Examples
Request example
curl --digest -u 'ak:sk' \
--request PUT \
--url 'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/proxies'\
-H 'X-Ob-Project-Id: <Project ID>'\
--data \ '{"instanceId":"xxx", "proxyClusterId": "xxx", "unitNum": 2}'
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
None