Batch Deleting Instances
Function
This API is used to delete instances in batches. Data in the instances will be deleted without any backup. Exercise caution when performing this operation.
URI
POST /v2/{project_id}/instances/action
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain it, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instances |
No |
Array of strings |
List of instance IDs. |
action |
Yes |
String |
Operation to be performed on instances. Value: delete. |
all_failure |
No |
String |
When set to reliability, this parameter indicates that all RocketMQ instances that fail to be created will be deleted. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
results |
Array of results objects |
Result of instance modification. |
Example Requests
-
Batch deleting RocketMQ instances
POST https://{endpoint}/v2/{project_id}/instances/action { "action" : "delete", "instances" : [ "54602a9d-5e22-4239-9123-77e350df4a34", "7166cdea-dbad-4d79-9610-7163e6f8b640" ] }
-
Deleting all RocketMQ instances that fail to be created
POST https://{endpoint}/v2/{project_id}/instances/action { "action" : "delete", "all_failure" : "reliability" }
Example Responses
Status code: 200
Instances deleted.
{ "results" : [ { "result" : "success", "instance" : "019cacb7-4ff0-4d3c-9f33-f5f7b7fdc0e6" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Instances deleted. |
Error Codes
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