Skip to content

Create Login Profile

iam_create_login_profile R Documentation

Creates a password for the specified IAM user

Description

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 change_password 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.

Usage

iam_create_login_profile(UserName, Password, PasswordResetRequired)

Arguments

UserName

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

Password

The new password for the user.

This parameter must be omitted when you make the request with an AssumeRoot session. It is required in all other cases.

The regex pattern that is used to validate this parameter is a string of characters. That string can include almost any printable ASCII character from the space (U+0020) through the end of the ASCII character range (⁠U+00FF⁠). You can also include the tab (U+0009), line feed (⁠U+000A⁠), and carriage return (⁠U+000D⁠) 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.

PasswordResetRequired

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

Value

A list with the following syntax:

list(
  LoginProfile = list(
    UserName = "string",
    CreateDate = as.POSIXct(
      "2015-01-01"
    ),
    PasswordResetRequired = TRUE|FALSE
  )
)

Request syntax

svc$create_login_profile(
  UserName = "string",
  Password = "string",
  PasswordResetRequired = TRUE|FALSE
)

Examples

## Not run: 
# The following command changes IAM user Bob's password and sets the flag
# that required Bob to change the password the next time he signs in.
svc$create_login_profile(
  Password = "h]6EszR}vJ*m",
  PasswordResetRequired = TRUE,
  UserName = "Bob"
)

## End(Not run)