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 | Project ID. For details, see Obtaining a Project ID. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
all_failure | No | Boolean | Whether to delete all DCS instances that failed to be created. Values:
|
Request Parameters¶
Parameter | Mandatory | Type | Description |
---|---|---|---|
instances | No | Array of strings | List of instance IDs. This parameter is set only when the all_failure parameter in the URI is set to false or another value. |
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
results | Array of BatchOpsResult objects | Result of deleting, restarting, or clearing data of an instance. |
Parameter | Type | Description |
---|---|---|
result | String | Instance deletion result. Options: success and failed. |
instance | String | DCS instance ID. |
Status code: 500
Parameter | Type | Description |
---|---|---|
error_msg | String | Error message. Maximum: 1024 |
error_code | String | Error code. Maximum: 9 |
error_ext_msg | String | Extended error information. This parameter is not used currently and is set to null. Maximum: 1024 |
Status code: 400
Parameter | Type | Description |
---|---|---|
error_msg | String | Error message. Maximum: 1024 |
error_code | String | Error code. Maximum: 9 |
error_ext_msg | String | Extended error information. This parameter is not used currently and is set to null. Maximum: 1024 |
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. |
500 | Internal service error. |
400 | Invalid request. |
Error Codes¶
See Error Codes.