GetLoginProfile - AWS Identity and Access Management

GetLoginProfile

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.

Request Syntax

{ "UserName": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

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: _+=,.@-

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [\w+=,.@-]+

Required: Yes

Response Syntax

{ "LoginProfile": { "CreateDate": number, "PasswordResetRequired": boolean, "UserName": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

LoginProfile

A structure containing the user name and password create date for the user.

Type: LoginProfile object

Errors

For information about the errors that are common to all actions, see Common Errors.

NoSuchEntityException

The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.

HTTP Status Code: 400

ServiceFailureException

The request processing has failed because of an unknown error, exception or failure.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of GetLoginProfile.

Sample Request

https://iam.amazonaws.com/?Action=GetLoginProfile &UserName=Bob &AUTHPARAMS

Sample Response

<GetLoginProfileResponse> <GetLoginProfileResult> <LoginProfile> <UserName>Bob</UserName> <CreateDate>2011-09-19T23:00:56Z</CreateDate> </LoginProfile> </GetLoginProfileResult> <ResponseMetadata> <RequestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</RequestId> </ResponseMetadata> </GetLoginProfileResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: