All Products
Search
Document Center

Data Management:GetUser

更新時間:Oct 21, 2024

Queries the information about a user.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TidlongNo

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

3***
UidstringNo

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

22973492647626****
UserIdstringNo

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

51****

Response parameters

ParameterTypeDescriptionExample
object
Userobject

The information about the user.

Statestring

The status of the user. Valid values:

  • NORMAL: The user is normal.
  • DISABLE: The user is disabled.
  • DELETE: The user is deleted.
NORMAL
CurResultCountlong

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

28
UserIdstring

The ID of the user.

51****
LastLoginTimestring

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

2021-11-08 11:26:21
MaxResultCountlong

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

10000
ParentUidlong

The UID of the Alibaba Cloud account of the user.

Note An Alibaba Cloud account can contain one or more RAM users.
140692647406****
RoleIdListarray

The list of role IDs.

RoleIdsinteger

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.
1
RoleNameListarray

The list of role names.

RoleNamesstring

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.
USER
NickNamestring

The nickname of the user.

User_NickName
MaxExecuteCountlong

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

2000
CurExecuteCountlong

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

3
Mobilestring

The mobile number of the user.

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.

1389223****
Uidstring

The UID of the user.

22275482072787****
Emailstring

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.

Uesr_email
DingRobotstring

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.

https://XXX.dingtalk.com/robot/send?access_token=***
Webhookstring

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.

http://dms-XXX.aliyun.com:8***
SignatureMethodstring

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

  • NONE: no signature.
  • HMAC_SHA1: HMAC_SHA1.
NONE
NotificationModestring

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

  • SMS: text message
  • EMAIL: email.
  • DINGDING: DingTalk.
  • DINGROBOT: DingTalk chatbot.
  • WEBHOOK: webhook.
EMAIL
RequestIdstring

The ID of the request.

804BB128-CAFA-5DD0-BA1E-43DDE488****
ErrorCodestring

The error code.

UnknownError
ErrorMessagestring

The error message returned if the request failed.

Unknown server error
Successboolean

Indicates whether the request was successful. Valid values:

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

Examples

Sample success responses

JSONformat

{
  "User": {
    "State": "NORMAL",
    "CurResultCount": 28,
    "UserId": "51****",
    "LastLoginTime": "2021-11-08 11:26:21",
    "MaxResultCount": 10000,
    "ParentUid": 0,
    "RoleIdList": {
      "RoleIds": [
        1
      ]
    },
    "RoleNameList": {
      "RoleNames": [
        "USER"
      ]
    },
    "NickName": "User_NickName",
    "MaxExecuteCount": 2000,
    "CurExecuteCount": 3,
    "Mobile": "1389223****",
    "Uid": "22275482072787****",
    "Email": "Uesr_email",
    "DingRobot": "https://XXX.dingtalk.com/robot/send?access_token=***",
    "Webhook": "http://dms-XXX.aliyun.com:8***",
    "SignatureMethod": "NONE",
    "NotificationMode": "EMAIL"
  },
  "RequestId": "804BB128-CAFA-5DD0-BA1E-43DDE488****",
  "ErrorCode": "UnknownError",
  "ErrorMessage": "Unknown server error",
  "Success": true
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history