Membuat akun untuk instans database Database Apsara for Tair (kompatibel dengan Redis® OSS).
Deskripsi operasi
Operasi API ini hanya mendukung instans yang kompatibel dengan Redis 4.0 atau versi lebih baru.
Status instans harus Running saat Anda memanggil operasi API ini.
Anda dapat membuat hingga 18 akun untuk setiap instans.
Untuk operasi konsol yang sesuai dengan operasi API ini, lihat Manajemen akun.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
kvstore:CreateAccount |
create |
*DBInstance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID instans. |
r-bp1zxszhcgatnx**** |
| AccountName |
string |
Yes |
Nama akun. Nama harus memenuhi persyaratan berikut:
|
demoaccount |
| AccountPrivilege |
string |
No |
Izin akun. Nilai valid:
|
RoleReadOnly |
| AccountPassword |
string |
Yes |
Kata sandi akun. Panjang kata sandi harus 8 hingga 32 karakter dan mengandung setidaknya tiga dari jenis karakter berikut: huruf besar, huruf kecil, karakter khusus, dan angka. Karakter khusus berikut didukung: |
uWonno21**** |
| AccountDescription |
string |
No |
Deskripsi akun.
|
testaccount |
| AccountType |
string |
No |
Tipe akun. Atur nilainya menjadi Normal (akun standar). |
Normal |
| SourceBiz |
string |
No |
Parameter ini hanya digunakan untuk pemeliharaan internal. Anda tidak perlu menentukan parameter ini. |
SDK |
| Parameters |
string |
No |
Parameter akun yang akan diubah dalam format JSON. Nilai baru menimpa nilai asli. Penting Parameter ini hanya didukung untuk instans Tair Serverless KV. |
{"access-db-id":"1","cu-limit":"10"} |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
ABAF95F6-35C1-4177-AF3A-70969EBD**** |
| InstanceId |
string |
ID instans. |
r-bp1zxszhcgatnx**** |
| AcountName |
string |
[Deprecated] Parameter ini sudah tidak digunakan lagi. |
demoaccount |
| AccountName |
string |
Nama akun. |
demoaccount |
Contoh
Respons sukses
JSONformat
{
"RequestId": "ABAF95F6-35C1-4177-AF3A-70969EBD****",
"InstanceId": "r-bp1zxszhcgatnx****",
"AcountName": "demoaccount",
"AccountName": "demoaccount"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidAccountName.Duplicate | Specified AccountName already exists in this instance. | |
| 400 | InvalidAccountName.Format | Specified AccountName is not valid. | |
| 400 | InvalidEngineVersion.Format | Current EngineVersion does not support operations. | |
| 400 | InvalidAccountDescription.Format | Specified AccountDescription is not valid. | |
| 400 | InvalidAccountPassword.Format | Specified AccountPassword is not valid. | |
| 400 | InvalidDBInstanceAccountMode.Format | Current DB instance AccountMode does not support this operation. | |
| 400 | InvalidAccountName.Forbid | Specified AccountName is a keyword. | |
| 400 | InvalidAccountPrivilege.Malformed | Specified account privilege is not valid. | |
| 403 | AccountLimitExceeded | Exceeding the allowed amount of account. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.