Skip to content

IAM  >  Operations  >  get_login_profile

get_login_profile

Operation

get_login_profile async

get_login_profile(request: GetLoginProfileInput | GetLoginProfileInputDict, /, *, plugins: list[Plugin] | None = None) -> GetLoginProfileOutput
get_login_profile(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetLoginProfileInputDict]) -> GetLoginProfileOutput

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.

Parameters:

Name Type Description Default
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetLoginProfileOutput

An instance of GetLoginProfileOutput.

Input

Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.

Model

GetLoginProfileInput dataclass

Bases: _SerdeShape

Dataclass for GetLoginProfileInput structure.

Attributes
user_name class-attribute instance-attribute
user_name: str | None = ...

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

This parameter is optional. If no user name is included, it defaults to the principal making the request. When you make this request with root user credentials, you must use an AssumeRoot session to omit the user name.

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

Dictionaries

GetLoginProfileInputDict

Bases: TypedDict

Dictionary form of GetLoginProfileInput.

Attributes
user_name instance-attribute
user_name: str | None

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

This parameter is optional. If no user name is included, it defaults to the principal making the request. When you make this request with root user credentials, you must use an AssumeRoot session to omit the user name.

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

Output

GetLoginProfileOutput dataclass

Bases: _SerdeShape

Contains the response to a successful GetLoginProfile request.

Attributes

login_profile instance-attribute
login_profile: LoginProfile

A structure containing the user name and the profile creation date for the user.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.