Membuat akun untuk instans ApsaraDB for Tair (kompatibel dengan Redis).
Deskripsi operasi
Operasi ini hanya didukung untuk instans yang kompatibel dengan Redis 4.0 atau yang lebih baru.
Untuk memanggil operasi ini, instans harus berada dalam status Running.
Anda dapat membuat hingga 18 akun dalam satu instans.
Untuk informasi tentang operasi konsol yang sesuai dengan 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 yang valid:
|
RoleReadOnly |
| AccountPassword |
string |
Yes |
Kata sandi akun. Panjang kata sandi harus 8 sampai 32 karakter dan harus berisi setidaknya tiga dari tipe karakter berikut: huruf besar, huruf kecil, angka, dan karakter khusus. Karakter khusus berikut didukung: |
uWonno21**** |
| AccountDescription |
string |
No |
Deskripsi akun.
|
testaccount |
| AccountType |
string |
No |
Tipe akun. Setel nilainya ke Normal, yang menunjukkan akun standar. |
Normal |
| SourceBiz |
string |
No |
Parameter ini hanya digunakan untuk pemeliharaan 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 |
Parameter ini sudah tidak digunakan. |
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.