Check the calculation instance before deleting it

Check the active tasks and workflow bindings that need to be processed before deleting the computing instance.

HTTP
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

Shell
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

resource_id

string

Yes

The compute instance ID to be deleted.

Successful response

JSON
{
  "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

code

string

OK on success.

msg

string

OK on success.

data

object

response data.

data.active_tasks

integer

Number of active tasks.

data.active_task_ids

array of string

Activity task ID. Returned when there is an active task.

data.bound_workflows

integer

Number of bound workflows.

data.bound_workflow_details

array of object

Bind workflow details. Returned if a binding exists.

data.bound_workflow_details[].id

string

workflow ID.

data.bound_workflow_details[].name

string

workflow name.

data.bound_workflow_details[].node_names

array of string

The node name to which this instance is bound. Returned if there is a value.

Error response

JSON
{
  "code": "PREFLIGHT_FAILED",
  "msg": "服务端错误",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

Error description.

data

null

Empty on error.

Common HTTP errors

HTTP status

Error code

Common cause

Recommended action

400

INVALID_PARAMS

Invalid request field, workspace, or operation precondition.

Fix the request parameters and submit again.

401

Unauthorized

Missing or invalid authentication credentials.

Check the credential type, expiration, and authentication header.

500

PREFLIGHT_FAILED

Internal processing failed; write operations may have been partially applied.

Retain request and trace details, and verify the current state before retrying.

Last updated on