CreateUser

更新时间:
复制 MD 格式

Creates an EIAM account in a specified EIAM instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

Username

string

Yes

The username. The username can contain letters, digits, underscores (_), periods (.), at signs (@), and hyphens (-). The username can be up to 256 characters in length.

user_001

DisplayName

string

No

The display name of the account. The display name can be up to 128 characters in length.

name_001

Password

string

No

The password. The password must meet the requirements of the password policy.

123456

PhoneRegion

string

No

The phone region code. The value is a 1 to 6-digit number and does not include a plus sign (+).

86

PhoneNumber

string

No

The phone number. The value is a 6 to 15-digit number.

12345678901

PhoneNumberVerified

boolean

No

Specifies whether the phone number is verified as a trusted phone number. This parameter is required if PhoneNumber is specified. If no special business requirement exists, set this parameter to true.

true

Email

string

No

The email address. The email prefix can contain uppercase letters, lowercase letters, digits, periods (.), underscores (_), and hyphens (-). The email address can be up to 128 characters in length.

example@example.com

EmailVerified

boolean

No

Specifies whether the email address is verified as a trusted email address. This parameter is required if Email is specified. If no special business requirement exists, set this parameter to true.

true

UserExternalId

string

No

The external ID of the account. This parameter is used to associate the account with an external system. The value can be up to 128 characters in length. If this parameter is not specified, the account ID is used by default.

user_d6sbsuumeta4h66ec3il7yxxxx

PrimaryOrganizationalUnitId

string

Yes

The ID of the primary organizational unit.

ou_wovwffm62xifdziem7an7xxxxx

OrganizationalUnitIds

array

No

The list of organizational unit IDs to which the account belongs. An account can belong to multiple organizational units.

string

No

The organizational unit ID.

ou_adz2vmgiwpo4tu6jtss3mynjji

Description

string

No

The description. The description can be up to 256 characters in length.

description text

CustomFields

array<object>

No

The list of custom fields.

description

object

No

The custom field object.

FieldName

string

No

The identifier of the custom field. Create the custom field in advance. For more information, refer to the custom fields module in the console.

age

FieldValue

string

No

The value of the custom field. The value must comply with the attribute constraints of the corresponding custom field.

10

PasswordInitializationConfig

object

No

The password initialization configuration.

PasswordInitializationPolicyPriority

string

No

The priority of the password initialization policy. By default, this parameter does not take effect. Valid values:

  • global: The global policy policy priority. The instance-level password initialization policy is used, and the password initialization policy specified in this request does not take effect. For more information, refer to the password initialization policy in password-related policies.

  • custom: The custom policy policy priority. The password initialization policy defined in this request is used, including whether to enable forced password change, the password initialization method, and the notification channel.

global

PasswordForcedUpdateStatus

string

No

The forced password change status. By default, this feature is not enabled. Valid values:

  • enabled: Enabled.

  • disabled: Disabled.

enabled

UserNotificationChannels

array

No

The list of password notification channels.

sms

string

No

The password notification channel. Valid values:

  • email: email

  • sms: text message.

sms

PasswordInitializationType

string

No

The password initialization method. Valid values:

  • random: random.

random

ClientToken

string

No

The client token that is used to ensure the idempotence of the request. You can use the client to generate a parameter value, but you must make sure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see References: How to ensure idempotence.

client-token-example

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

0441BD79-92F3-53AA-8657-F8CE4A2B912A

UserId

string

The account ID.

user_d6sbsuumeta4h66ec3il7yxxxx

Examples

Success response

JSON format

{
  "RequestId": "0441BD79-92F3-53AA-8657-F8CE4A2B912A",
  "UserId": "user_d6sbsuumeta4h66ec3il7yxxxx"
}

Error codes

HTTP status code

Error code

Error message

Description

403 ResourceDuplicated.Username The specified resource: Username already exist. Duplicate user name

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.