Restore computing instance¶
Resume a paused compute instance. After success, the instance returns to IDLE, and the Worker will not be deployed immediately; the required Worker type will be activated only for subsequent workload requirements.
POST $CLOUDSIGMA_API_BASE/compute-resources/{resource_id}/resume
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First query the calculation instance details and confirm that the instance status is SUSPENDED.
Set the operation-specific values used in the request:
$RESOURCE_ID: Compute instance ID to restore.
Request¶
curl -X POST "$CLOUDSIGMA_API_BASE/compute-resources/$RESOURCE_ID/resume" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Compute instance ID. |
Successful response¶
When successful, 200 is returned, and data is the calculation instance object.
{
"code": "OK",
"msg": "OK",
"data": {
"id": "cr-001",
"name": "data-processing",
"spec_id": "task-standard-small",
"status": "IDLE",
"status_message": "",
"min_replicas": 0,
"max_replicas": 2,
"current_replicas": 0
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
string |
Compute instance ID. |
|
string |
ID of the workspace to which it belongs. |
|
string |
Compute instance name. |
|
string |
Example description; returned when there is a value. |
|
string |
Compute spec ID. |
|
string |
Instance type. |
|
integer |
CPU configuration value. |
|
integer |
Configuration value expressed in GiB of memory. |
|
integer |
GPU configuration value. |
|
integer |
CPU configuration value in millicores. |
|
integer |
Configuration value expressed in MiB of memory. |
|
integer |
Number of GPUs. |
|
integer |
MiB of video memory for a single GPU. |
|
integer |
Number of GPU cores. |
|
integer |
Serverless instances are fixed to |
|
integer |
Maximum number of copies. |
|
integer |
Number of target copies. |
|
integer |
The current number of copies. |
|
string |
Go Worker image ID; returned if there is a value. |
|
string |
Python Worker image ID; returned if there is a value. |
|
object[] |
Worker image selection; returned when there is a value. |
|
string |
Worker type. |
|
string |
Image ID. |
|
string |
Running platform. |
|
string |
Instance running platform; returned if there is a value. |
|
integer |
Automatic pause waiting time. |
|
boolean |
Whether it is the default computing instance of the workspace. |
|
string |
|
|
string |
Supplementary status information. |
|
string |
The scaling reason provided by the server; returned if there is a value. |
|
string |
Last activation time; returned if there is a value. |
|
string |
Last active time; returned if there is a value. |
|
string |
Creator ID; returned if there is a value. |
|
string |
Creation time; returned if there is a value. |
|
string |
Last updated time; returned if there is a value. |
In this document, [] after a type means an array; for example, object[] is an array of objects. In field paths, [] means each item in an array; for example, data.worker_images[].worker_type is the worker_type field of each item in data.worker_images.
Error response¶
{
"code": "RESUME_FAILED",
"msg": "请求参数无效",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The instance ID is invalid or the current state does not allow recovery. |
Check the instance details first, confirm the status and try again. |
|
— |
Missing or invalid access credentials. |
Check the regional endpoint, API key, and workspace ID. |
|
|
The current identity does not have instance operation permissions. |
Requesting permission to |
|
|
The instance does not exist or does not belong to the current workspace. |
Check |
|
|
The instance status conflicts with this operation. |
Read the latest status before operating. |
|
|
The server failed to process the restore request. |
Try again later. |
Follow-up operations¶
Query calculation instance details, and if necessary, Query Worker runtime.