Delete calculation instance¶
Delete the compute instance in the current workspace.
DELETE $CLOUDSIGMA_API_BASE/compute-resources/{resource_id}
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
Check before deleting to confirm the instance to be deleted.
Set the operation-specific values used in the request:
$RESOURCE_ID: The compute instance ID to be deleted.
force=true will require the server to forcibly handle dependencies, and its impact should be confirmed before use.
Request¶
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
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The ID of the computing instance to be deleted. |
Query parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
boolean |
No |
Request forced deletion when passing |
Successful response¶
Returns 200 on success, data is null.
{
"code": "OK",
"msg": "OK",
"data": null
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
Fixed to |
Error response¶
{
"code": "DELETE_FAILED",
"msg": "请求参数无效",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
|
First execute CHECK before deleting. |
|
— |
Missing or invalid access credentials. |
Check the regional endpoint, API key, and workspace ID. |
|
|
The current identity does not have the permission to delete the instance. |
Use valid credentials, or contact your administrator for authorization. |
|
|
The instance does not exist or does not belong to the current workspace. |
Check |
|
|
There are still active tasks or binding relationships, and they cannot be deleted based on the current conditions. |
Retry after processing check results; only use |
|
|
The server failed to delete the instance. |
Record the request time and error message and try again. |
Follow-up operations¶
Re-List calculation instances to confirm that the resource is no longer visible.