All Products
Search
Document Center

ApsaraDB for OceanBase (Deprecated):DescribeTenantUsers

Last Updated:Jun 26, 2026

Queries the list of database access accounts under a tenant.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

oceanbase:DescribeTenantUsers

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TenantId

string

Yes

The tenant ID.

ob2mr3oae0****

SearchKey

string

No

The filter keyword for fuzzy match when querying the list.

pay

PageNumber

integer

No

The page number of the paged query. Minimum value: 1. Default value: 1.

1

PageSize

integer

No

The number of rows per page for the paged query. Maximum value: 100. Default value: 10.

10

UserName

string

No

The database account name. Certain reserved keywords such as SYS and root cannot be used.

pay_test

Response elements

Element

Type

Description

Example

object

The response parameters.

TotalCount

integer

The total number of database accounts in the tenant.

1

RequestId

string

The request ID.

EE205C00-30E4-XXXX-XXXX-87E3A8A2AA0C

TenantUsers

array<object>

The list of database accounts in the tenant.

array<object>

The details of a database account.

UserType

string

The type of the database account. Valid values:

  • Admin: superuser account.

  • Normal: standard account.

Normal

Description

string

The description of the database account.

use for test

Databases

array<object>

The list of database permissions granted to the account.

object

The details of a database account.

Database

string

The name of the database (schema).

db_pay1

Role

string

The role granted.
For Oracle mode, roles are at the schema level and can be classified as follows:

  • ReadWrite: read-write permission, including CREATE TABLE, CREATE VIEW, CREATE PROCEDURE, CREATE SYNONYM, CREATE SEQUENCE, CREATE TRIGGER, CREATE TYPE, CREATE SESSION, EXECUTE ANY PROCEDURE, CREATE ANY OUTLINE, ALTER ANY OUTLINE, DROP ANY OUTLINE, CREATE ANY PROCEDURE, ALTER ANY PROCEDURE, DROP ANY PROCEDURE, CREATE ANY SEQUENCE, ALTER ANY SEQUENCE, DROP ANY SEQUENCE, CREATE ANY TYPE, ALTER ANY TYPE, DROP ANY TYPE, SYSKM, CREATE ANY TRIGGER, ALTER ANY TRIGGER, DROP ANY TRIGGER, CREATE PROFILE, ALTER PROFILE, DROP PROFILE;

  • ReadOnly: read-only permission, including SELECT.

For MySQL mode, roles are at the database level and include the following types:

  • ReadWrite: read-write permission, including ALL PRIVILEGES;

  • ReadOnly: read-only permission, including SELECT;

  • DDL: DDL permission, including CREATE, DROP, ALTER, SHOW VIEW, CREATE VIEW;

  • DML: DML permission, including SELECT, INSERT, UPDATE, DELETE, SHOW VIEW.

Note


Additionally, an Oracle account has default read-write permission on its own schema, which is not listed here.

ReadOnly

Table

string

The name of the table.

tbl_pay1

Privileges

string

When a user grants custom permissions on a database, the privileges field returns the custom permission content, separated by commas (","). At all other times, the privileges field returns no data.

select,delete,update

UserStatus

string

The status of the database account. Valid values:

  • LOCKED: locked.

  • ONLINE: unlocked.

ONLINE

UserName

string

The database account name.

pay_test

TenantId

string

The ID of the tenant to which the account belongs.

t4pnum****

InstanceId

string

The ID of the cluster to which the account belongs.

obshc32****

GlobalPermissions

string

The global permission information.

Encrypt,Decrypt

Examples

Success response

JSON format

{
  "TotalCount": 1,
  "RequestId": "EE205C00-30E4-XXXX-XXXX-87E3A8A2AA0C",
  "TenantUsers": [
    {
      "UserType": "Normal",
      "Description": "use for test",
      "Databases": [
        {
          "Database": "db_pay1",
          "Role": "ReadOnly",
          "Table": "tbl_pay1",
          "Privileges": "select,delete,update"
        }
      ],
      "UserStatus": "ONLINE",
      "UserName": "pay_test",
      "TenantId": "t4pnum**** ",
      "InstanceId": "obshc32****",
      "GlobalPermissions": "Encrypt,Decrypt"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

2014 InternalError The request processing has failed due to some unknown error.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.