Queries the time when an AccessKey pair was used for the last time.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ram:GetAccessKeyLastUsed |
get |
*User
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| UserPrincipalName |
string |
No |
The logon name of the RAM user. If you do not specify this parameter, the AccessKey pair of the current user is queried. |
test@example.onaliyun.com |
| UserAccessKeyId |
string |
Yes |
The ID of the AccessKey pair that you want to query. |
LTAI******************* |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| AccessKeyLastUsed |
object |
The details of the time when the AccessKey pair was used for the last time. |
|
| LastUsedDate |
string |
The time when the AccessKey pair was used for the last time. |
2020-10-16T01:37:37Z |
| ServiceName |
string |
The Alibaba Cloud service that was last accessed by using the AccessKey pair. |
Ram |
| RequestId |
string |
The request ID. |
B29C79F6-354B-4297-A994-1338CC22A2EC |
Examples
Success response
JSON format
{
"AccessKeyLastUsed": {
"LastUsedDate": "2020-10-16T01:37:37Z",
"ServiceName": "Ram"
},
"RequestId": "B29C79F6-354B-4297-A994-1338CC22A2EC"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.