GetUser

Last Updated: Aug 26, 2016

Interface description

 Obtains user information in detail.

Request parameters

Action

  • Name: Action
  • Type: String
  • Required: Yes
  • Description: Operation interface, required. The parameter value is “GetUser”.

UserName

  • Name: UserName
  • Type: String
  • Required: Yes
  • Description: User name.Example: zhangqiang
  • Format: ^[a-zA-Z0-9\.@\-_]+$

Return parameters

User

  • Type: User Type
  • Description: User information.

Required permissions

Action

ram:GetUser

Resource

acs:ram:*:${AccountId}:user/${UserName}

Error messages

InvalidParameter.UserName.InvalidChars
  • HTTP Status:400
  • Error Message:The parameter - “UserName” contains invalid chars.
InvalidParameter.UserName.Length
  • HTTP Status:400
  • Error Message:The parameter - “UserName” beyond the length limit.
EntityNotExist.User
  • HTTP Status:404
  • Error Message:The user does not exist.

Operation examples

Request example

  1. https://ram.aliyuncs.com/?Action=GetUser
  2. &UserName=zhangqiang
  3. &<Public request parameters>

Return example

XML format

  1. <GetUserResponse>
  2. <RequestId>2D69A58F-345C-4FDE-88E4-BF5189484043</RequestId>
  3. <User>
  4. <UserId>1227489245380721</UserId>
  5. <UserName>zhangqiang</UserName>
  6. <DisplayName>zhangqiang</DisplayName>
  7. <MobilePhone>86-18600008888</MobilePhone>
  8. <Email>zhangqiang@example.com</Email>
  9. <Comments>This is a cloud computing engineer.</Comments>
  10. <CreateDate>2015-01-23T12:33:18Z</CreateDate>
  11. <UpdateDate>2015-02-11T03:15:21Z</UpdateDate>
  12. <LastLoginDate>2015-01-23T12:33:18Z</LastLoginDate>
  13. </User>
  14. <UserId>1227489245380721</UserId>
  15. </GetUserResponse>

JSON format

  1. {
  2. "RequestId": "2D69A58F-345C-4FDE-88E4-BF5189484043",
  3. "User": {
  4. "UserId": "1227489245380721",
  5. "UserName": "zhangqiang",
  6. "DisplayName": "zhangqiang",
  7. "MobilePhone": "86-18600008888",
  8. "Email": "zhangqiang@example.com",
  9. "Comments": "This is a cloud computing engineer".
  10. "CreateDate": "2015-01-23T12:33:18Z",
  11. "UpdateDate": "2015-02-11T03:15:21Z",
  12. "LastLoginDate": "2015-01-23T12:33:18Z"
  13. }
  14. }
Thank you! We've received your feedback.