Membuat database untuk Kluster PolarDB Basis Data Relasional Cloud-Native.
Deskripsi operasi
Before you call this operation, make sure that the following requirements are met:
The cluster is in the Running state.
The cluster is unlocked.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:CreateDatabase |
create |
*DBCluster
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
ID kluster. |
pc-************** |
| DBName |
string |
Yes |
Nama database. Nama harus memenuhi persyaratan berikut:
Catatan
Jangan gunakan kata yang dicadangkan sebagai nama database, seperti |
testDB |
| CharacterSetName |
string |
Yes |
Set karakter yang digunakan oleh Kluster. Untuk informasi selengkapnya, lihat Tabel set karakter. |
utf8 |
| DBDescription |
string |
No |
Deskripsi database. Deskripsi harus memenuhi persyaratan berikut:
Catatan
Parameter ini wajib untuk Kluster PolarDB Basis Data Relasional Cloud-Native for Oracle atau PolarDB Basis Data Relasional Cloud-Native for PostgreSQL. Parameter ini bersifat opsional untuk Kluster PolarDB Basis Data Relasional Cloud-Native for MySQL. |
testdesc |
| AccountName |
string |
No |
Nama akun yang diberi izin untuk mengakses database. Anda dapat memanggil operasi DescribeAccounts untuk mengkueri informasi akun. Catatan
|
testacc |
| AccountPrivilege |
string |
No |
Izin yang diberikan kepada akun. Nilai valid:
Nilai default adalah ReadWrite. Catatan
|
ReadWrite |
| Collate |
string |
No |
Bahasa yang menentukan Aturan pengurutan dalam database. Catatan
|
C |
| Ctype |
string |
No |
Bahasa yang menunjukkan tipe karakter database. Catatan
Untuk Tampilan nilai valid parameter ini, lakukan langkah berikut: Masuk ke Konsol PolarDB Basis Data Relasional Cloud-Native dan klik ID Kluster. Di panel navigasi sebelah kiri, pilih Pengaturan dan Manajemen > Database. Lalu, klik Buat Database. |
C |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
93E98F25-BE02-40DA-83E3-F77F8D****** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "93E98F25-BE02-40DA-83E3-F77F8D******"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidDBName.Malformed | The specified parameter DBName is not valid. | |
| 400 | Database.AddError | Instance %s add database minidoc error | |
| 400 | InvalidDBDescription.Malformed | The specified parameter DBDescription is not valid. | |
| 400 | InvalidAccountPrivilege.Malformed | The specified parameter AccountPrivilege is not valid. | |
| 400 | InvalidAccountName.Malformed | The specified parameter AccountName is not valid. | |
| 404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | |
| 404 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | |
| 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.