UpdateLoginProfile
Changes the password or the maximum sign-in session duration for the specified IAM user. You can use the AWS CLI, the AWS API, or the Users page in the IAM console to change the password for any IAM user. Use ChangePassword to change your own password in the My Security Credentials page in the AWS Management Console.
For more information about modifying passwords, see Managing passwords in the IAM User Guide.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
- MaxSigninSessionDuration
-
The maximum duration (in seconds) of an AWS Sign-In session that uses the specified IAM user's login profile (user name and password). This setting can have a value from 1 hour (3600 seconds) to 90 days (7776000 seconds), inclusive.
This setting applies only to sessions created through OAuth-based flows (
signin:CreateOAuth2Token). It does not affect AWS Management Console browser sessions or traditional STS sessions.If you omit both this parameter and
ResetMaxSigninSessionDuration, the current setting is unchanged. You cannot specify this parameter and setResetMaxSigninSessionDurationtotruein the same request. If you update only the sign-in session duration, the user's password andPasswordResetRequiredsetting do not change.Changes to this setting apply to new sign-in sessions. Sessions that are already established are not affected.
NoteThis setting is not supported for the root user.
Type: Integer
Valid Range: Minimum value of 3600. Maximum value of 7776000.
Required: No
- Password
-
The new password for the specified IAM user.
The regex pattern
used to validate this parameter is a string of characters consisting of the following: -
Any printable ASCII character ranging from the space character (
\u0020) through the end of the ASCII character range -
The printable characters in the Basic Latin and Latin-1 Supplement character set (through
\u00FF) -
The special characters tab (
\u0009), line feed (\u000A), and carriage return (\u000D)
However, the format can be further restricted by the account administrator by setting a password policy on the AWS account. For more information, see UpdateAccountPasswordPolicy.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern:
[\u0009\u000A\u000D\u0020-\u00FF]+Required: No
-
- PasswordResetRequired
-
Allows this new password to be used only once by requiring the specified IAM user to set a new password on next sign-in.
Type: Boolean
Required: No
- ResetMaxSigninSessionDuration
-
Specifies whether to clear the maximum sign-in session duration on the specified IAM user's login profile. Set this value to
trueto return the setting to its unset state, so that the existing sign-in session behavior applies.If you set this value to
falseor omit it, the current setting is not cleared. You cannot set this value totrueand specifyMaxSigninSessionDurationin the same request. Clearing a setting that is already unset has no effect.Type: Boolean
Required: No
- UserName
-
The name of the user whose password you want to update.
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
Errors
For information about the errors that are common to all actions, see Common Error Types.
- EntityTemporarilyUnmodifiable
-
The request was rejected because it referenced an entity that is temporarily unmodifiable, such as a user name that was deleted and then recreated. The error indicates that the request is likely to succeed if you try again after waiting several minutes. The error message describes the entity.
HTTP Status Code: 409
- InvalidInput
-
The request was rejected because an invalid or out-of-range value was supplied for an input parameter.
HTTP Status Code: 400
- LimitExceeded
-
The request was rejected because it attempted to create resources beyond the current AWS account limits. The error message describes the limit exceeded.
HTTP Status Code: 409
- NoSuchEntity
-
The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.
HTTP Status Code: 404
- PasswordPolicyViolation
-
The request was rejected because the provided password did not meet the requirements imposed by the account password policy.
HTTP Status Code: 400
- ServiceFailure
-
The request processing has failed because of an unknown error, exception or failure.
HTTP Status Code: 500
Examples
Example
This example illustrates one usage of UpdateLoginProfile.
Sample Request
https://iam.amazonaws.com/?Action=UpdateLoginProfile
&UserName=Bob
&Password=^L[p*#Z*8o)K
&Version=2010-05-08
&AUTHPARAMS
Sample Response
<UpdateLoginProfileResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">
<ResponseMetadata>
<RequestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</RequestId>
</ResponseMetadata>
</UpdateLoginProfileResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: