Updating Application Objects of an Upgrade Policy in Batches
Function
Performs batch operations on application objects associated with a specified policy.
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:updateApplyObjects
Write
-
-
-
-
URI
POST /v2/{project_id}/upgrade-strategy/{strategy_id}/apply-objects
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| strategy_id | Yes | String | Policy ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| operate_type | Yes | Integer | Operation type. The value can be 1 (batch deletion) or 2 (batch addition). |
| delete_ids | No | Array of strings | List of IDs of application objects to be deleted in batches (This parameter is mandatory when operate_type is set to 1.) |
| add_objects | No | Array of ApplyObjectInfo objects | List of application objects to be added in batches (This parameter is mandatory when operate_type is set to 2.) |
| 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
{
"operate_type" : 1,
"delete_ids" : [ ],
"add_objects" : [ {
"object_type" : "DESKTOP",
"object_id" : "desktop-001"
} ]
} Example Responses
Status code: 200
ok
{
"strategy_ids" : [ "strategy-001" ]
} 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