Batch Deleting DCS Instances
Function
This API is used to delete multiple DCS instances at a time.
URI
DELETE /v2/{project_id}/instances
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID. Constraints: N/A Range: N/A Default Value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
all_failure |
No |
Boolean |
Definition: Whether to delete all DCS instances that failed to be created. Options: Constraints: N/A Range:
Default Value: false |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
instances |
No |
Array of strings |
Definition: List of instance IDs. This parameter is set only when the all_failure parameter in the URI is set to false or another value. Constraints: N/A |
|
is_recycle |
No |
Boolean |
Definition Whether to move the deleted instance to the recycle bin. Constraints Redis 4.0 and later instances can be moved to the recycle bin. Range true: Yes false: No, the deleted instance is directly destroyed. Default Value false |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
results |
Array of BatchOpsResult objects |
Definition: Result of deleting, restarting, or clearing data of an instance. |
|
Parameter |
Type |
Description |
|---|---|---|
|
result |
String |
Definition Operation result. Range success: The instance is deleted, restarted, or cleared. failed: The instance fails to be deleted, restarted, or cleared. |
|
instance |
String |
Definition: DCS instance ID. Range: N/A |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
|
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
|
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
|
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
|
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Example Requests
Batch deleting DCS instances
DELETE https://{dcs_endpoint}/v2/{project_id}/instances?all_failure={all_failure}
{
"instances" : [ "54602a9d-5e22-4239-9123-77e350df4a34", "7166cdea-dbad-4d79-9610-7163e6f8b640" ]
}
Example Responses
Status code: 200
DCS instances deleted successfully.
{
"results" : [ {
"result" : "success",
"instance" : "54602a9d-5e22-4239-9123-77e350df4a34"
}, {
"result" : "success",
"instance" : "7166cdea-dbad-4d79-9610-7163e6f8b640"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
DCS instances deleted successfully. |
|
400 |
Invalid request. |
|
500 |
Internal service error. |
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