All Products
Search
Document Center

AnalyticDB:DescribeAccountPrivileges

Last Updated:Nov 10, 2025

Queries the permissions of a database account on a specified permission level.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
adb:DescribeAccountPrivilegeslist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the cluster.

cn-hangzhou
DBClusterIdstringYes

The ID of the AnalyticDB for MySQL Data Lakehouse Edition (V3.0) cluster.

amv-bp1k5p066e1a****
AccountNamestringYes

The name of the database account.

account1
PrivilegeTypestringYes

The permission level that you want to query. You can call the DescribeEnabledPrivileges operation to query the permission level of the database account.

Global
DatabasePrivilegeObjectstringNo

The databases that you want to query. You can use this parameter to query the permissions of the database account on specific databases. This parameter is available only if the PrivilegeType parameter is set to Database, Table, or Column.

db1
TablePrivilegeObjectstringNo

The tables that you want to query. You can use this parameter to query the permissions of the database account on specific tables. This parameter can be used together with the DatabasePrivilegeObject parameter. This parameter is available only if the PrivilegeType parameter is set to Table or Column.

table1
PageNumberstringNo

The number of the page to return. Pages start from page 1. Default value: 1.

1
PageSizestringNo

The number of entries to return on each page. Default value: 20.

10
ColumnPrivilegeObjectstringNo

The columns that you want to query. You can use this parameter to query the permissions of the database account on specific columns. This parameter is available only if the PrivilegeType parameter is set to Column.

col1

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

DA32480A-E3E5-1BE7-BA98-724551DC04C8
Dataarray<object>

Details of the permissions.

dataobject
PrivilegeTypestring

The permission level of the permission. Valid values: Global, Database, Table, and Column. You can call the DescribeEnabledPrivileges parameter to query the permission level of a specific permission.

Column
PrivilegeObjectobject

The objects on which the permission takes effect, including databases, tables, columns, and additional descriptions.

Databasestring

The name of the database.

db1
Tablestring

The name of the table.

tabl1
Columnstring

The name of the column.

column1
Descriptionstring

The description of the permission object.

a test column
Privilegesarray

The name of the permission. You can call the DescribeEnabledPrivileges operation to query the name of the permission.

privilegestring
insert,select
TotalCountlong

The total number of entries returned.

100
PageNumberlong

The page number of the returned page.

1
PageSizelong

The number of entries returned per page.

20

Examples

Sample success responses

JSONformat

{
  "RequestId": "DA32480A-E3E5-1BE7-BA98-724551DC04C8",
  "Data": [
    {
      "PrivilegeType": "Column",
      "PrivilegeObject": {
        "Database": "db1",
        "Table": "tabl1",
        "Column": "column1",
        "Description": "a test column"
      },
      "Privileges": [
        "insert,select"
      ]
    }
  ],
  "TotalCount": 100,
  "PageNumber": 1,
  "PageSize": 20
}

Error codes

HTTP status codeError codeError messageDescription
400ACS.Account.NotExistThe account is not found.The specified RAM user does not exist.
400InvalidDBClusterId.MalformedThe specified parameter DBClusterId is not valid.The DBClusterId parameter is invalid. Check the parameter.
400ACS.Account.NotBindDatabaseAccountThe account has not been associated with a database account.-
400ACS.InvalidParameter.%sParameter %s is invalid.The specified parameter is invalid.
400InvalidDBCluster.NotFoundThe DBClusterId provided does not exist in our records.The specified DBClusterId parameter does not exist. Make sure that the DBClusterId value is valid.

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

Change history

Change timeSummary of changesOperation
2023-12-06The Error code has changedView Change Details
2023-04-20The Error code has changedView Change Details
2023-03-24The internal configuration of the API is changed, but the call is not affectedView Change Details