Assigns users to multiple cloud computers in a batch.
Operation description
The cloud computers must be in the Running state.
This operation immediately returns a result. To check whether the assignment is successful, call DescribeDesktops and check the
ManagementFlagsresponse parameter:ASSIGNINGindicates that the assignment is in progress, and other values indicate that the assignment is complete.Check whether the assignment is complete every 2 to 5 seconds, for a maximum of 50 seconds. In most cases, the assignment is completed within 1 to 5 seconds.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecd:BatchModifyEntitlement |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. You can call DescribeRegions to query the regions supported by Elastic Desktop Service (EDS). |
cn-hangzhou |
| MaxUserPerDesktop |
integer |
No |
The number of users to assign to each cloud computer. |
1 |
| MaxDesktopPerUser |
integer |
No |
The number of cloud computers to assign to each user. |
0 |
| Strategy |
string |
No |
The policy used when the ratio of cloud computers to users cannot be evenly matched. Valid values:
Valid values:
|
AVERAGE |
| DesktopId |
array |
Yes |
The IDs of the cloud computers for which you want to update authorized users. |
|
|
string |
No |
The ID of the cloud computer for which you want to update authorized users. |
ecd-gx2x1dhsmucyy**** |
|
| EndUserId |
array |
No |
The user IDs (usernames). |
|
|
string |
No |
The user ID (username). |
Alice |
|
| Preview |
boolean |
Yes |
Specifies whether to preview the assignment. If you set this parameter to true, the assignment is not actually performed. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
51592A88-0F2C-55E6-AD2C-2AD9C10D**** |
| Entitlements |
object |
The assignment results. |
|
| Status |
string |
The overall assignment result. Valid values:
|
FINISHED |
| TaskId |
string |
The task ID. |
B2F4F018-0EDF-159C-B285-117B5F1C**** |
| AssignModels |
array<object> |
The assignment result details. |
|
|
object |
|||
| DesktopId |
string |
The cloud computer ID. |
ecd-e94kzikmpljjx99pl |
| InnerStatus |
string |
The assignment result of a single cloud computer. Valid values:
|
FINISHED |
| EndUserIds |
array |
The user IDs (usernames) authorized for the cloud computer. |
|
|
string |
The user ID (username) authorized 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.