Mengkueri detail database dalam Kluster PolarDB Basis Data Relasional Cloud-Native tertentu.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:DescribeDatabases |
get |
*DBCluster
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
ID Kluster. |
pc-************** |
| DBName |
string |
No |
Nama database. Catatan
Anda tidak dapat menentukan beberapa nama database. |
test_db |
| PageNumber |
integer |
No |
Nomor halaman yang dikembalikan. Nilai harus berupa bilangan bulat yang lebih besar dari 0 dan tidak melebihi nilai maksimum bilangan bulat. Nilai default: 1. |
1 |
| PageSize |
integer |
No |
Jumlah entri yang dikembalikan di setiap halaman. Nilai valid:
Nilai default: 30. |
30 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| PageRecordCount |
integer |
The number of entries returned on the current page. |
1 |
| Databases |
object |
||
| Database |
array<object> |
The details of the databases. |
|
|
array<object> |
|||
| DBDescription |
string |
The description of the database. |
test_des |
| DBStatus |
string |
The state of the database. Valid values:
|
Running |
| DBName |
string |
The name of the database. |
test_db |
| Engine |
string |
The type of the database engine. Valid values:
|
MySQL |
| MasterID |
string |
The ID of the primary node in the cluster of Multi-master Cluster (Database/Table) Edition. |
2 |
| CharacterSetName |
string |
The character set that the database uses. For more information, see Character set tables. |
utf8mb4 |
| Accounts |
object |
||
| Account |
array<object> |
Details about the accounts. Catatan
A PolarDB for MySQL cluster does not support privileged accounts. |
|
|
object |
|||
| PrivilegeStatus |
string |
The authorization state of the account. Valid values:
|
Empowered |
| AccountStatus |
string |
The state of the account. Valid values:
|
Available |
| AccountPrivilege |
string |
The permissions that are granted to the account. Valid values:
|
ReadOnly |
| AccountName |
string |
The username of the account. Catatan
A PolarDB for MySQL cluster does not support privileged accounts. |
test_acc |
| RequestId |
string |
The ID of the request. |
E1DF8CA6-2300-448B-9ABF-760C4B****** |
| PageNumber |
integer |
The page number. |
1 |
Contoh
Respons sukses
JSONformat
{
"PageRecordCount": 1,
"Databases": {
"Database": [
{
"DBDescription": "test_des",
"DBStatus": "Running",
"DBName": "test_db",
"Engine": "MySQL",
"MasterID": "2",
"CharacterSetName": "utf8mb4",
"Accounts": {
"Account": [
{
"PrivilegeStatus": "Empowered",
"AccountStatus": "Available",
"AccountPrivilege": "ReadOnly",
"AccountName": "test_acc"
}
]
}
}
]
},
"RequestId": "E1DF8CA6-2300-448B-9ABF-760C4B******",
"PageNumber": 1
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | |
| 400 | InvalidPageSize.Malformed | The specified parameter PageSize is not valid. | |
| 400 | InvalidPageNumber.Malformed | The specified parameter PageNumber is not valid. | |
| 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. | |
| 404 | InvalidDBClusterId.NotFound | The DBInstanceId provided does not exist in our records. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.