Queries the details of a user.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetUser

The operation that you want to perform. Set the value to GetUser.

Tid Long Yes 3***

The ID of the tenant. You can call the GetUserActiveTenant operation to query the ID of the tenant.

Uid String No 22973492647626****

The UID of the user. You can view your UID by moving the pointer over the profile picture in the upper-right corner of the Data Management (DMS) console.

UserId String No 51****

The ID of the user. You can call the ListUsers operation to query the ID of the user.

RegionId String No cn-hangzhou

The ID of the region where DMS is activated. Set this parameter to the ID of the region that is close to your services. For more information about the valid values of the parameter, see RegionID parameter.

Response parameters

Parameter Type Example Description
User Object

The information about the user.

State String NORMAL

The status of the user. Valid values:

  • NORMAL: The user is normal.
  • DISABLE: The user is disabled.
  • DELETE: The user is deleted.
CurResultCount Long 28

The number of rows that are queried on the current day.

UserId String 51****

The ID of the user.

LastLoginTime String 2021-11-08 11:26:21

The last time when the user logged on to the console.

MaxResultCount Long 10000

The maximum number of rows that can be queried on the current day.

ParentUid Long 140692647406****

The UID of the Alibaba Cloud account of the user.

Note An Alibaba Cloud account can contain one or more RAM users.
RoleIdList Array of Integer 1

The ID of the role that is assigned to the user. Valid values:

  • 1: a regular user role.
  • 2: a database administrator (DBA) role.
  • 3: a DMS administrator role.
  • 4: a security administrator role.
  • 6: a schema read-only user role.
RoleNameList Array of String USER

The name of the role that is assigned to the user. Valid values:

  • USER: a regular user.
  • DBA : a DBA.
  • ADMIN: a DMS administrator.
  • SECURITY_ADMIN: a security administrator.
  • STRUCT_READ_ONLY: a schema read-only user.
NickName String User_NickName

The nickname of the user.

MaxExecuteCount Long 2000

The maximum number of queries that can be performed on the current day.

CurExecuteCount Long 3

The number of queries that are performed on the current day.

Mobile String 1389223****

The mobile phone number that is used to receive notifications.

Note
  • The system returns this parameter if the user has set a mobile phone number in the console. To set a mobile phone number in the console, move the pointer over the profile picture in the upper-right corner and click the Edit icon next to Notice.
  • The system does not return this parameter if the user has not set a mobile phone number.
Uid String 22275482072787****

The UID of the user.

Email String Uesr_email

The email address that is used to receive notifications.

Note
  • The system returns this parameter if the user has set an email address in the console. To set an email address in the console, move the pointer over the profile picture in the upper-right corner and click the Edit icon next to Notice.
  • The system does not return this parameter if the user has not set an email address.
DingRobot String https://XXX.dingtalk.com/robot/send?access_token=***

The DingTalk chatbot URL that is used to receive notifications.

Note
  • The system returns this parameter if the user has set a DingTalk chatbot URL in the console. To set a DingTalk chatbot URL in the console, move the pointer over the profile picture in the upper-right corner and click the Edit icon next to Notice.
  • The system does not return this parameter if the user has not set a DingTalk chatbot URL.
Webhook String http://dms-XXX.aliyun.com:8***

The webhook URL that is used to receive notifications.

Note
  • If the user has set a webhook URL, DMS sends notifications to the specified URL.
  • The system does not return this parameter if the user has not set a webhook URL.
SignatureMethod String NONE

The signature method that is used to secure connections when a webhook URL is used. Valid values:

  • NONE: no signature.
  • HMAC_SHA1: HMAC_SHA1.
NotificationMode String EMAIL

The notification method. The system returns one or more values. Valid values:

  • SMS: text message.
  • EMAIL: email.
  • DingTalk: DingTalk.
  • DINGROBOT: DingTalk chatbot.
  • WEBHOOK: webhook.
RequestId String 804BB128-CAFA-5DD0-BA1E-43DDE488****

The ID of the request.

ErrorCode String UnknownError

The error code returned.

ErrorMessage String Unknown server error

The error message returned.

Success Boolean true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.

Examples

Sample requests

http(s)://dms-enterprise.aliyuncs.com/?Action=GetUser
&Tid=3***
&Uid=22973492647626****
&UserId=51****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetUserResponse>
    <User>
        <NotificationMode/>
        <Email>Uesr_email</Email>
        <RoleNameList>
            <RoleNames>USER</RoleNames>
            <RoleNames>ADMIN</RoleNames>
        </RoleNameList>
        <NickName>User_NickName</NickName>
        <MaxExecuteCount>2000</MaxExecuteCount>
        <CurResultCount>28</CurResultCount>
        <LastLoginTime>2021-11-09 13:39:21</LastLoginTime>
        <Uid>22275482072787****</Uid>
        <RoleIdList>
            <RoleIds>1</RoleIds>
            <RoleIds>3</RoleIds>
        </RoleIdList>
        <MaxResultCount>10000</MaxResultCount>
        <State>NORMAL</State>
        <UserId>51****</UserId>
        <CurExecuteCount>3</CurExecuteCount>
        <ParentUid>140692647406****</ParentUid>
    </User>
    <RequestId>804BB128-CAFA-5DD0-BA1E-43DDE488****</RequestId>
    <Success>true</Success>
</GetUserResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "User" : {
    "NotificationMode" : "",
    "Email" : "Uesr_email",
    "RoleNameList" : {
      "RoleNames" : [ "USER", "ADMIN" ]
    },
    "NickName" : "User_NickName",
    "MaxExecuteCount" : 2000,
    "CurResultCount" : 28,
    "LastLoginTime" : "2021-11-09 13:39:21",
    "Uid" : "22275482072787****",
    "RoleIdList" : {
      "RoleIds" : [ 1, 3 ]
    },
    "MaxResultCount" : 10000,
    "State" : "NORMAL",
    "UserId" : "51****",
    "CurExecuteCount" : 3,
    "ParentUid" : "140692647406****"
  },
  "RequestId" : "804BB128-CAFA-5DD0-BA1E-43DDE488****",
  "Success" : true
}

Error codes

For a list of error codes, visit the API Error Center.