調用DescribeCacheAnalysisJob介面,查詢快取分析任務詳情。
介面說明
使用該介面需滿足以下前提條件:
使用阿里雲或 DAS 的 SDK 時,建議使用最新版本。
使用 SDK 調用 DAS 服務時,需要將地區指定為 cn-shanghai。
本介面只適用於 Redis 引擎。
調用本介面可查詢執行個體緩衝分析任務中排名前 500 的 Key 資訊。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
hdm:DescribeCacheAnalysisJob |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| InstanceId |
string |
是 |
執行個體 ID。 |
r-bp18ff4a195d**** |
| JobId |
string |
是 |
緩衝分析任務 ID,您可通過調用 CreateCacheAnalysisJob 介面擷取返回參數的 JobId。 |
sf79-sd99-sa37-**** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| Message |
string |
請求返回訊息。 說明
請求成功時該參數返回 Successful,請求失敗時會返回請求異常資訊(如錯誤碼等)。 |
Successful |
| RequestId |
string |
請求 ID。 |
B6D17591-B48B-4D31-9CD6-9B9796B2**** |
| Data |
object |
詳細資料列表。 |
|
| TaskState |
string |
緩衝分析任務的狀態:
|
BACKUP |
| JobId |
string |
緩衝分析任務 ID。 |
sf79-sd99-sa37-**** |
| Message |
string |
請求返回訊息。 說明
請求成功時該參數返回 Successful,請求失敗時會返回請求異常資訊(如錯誤碼等)。 |
Successful |
| BigKeys |
object |
||
| KeyInfo |
array<object> |
大 Key 詳細資料,根據 Key 佔用位元組數降序排列。 |
|
|
object |
|||
| Type |
string |
Redis 資料結構類型。 |
hash |
| Db |
integer |
資料庫名稱。 |
0 |
| ExpirationTimeMillis |
integer |
Key 到期時間,格式為 Unix 時間戳記,單位為毫秒(ms),0 表示不到期。 |
1596256542547 |
| Key |
string |
Key 的名稱。 |
task_x**** |
| Encoding |
string |
Key 內部資料類型。 |
hashtable |
| Bytes |
integer |
Key 佔用位元組數。 |
12345 |
| NodeId |
string |
執行個體的資料節點 ID。 |
r-x****-db-0 |
| Count |
integer |
Key 的元素個數。 |
127 |
| KeyPrefixes |
object |
||
| Prefix |
array<object> |
Key 首碼列表。 |
|
|
object |
|||
| KeyNum |
integer |
該首碼 Key 的數量。 |
123 |
| Type |
string |
Redis 資料結構類型。 |
hash |
| Bytes |
integer |
Key 佔用位元組數。 |
12345 |
| Prefix |
string |
Key 的首碼。 |
task_ |
| Count |
integer |
Key 的元素個數。 |
127 |
| BigKeysOfNum |
object |
||
| KeyInfo |
array<object> |
大 Key 詳細資料,根據 Key 數量降序排列。 |
|
|
object |
|||
| Type |
string |
Redis 資料結構類型。 |
hash |
| Db |
integer |
資料庫名稱。 |
0 |
| ExpirationTimeMillis |
integer |
Key 到期時間,格式為 Unix 時間戳記,單位為毫秒(ms),0 表示不到期。 |
1596256542547 |
| Key |
string |
Key 的名稱。 |
task_x**** |
| Encoding |
string |
Key 內部資料類型。 |
hashtable |
| Bytes |
integer |
Key 佔用位元組數。 |
12345 |
| NodeId |
string |
執行個體的資料節點 ID。 |
r-x****-db-0 |
| Count |
integer |
Key 的元素個數。 |
127 |
| UnexBigKeysOfBytes |
object |
||
| KeyInfo |
array<object> |
永不到期 Key 的詳細資料,根據 Key 佔用位元組數降序排列。 |
|
|
object |
|||
| Type |
string |
Redis 資料結構類型。 |
hash |
| Db |
integer |
資料庫名稱。 |
0 |
| ExpirationTimeMillis |
integer |
Key 到期時間,格式為 Unix 時間戳記,單位為毫秒(ms),0 表示不到期。 |
1596256542547 |
| Key |
string |
Key 的名稱。 |
task_x**** |
| Encoding |
string |
Key 內部資料類型。 |
hashtable |
| Bytes |
integer |
Key 佔用位元組數。 |
12345 |
| NodeId |
string |
執行個體的資料節點 ID |
r-x****-db-0 |
| Count |
integer |
Key 的元素個數。 |
127 |
| UnexBigKeysOfNum |
object |
||
| KeyInfo |
array<object> |
永不到期 Key 的詳細資料,根據 Key 數量降序排列。 |
|
|
object |
|||
| Type |
string |
Redis 資料結構類型。 |
hash |
| Db |
integer |
資料庫名稱。 |
0 |
| ExpirationTimeMillis |
integer |
Key 到期時間,格式為 Unix 時間戳記,單位為毫秒(ms),0 表示不到期。 |
1596256542547 |
| Key |
string |
Key 的名稱。 |
task_x**** |
| Encoding |
string |
Key 內部資料類型。 |
hashtable |
| Bytes |
integer |
Key 佔用位元組數。 |
12345 |
| NodeId |
string |
執行個體的資料節點 ID。 |
r-x****-db-0 |
| Count |
integer |
Key 的元素個數。 |
127 |
| InstanceId |
string |
執行個體 ID。 |
r-bp18ff4a195d**** |
| NodeId |
string |
執行個體的資料節點 ID。 |
r-x****-db-0 |
| ExpiryKeysLevelCount |
object |
||
| ExpiryLevel |
array<object> |
按到期時間分類的 Key 統計資訊。 |
|
|
object |
按到期時間分類的 Key 統計資訊。 |
||
| AnalysisTs |
integer |
分析完成的時間,格式為 Unix 時間戳記,單位為毫秒(ms)。 |
1717469347000 |
| Level |
integer |
到期時間層級。取值:
|
0 |
| TotalBytes |
integer |
按到期時間分類統計的 Key 佔用的位元組數。 |
8064 |
| TotalKeys |
integer |
按到期時間分類統計的 Key 總數。 |
62 |
| Code |
string |
返回的狀態代碼。 |
200 |
| Success |
string |
請求是否執行成功:
|
true |
樣本
正常返回樣本
JSON格式
{
"Message": "Successful",
"RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
"Data": {
"TaskState": "BACKUP",
"JobId": "sf79-sd99-sa37-****",
"Message": "Successful",
"BigKeys": {
"KeyInfo": [
{
"Type": "hash",
"Db": 0,
"ExpirationTimeMillis": 1596256542547,
"Key": "task_x****",
"Encoding": "hashtable",
"Bytes": 12345,
"NodeId": "r-x****-db-0",
"Count": 127
}
]
},
"KeyPrefixes": {
"Prefix": [
{
"KeyNum": 123,
"Type": "hash",
"Bytes": 12345,
"Prefix": "task_",
"Count": 127
}
]
},
"BigKeysOfNum": {
"KeyInfo": [
{
"Type": "hash",
"Db": 0,
"ExpirationTimeMillis": 1596256542547,
"Key": "task_x****",
"Encoding": "hashtable",
"Bytes": 12345,
"NodeId": "r-x****-db-0",
"Count": 127
}
]
},
"UnexBigKeysOfBytes": {
"KeyInfo": [
{
"Type": "hash",
"Db": 0,
"ExpirationTimeMillis": 1596256542547,
"Key": "task_x****",
"Encoding": "hashtable",
"Bytes": 12345,
"NodeId": "r-x****-db-0",
"Count": 127
}
]
},
"UnexBigKeysOfNum": {
"KeyInfo": [
{
"Type": "hash",
"Db": 0,
"ExpirationTimeMillis": 1596256542547,
"Key": "task_x****",
"Encoding": "hashtable",
"Bytes": 12345,
"NodeId": "r-x****-db-0",
"Count": 127
}
]
},
"InstanceId": "r-bp18ff4a195d****",
"NodeId": "r-x****-db-0",
"ExpiryKeysLevelCount": {
"ExpiryLevel": [
{
"AnalysisTs": 1717469347000,
"Level": 0,
"TotalBytes": 8064,
"TotalKeys": 62
}
]
}
},
"Code": "200",
"Success": "true"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidParams | The request parameters are invalid. | |
| 403 | NoPermission | You are not authorized to do this action. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。