调用 DescribeDatabases 接口查看数据库列表。
同步请求。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
InstanceId | String | 是 | mysql-r3xq0zdl**** | 实例 ID。 |
DBName | String | 否 | testdb1 | 数据库名称。 |
PageNumber | Integer | 否 | 1 | 当前页页码。取值最小为 1。默认值为 1。 |
PageSize | Integer | 否 | 10 | 每页记录数。最小值为 1,最大值不超过 100。默认值为 10。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Total | Integer | 1 | 数据库总数。 |
Databases | Object[] | [
{
"CharacterSetName": "utf8",
"DBDesc": "这是一段数据库 testdb1 的描述。",
"DBName": "testdb1",
"DBPartition": 0,
"DBStatus": "Available",
"DatabasePrivileges": null,
"DatabasePrivilegesInfo": null
}
] | 数据库列表。 |
POST /?Action=DescribeDatabases&Version=2022-01-01 HTTP/1.1 Content-Type: application/json Host: rds.volcengineapi.com X-Date: 20211202T101010Z Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mysql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458**** { "InstanceId": "mysql-4674157d****", "PageSize": 10, "PageNumber": 1 }
{ "ResponseMetadata": { "RequestId": "2023011116092131FBB0733F03E98C9690", "Action": "DescribeDatabases", "Version": "2022-01-01", "Service": "rds_mysql", "Region": "cn-beijing" }, "Result": { "Databases": [ { "CharacterSetName": "utf8", "DBDesc": "这是一段数据库 testdb1 的描述。", "DBName": "testdb1", "DBPartition": 0, "DBStatus": "Available", "DatabasePrivileges": [ { "AccountName": "TestAccount1", "AccountPrivilege": "ReadOnly", "AccountPrivilegeDetail": "LOCK TABLES,SELECT,SHOW VIEW", "Host": "192.***.***.2" }, { "AccountName": "TestAccount2", "AccountPrivilege": "ReadWrite", "AccountPrivilegeDetail": "ALTER,ALTER ROUTINE,CREATE,CREATE ROUTINE,CREATE TMP TABLE,CREATE VIEW,DELETE,DROP,EVENT,EXECUTE,INDEX,INSERT,LOCK TABLES,REFERENCES,SELECT,SHOW VIEW,TRIGGER,UPDATE", "Host": "%" } ] }, { "CharacterSetName": "utf8", "DBDesc": "这是一段数据库 testdb2 的描述信息。", "DBName": "testdb2", "DBPartition": 0, "DBStatus": "Available", "DatabasePrivileges": [ { "AccountName": "TestAccount2", "AccountPrivilege": "ReadOnly", "AccountPrivilegeDetail": "LOCK TABLES,SELECT,SHOW VIEW", "Host": "%" } ] } ], "Total": 2 } }
更多详情,请参见错误码。