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.
Parameters:
-
access_key_id
(accessKeyIdType)
–
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.
Raises:
Source code in docs_src/capo_iam/_services/async_iam.py
| async def get_access_key_last_used(
self,
access_key_id: "capo_iam.types.access_key_id_type.accessKeyIdType",
*,
config_overrides: Optional[AsyncIAMClientConfig] = None,
) -> (
"capo_iam.types.get_access_key_last_used_response.GetAccessKeyLastUsedResponse"
):
"""<p>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.</p>
Args:
access_key_id: <p>The identifier of an access key.</p> <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters that can consist of any upper or lowercased letter or digit.</p>
Raises:
capo_iam.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_iam.types.get_access_key_last_used_request.GetAccessKeyLastUsedRequest]",
) -> AsyncOperationResponse[
"capo_iam.types.get_access_key_last_used_response.GetAccessKeyLastUsedResponse"
]:
import capo_iam._operations.aws_identity_management_v20100508.get_access_key_last_used
(
output,
http_response,
) = await capo_iam._operations.aws_identity_management_v20100508.get_access_key_last_used.async_get_access_key_last_used(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetAccessKeyLastUsed")
)
input_: capo_iam.types.get_access_key_last_used_request.GetAccessKeyLastUsedRequest = {
"access_key_id": access_key_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|