Locks one or more convenience users.


For security reasons, you can lock convenience users. Convenience users that are locked cannot log on to cloud desktops.

Note You can call the DescribeUsers operation to query the information about convenience users. If the return value of Status is 0, the user is unlocked. If the return value of Status is 9, the user is locked.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes LockUsers

The operation that you want to perform. Set the value to LockUsers.

Users.N RepeatList Yes test1

The usernames of convenience users to be locked. You can specify multiple usernames in the list.

Response parameters

Parameter Type Example Description
LockUsersResult Struct

The result of the operation.

FailedUsers Array of FailedUsers

The information about the convenience users that failed to be locked.

EndUserId String test123

The convenience user that failed to be locked.

ErrorCode String InvalidUsername

The error code.

ErrorMessage String test123 is invalid username

The error message.

LockedUsers List test1

The convenience users that were locked.

RequestId String EC4A8495-3323-4364-A374-FEE8584644F8

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format

    "LockUsersResult": {
        "LockedUsers": [
        "FailedUsers": []
    "RequestId": "EC4A8495-3323-4364-A374-FEE8584644F8"