DescribeDatabasesZonal - 查询边缘集群数据库信息

查询PolarDB边缘云数据库

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求语法

POST  HTTP/1.1

请求参数

名称

类型

必填

描述

示例值

DBClusterId

string

集群 ID。

pc-**************

DBName

string

数据库名。

test_db

PageNumber

integer

页码,取值范围为大于 0 但不超过 Integer 最大值的整数,默认值为 1。

1

PageSize

integer

每页记录数,取值范围如下:

  • 30

  • 50

  • 100

默认值为 30。

30

MaxResults

integer

本次读取的最大数据量。

10

NextToken

string

查询凭证(token),取值为上一次 api 调用返回的 nexttoken 参数值。如果没有下一个查询,请不传。

212db86sca4384811e0b5e8707e******

返回参数

名称

类型

描述

示例值

object

Schema of Response

PageRecordCount

integer

本页记录数。

7

Databases

array<object>

数据库信息详情。

object

DBDescription

string

数据库备注。

test_des

DBStatus

string

数据库状态,取值范围如下:

  • Creating:创建中

  • Running:使用中

  • Deleting:删除中

Running

DBName

string

数据库名。

test_db

Engine

string

数据库引擎类型,取值范围如下:

  • MySQL

  • Oracle

  • PostgreSQL

MySQL

MasterID

string

多主集群(库表)版的数据库所对应的主节点 ID。

2

CharacterSetName

string

字符集名称。

utf8mb4

Accounts

array<object>

数据库账号信息详情。

说明

当集群为 PolarDB MySQL 版时,不含高权限账号。

object

PrivilegeStatus

string

授权状态,取值范围如下:

  • Empowering:授权中

  • Empowered:授权完成

  • Removing:移除权限中

Empowered

AccountStatus

string

账号状态,取值范围如下:

  • Creating:创建中

  • Available:可用

  • Deleting:删除中

Available

AccountPrivilege

string

账号权限,取值范围如下:

  • ReadWrite:读写

  • ReadOnly:只读

  • DMLOnly:只允许 DML

  • DDLOnly:只允许 DDL

  • ReadIndex:只读+索引

ReadOnly

AccountName

string

账号名称。

说明

当集群为 PolarDB MySQL 版时,不含高权限账号。

test_acc

RequestId

string

请求 ID。

2FED790E-FB61-4721-8C1C-07C627******

PageNumber

integer

页码。

1

MaxResults

integer

本次读取的最大数据量。

10

NextToken

string

查询凭证(token),取值为上一次 api 调用返回的 nexttoken 参数值。如果没有下一个查询,请不传。

212db86sca4384811e0b5e8707e******

示例

正常返回示例

JSON格式

{
  "PageRecordCount": 7,
  "Databases": [
    {
      "DBDescription": "test_des",
      "DBStatus": "Running",
      "DBName": "test_db",
      "Engine": "MySQL",
      "MasterID": "2",
      "CharacterSetName": "utf8mb4",
      "Accounts": [
        {
          "PrivilegeStatus": "Empowered",
          "AccountStatus": "Available",
          "AccountPrivilege": "ReadOnly",
          "AccountName": "test_acc"
        }
      ]
    }
  ],
  "RequestId": "2FED790E-FB61-4721-8C1C-07C627******",
  "PageNumber": 1,
  "MaxResults": 10,
  "NextToken": "212db86sca4384811e0b5e8707e******"
}

错误码

HTTP status code

错误码

错误信息

描述

400 InvalidDBClusterId.Malformed The specified parameter DBClusterId is not valid.
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 数据库实例连接失败,请检查实例状态和数据库进程列表
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. 当前的记录中不存在提供的DBClusterId。
404 InvalidDBClusterId.NotFound The DBInstanceId provided does not exist in our records. 当前的记录中不存在提供的DBClusterId。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情