Queries the permissions of a specified database account for a single ApsaraDB for ClickHouse cluster.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeAccountAuthority

The operation that you want to perform. Set the value to DescribeAccountAuthority.

RegionId String Yes cn-hangzhou

The region ID. You can call the DescribeRegions operation to query the most recent region list.

DBClusterId String Yes cc-bp1p816075e21****

The ID of the cluster.

AccountName String Yes test

The username of the database account.

Response parameters

Parameter Type Example Description
DdlAuthority Boolean true

Indicates whether the database account has DDL permissions. Valid values:

  • true: has DDL permissions.
  • false: does not have DDL permissions.
DmlAuthority String all

Indicates whether the database account has DML permissions. Valid values:

  • all
  • readOnly,modify
RequestId String F5178C10-1407-4987-9133-DE4DC9119F75

The ID of the request.

TotalDatabases Array of String db1,db2

The list of all databases.

TotalDictionaries Array of String dt1,dt2

The list of all dictionaries.

AllowDictionaries Array of String dt1

The list of dictionaries to which permissions have been granted.

AllowDatabases Array of String db1

The list of databases to which permissions have been granted.

AccountName String test

The username of the database account.

Examples

Sample requests

http(s)://clickhouse.aliyuncs.com/?Action=DescribeAccountAuthority
&RegionId=cn-hangzhou
&DBClusterId=cc-bp1p816075e21****
&AccountName=test
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeAccountAuthorityResponse>
    <DdlAuthority>true</DdlAuthority>
    <DmlAuthority>all</DmlAuthority>
    <RequestId>F5178C10-1407-4987-9133-DE4DC9119F75</RequestId>
    <TotalDatabases>db1,db2</TotalDatabases>
    <TotalDictionaries>dt1,dt2</TotalDictionaries>
    <AllowDictionaries>dt1</AllowDictionaries>
    <AllowDatabases>db1</AllowDatabases>
    <AccountName>test</AccountName>
</DescribeAccountAuthorityResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "DdlAuthority" : true,
  "DmlAuthority" : "all",
  "RequestId" : "F5178C10-1407-4987-9133-DE4DC9119F75",
  "TotalDatabases" : [ "db1,db2" ],
  "TotalDictionaries" : [ "dt1,dt2" ],
  "AllowDictionaries" : [ "dt1" ],
  "AllowDatabases" : [ "db1" ],
  "AccountName" : "test"
}

Error codes

HttpCode Error code Error message Description
500 InternalError An error occurred while processing your request. The error message returned because an internal error has occurred. Try again later.
503 ServiceUnavailable An error occurred while processing your request. The error message returned because the service is unavailable. Try again later.

For a list of error codes, visit the API Error Center.