Retrieves the user name for the specified IAM user. A login profile is created when
you create a password for the user to access the Amazon Web Services Management Console. If the user does not exist
or does not have a password, the operation returns a 404 (NoSuchEntity)
error.
If you create an IAM user with access to the console, the CreateDate
reflects the date you created the initial password for the user.
If you create an IAM user with programmatic access, and then later add a password
for the user to access the Amazon Web Services Management Console, the CreateDate reflects the initial
password creation date. A user with programmatic access does not have a login profile
unless you create a password for the user to access the Amazon Web Services Management Console.
Example
Use a bare-bones client and the command you need to make an API call.
Base exception class for all service exceptions from IAM service.
Example
To get password information for an IAM user
// The following command gets information about the password for the IAM user named Anika. constinput = { "UserName":"Anika" }; constcommand = newGetLoginProfileCommand(input); constresponse = awaitclient.send(command); /* response == { "LoginProfile": { "CreateDate": "2012-09-21T23:03:39Z", "UserName": "Anika" } } */ // example id: d6b580cc-909f-4925-9caa-d425cbc1ad47
Retrieves the user name for the specified IAM user. A login profile is created when you create a password for the user to access the Amazon Web Services Management Console. If the user does not exist or does not have a password, the operation returns a 404 (
NoSuchEntity
) error.If you create an IAM user with access to the console, the
CreateDate
reflects the date you created the initial password for the user.If you create an IAM user with programmatic access, and then later add a password for the user to access the Amazon Web Services Management Console, the
CreateDate
reflects the initial password creation date. A user with programmatic access does not have a login profile unless you create a password for the user to access the Amazon Web Services Management Console.Example
Use a bare-bones client and the command you need to make an API call.
Param
GetLoginProfileCommandInput
Returns
GetLoginProfileCommandOutput
See
input
shape.response
shape.config
shape.Throws
NoSuchEntityException (client fault)
The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.
Throws
ServiceFailureException (server fault)
The request processing has failed because of an unknown error, exception or failure.
Throws
IAMServiceException
Base exception class for all service exceptions from IAM service.
Example
To get password information for an IAM user