Delete calculation instance¶
Delete the computing instance in the current workspace.
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¶
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 |
|---|---|---|---|
|
string |
Yes |
The compute instance ID to be deleted. |
Query parameters
Field |
Type |
Required |
Description |
|---|---|---|---|
|
boolean |
No |
When set to |
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¶
{
"code": "OK",
"msg": "OK",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
Fixed to |
Error response¶
{
"code": "DELETE_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. |
403 |
|
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 |
|
The target object or required reference was not found. |
Verify the object identifier, workspace, and current status. |
409 |
|
Conflict in resource state, request payload, or concurrent modification. |
Re-read the current state and version, then handle according to the latest result. |
503 |
|
A business, runtime, or authorization dependency is temporarily unavailable. |
After the dependency recovers, check existing results first instead of blindly repeating writes. |