AWS Identity and Access Management

2015/04/23 - AWS Identity and Access Management - 1 new api methods

GetAccessKeyLastUsed (new) Link ΒΆ

Retrieves information about when the specified access key was last used. The information includes the date and time of last use, along with the AWS service and region that were specified in the last request made with that key.

Request Syntax

client.get_access_key_last_used(
    AccessKeyId='string'
)
type AccessKeyId

string

param AccessKeyId

[REQUIRED]

The identifier of an access key.

rtype

dict

returns

Response Syntax

{
    'UserName': 'string',
    'AccessKeyLastUsed': {
        'LastUsedDate': datetime(2015, 1, 1),
        'ServiceName': 'string',
        'Region': 'string'
    }
}

Response Structure

  • (dict) --

    Contains the response to a successful GetAccessKeyLastUsed request. It is also returned as a member of the AccessKeyMetaData structure returned by the ListAccessKeys action.

    • UserName (string) --

      The name of the AWS IAM user that owns this access key.

    • AccessKeyLastUsed (dict) --

      Contains information about the last time the access key was used.

      • LastUsedDate (datetime) --

        The date and time, in ISO 8601 date-time format, when the access key was most recently used.

      • ServiceName (string) --

        The name of the AWS service with which this access key was most recently used.

      • Region (string) --

        The AWS region where this access key was most recently used.

        For more information about AWS regions, see Regions and Endpoints in the Amazon Web Services General Reference.