Class PasswordPolicy
- java.lang.Object
-
- com.amazonaws.services.identitymanagement.model.PasswordPolicy
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class PasswordPolicy extends Object implements Serializable, Cloneable
Contains information about the account password policy.
This data type is used as a response element in the GetAccountPasswordPolicy action.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PasswordPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PasswordPolicy
clone()
boolean
equals(Object obj)
Boolean
getAllowUsersToChangePassword()
Specifies whether IAM users are allowed to change their own password.Boolean
getExpirePasswords()
Indicates whether passwords in the account expire.Boolean
getHardExpiry()
Specifies whether IAM users are prevented from setting a new password after their password has expired.Integer
getMaxPasswordAge()
The number of days that an IAM user password is valid.Integer
getMinimumPasswordLength()
Minimum length to require for IAM user passwords.Integer
getPasswordReusePrevention()
Specifies the number of previous passwords that IAM users are prevented from reusing.Boolean
getRequireLowercaseCharacters()
Specifies whether to require lowercase characters for IAM user passwords.Boolean
getRequireNumbers()
Specifies whether to require numbers for IAM user passwords.Boolean
getRequireSymbols()
Specifies whether to require symbols for IAM user passwords.Boolean
getRequireUppercaseCharacters()
Specifies whether to require uppercase characters for IAM user passwords.int
hashCode()
Boolean
isAllowUsersToChangePassword()
Specifies whether IAM users are allowed to change their own password.Boolean
isExpirePasswords()
Indicates whether passwords in the account expire.Boolean
isHardExpiry()
Specifies whether IAM users are prevented from setting a new password after their password has expired.Boolean
isRequireLowercaseCharacters()
Specifies whether to require lowercase characters for IAM user passwords.Boolean
isRequireNumbers()
Specifies whether to require numbers for IAM user passwords.Boolean
isRequireSymbols()
Specifies whether to require symbols for IAM user passwords.Boolean
isRequireUppercaseCharacters()
Specifies whether to require uppercase characters for IAM user passwords.void
setAllowUsersToChangePassword(Boolean allowUsersToChangePassword)
Specifies whether IAM users are allowed to change their own password.void
setExpirePasswords(Boolean expirePasswords)
Indicates whether passwords in the account expire.void
setHardExpiry(Boolean hardExpiry)
Specifies whether IAM users are prevented from setting a new password after their password has expired.void
setMaxPasswordAge(Integer maxPasswordAge)
The number of days that an IAM user password is valid.void
setMinimumPasswordLength(Integer minimumPasswordLength)
Minimum length to require for IAM user passwords.void
setPasswordReusePrevention(Integer passwordReusePrevention)
Specifies the number of previous passwords that IAM users are prevented from reusing.void
setRequireLowercaseCharacters(Boolean requireLowercaseCharacters)
Specifies whether to require lowercase characters for IAM user passwords.void
setRequireNumbers(Boolean requireNumbers)
Specifies whether to require numbers for IAM user passwords.void
setRequireSymbols(Boolean requireSymbols)
Specifies whether to require symbols for IAM user passwords.void
setRequireUppercaseCharacters(Boolean requireUppercaseCharacters)
Specifies whether to require uppercase characters for IAM user passwords.String
toString()
Returns a string representation of this object; useful for testing and debugging.PasswordPolicy
withAllowUsersToChangePassword(Boolean allowUsersToChangePassword)
Specifies whether IAM users are allowed to change their own password.PasswordPolicy
withExpirePasswords(Boolean expirePasswords)
Indicates whether passwords in the account expire.PasswordPolicy
withHardExpiry(Boolean hardExpiry)
Specifies whether IAM users are prevented from setting a new password after their password has expired.PasswordPolicy
withMaxPasswordAge(Integer maxPasswordAge)
The number of days that an IAM user password is valid.PasswordPolicy
withMinimumPasswordLength(Integer minimumPasswordLength)
Minimum length to require for IAM user passwords.PasswordPolicy
withPasswordReusePrevention(Integer passwordReusePrevention)
Specifies the number of previous passwords that IAM users are prevented from reusing.PasswordPolicy
withRequireLowercaseCharacters(Boolean requireLowercaseCharacters)
Specifies whether to require lowercase characters for IAM user passwords.PasswordPolicy
withRequireNumbers(Boolean requireNumbers)
Specifies whether to require numbers for IAM user passwords.PasswordPolicy
withRequireSymbols(Boolean requireSymbols)
Specifies whether to require symbols for IAM user passwords.PasswordPolicy
withRequireUppercaseCharacters(Boolean requireUppercaseCharacters)
Specifies whether to require uppercase characters for IAM user passwords.
-
-
-
Method Detail
-
setMinimumPasswordLength
public void setMinimumPasswordLength(Integer minimumPasswordLength)
Minimum length to require for IAM user passwords.
- Parameters:
minimumPasswordLength
- Minimum length to require for IAM user passwords.
-
getMinimumPasswordLength
public Integer getMinimumPasswordLength()
Minimum length to require for IAM user passwords.
- Returns:
- Minimum length to require for IAM user passwords.
-
withMinimumPasswordLength
public PasswordPolicy withMinimumPasswordLength(Integer minimumPasswordLength)
Minimum length to require for IAM user passwords.
- Parameters:
minimumPasswordLength
- Minimum length to require for IAM user passwords.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRequireSymbols
public void setRequireSymbols(Boolean requireSymbols)
Specifies whether to require symbols for IAM user passwords.
- Parameters:
requireSymbols
- Specifies whether to require symbols for IAM user passwords.
-
getRequireSymbols
public Boolean getRequireSymbols()
Specifies whether to require symbols for IAM user passwords.
- Returns:
- Specifies whether to require symbols for IAM user passwords.
-
withRequireSymbols
public PasswordPolicy withRequireSymbols(Boolean requireSymbols)
Specifies whether to require symbols for IAM user passwords.
- Parameters:
requireSymbols
- Specifies whether to require symbols for IAM user passwords.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isRequireSymbols
public Boolean isRequireSymbols()
Specifies whether to require symbols for IAM user passwords.
- Returns:
- Specifies whether to require symbols for IAM user passwords.
-
setRequireNumbers
public void setRequireNumbers(Boolean requireNumbers)
Specifies whether to require numbers for IAM user passwords.
- Parameters:
requireNumbers
- Specifies whether to require numbers for IAM user passwords.
-
getRequireNumbers
public Boolean getRequireNumbers()
Specifies whether to require numbers for IAM user passwords.
- Returns:
- Specifies whether to require numbers for IAM user passwords.
-
withRequireNumbers
public PasswordPolicy withRequireNumbers(Boolean requireNumbers)
Specifies whether to require numbers for IAM user passwords.
- Parameters:
requireNumbers
- Specifies whether to require numbers for IAM user passwords.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isRequireNumbers
public Boolean isRequireNumbers()
Specifies whether to require numbers for IAM user passwords.
- Returns:
- Specifies whether to require numbers for IAM user passwords.
-
setRequireUppercaseCharacters
public void setRequireUppercaseCharacters(Boolean requireUppercaseCharacters)
Specifies whether to require uppercase characters for IAM user passwords.
- Parameters:
requireUppercaseCharacters
- Specifies whether to require uppercase characters for IAM user passwords.
-
getRequireUppercaseCharacters
public Boolean getRequireUppercaseCharacters()
Specifies whether to require uppercase characters for IAM user passwords.
- Returns:
- Specifies whether to require uppercase characters for IAM user passwords.
-
withRequireUppercaseCharacters
public PasswordPolicy withRequireUppercaseCharacters(Boolean requireUppercaseCharacters)
Specifies whether to require uppercase characters for IAM user passwords.
- Parameters:
requireUppercaseCharacters
- Specifies whether to require uppercase characters for IAM user passwords.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isRequireUppercaseCharacters
public Boolean isRequireUppercaseCharacters()
Specifies whether to require uppercase characters for IAM user passwords.
- Returns:
- Specifies whether to require uppercase characters for IAM user passwords.
-
setRequireLowercaseCharacters
public void setRequireLowercaseCharacters(Boolean requireLowercaseCharacters)
Specifies whether to require lowercase characters for IAM user passwords.
- Parameters:
requireLowercaseCharacters
- Specifies whether to require lowercase characters for IAM user passwords.
-
getRequireLowercaseCharacters
public Boolean getRequireLowercaseCharacters()
Specifies whether to require lowercase characters for IAM user passwords.
- Returns:
- Specifies whether to require lowercase characters for IAM user passwords.
-
withRequireLowercaseCharacters
public PasswordPolicy withRequireLowercaseCharacters(Boolean requireLowercaseCharacters)
Specifies whether to require lowercase characters for IAM user passwords.
- Parameters:
requireLowercaseCharacters
- Specifies whether to require lowercase characters for IAM user passwords.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isRequireLowercaseCharacters
public Boolean isRequireLowercaseCharacters()
Specifies whether to require lowercase characters for IAM user passwords.
- Returns:
- Specifies whether to require lowercase characters for IAM user passwords.
-
setAllowUsersToChangePassword
public void setAllowUsersToChangePassword(Boolean allowUsersToChangePassword)
Specifies whether IAM users are allowed to change their own password.
- Parameters:
allowUsersToChangePassword
- Specifies whether IAM users are allowed to change their own password.
-
getAllowUsersToChangePassword
public Boolean getAllowUsersToChangePassword()
Specifies whether IAM users are allowed to change their own password.
- Returns:
- Specifies whether IAM users are allowed to change their own password.
-
withAllowUsersToChangePassword
public PasswordPolicy withAllowUsersToChangePassword(Boolean allowUsersToChangePassword)
Specifies whether IAM users are allowed to change their own password.
- Parameters:
allowUsersToChangePassword
- Specifies whether IAM users are allowed to change their own password.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isAllowUsersToChangePassword
public Boolean isAllowUsersToChangePassword()
Specifies whether IAM users are allowed to change their own password.
- Returns:
- Specifies whether IAM users are allowed to change their own password.
-
setExpirePasswords
public void setExpirePasswords(Boolean expirePasswords)
Indicates whether passwords in the account expire. Returns true if MaxPasswordAge is contains a value greater than 0. Returns false if MaxPasswordAge is 0 or not present.
- Parameters:
expirePasswords
- Indicates whether passwords in the account expire. Returns true if MaxPasswordAge is contains a value greater than 0. Returns false if MaxPasswordAge is 0 or not present.
-
getExpirePasswords
public Boolean getExpirePasswords()
Indicates whether passwords in the account expire. Returns true if MaxPasswordAge is contains a value greater than 0. Returns false if MaxPasswordAge is 0 or not present.
- Returns:
- Indicates whether passwords in the account expire. Returns true if MaxPasswordAge is contains a value greater than 0. Returns false if MaxPasswordAge is 0 or not present.
-
withExpirePasswords
public PasswordPolicy withExpirePasswords(Boolean expirePasswords)
Indicates whether passwords in the account expire. Returns true if MaxPasswordAge is contains a value greater than 0. Returns false if MaxPasswordAge is 0 or not present.
- Parameters:
expirePasswords
- Indicates whether passwords in the account expire. Returns true if MaxPasswordAge is contains a value greater than 0. Returns false if MaxPasswordAge is 0 or not present.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isExpirePasswords
public Boolean isExpirePasswords()
Indicates whether passwords in the account expire. Returns true if MaxPasswordAge is contains a value greater than 0. Returns false if MaxPasswordAge is 0 or not present.
- Returns:
- Indicates whether passwords in the account expire. Returns true if MaxPasswordAge is contains a value greater than 0. Returns false if MaxPasswordAge is 0 or not present.
-
setMaxPasswordAge
public void setMaxPasswordAge(Integer maxPasswordAge)
The number of days that an IAM user password is valid.
- Parameters:
maxPasswordAge
- The number of days that an IAM user password is valid.
-
getMaxPasswordAge
public Integer getMaxPasswordAge()
The number of days that an IAM user password is valid.
- Returns:
- The number of days that an IAM user password is valid.
-
withMaxPasswordAge
public PasswordPolicy withMaxPasswordAge(Integer maxPasswordAge)
The number of days that an IAM user password is valid.
- Parameters:
maxPasswordAge
- The number of days that an IAM user password is valid.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPasswordReusePrevention
public void setPasswordReusePrevention(Integer passwordReusePrevention)
Specifies the number of previous passwords that IAM users are prevented from reusing.
- Parameters:
passwordReusePrevention
- Specifies the number of previous passwords that IAM users are prevented from reusing.
-
getPasswordReusePrevention
public Integer getPasswordReusePrevention()
Specifies the number of previous passwords that IAM users are prevented from reusing.
- Returns:
- Specifies the number of previous passwords that IAM users are prevented from reusing.
-
withPasswordReusePrevention
public PasswordPolicy withPasswordReusePrevention(Integer passwordReusePrevention)
Specifies the number of previous passwords that IAM users are prevented from reusing.
- Parameters:
passwordReusePrevention
- Specifies the number of previous passwords that IAM users are prevented from reusing.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setHardExpiry
public void setHardExpiry(Boolean hardExpiry)
Specifies whether IAM users are prevented from setting a new password after their password has expired.
- Parameters:
hardExpiry
- Specifies whether IAM users are prevented from setting a new password after their password has expired.
-
getHardExpiry
public Boolean getHardExpiry()
Specifies whether IAM users are prevented from setting a new password after their password has expired.
- Returns:
- Specifies whether IAM users are prevented from setting a new password after their password has expired.
-
withHardExpiry
public PasswordPolicy withHardExpiry(Boolean hardExpiry)
Specifies whether IAM users are prevented from setting a new password after their password has expired.
- Parameters:
hardExpiry
- Specifies whether IAM users are prevented from setting a new password after their password has expired.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isHardExpiry
public Boolean isHardExpiry()
Specifies whether IAM users are prevented from setting a new password after their password has expired.
- Returns:
- Specifies whether IAM users are prevented from setting a new password after their password has expired.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public PasswordPolicy clone()
-
-