Mengkueri kunci panas dari instans Redis dengan memanggil operasi DescribeHotKeys.
Deskripsi operasi
Sebelum Anda memulai:
Saat menggunakan Alibaba Cloud SDK, pastikan versi aliyun-sdk-core lebih baru dari 4.3.3. Gunakan versi terbaru.
Versi DAS SDK harus 1.0.2 atau lebih baru.
Saat memanggil DAS menggunakan SDK, atur wilayah ke cn-shanghai.
- Operasi ini hanya berlaku untuk instans Redis berikut:
Instans adalah instans Redis Community Edisi atau instans Tair (Redis® OSS-Compatible) yang dioptimalkan untuk memori.
Versi mesin minor instans adalah yang terbaru.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hdm:DescribeHotKeys |
get |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID instans dari instans Redis. |
r-bp18ff4a195d**** |
| NodeId |
string |
No |
ID shard data dalam instans Redis. |
r-x****-db-0 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| Message |
string |
Paket yang dikembalikan. Catatan
Jika permintaan berhasil, Successful dikembalikan. Jika permintaan gagal, paket kesalahan seperti kode kesalahan dikembalikan. |
Successful |
| RequestId |
string |
ID permintaan. |
B6D17591-B48B-4D31-9CD6-9B9796B2**** |
| Data |
object |
||
| HotKey |
array<object> |
Daftar informasi detail. |
|
|
object |
Set hasil. |
||
| Key |
string |
The key. |
abc:def:eng |
| Db |
integer |
The DB where the key is stored. |
0 |
| Hot |
string |
The access frequency of the key, which is the number of accesses per second. |
5500~6000 |
| KeyType |
string |
The type of the key. |
zset |
| Size |
integer |
The number of elements. |
2 |
| InBytes |
integer |
85766 |
|
| OutBytes |
integer |
1054688 |
|
| NodeId |
string |
r-x****-db-0 |
|
| Category |
string |
qps |
|
| Code |
string |
Kode status yang dikembalikan. |
200 |
| Success |
string |
Apakah permintaan berhasil. Nilai valid:
|
true |
Contoh
Respons sukses
JSONformat
{
"Message": "Successful",
"RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
"Data": {
"HotKey": [
{
"Key": "abc:def:eng",
"Db": 0,
"Hot": "5500~6000",
"KeyType": "zset",
"Size": 2,
"InBytes": 85766,
"OutBytes": 1054688,
"NodeId": "r-x****-db-0",
"Category": "qps"
}
]
},
"Code": "200",
"Success": "true"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The request parameters are invalid. | |
| 403 | NoPermission | You are not authorized to do this action. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.