UpdateUser
In this article:
UpdateUser#
Description#
Updates an IAM user.
Request Parameters#
Required parameters#
UserName — The name of the user.
Type: String
Required: Yes
Optional parameters#
DisableOtp — When set to
True
, disables two-factor authentication for the user.Type: Boolean
Required: No
DisplayName — The displayed name of the user.
Type: String
Required: No
Email — The user email.
Type: String
Required: No
Enabled — Indicates whether the user is locked.
Type: Boolean
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
Password — The user password.
Type: String
Required: No
Phone — The phone number of the user.
Type: String
Required: No
Response Elements#
User — Updated user details.
Type: User object
Examples#
Request
https://iam.k2.cloud/?Action=UpdateUser
&UserName=user-1
&DisplayName=New Name
&Password=CO198)r[CCpDS24gg
&Email=new@gmail.com
&Phone=+0 000 000 00 00
&Enabled=False
Response
<UpdateUserResponse>
<UpdateUserResult>
<User>
<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>New Name</DisplayName>
<Enabled>false</Enabled>
<UpdateDate>1724426717</UpdateDate>
</User>
</UpdateUserResult>
<requestId>4527c87a-dd8c-4ff4-9477-073c9dd5aaca</requestId>
<ResponseMetadata>
<RequestId>4527c87a-dd8c-4ff4-9477-073c9dd5aaca</RequestId>
</ResponseMetadata>
</UpdateUserResponse>
c2-iam UpdateUser UserName user-1 Password 'CO198)r[CCpDS24gg'
c2-iam UpdateUser UserName user-1 DisplayName 'New Name'
c2-iam UpdateUser UserName user-1 Email new@gmail.com Phone '+0 000 000 00 00'
c2-iam UpdateUser UserName user-1 Enabled True