Description
You can call this operation to update configurations of an OBProxy cluster.
Call description
Prerequisite
You have passed the authentication for the OCP application service.
Request path
PATCH /api/v2/obproxy/clusters/{id}
Request parameters
Path parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Long | Yes | 1 | The ID of the OBProxy cluster. |
body:
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| address | String | No | foo.bar | The IP address of the OBProxy cluster. |
| port | Integer | No | 2881 | The access port number of the OBProxy cluster. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | The information about the asynchronous task. For more information, see Task information. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | An HTTP status code. |
| traceId | String | The trace ID of the request. This trace ID is used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Data structure of obproxyCluster
| Parameter | Type | Description |
|---|---|---|
| id | Long | The ID of the OBProxy cluster. |
| name | String | The name of the OBProxy cluster. |
| parameterVersion | Long | The parameter version of the OBProxy cluster. |
| creatorId | Long | The ID of the creator. |
| creatorName | String | The name of the creator. |
| createTime | OffsetDateTime | The creation time. |
| updateTime | OffsetDateTime | The update time. |
| configUrl | String | The URL of the ConfigUrl service. |
| address | String | The IP address of the OBProxy cluster. |
| port | Integer | The access port number of the OBProxy cluster. |
| obLinks | Array | The information about connectable OceanBase clusters. For more information about the data structure, see Data structure of ObLink. |
| versions | Array | The versions of OBProxies. The number of OBProxies is counted by version. For more information about the data structure, see Data structure of VersionStatInfo. |
| topo | Array | The topology of OBProxies. The number of OBProxies is counted by IDC. For more information about the data structure, see Data structure of IdcStatInfo. |
| obproxies | Array | The list of all OBProxies in the cluster. For more information about the data structure, see Data structure of ObproxyServer. |
Data structure of ObLink
| Parameter | Type | Description |
|---|---|---|
| clusterId | Long | The ID of the cluster. |
| clusterName | String | The name of the cluster. |
| username | String | The username used to connect to the cluster. |
| status | String | The status of the cluster. Valid values: RUNNING UNAVAILABLE STOPPED CREATING TAKINGOVER DELETING MOVINGOUT RESTARTING STARTING STOPPING SWITCHOVER FAILOVER UPGRADING OPERATING * ABANDONED |
| connections | Double | The number of connections in the OceanBase cluster. |
| obClusterId | Long | The ID of the OceanBase cluster. |
| clusterType | String | The type of the cluster. Valid values: PRIMARY STANDBY |
Data structure of VersionStatInfo
| Parameter | Type | Description |
|---|---|---|
| version | String | The version information. |
| count | Long | The number of OBProxies. |
Data structure of IdcStatInfo
| Parameter | Type | Description |
|---|---|---|
| idcName | String | The name of the IDC. |
| count | Long | The number of OBProxies. |
Data structure of ObproxyServer
| Parameter | Type | Description |
|---|---|---|
| id | Long | The ID of the OBProxy server. |
| clusterId | Long | The ID of the OBProxy cluster to which the OBProxy belongs. |
| hostId | Long | The ID of the host to which the OBProxy belongs. |
| idcName | String | The name of the IDC to which the OBProxy belongs. |
| lastActiveTime | OffsetDateTime | The last active time. |
| parameterVersion | Long | The parameter version. |
| ip | String | The IP address. |
| sqlPort | Integer | The SQL port number. |
| exporterPort | Integer | The exporter port number. |
| version | String | The version of the OBProxy. |
| status | String | The status of the OBProxy. Valid values: CREATING RUNNING RESTARTING UPGRADING REFRESHING DELETING UNAVAILABLE TAKINGOVER |
| operateStatus | String | The operating status of the OBProxy. Valid values: NORMAL OPERATING |
| architecture | String | The hardware architecture of the host. |
Examples
Sample request
GET /api/v2/obproxy/clusters/1
{
"address": "foo.bar",
"port": 2883
}
Sample response
{
"data": {
"address": "foo.bar",
"configUrl": "http://xxx.xxx.xxx.xxx:8080/services?Action=GetObProxyConfig&User_ID=alibaba&UID=admin&ObproxyClusterName=test",
"createTime": "2021-09-01T16:52:56+08:00",
"creatorId": 100,
"creatorName": "admin",
"id": 1,
"name": "test",
"obLinks": [],
"obproxies": [{
"architecture": "x86_64",
"clusterId": 1,
"exporterPort": 2884,
"hostId": 2,
"id": 1,
"idcName": "am171",
"ip": "xxx.xxx.xxx.xxx",
"lastActiveTime": "2021-09-01T16:59:06+08:00",
"operateStatus": "NORMAL",
"parameterVersion": 3,
"sqlPort": 2883,
"status": "UNAVAILABLE",
"version": "1.9.1.1-1919579"
}],
"parameterVersion": 3,
"port": 2883,
"topo": [{
"count": 1,
"idcName": "am171"
}],
"updateTime": "2021-09-01T16:59:14+08:00",
"versions": [{
"count": 1,
"version": "1.9.1.1-1919579"
}],
"workMode": "CONFIG_URL"
},
"duration": 37,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-09-03T16:13:33.908+08:00",
"traceId": "5f0e2f08e30e49e7"
}