Class PasswordPolicy
- java.lang.Object
-
- software.amazon.awssdk.services.iam.model.PasswordPolicy
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<PasswordPolicy.Builder,PasswordPolicy>
@Generated("software.amazon.awssdk:codegen") public final class PasswordPolicy extends Object implements SdkPojo, Serializable, ToCopyableBuilder<PasswordPolicy.Builder,PasswordPolicy>
Contains information about the account password policy.
This data type is used as a response element in the GetAccountPasswordPolicy operation.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePasswordPolicy.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleanallowUsersToChangePassword()Specifies whether IAM users are allowed to change their own password.static PasswordPolicy.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)BooleanexpirePasswords()Indicates whether passwords in the account expire.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)BooleanhardExpiry()Specifies whether IAM users are prevented from setting a new password via the Amazon Web Services Management Console after their password has expired.inthashCode()IntegermaxPasswordAge()The number of days that an IAM user password is valid.IntegerminimumPasswordLength()Minimum length to require for IAM user passwords.IntegerpasswordReusePrevention()Specifies the number of previous passwords that IAM users are prevented from reusing.BooleanrequireLowercaseCharacters()Specifies whether IAM user passwords must contain at least one lowercase character (a to z).BooleanrequireNumbers()Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).BooleanrequireSymbols()Specifies whether IAM user passwords must contain at least one of the following symbols:BooleanrequireUppercaseCharacters()Specifies whether IAM user passwords must contain at least one uppercase character (A to Z).Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends PasswordPolicy.Builder>serializableBuilderClass()PasswordPolicy.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
minimumPasswordLength
public final Integer minimumPasswordLength()
Minimum length to require for IAM user passwords.
- Returns:
- Minimum length to require for IAM user passwords.
-
requireSymbols
public final Boolean requireSymbols()
Specifies whether IAM user passwords must contain at least one of the following symbols:
! @ # $ % ^ & * ( ) _ + - = [ ] { } | '
- Returns:
- Specifies whether IAM user passwords must contain at least one of the following symbols:
! @ # $ % ^ & * ( ) _ + - = [ ] { } | '
-
requireNumbers
public final Boolean requireNumbers()
Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).
- Returns:
- Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).
-
requireUppercaseCharacters
public final Boolean requireUppercaseCharacters()
Specifies whether IAM user passwords must contain at least one uppercase character (A to Z).
- Returns:
- Specifies whether IAM user passwords must contain at least one uppercase character (A to Z).
-
requireLowercaseCharacters
public final Boolean requireLowercaseCharacters()
Specifies whether IAM user passwords must contain at least one lowercase character (a to z).
- Returns:
- Specifies whether IAM user passwords must contain at least one lowercase character (a to z).
-
allowUsersToChangePassword
public final Boolean allowUsersToChangePassword()
Specifies whether IAM users are allowed to change their own password. Gives IAM users permissions to
iam:ChangePasswordfor only their user and to theiam:GetAccountPasswordPolicyaction. This option does not attach a permissions policy to each user, rather the permissions are applied at the account-level for all users by IAM.- Returns:
- Specifies whether IAM users are allowed to change their own password. Gives IAM users permissions to
iam:ChangePasswordfor only their user and to theiam:GetAccountPasswordPolicyaction. This option does not attach a permissions policy to each user, rather the permissions are applied at the account-level for all users by IAM.
-
expirePasswords
public final Boolean expirePasswords()
Indicates whether passwords in the account expire. Returns true if
MaxPasswordAgecontains 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
MaxPasswordAgecontains a value greater than 0. Returns false if MaxPasswordAge is 0 or not present.
-
maxPasswordAge
public final Integer maxPasswordAge()
The number of days that an IAM user password is valid.
- Returns:
- The number of days that an IAM user password is valid.
-
passwordReusePrevention
public final Integer passwordReusePrevention()
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.
-
hardExpiry
public final Boolean hardExpiry()
Specifies whether IAM users are prevented from setting a new password via the Amazon Web Services Management Console after their password has expired. The IAM user cannot access the console until an administrator resets the password. IAM users with
iam:ChangePasswordpermission and active access keys can reset their own expired console password using the CLI or API.- Returns:
- Specifies whether IAM users are prevented from setting a new password via the Amazon Web Services
Management Console after their password has expired. The IAM user cannot access the console until an
administrator resets the password. IAM users with
iam:ChangePasswordpermission and active access keys can reset their own expired console password using the CLI or API.
-
toBuilder
public PasswordPolicy.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<PasswordPolicy.Builder,PasswordPolicy>
-
builder
public static PasswordPolicy.Builder builder()
-
serializableBuilderClass
public static Class<? extends PasswordPolicy.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-