Check the calculation instance before deleting it¶
Check the active tasks and workflow bindings that need to be processed before deleting the computing instance.
GET $CLOUDSIGMA_API_BASE/compute-resources/{resource_id}/preflight-delete
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First Query the computing instance details and confirm the instance to be deleted. Prepare the personal access token, target workspace ID, and computing instance ID that can access the target workspace.
Request parameters¶
curl "$CLOUDSIGMA_API_BASE/compute-resources/$RESOURCE_ID/preflight-delete" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The compute instance ID to be deleted. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"active_tasks": 1,
"active_task_ids": [
"task-001"
],
"bound_workflows": 1,
"bound_workflow_details": [
{
"id": "wf-001",
"name": "daily-load"
}
]
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object |
response data. |
|
integer |
Number of active tasks. |
|
array of string |
Activity task ID. Returned when there is an active task. |
|
integer |
Number of bound workflows. |
|
array of object |
Bind workflow details. Returned if a binding exists. |
|
string |
workflow ID. |
|
string |
workflow name. |
|
array of string |
The node name to which this instance is bound. Returned if there is a value. |
Error response¶
{
"code": "PREFLIGHT_FAILED",
"msg": "服务端错误",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Error description. |
|
null |
Empty on error. |
Common HTTP errors¶
HTTP status |
Error code |
Common cause |
Recommended action |
|---|---|---|---|
400 |
|
Invalid request field, workspace, or operation precondition. |
Fix the request parameters and submit again. |
401 |
|
Missing or invalid authentication credentials. |
Check the credential type, expiration, and authentication header. |
500 |
|
Internal processing failed; write operations may have been partially applied. |
Retain request and trace details, and verify the current state before retrying. |