Skip to content

IAM  >  Operations  >  create_login_profile

create_login_profile

Operation

create_login_profile async

create_login_profile(input: CreateLoginProfileInput, plugins: list[Plugin] | None = None) -> CreateLoginProfileOutput

Creates a password for the specified IAM user. A password allows an IAM user to access Amazon Web Services services through the Amazon Web Services Management Console.

You can use the CLI, the Amazon Web Services API, or the Users page in the IAM console to create a password for any IAM user. Use ChangePassword to update your own existing password in the My Security Credentials page in the Amazon Web Services Management Console.

For more information about managing passwords, see Managing passwords in the IAM User Guide.

Parameters:

Name Type Description Default
input CreateLoginProfileInput

An instance of CreateLoginProfileInput.

required
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
CreateLoginProfileOutput

An instance of CreateLoginProfileOutput.

Input

CreateLoginProfileInput dataclass

Bases: _SerdeShape

Dataclass for CreateLoginProfileInput structure.

Attributes

password class-attribute instance-attribute
password: str | None = ...
The new password for the user.

This parameter must be omitted when you make the request with an
[AssumeRoot](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html)
session. It is required in all other cases.

The [regex pattern](http://wikipedia.org/wiki/regex) that is used to
validate this parameter is a string of characters. That string can
include almost any printable ASCII character from the space (` `)
through the end of the ASCII character range (`ΓΏ`). You can also
include the tab (`  `), line feed (`

), and carriage return ( `) characters. Any of these characters are valid in a password. However, many tools, such as the Amazon Web Services Management Console, might restrict the ability to type certain characters because they have special meaning within that tool.

password_reset_required class-attribute instance-attribute
password_reset_required: bool = ...

Specifies whether the user is required to set a new password on next sign-in.

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

The name of the IAM user to create a password for. The user must already exist.

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

CreateLoginProfileOutput dataclass

Bases: _SerdeShape

Contains the response to a successful CreateLoginProfile request.

Attributes

login_profile instance-attribute
login_profile: LoginProfile

A structure containing the user name and password create date.

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.