Description
You can call this operation to bind tags to or unbind tags from an arbitration service.
Call description
Prerequisites
You have the ARBITRATION:UPDATE permission on the arbitration service.
Request path
POST /api/v2/arbitration/services/{id}/tagResource
Request parameters
path:
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Long | Yes | 4901 | The ID of the arbitration service to which the tags are bound, or from which the tags are unbound. |
body:
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| requests | List<Object> | No | - | For more information, see the Bind/Unbind tags for resource usage section in this topic. |
Bind/Unbind tags for resource usage
| Parameter | Type | Description |
|---|---|---|
| tagId | Long | The ID of the tag. |
| action | String | Specify to bind or unbind the tag. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | For more information, see the Arbitration service information section in this topic. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of time taken by the server to process the request, in milliseconds. |
| status | Integer | The 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. |
Arbitration service information
| Parameter | Type | Description |
|---|---|---|
| id | Long | The ID of the arbitration service. |
| hostId | Long | The ID of the host where the arbitration service resides. |
| svrIp | String | The IP address of the host where the arbitration service resides. |
| svrPort | Integer | The port of the arbitration service. |
| status | String | The status of the arbitration service. |
| groupId | Long | The ID of the service group to which the arbitration service belongs. |
| groupName | String | The name of the service group. |
| priority | Integer | The priority of the arbitration service in the service group. |
| operatingTaskInstanceId | Long | The ID of the running task. |
| statusAnalysis | Object | For more information, see the Exception analysis section in this topic. |
| version | String | The version of the arbitration service. |
| installPath | String | The installation directory of the arbitration service. |
| runPath | String | The operation directory of the arbitration service. |
| runUser | String | The user who runs the arbitration service. |
| architecture | String | The architecture of the host where the arbitration service resides. |
| description | String | The description of the arbitration service. |
| clusters | List<Object> | For more information, see the Information of associated clusters section in this topic. |
| createTime | OffsetDateTime | The time when the arbitration service was created. |
| updateTime | OffsetDateTime | The time when the arbitration service was last modified. |
| startupParameters | Object | For more information, see the Startup parameters of an arbitration service section in this topic. |
| tags | List<Object> | The tags. |
Exception analysis
| Parameter | Type | Description |
|---|---|---|
| startTime | OffsetDateTime | The time when the exception started. |
| reason | String | The cause of the exception. |
| action | String | The suggested solution. |
| reasonType | String | The type of the exception cause. |
| diagnosisType | String | The diagnostic type. |
| diagnosisContent | Object | The content of the diagnosis. |
Information of associated clusters
| Parameter | Type | Description |
|---|---|---|
| id | Long | The ID of the cluster. |
| name | String | The name of the cluster. |
| obClusterId | Long | The cluster ID generated by the OceanBase Database system. |
| status | String | The status of the cluster. |
| tenants | List<Object> | For more information, see the Information of tenants in the clusters section in this topic. |
| tags | List<Object> | For more information, see the Tags section in this topic. |
Information of tenants in the clusters
| Parameter | Type | Description |
|---|---|---|
| id | Long | The ID of the tenant. |
| name | String | The name of the tenant. |
| obTenantId | Long | The tenant ID generated by the OceanBase Database system. |
| arbitrationStatus | String | The status of the arbitration service. |
| degradedLsIdList | List<Long> | The IDs of the downgraded log streams. |
Tags
| Parameter | Type | Description |
|---|---|---|
| id | Long | The ID of the tag. |
| key | String | The key of the tag. |
| value | String | The value of the tag. |
| refs | List<Object> | For more information, see the Objects bound to the tag section in this topic. |
Objects bound to the tag
| Parameter | Type | Description |
|---|---|---|
| id | Long | The ID of the tag. |
| name | String | The name of the tag. |
| resourceType | String | The type of the object. |
Startup parameters of an arbitration service
| Parameter | Type | Description |
|---|---|---|
| name | String | The name of the parameter. |
| value | String | The value of the parameter. |
Examples
Sample request
POST /api/v2/arbitration/services/4901/tagResource
[
{
"tagId":1,
"action":"TAG"
}
]
Sample response
{
"data": {
"architecture": "x86_64",
"clusters": [],
"createTime": "2025-01-21T10:41:59+08:00",
"description": "arbitration_service_1",
"hostId": 11,
"id": 21,
"installPath": "/home/admin/oceanbase",
"runPath": "/home/admin/oceanbase",
"runUser": "admin",
"startupParameters": [],
"status": "RUNNING",
"svrIp": "xxx.xxx.xxx.xxx",
"svrPort": 2882,
"tags": [
{
"id": 1,
"key": "key_01",
"refs": [],
"value": "value_01",
"valueOrEmpty": "value_01"
}
],
"updateTime": "2025-01-21T10:43:38+08:00",
"version": "4.3.3.1-101000032024102022"
},
"duration": 27,
"server": "6d952bd732",
"status": 200,
"successful": true,
"timestamp": "2025-01-21T10:48:54.525+08:00",
"traceId": "756c8d874c5793a8"
}