getAccessKeyLastUsed method

Future<GetAccessKeyLastUsedResponse> getAccessKeyLastUsed({
  1. required String accessKeyId,
})

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.

Parameter accessKeyId : 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.

Implementation

Future<GetAccessKeyLastUsedResponse> getAccessKeyLastUsed({
  required String accessKeyId,
}) async {
  ArgumentError.checkNotNull(accessKeyId, 'accessKeyId');
  _s.validateStringLength(
    'accessKeyId',
    accessKeyId,
    16,
    128,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['AccessKeyId'] = accessKeyId;
  final $result = await _protocol.send(
    $request,
    action: 'GetAccessKeyLastUsed',
    version: '2010-05-08',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['GetAccessKeyLastUsedRequest'],
    shapes: shapes,
    resultWrapper: 'GetAccessKeyLastUsedResult',
  );
  return GetAccessKeyLastUsedResponse.fromXml($result);
}