Locks one or more convenience users.

Description

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.

Debugging

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.

Examples

Sample requests

https://eds-user.cn-shanghai.aliyuncs.com/?Action=LockUsers
&Users.1=test1
&<Common request parameters>

Sample success responses

XML format

<LockUsersResponse>
      <LockUsersResult>
            <LockedUsers>test1</LockedUsers>
      </LockUsersResult>
      <RequestId>EC4A8495-3323-4364-A374-FEE8584644F8</RequestId>
</LockUsersResponse>

JSON format

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