Assigns multiple cloud computers to users in a batch.
Operation description
The target cloud computers must be in the Running state.
This is an asynchronous API. To check the assignment status, call DescribeDesktops and refer to the
ManagementFlagsparameter. A value ofASSIGNINGmeans it is in progress; otherwise, it is complete.Recommended polling interval: 2–5 seconds (max duration: 50s). The process usually takes 1–5 seconds.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
ecd:BatchModifyEntitlement | *All Resource
| None | None |
Request parameters
Parameter | Type | Required | Description | Example |
RegionId | string | Yes | The ID of the region. Call the DescribeRegions operation to query the list of regions where Elastic Desktop Service (EDS) Enterprise is available. | cn-hangzhou |
MaxUserPerDesktop | integer | No | The number of users assigned to each cloud computer. | 1 |
MaxDesktopPerUser | integer | No | The number of cloud computers allocated to each user. | 0 |
Strategy | string | No | The disproportional assignment policy. Valid values: AVERAGE: The system preferentially guarantees that each user is assigned with at least a cloud computer. If the number of selected cloud computers cannot be proportionally assigned to the selected users, ensure that each user is assigned a cloud computer. CENTRAL: The system preferentially assigns the designated number of cloud computers to each user. If the number of selected cloud computers cannot be proportionally assigned to the selected users, ensure that each user is assigned the specified number of cloud computers. Valid values:
| AVERAGE |
| DesktopId | array | Yes | The IDs of the cloud computers for which you want to modify end users. | |
string | No | The ID of a cloud computer for which you want to modify end users. | ecd-gx2x1dhsmucyy**** | |
| EndUserId | array | No | The IDs of the users. | |
string | No | The ID of the user. | Alice | |
Preview | boolean | Yes | Whether to preview the assign results instead of actually assigning cloud computers. | true |
Response elements
Element | Type | Description | Example |
object | |||
RequestId | string | The request ID. | 51592A88-0F2C-55E6-AD2C-2AD9C10D**** |
| Entitlements | object | The results. | |
Status | string | The result. Valid values:
Valid values:
| FINISHED |
TaskId | string | The task ID. | B2F4F018-0EDF-159C-B285-117B5F1C**** |
| AssignModels | array<object> | The assignment results. | |
object | |||
DesktopId | string | The cloud computer ID. | ecd-e94kzikmpljjx99pl |
InnerStatus | string | The assign result for each cloud computer. Valid values:
Valid values:
| FINISHED |
| EndUserIds | array | The authorized user IDs for the cloud computer. | |
string | The authorized user ID for the cloud computer. | Alice |
Examples
Success response
JSON format
{
"RequestId": "51592A88-0F2C-55E6-AD2C-2AD9C10D****",
"Entitlements": {
"Status": "FINISHED",
"TaskId": "B2F4F018-0EDF-159C-B285-117B5F1C****",
"AssignModels": [
{
"DesktopId": "ecd-e94kzikmpljjx99pl",
"InnerStatus": "FINISHED",
"EndUserIds": [
"Alice"
]
}
]
}
}Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.