Delete calculation instance

Delete the computing instance in the current workspace.

HTTP
DELETE $CLOUDSIGMA_API_BASE/compute-resources/{resource_id}

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 check the calculation instance deletion condition 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 body

Shell
curl -X DELETE "$CLOUDSIGMA_API_BASE/compute-resources/$RESOURCE_ID" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Path parameters

Field

Type

Required

Description

resource_id

string

Yes

The compute instance ID to be deleted.

Query parameters

Field

Type

Required

Description

force

boolean

No

When set to true, cancel the active task record and clean up the workflow association, and then submit the deletion request.

Setting force=true will cancel the active task record and clean up the resource binding of the workflow. Cleanup scope includes DSL, MOWL and released versions. After completing cleanup, the service submits a termination request.

When parsing fails, this cleanup will be rolled back. After preflight, dependencies may still change.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": null
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

null

Fixed to null when the delete request completes successfully.

Error response

JSON
{
  "code": "DELETE_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, DELETE_FAILED

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.

403

ErrForbidden

The current identity or active role does not have permission for this operation.

Use an authorized identity or contact an administrator to grant access.

404

NOT_FOUND

The target object or required reference was not found.

Verify the object identifier, workspace, and current status.

409

DELETE_CONFLICT

Conflict in resource state, request payload, or concurrent modification.

Re-read the current state and version, then handle according to the latest result.

503

DELETE_UNAVAILABLE, ErrServiceUnavailable

A business, runtime, or authorization dependency is temporarily unavailable.

After the dependency recovers, check existing results first instead of blindly repeating writes.

Last updated on