Batch Deleting DB Instances
Function
This API is used to batch delete pay-per-use DB instances.
To delete DB instances and read replicas billed in the yearly/monthly mode, unsubscribe from the order first. For details, see Unsubscribing from a Yearly/Monthly Instance.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
Authorization Information
- If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
rds:instance:deleteInstance |
write |
- |
- |
rds:instance:delete |
- |
Constraints
- This API is supported for the MySQL DB engine only.
- A maximum of 50 pay-per-use DB instances can be deleted at a time.
URI
- URI format
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Constraints
The value cannot be empty.
Range
N/A
Default Value
N/A
Request Parameters
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
instance_ids |
Yes |
Definition Instance IDs. Constraints N/A Range N/A Default Value N/A |
Example Request
Batch delete DB instances.
POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/batch-delete
{
"instance_ids" : [
"347288b745f9455faa700e88c17ca276in01",
"230e3f38495e437097dbef6266e208fdin01"
]
}
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
records
Object
Definition
Records of instance deletion tasks. If an instance fails to be deleted, no record will be returned.
For details about the data structure, see Table 4.
- Example normal response
{ "records" : [ { "instance_id" : "347288b745f9455faa700e88c17ca276in01", "job_id" : "3508dff1-7d4d-41d6-833d-1f38f93e02da" } ] } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot