IAM.Client.
get_access_key_last_used
(**kwargs)¶Retrieves information about when the specified access key was last used. The information includes the date and time of last use, along with the Amazon Web Services service and Region that were specified in the last request made with that key.
See also: AWS API Documentation
Request Syntax
response = client.get_access_key_last_used(
AccessKeyId='string'
)
[REQUIRED]
The identifier of an access key.
This parameter allows (through its regex pattern ) a string of characters that can consist of any upper or lowercased letter or digit.
{
'UserName': 'string',
'AccessKeyLastUsed': {
'LastUsedDate': datetime(2015, 1, 1),
'ServiceName': 'string',
'Region': 'string'
}
}
Response Structure
Contains the response to a successful GetAccessKeyLastUsed request. It is also returned as a member of the AccessKeyMetaData structure returned by the ListAccessKeys action.
The name of the IAM user that owns this access key.
Contains information about the last time the access key was used.
The date and time, in ISO 8601 date-time format, when the access key was most recently used. This field is null in the following situations:
The name of the Amazon Web Services service with which this access key was most recently used. The value of this field is "N/A" in the following situations:
The Amazon Web Services Region where this access key was most recently used. The value for this field is "N/A" in the following situations:
For more information about Amazon Web Services Regions, see Regions and endpoints in the Amazon Web Services General Reference.
Exceptions
IAM.Client.exceptions.NoSuchEntityException