Overview
You can call this API to delete a read-only replica instance.
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
DELETE api/v2/instances/{instanceId}/readonlyInstance
Request parameters
Path
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the instance. | obxxx |
Body
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| readonlyInstanceId | String | Yes | The ID of the read-only replica instance. | obroxxx |
| dryRun | Boolean | No | Specifies whether to perform a dry run. | false |
Response parameters
| Parameter | Type | Description | Example value |
|---|---|---|---|
| success | boolean | Indicates whether the request was successful. | true/false |
| requestId | String | trace | dc302d76-66b5-48d8-ab53-a035******** (64-bit) |
Examples
Request example
curl --digest -u 'ak:sk' \
-X DELETE \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/readonlyInstance' \
--data '{
"readonlyInstanceId": "obxxx",
"dryRun": false
}'
Response example
Here is a response example when the request is successful:
{
"data":{},
"success" : true,
"requestId": "dc302d76-66b5-48d8-ab53-a035********"
}
Here is a response example when the request failed:
{
"errorCode": "Params.InstanceName.Invalid",
"errorMessage": "The cluster name is invalid.",
"requestId": "cb32942e-bdf2-4d85-a26f-6bf8********",
"success": false
}