CreateUser#

Description#

Creates a new IAM user.

Request Parameters#

Required parameters#

  • DisplayName — The displayed name of the user.

    • Type: String

    • Required: Yes

  • Password — The user password.

    • Type: String

    • Required: Yes

  • UserName — The name of the user.

    • Type: String

    • Required: Yes

Optional parameters#

  • Email — The user email.

    • Type: String

    • Required: No

  • OtpRequired — Indicates whether the user is required to use two-factor authentication to log in to the web interface.

    • Type: Boolean

    • Required: No

Response Elements#

  • User — New user details.

Examples#

Request

https://iam.k2.cloud/?Action=CreateUser
&UserName=user-1
&DisplayName=John Smith
&Password=YBLS]D]tKe<!<H6
&Email=test@gmail.com
&OtpRequired=True

Response

<CreateUserResponse>
    <CreateUserResult>
        <User>
            <SecretKey>2+suSXUfTWK/ecpkTOWBrw</SecretKey>
            <UserArn>arn:c2:iam::c2dev:user/user-1</UserArn>
            <UserId>a73bacad-aeca-4916-b37a-7d5f871b068e</UserId>
            <UserName>user-1</UserName>
            <Login>user-1@c2dev</Login>
            <DisplayName>John Smith</DisplayName>
            <Enabled>true</Enabled>
            <UpdateDate>1724425933</UpdateDate>
        </User>
    </CreateUserResult>
    <requestId>df616e2d-5be5-4412-9f36-5f3488de2083</requestId>
    <ResponseMetadata>
        <RequestId>df616e2d-5be5-4412-9f36-5f3488de2083</RequestId>
    </ResponseMetadata>
</CreateUserResponse>
c2-iam CreateUser UserName user-1 DisplayName 'John Smith' Password 'YBLS]D]tKe<!<H6'

c2-iam CreateUser UserName user-1 DisplayName 'John Smith' Password 'YBLS]D]tKe<!<H6' Email test@gmail.com OtpRequired True