All Products
Search
Document Center

ApsaraDB for OceanBase:DeleteInstances

Last Updated:Dec 02, 2024

You can call this operation to release an OceanBase cluster.

Operation description

Before you call this operation, ensure that the following requirements are met:

  • The cluster is in the Running state.
  • The cluster is a primary cluster and the billing method is pay-as-you-go.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
oceanbase:DeleteInstancesdelete
*Instance
acs:oceanbase:{#regionId}:{#accountId}:instance/{#instanceId}/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdsstringYes

The ID of the cluster to be deleted.
The value is a string in the JSON format.

[”ob ob3f6yhv9uxxxx“]
BackupRetainModestringNo

The backup retention strategy for cluster deletion. Valid values:

  • receive_all: retains all backup sets.
  • delete_all: deletes all backup sets.
  • receive_last: retains the last backup set.
Note
Default value: delete_all.
delete_all
DryRunbooleanNo

Specifies whether to perform only a dry run for the request. Default value: false. Valid values:

  • true: Only a dry-run request is sent and the instance is not deleted. If the dry run succeeds, DryRunResult=true is returned. If the dry run fails, an error code is returned.
  • false: The actual request is sent and no dry run is performed. The instance is deleted if the requirements are met. By default, false is returned for the parameter DryRunResult if you set DryRun to false.
false

Response parameters

ParameterTypeDescriptionExample
object

The return result of the request.

RequestIdstring

The ID of the request.

473469C7-****-****-B3DB-A3DC0DE3C83E
Dataobject

The returned data.

DryRunResultboolean

The result of the dry-run request.

  • If the DryRun parameter is set to true and the dry run succeeds, the DryRunResult parameter returns true. Otherwise, an error code is returned.
  • If the DryRun parameter is set to false, no dry run is performed and the DryRunResult parameter returns false.
false

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-****-****-B3DB-A3DC0DE3C83E",
  "Data": {
    "DryRunResult": false
  }
}

Error codes

HTTP status codeError codeError message
400BadRequestBadRequest
404InstanceStatus.InvalidInstanceStatus.Invalid
404StandbyInstance.StillOnlineStandbyInstance.StillOnline
404UnknownErrorUnknownError
404Tenant.StillOnlineTenant.StillOnline
404ServiceTemporarilyUnavailableServiceTemporarilyUnavailable
404NotFoundNotFound
500InternalServerErrorInternalServerError

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-10-30The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details
2023-07-04The Error code has changedView Change Details