Description
The interface used to delete a replica for the specified tenant.
Call instructions
Interface constraints
The caller needs to authenticate through the OCP application service.
Request path
POST /api/v2/ob/clusters/{id}/tenants/{tenantId}/deleteReplica
Request parameters
path:
Parameter |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| id | Long | Yes | 9 | The cluster ID of the target tenant in OCP. |
| tenantId | Long | Yes | 18 | The tenant ID of the target tenant in OCP. |
body:
Parameter |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| zoneName | String | Yes | foo | The tenant name, which is unique in the cluster. |
Return result
Basic data structure
Parameter |
Type |
Description |
|---|---|---|
| data | Object | Asynchronous task information. 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 that conforms to the HTTP status code specification. |
| traceId | String | The Trace ID of the request, which is used to troubleshoot issues. |
| server | String | The address of the application service that responded to the request. |
Examples
Request example
POST /api/v2/ob/clusters/9/tenants/18/addReplica
[
{
"zoneName": "zone1"
},
{
"zoneName": "zone2"
}
]
Return example
{
"data": {
"clusterId": 9,
"context": {
"listMap": {
"zone_names": [
"zone3"
]
},
"parallel": false,
"parallelIdx": -1,
"stringMap": {
"tenant_id": "18",
"cluster_id": "9"
}
},
"creator": "admin",
"executor": "xxx.xxx.xxx.xxx",
"id": 239885,
"name": "Delete tenant replica",
"operation": "EXECUTE",
"startTime": "2021-06-30T12:06:51.078+08:00",
"status": "RUNNING",
"subtasks": [
{
"className": "com.alipay.ocp.service.task.business.tenant.UpdateTenantStatusTask",
"description": "Update tenant status",
"downstreams": [
],
"id": 305073,
"name": "Update tenant status",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"runTime": 1,
"seriesId": 1,
"status": "PENDING",
"timeout": 300,
"upstreams": [
305072
]
},
{
"className": "com.alipay.ocp.service.task.business.tenant.PrepareResourcePoolTask",
"description": "Prepare resource pool",
"downstreams": [
305070
],
"id": 305074,
"name": "Prepare resource pool",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"runTime": 1,
"seriesId": 5,
"status": "PENDING",
"timeout": 300,
"upstreams": [
305071
]
},
{
"className": "com.alipay.ocp.service.task.business.tenant.DeleteResourcePoolTask",
"description": "Delete resource pool",
"downstreams": [
305072
],
"id": 305070,
"name": "Delete resource pool",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"runTime": 1,
"seriesId": 0,
"status": "PENDING",
"timeout": 300,
"upstreams": [
305074
]
},
{
"className": "com.alipay.ocp.service.task.business.tenant.WaitAlterLocalityTask",
"description": "Wait alter locality",
"downstreams": [
305074
],
"id": 305071,
"name": "Wait alter locality",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"runTime": 1,
"seriesId": 2,
"status": "PENDING",
"timeout": 3600,
"upstreams": [
305069
]
},
{
"className": "com.alipay.ocp.service.task.business.tenant.SyncTenantInfoTask",
"description": "Sync tenant information",
"downstreams": [
305073
],
"id": 305072,
"name": "Sync tenant information",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"runTime": 1,
"seriesId": 4,
"status": "PENDING",
"timeout": 300,
"upstreams": [
305070
]
},
{
"className": "com.alipay.ocp.service.task.business.tenant.PrepareAlterTenantTask",
"description": "Prepare alter tenant",
"downstreams": [
305071
],
"id": 305069,
"name": "Prepare alter tenant",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"runTime": 1,
"seriesId": 3,
"status": "READY",
"timeout": 300,
"upstreams": [
]
}
],
"taskDefinitionId": -1,
"tenantId": 18,
"type": "MANUAL"
},
"duration": 104,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-06-30T12:06:51.103+08:00",
"traceId": "55f85ba1c1db4b13"
}
