Overview
You can call this API to modify the port number of the tenant connection address.
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}/tenants/{tenantId}/addressPort
Request parameters
Path
| Name |
Type |
Required |
Description |
Example value |
| instanceId |
string |
Yes |
The ID of the OceanBase Cloud instance. |
ob317v4uif**** |
| tenantId |
string |
Yes |
The ID of the tenant. |
ob2mr3oae0**** |
Query
| Name |
Type |
Required |
Description |
Example value |
| requestId |
String |
Yes |
Request ID |
6e87d618-854e-4ca1-ae1f-babc******** |
Body
| Name |
Type |
Required |
Description |
Example value |
| addressId |
String |
Yes |
The ID of the address. |
your-address-id |
| proxyClusterId |
String |
Yes |
The ID of the proxy cluster. |
proxy-6tvgz6z2**** |
| serviceType |
String |
Yes |
The type of the address. |
OBPROXY_INTRANET, OBPROXY_INTERNET, OBPROXY_READONLY, OBPROXY_READWRITE...... |
| port |
Integer |
Yes |
The new port number. |
12345 |
Response parameters
| Name |
Type |
Description |
Example value |
| success |
boolean |
Indicates whether the operation succeeded. |
true/false |
| errorCode |
string |
The error code. |
"E001" |
| errorMessage |
string |
The error message. |
"Operation succeeded" |
| data |
object |
The business data. |
{...} |
| data.addressId |
string |
The ID of the address. |
"12345" |
| cost |
integer[int64] |
The time consumed (in milliseconds) |
150 |
| server |
string |
The server address |
"xx.xxx.xx.xxx" |
| requestId |
string |
The request ID. |
"req_20250811_001" |
| totalCount |
integer[int64] |
The total number. |
100 |
| extra |
object |
Additional information. |
{"key1": "value1"} |
Examples
Request example
curl --digest -u '<Your ak:sk>' \
--request PUT \
--url 'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/addressPort?requestId={requestId}' \
-H 'X-Ob-Project-Id: <Project ID>' \
-H 'Content-Type: application/json' \
--data '{"addressId": "your-address-id", "proxyClusterId": "proxy-6tvgz6z2****", "serviceType": "OBPROXY_INTRANET", "port": 33061}'
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
{
"success": true,
"errorCode": "E001",
"errorMessage": "Operation succeeded",
"data": {
"addressId": "your-address-id"
},
"cost": 150,
"server": "xxx.xxx.x.xxx:xxxx",
"requestId": "req_20250811_001",
"totalCount": 1,
"extra": {}
}