Buat akun untuk instans ApsaraDB for Tair (kompatibel dengan Redis OSS).
Deskripsi operasi
API ini hanya mendukung instans yang kompatibel dengan Redis 4.0 atau versi yang lebih baru.
Instans harus dalam status running untuk menggunakan API ini.
Anda dapat membuat hingga 18 akun untuk satu instans.
Untuk operasi yang sesuai di konsol, lihat Account Management.
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 tersebut harus memenuhi persyaratan berikut:
|
demoaccount |
| AccountPrivilege |
string |
No |
Hak akses akun. Nilai yang valid:
|
RoleReadOnly |
| AccountPassword |
string |
Yes |
Password akun. Password harus terdiri dari 8 hingga 32 karakter dan mengandung minimal tiga jenis karakter berikut: huruf kapital, huruf kecil, angka, serta karakter khusus tertentu. Karakter khusus tersebut meliputi |
uWonno21**** |
| AccountDescription |
string |
No |
Deskripsi akun.
|
testaccount |
| AccountType |
string |
No |
Jenis akun. Tetapkan nilainya ke Normal, yang menunjukkan bahwa akun tersebut adalah akun standar. |
Normal |
| SourceBiz |
string |
No |
Parameter ini hanya digunakan untuk maintenance internal. Anda tidak perlu menentukan parameter ini. |
SDK |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
ABAF95F6-35C1-4177-AF3A-70969EBD**** |
| InstanceId |
string |
ID instans. |
r-bp1zxszhcgatnx**** |
| AcountName |
string |
Nama akun. |
demoaccount |
| AccountName |
string |
Nama akun. |
demoaccount |
Contoh
Respons sukses
JSONformat
{
"RequestId": "ABAF95F6-35C1-4177-AF3A-70969EBD****",
"InstanceId": "r-bp1zxszhcgatnx****",
"AcountName": "demoaccount",
"AccountName": "demoaccount"
}
Respons error
JSONformat
{
"RequestId":"ABAF95F6-35C1-4177-AF3A-70969EBDF624",
"AcountName":"test2"
}
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.