Modifying an Upgrade Policy
Function
Modifies an upgrade policy and updates the associated application object information.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
workspace:upgradeStrategy:update
Write
-
-
-
-
URI
PUT /v2/{project_id}/upgrade-strategy/{strategy_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| strategy_id | Yes | String | Policy ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| strategy_name | No | String | Policy name. |
| is_force_upgrade | No | Integer | Whether to forcibly upgrade the version. The value can be 0 (no) or 1 (yes). |
| min_version | No | String | Upgrade is required if the version is earlier than this version. |
| target_version | No | String | Target version. |
| strategy_desc | No | String | Policy description. |
| strategy_priority | No | Integer | Priority. A smaller value indicates a higher priority. |
| status | No | Integer | Status. The value can be 0 (disabled) or 1 (enabled). |
| apply_objects | No | Array of ApplyObjectInfo objects | Application object list. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| object_type | No | String | Application object type. The value can be DESKTOP (single desktop), ALL_DESKTOPS (all desktops), DESKTOP_POOL (desktop pool), DESKTOP_TAG (desktop tag), ALL_USERS (all users), USER (single user), and USER_GROUP (user group). |
| object_id | No | String | Object ID. This value can be null when object_type is set to ALL_DESKTOPS or ALL_USERS. |
Response Parameters
Status code: 200
ok
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Service error code. |
| error_msg | String | Service error message. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Service error code. |
| error_msg | String | Service error message. |
Example Requests
{
"strategy_name" : "name",
"is_force_upgrade" : 0,
"min_version" : "23.0.0",
"target_version" : "26.6.0",
"strategy_desc" : "test",
"strategy_priority" : 1,
"status" : 1,
"apply_objects" : [ {
"object_type" : "DESKTOP",
"object_id" : "desktop-001"
} ]
} Example Responses
None
Status Codes
| Status Code | Description |
|---|---|
| 200 | ok |
| 400 | Invalid request parameter. |
| 500 | Internal server error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot