Update running strategy¶
Partially updated run policy configuration. Each successful update increments the policy version and only affects subsequent runs that are allowed to execute.
PATCH $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/runtime-policy-profiles/{policy_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 Query the running policy configuration details to confirm the policy to be updated. Prepare the personal access token, target workspace ID, and policy ID that can access the target workspace.
Request body¶
Replace $WORKSPACE_ID, $POLICY_ID, $CLOUDSIGMA_API_KEY in the example with actual values.
curl -X PATCH "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/runtime-policy-profiles/$POLICY_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"budgets": {
"max_steps": 30
},
"retry": {
"max_attempts": 2
}
}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Current workspace ID. |
|
string |
Yes |
Run policy ID. |
Request body
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string or null |
No |
Policy name and description. |
|
string or null |
No |
Policy name and description. |
|
string or null |
No |
Policy status and scope. |
|
string or null |
No |
Policy status and scope. |
|
string or null |
When not in workspace |
Required when in non-workspace scope, provide non-null reference. |
|
object or null |
No |
Admission, budgeting, and retry configuration. |
|
object or null |
No |
Admission, budgeting, and retry configuration. |
|
object or null |
No |
Admission, budgeting, and retry configuration. |
|
object or null |
No |
Data, Product and Provider Restrictions. |
|
object or null |
No |
Data, Product and Provider Restrictions. |
|
object or null |
No |
Data, Product and Provider Restrictions. |
|
object or null |
No |
Additional tags, annotations and metadata. |
|
object or null |
No |
Additional tags, annotations and metadata. |
|
object or null |
No |
Additional tags, annotations and metadata. |
The values labels and annotations only support strings or null. Other configuration objects can contain legal JSON extension fields. When created, the configuration object cannot be null.
When updating, omit the field or fill in null to retain the original value, and clear the object when filling in {}. An empty update will also increment the version. This interface does not check whether old versions have changed.
Successful response¶
{
"code": 0,
"data": {
"id": "policy_01",
"workspace_id": "",
"name": "默认运行限制",
"status": "active",
"scope_type": "workspace",
"budgets": {
"max_steps": 30
},
"retry": {
"max_attempts": 2
},
"version": 2,
"created_at": "2026-08-21T07:00:00Z",
"updated_at": "2026-08-21T07:00:00Z"
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
Run policy ID. |
|
string |
The workspace ID to which it belongs. |
|
string |
Updated policy name, status, and scope type. |
|
string |
Description. |
|
string |
Updated policy name, status, and scope type. Values: |
|
string |
Updated policy name, status, and scope type. Values: |
|
string |
Scope object reference. |
|
object |
Admission configuration. |
|
object |
Updated budget and retry configuration. Only returned if there is a value. |
|
object |
Updated budget and retry configuration. Only returned if there is a value. |
|
object |
Data strategy. |
|
object |
Product strategy. |
|
object |
Provider constraints. |
|
integer |
Updated policy version. |
|
object |
Tag mapping. |
|
object |
Annotation mapping. |
|
object |
Extended metadata. |
|
string |
Creator. |
|
string |
Last updated by. |
|
string |
Creation time. RFC 3339 time. |
|
string |
Update time. RFC 3339 time. |
Error response¶
{
"code": 2,
"message": "运行策略参数无效"
}
Field |
Type |
Description |
|---|---|---|
|
integer |
error code. |
|
string |
Error message for the caller. |