查詢指定AccessKey的最後使用記錄。
介面說明
本介面僅可查詢自 2022 年 02 月 01 日起(最長 400 天),指定 AccessKey 的最後使用記錄。因該資料存在一定的延遲(一般小時級),請您務必謹慎變更 AccessKey。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
actiontrail:GetAccessKeyLastUsedInfo |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| AccessKey |
string |
是 |
AccessKey ID。 |
LTAI**************** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| AccessKeyId |
string |
AccessKey ID。 |
LTAI**************** |
| AccountId |
string |
阿里雲帳號 ID。 |
104758519118**** |
| AccountType |
string |
AccessKey 所屬帳號身份類型。 枚舉值:
|
ram-user |
| Detail |
string |
最後使用事件詳情。 |
{ "eventId": "239EB588-CD24-522E-B0B5-174A1A58****", "eventVersion": 1, "eventSource": "ecs.cn-hangzhou.aliyuncs.com", "sourceIpAddress": "10.10.**.**", "eventType": "ApiCall", "userIdentity": { "accountId": "104758519118****", "principalId": "24549429003625****", "type": "ram-user", "userName": "alice" }, "serviceName": "Ecs", "apiVersion": "2016-01-20", "requestId": "239EB588-CD24-522E-B0B5-174A1A588BE0", "eventTime": "2021-08-05T09:21:32Z", "isGlobal": false, "acsRegion": "cn-hangzhou", "eventName": "DescribeInstances" } |
| OwnerId |
string |
AccessKey 所屬帳號 ID。 |
24549429003625**** |
| RequestId |
string |
請求 ID。 |
239EB588-CD24-522E-B0B5-174A1A588BE0 |
| ServiceName |
string |
最後使用的雲端服務。 |
Ecs |
| ServiceNameCn |
string |
最後使用的雲端服務中文名稱。 |
Elastic Compute Service |
| ServiceNameEn |
string |
最後使用的雲端服務英文名稱。 |
Elastic Compute Service |
| Source |
string |
最後使用記錄來源。 枚舉值:
|
ManagementEvent |
| UsedTimestamp |
integer |
最後使用時間戳。 |
1657247532000 |
| UserName |
string |
AccessKey 所屬帳號名稱。 如果 AccountType 為 root-account,則 userName 記錄為“root”;如果 AccountType 為 ram-user,則 userName 記錄為 RAM 使用者名稱。 |
alice |
樣本
正常返回樣本
JSON格式
{
"AccessKeyId": "LTAI****************",
"AccountId": "104758519118****",
"AccountType": "ram-user",
"Detail": "{\n \"eventId\": \"239EB588-CD24-522E-B0B5-174A1A58****\",\n \"eventVersion\": 1,\n \"eventSource\": \"ecs.cn-hangzhou.aliyuncs.com\",\n \"sourceIpAddress\": \"10.10.**.**\",\n \"eventType\": \"ApiCall\",\n \"userIdentity\": {\n \"accountId\": \"104758519118****\",\n \"principalId\": \"24549429003625****\",\n \"type\": \"ram-user\",\n \"userName\": \"alice\"\n },\n \"serviceName\": \"Ecs\",\n \"apiVersion\": \"2016-01-20\",\n \"requestId\": \"239EB588-CD24-522E-B0B5-174A1A588BE0\",\n \"eventTime\": \"2021-08-05T09:21:32Z\",\n \"isGlobal\": false,\n \"acsRegion\": \"cn-hangzhou\",\n \"eventName\": \"DescribeInstances\"\n}",
"OwnerId": "24549429003625****",
"RequestId": "239EB588-CD24-522E-B0B5-174A1A588BE0",
"ServiceName": "Ecs",
"ServiceNameCn": "Elastic Compute Service",
"ServiceNameEn": "Elastic Compute Service",
"Source": "ManagementEvent",
"UsedTimestamp": 1657247532000,
"UserName": "alice"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | IncompleteSignature | The request signature does not conform to Alibaba Cloud standards. | 簽名不匹配。請檢查AcceseKey ID和AccessKey Secret是否正確;檢查簽名方法是否正確。詳細資料參見“簽名機制”。 |
| 400 | InvalidQueryParameter | The specified query parameter is invalid. | 無效的查詢參數。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。