getLoginProfile method

Future<GetLoginProfileResponse> getLoginProfile({
  1. required String userName,
})

Retrieves the user name and password-creation date for the specified IAM user. If the user has not been assigned a password, the operation returns a 404 (NoSuchEntity) error.

May throw NoSuchEntityException. May throw ServiceFailureException.

Parameter userName : The name of the user whose login profile you want to retrieve.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

Implementation

Future<GetLoginProfileResponse> getLoginProfile({
  required String userName,
}) async {
  ArgumentError.checkNotNull(userName, 'userName');
  _s.validateStringLength(
    'userName',
    userName,
    1,
    64,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['UserName'] = userName;
  final $result = await _protocol.send(
    $request,
    action: 'GetLoginProfile',
    version: '2010-05-08',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['GetLoginProfileRequest'],
    shapes: shapes,
    resultWrapper: 'GetLoginProfileResult',
  );
  return GetLoginProfileResponse.fromXml($result);
}