Retry the compute instance operation¶
Retry the compute instance in the ERROR state. After success, the instance returns to IDLE and the Worker will not be redeployed immediately.
POST $CLOUDSIGMA_API_BASE/compute-resources/{resource_id}/retry
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 ERROR.
Set the operation-specific values used in the request:
$RESOURCE_ID: The compute instance ID to retry the operation.
Request¶
curl -X POST "$CLOUDSIGMA_API_BASE/compute-resources/$RESOURCE_ID/retry" \
-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; returned if there is a value. |
|
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": "RETRY_FAILED",
"msg": "请求参数无效",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The instance ID is invalid or the current status does not allow retry. |
Check the details first to confirm the failure reason and current status. |
|
— |
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 state conflicts with the retry operation. |
Read the latest status before operating. |
|
|
The server failed to handle the retry. |
Try again later. |
Follow-up operations¶
Query calculation instance details and Query Worker runtime.