All Products
Search
Document Center

Data Management:GetUser

Last Updated:Apr 18, 2024

Queries the information about a user.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dms:GetUserRead
  • All Resources
    *
    none
none

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.

integer

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.

string

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