查询PolarDB集群的数据库账号信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
        
            调试
        
    
授权信息
| 
                                 操作  | 
                            
                                 访问级别  | 
                            
                                 资源类型  | 
                            
                                 条件关键字  | 
                            
                                 关联操作  | 
                        
| 
                                 polardb:DescribeAccounts  | 
                            
                                 get  | 
                            
                                     *dbcluster 
  | 
                            无 | 无 | 
请求参数
| 
                             名称  | 
                        
                             类型  | 
                        
                             必填  | 
                        
                             描述  | 
                        
                             示例值  | 
                    
| DBClusterId | 
                             string  | 
                        
                             是  | 
                        
                             集群 ID。  | 
                        
                             pc-***************  | 
                    
| AccountName | 
                             string  | 
                        
                             否  | 
                        
                             账号名称。  | 
                        
                             test_acc  | 
                    
| NodeType | 
                             string  | 
                        
                             否  | 
                        
                             节点类型,查询 PolarDB Search 节点账号时需要传入 
  | 
                        
                             Search  | 
                    
| PageNumber | 
                             integer  | 
                        
                             否  | 
                        
                             页码,取值范围为大于 0 但不超过 Integer 最大值的整数。默认值为 1。  | 
                        
                             1  | 
                    
| PageSize | 
                             integer  | 
                        
                             否  | 
                        
                             每页记录数,取值范围: 
 默认值为 30。  | 
                        
                             30  | 
                    
返回参数
| 
                             名称  | 
                        
                             类型  | 
                        
                             描述  | 
                        
                             示例值  | 
                    
| 
                             object  | 
                        |||
| PageRecordCount | 
                             integer  | 
                        
                             本页记录数。  | 
                        
                             1  | 
                    
| RequestId | 
                             string  | 
                        
                             请求 ID。  | 
                        
                             155462B9-205F-4FFC-BB43-4855FE******  | 
                    
| PageNumber | 
                             integer  | 
                        
                             页码。  | 
                        
                             1  | 
                    
| Accounts | 
                             array  | 
                        
                             账号信息详情。  | 
                        |
| 
                             object  | 
                        |||
| AccountDescription | 
                             string  | 
                        
                             账号备注。  | 
                        
                             test  | 
                    
| AccountStatus | 
                             string  | 
                        
                             账号状态。取值范围: 
  | 
                        
                             Available  | 
                    
| AccountLockState | 
                             string  | 
                        
                             账号锁定状态。取值范围: 
  | 
                        
                             UnLock  | 
                    
| AccountPasswordValidTime | 
                             string  | 
                        
                             密码过期时间。  | 
                        
                             undefined  | 
                    
| AccountType | 
                             string  | 
                        
                             账户类型。取值范围: 
  | 
                        
                             Normal  | 
                    
| DatabasePrivileges | 
                             array  | 
                        
                             目标账号拥有的数据库权限详情。  | 
                        |
| 
                             object  | 
                        |||
| AccountPrivilege | 
                             string  | 
                        
                             账号权限。  | 
                        
                             ReadOnly  | 
                    
| DBName | 
                             string  | 
                        
                             数据库名称。  | 
                        
                             DBtest  | 
                    
| AccountName | 
                             string  | 
                        
                             账号名。  | 
                        
                             test_acc  | 
                    
示例
正常返回示例
JSON格式
{
  "PageRecordCount": 1,
  "RequestId": "155462B9-205F-4FFC-BB43-4855FE******",
  "PageNumber": 1,
  "Accounts": [
    {
      "AccountDescription": "test",
      "AccountStatus": "Available",
      "AccountLockState": "UnLock",
      "AccountPasswordValidTime": "undefined",
      "AccountType": "Normal",
      "DatabasePrivileges": [
        {
          "AccountPrivilege": "ReadOnly",
          "DBName": "DBtest"
        }
      ],
      "AccountName": "test_acc"
    }
  ]
}
            错误码
| 
                                 HTTP status code  | 
            				
                                 错误码  | 
            				
                                 错误信息  | 
            				
                                 描述  | 
            			
|---|---|---|---|
| 400 | InvalidPageSize.Malformed | The specified parameter PageSize is not valid. | 指定的参数PageSize无效 | 
| 400 | InvalidPageNumber.Malformed | The specified parameter PageNumber is not valid. | 指定的参数PageNumber无效 | 
| 400 | Database.ConnectError | db instance %s connect failed, please check instance status and database processlist | 数据库实例连接失败,请检查实例状态和数据库进程列表 | 
| 400 | Account.QueryError | Instance %s query account error | 实例%s查询帐户错误 | 
| 400 | Connect.Timeout | Service can not connect to instance temporarily. | 服务暂时无法连接到实例 | 
| 404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | 当前的记录中不存在提供的DBClusterId。 | 
| 404 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | 指定的参数DBClusterId无效 | 
| 404 | InvalidDBClusterId.NotFound | The DBInstanceId provided does not exist in our records. | 当前的记录中不存在提供的DBClusterId。 | 
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。