Description
You can call this operation to delete a zone from an OceanBase cluster.
Call description
Prerequisites
You have the permissions to manage the OceanBase cluster.
For more information about the permissions, see Roles overview and Users Overview.
You have passed the authentication for the OCP application service.
Request path
DELETE /api/v2/ob/clusters/{id}/zones/{zoneName}
Path parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Integer | Yes | 1 | The ID of the OceanBase cluster from which a zone needs to be deleted. |
| zoneName | String | Yes | 1 | The name of the zone to be deleted. |
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. |
Examples
Sample request
DELETE /api/v2/ob/clusters/1/zones/zone2
Sample response
{
"data": {
"cluster": {
"id": 21,
"name": "ob_upgrade",
"obClusterId": 22
},
"context": "Context(parallelIdx=-1, stringMap={cluster_name=ob_upgrade, cluster_id=21, service_type=OB_CLUSTER, service_name=ob_upgrade:22, former_cluster_status=RUNNING, zone_name=zone2, target_cluster_status=RUNNING, service_version=2.2.75, ob_cluster_id=22}, listMap={server_ids=[8], host_ids=[1]})",
"creator": {
"id": 100,
"name": "admin"
},
"id": 108033,
"name": "Delete OB zone",
"startTime": "2021-03-02T11:34:39.009+08:00",
"status": "RUNNING",
"tasks": [
{
"description": "Sync cluster info",
"downstreams": [
129783
],
"id": 129774,
"name": "Sync cluster info",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129781
]
},
{
"description": "Unreserve host",
"downstreams": [
129781
],
"id": 129775,
"name": "Unreserve host",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129784
]
},
{
"description": "Prepare delete OB zone",
"downstreams": [
129786
],
"id": 129776,
"name": "Prepare delete OB zone",
"operation": "EXECUTE",
"status": "RUNNING",
"upstreams": [
]
},
{
"description": "Stop zone",
"downstreams": [
129782
],
"id": 129777,
"name": "Stop zone",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129786
]
},
{
"description": "Wait observer delete",
"downstreams": [
129779
],
"id": 129778,
"name": "Wait observer delete",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129782
]
},
{
"description": "Stop ocp agent service",
"downstreams": [
129785
],
"id": 129779,
"name": "Stop ocp agent service",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129778
]
},
{
"description": "Clean observer host",
"downstreams": [
129784
],
"id": 129780,
"name": "Clean observer host",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129785
]
},
{
"description": "Delete zone meta info",
"downstreams": [
129774
],
"id": 129781,
"name": "Delete zone meta info",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129775
]
},
{
"description": "Delete observer",
"downstreams": [
129778
],
"id": 129782,
"name": "Delete observer",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129777
]
},
{
"description": "Update OB cluster status",
"downstreams": [
],
"id": 129783,
"name": "Update OB cluster status",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129774
]
},
{
"description": "Delete zone",
"downstreams": [
129775
],
"id": 129784,
"name": "Delete zone",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129780
]
},
{
"description": "Wait node",
"downstreams": [
129780
],
"id": 129785,
"name": "Wait node",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129779
]
},
{
"description": "Prepare delete observer",
"downstreams": [
129777
],
"id": 129786,
"name": "Prepare delete observer",
"operation": "EXECUTE",
"status": "PENDING",
"upstreams": [
129776
]
}
]
},
"duration": 127,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-03-02T11:34:39.067+08:00",
"traceId": "80c3cf69ae8042dc"
}