All Products
Search
Document Center

Data Management:ListUsers

Last Updated:Nov 28, 2024

Queries the details of users.

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

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:ListUserslist
*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***
RolestringNo

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

  • USER: a regular user.
  • DBA : a database administrator (DBA).
  • ADMIN: a Data Management (DMS) administrator.
  • SECURITY_ADMIN: a security administrator.
  • STRUCT_READ_ONLY: a schema read-only user.
Note To check your role, move the pointer over the profile picture in the upper-right corner of the DMS console.
DBA
UserStatestringNo

The status of the user. Valid values:

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

The search keyword. Fuzzy match is supported.

test
PageNumberintegerNo

The number of the page to return.

1
PageSizeintegerNo

The number of entries to return on each page.

**

Valid values: 10, 20, 50, and 100.**** Default value: 10.

10

Response parameters

ParameterTypeDescriptionExample
object
TotalCountlong

The total number of entries returned.

3
RequestIdstring

The ID of the request.

69161997-6030-53BA-A333-DBEC83B732FF
ErrorCodestring

The error code returned if the request failed.

InvalidTid
ErrorMessagestring

The error message returned if the request failed.

Specified parameter Tid is not valid.
UserListarray<object>

The details of users.

Userobject

The details of 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 were queried on the current day.

0
UserIdstring

The ID of the user.

8****
LastLoginTimestring

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

2021-11-08 13:43:43
MaxResultCountlong

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

50000
ParentUidstring

The ID of the Alibaba Cloud account of the user.

140692647406****
RoleIdListarray

The IDs of the roles.

RoleIdsinteger

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

  • 1: a regular user role.
  • 2: a DBA role.
  • 3: a DMS administrator role.
  • 4: a security administrator role.
  • 6: a schema read-only user role.
3
RoleNameListarray

The names of roles.

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

The nickname of the user.

test_NickName
MaxExecuteCountlong

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

2000
CurExecuteCountlong

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

0
Mobilestring

The mobile phone number of the user.

Note
  • The system returns this parameter if you have 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 you have not set a mobile phone number.

1389999****
Uidstring

The ID of the Alibaba Cloud account.

167382665015****
Emailstring

The email address that is used to receive notifications.

Note
  • The system returns this parameter if you have 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 you have not set an email address.

username@example.com
DingRobotstring

The DingTalk chatbot URL that is used to receive notifications.

Note
  • The system returns this parameter if you have 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 you have not set a DingTalk chatbot URL.

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

The webhook URL that is used to receive notifications.

Note
  • If you have set a webhook URL, DMS sends notifications to the specified URL.

  • The system does not return this parameter if you have 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.
HMAC_SHA1
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.
DINGROBOT
Successboolean

Indicates whether the request was successful. Valid values:

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

Examples

Sample success responses

JSONformat

{
  "TotalCount": 3,
  "RequestId": "69161997-6030-53BA-A333-DBEC83B732FF",
  "ErrorCode": "InvalidTid",
  "ErrorMessage": "Specified parameter Tid is not valid.",
  "UserList": {
    "User": [
      {
        "State": "NORMAL",
        "CurResultCount": 0,
        "UserId": "8****",
        "LastLoginTime": "2021-11-08 13:43:43",
        "MaxResultCount": 50000,
        "ParentUid": "140692647406****",
        "RoleIdList": {
          "RoleIds": [
            3
          ]
        },
        "RoleNameList": {
          "RoleNames": [
            "ADMIN"
          ]
        },
        "NickName": "test_NickName",
        "MaxExecuteCount": 2000,
        "CurExecuteCount": 0,
        "Mobile": "1389999****",
        "Uid": "167382665015****",
        "Email": "username@example.com",
        "DingRobot": "https://XXX.dingtalk.com/robot/send?access_token=9b7a4a562cbe7fcdea9962afac7b9d7b4504d564948083419750f9cafa78e4ef",
        "Webhook": "http://dms-XXX.aliyun.com:8***",
        "SignatureMethod": "HMAC_SHA1",
        "NotificationMode": "DINGROBOT"
      }
    ]
  },
  "Success": true
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-09-11The internal configuration of the API is changed, but the call is not affectedView Change Details