调用DescribeAccountAuthority接口查询单个云数据库ClickHouse集群指定数据库账号的权限。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeAccountAuthority |
系统规定参数。取值:DescribeAccountAuthority。 |
RegionId | String | 是 | cn-hangzhou |
地域ID。您可以通过调用DescribeRegions接口查询地域ID。 |
DBClusterId | String | 是 | cc-bp1p816075e21**** |
集群ID。 |
AccountName | String | 是 | test |
数据库账号。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
DdlAuthority | Boolean | true |
是否具备DDL权限,取值说明:
|
DmlAuthority | String | all |
是否具备DML权限,取值说明:
|
RequestId | String | F5178C10-1407-4987-9133-DE4DC9119F75 |
请求ID。 |
TotalDatabases | Array of String | db1,db2 |
所有数据库列表。 |
TotalDictionaries | Array of String | dt1,dt2 |
所有字典列表。 |
AllowDictionaries | Array of String | dt1 |
已授权的字典列表。 |
AllowDatabases | Array of String | db1 |
已授权的数据库列表。 |
AccountName | String | test |
数据库账号。 |
示例
请求示例
http(s)://clickhouse.aliyuncs.com/?Action=DescribeAccountAuthority
&RegionId=cn-hangzhou
&DBClusterId=cc-bp1p816075e21****
&AccountName=test
&公共请求参数
正常返回示例
XML
格式
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
格式
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"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
500 | InternalError | An error occurred while processing your request. | 系统内部错误,请稍后重试 |
503 | ServiceUnavailable | An error occurred while processing your request. | 系统暂时不可用,请稍后重试 |
访问错误中心查看更多错误码。