All Products
Search
Document Center

PolarDB:DescribeDatabases

Last Updated:Jun 10, 2026

Mengkueri detail database dalam Kluster PolarDB Basis Data Relasional Cloud-Native tertentu.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

polardb:DescribeDatabases

get

*DBCluster

acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}

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:

  • 30

  • 50

  • 100

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:

  • Creating

  • Running

  • Deleting

Running

DBName

string

The name of the database.

test_db

Engine

string

The type of the database engine. Valid values:

  • MySQL

  • Oracle

  • PostgreSQL

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:

  • Empowering: The system is granting permissions to the account.

  • Empowered: Permissions are granted to the account.

  • Removing: The system is revoking permissions from the account.

Empowered

AccountStatus

string

The state of the account. Valid values:

  • Creating

  • Available

  • Deleting

Available

AccountPrivilege

string

The permissions that are granted to the account. Valid values:

  • ReadWrite: read and write permissions

  • ReadOnly: read-only permissions

  • DMLOnly: The account is granted the permissions to execute only DML statements on the database.

  • DDLOnly: The account is granted the permissions to execute only DDL statements on the database.

  • ReadIndex: The account has the read and index permissions on the database.

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.