All Products
Search
Document Center

Elastic Desktop Service:CreateUsers

Last Updated:Nov 20, 2024

Creates a convenience user.

Operation description

Convenience users are dedicated Elastic Desktop Service (EDS) user accounts and are suitable for scenarios in which you do not need to connect to enterprise Active Directory (AD) systems. The information about a convenience user includes the username, email address, and mobile number. You must specify the username or email address.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecd:CreateUserscreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
Usersarray<object>Yes

The information about the convenience user.

CreateUsers
objectYes

Details of the convenience user.

EndUserIdstringYes

The username of the convenience user. The name can contain lowercase letters, digits, and underscores (_), and must be 3 to 24 characters in length.

test1
EmailstringNo

The email address of the convenience user. The email address is used to receive notifications about events such as desktop assignment. You must specify an email address or a mobile number to receive notifications.

username@example.com
PhonestringNo

Mobile numbers are not supported on the international site (alibabacloud.com).

1381111****
PasswordstringNo

The user password.

Note The password must be at least 10 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters (excluding spaces).
password1
OwnerTypestringNo

The type of the account ownership.

Valid values:

  • CreateFromManager: administrator-activated
  • Normal: user-activated
Normal
OrgIdstringNo

The organization to which the convenience user belongs.

1111****
RemarkstringNo

The remarks on the convenience user.

remark1
RealNickNamestringNo

The display name of the end user.

Bean
PasswordstringNo

The initial password. If this parameter is left empty, an email for password reset is sent to the specified email address.

Test123****
AutoLockTimestringNo

The date on which the convenience users are automatically locked.

2023-03-03

Response parameters

ParameterTypeDescriptionExample
object

The information that is returned.

RequestIdstring

The ID of the request.

1CBAFFAB-B697-4049-A9B1-67E1FC5F****
CreateResultobject

The result of user creation.

CreatedUsersarray<object>

Details of the created convenience users.

createdUsersobject

Details of the created convenience user.

EndUserIdstring

The name of the end user.

test1
Emailstring

The email address of the end user.

username@example.com
Phonestring

The mobile number of the end user.

1381111****
Remarkstring

The remarks of the end user.

remark1
RealNickNamestring

The display name of the end user.

Bean
FailedUsersarray<object>

Details of the convenience users that failed to be created.

failedUsersobject

Details of the convenience user that failed to be created.

EndUserIdstring

The name of the end user.

test2
Emailstring

The email address of the end user.

username2@example.com
Phonestring

The mobile number of the end user.

1390000****
ErrorCodestring

The error code returned if the request failed.

ExistedEndUserId
ErrorMessagestring

The error message returned.

The username test is used by another user.

Examples

Sample success responses

JSONformat

{
  "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
  "CreateResult": {
    "CreatedUsers": [
      {
        "EndUserId": "test1",
        "Email": "username@example.com",
        "Phone": "1381111****",
        "Remark": "remark1",
        "RealNickName": "Bean"
      }
    ],
    "FailedUsers": [
      {
        "EndUserId": "test2",
        "Email": "username2@example.com",
        "Phone": "1390000****",
        "ErrorCode": "ExistedEndUserId",
        "ErrorMessage": "The username test is used by another user."
      }
    ]
  }
}

Error codes

HTTP status codeError codeError message
400INTERNAL_ERRORInternal error.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-04-09The Error code has changed. The request parameters of the API has changedView Change Details
2024-01-16The Error code has changed. The response structure of the API has changedView Change Details
2023-08-31The Error code has changed. The request parameters of the API has changedView Change Details
2021-04-02Add OperationView Change Details