Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.identitymanagement.model;
 
 
Container for the parameters to the UpdateAccountPasswordPolicy operation.

Updates the password policy settings for the AWS account.

NOTE: This action does not support partial updates. No parameters are required, but if you do not specify a parameter, that parameter's value reverts to its default value. See the Request Parameters section for each parameter's default value.

For more information about using a password policy, see Managing an IAM Password Policy in the Using IAM guide.

 
 public class UpdateAccountPasswordPolicyRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The minimum number of characters allowed in an IAM user password.

Default value: 6

Constraints:
Range: 6 - 128

 
     private Integer minimumPasswordLength;

    
Specifies whether IAM user passwords must contain at least one of the following non-alphanumeric characters:

!

:
# $ % ^ & * ( ) _ + - = [ ] { } | '

Default value: false

 
     private Boolean requireSymbols;

    
Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).

Default value: false

 
     private Boolean requireNumbers;

    
Specifies whether IAM user passwords must contain at least one uppercase character from the ISO basic Latin alphabet (A to Z).

Default value: false

 
     private Boolean requireUppercaseCharacters;

    
Specifies whether IAM user passwords must contain at least one lowercase character from the ISO basic Latin alphabet (a to z).

Default value: false

 
     private Boolean requireLowercaseCharacters;

    
Allows all IAM users in your account to use the AWS Management Console to change their own passwords. For more information, see Letting IAM Users Change Their Own Passwords in the Using IAM guide.

Default value: false

 
     private Boolean allowUsersToChangePassword;

    
The number of days that an IAM user password is valid. The default value of 0 means IAM user passwords never expire.

Default value: 0

Constraints:
Range: 1 - 1095

 
     private Integer maxPasswordAge;

    
Specifies the number of previous passwords that IAM users are prevented from reusing. The default value of 0 means IAM users are not prevented from reusing previous passwords.

Default value: 0

Constraints:
Range: 1 - 24

    private Integer passwordReusePrevention;

    
Prevents IAM users from setting a new password after their password has expired.

Default value: false

    private Boolean hardExpiry;

    
The minimum number of characters allowed in an IAM user password.

Default value: 6

Constraints:
Range: 6 - 128

Returns:
The minimum number of characters allowed in an IAM user password.

Default value: 6

    public Integer getMinimumPasswordLength() {
        return ;
    }
    
    
The minimum number of characters allowed in an IAM user password.

Default value: 6

Constraints:
Range: 6 - 128

Parameters:
minimumPasswordLength The minimum number of characters allowed in an IAM user password.

Default value: 6

    public void setMinimumPasswordLength(Integer minimumPasswordLength) {
        this. = minimumPasswordLength;
    }
    
    
The minimum number of characters allowed in an IAM user password.

Default value: 6

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 6 - 128

Parameters:
minimumPasswordLength The minimum number of characters allowed in an IAM user password.

Default value: 6

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateAccountPasswordPolicyRequest withMinimumPasswordLength(Integer minimumPasswordLength) {
        this. = minimumPasswordLength;
        return this;
    }

    
Specifies whether IAM user passwords must contain at least one of the following non-alphanumeric characters:

!

Returns:
Specifies whether IAM user passwords must contain at least one of the following non-alphanumeric characters:

! @ # $ % ^ & * ( ) _ + - = [ ] { } | '

Default value: false

:
# $ % ^ & * ( ) _ + - = [ ] { } | '

Default value: false

    public Boolean isRequireSymbols() {
        return ;
    }
    
    
Specifies whether IAM user passwords must contain at least one of the following non-alphanumeric characters:

!

Parameters:
requireSymbols Specifies whether IAM user passwords must contain at least one of the following non-alphanumeric characters:

! @ # $ % ^ & * ( ) _ + - = [ ] { } | '

Default value: false

:
# $ % ^ & * ( ) _ + - = [ ] { } | '

Default value: false

    public void setRequireSymbols(Boolean requireSymbols) {
        this. = requireSymbols;
    }
    
    
Specifies whether IAM user passwords must contain at least one of the following non-alphanumeric characters:

!

Parameters:
requireSymbols Specifies whether IAM user passwords must contain at least one of the following non-alphanumeric characters:

! @ # $ % ^ & * ( ) _ + - = [ ] { } | '

Default value: false

Returns:
A reference to this updated object so that method calls can be chained together.
:
# $ % ^ & * ( ) _ + - = [ ] { } | '

Default value: false

Returns a reference to this object so that method calls can be chained together.

        this. = requireSymbols;
        return this;
    }

    
Specifies whether IAM user passwords must contain at least one of the following non-alphanumeric characters:

!

Returns:
Specifies whether IAM user passwords must contain at least one of the following non-alphanumeric characters:

! @ # $ % ^ & * ( ) _ + - = [ ] { } | '

Default value: false

:
# $ % ^ & * ( ) _ + - = [ ] { } | '

Default value: false

    public Boolean getRequireSymbols() {
        return ;
    }

    
Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).

Default value: false

Returns:
Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).

Default value: false

    public Boolean isRequireNumbers() {
        return ;
    }
    
    
Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).

Default value: false

Parameters:
requireNumbers Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).

Default value: false

    public void setRequireNumbers(Boolean requireNumbers) {
        this. = requireNumbers;
    }
    
    
Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).

Default value: false

Returns a reference to this object so that method calls can be chained together.

Parameters:
requireNumbers Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).

Default value: false

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = requireNumbers;
        return this;
    }

    
Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).

Default value: false

Returns:
Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).

Default value: false

    public Boolean getRequireNumbers() {
        return ;
    }

    
Specifies whether IAM user passwords must contain at least one uppercase character from the ISO basic Latin alphabet (A to Z).

Default value: false

Returns:
Specifies whether IAM user passwords must contain at least one uppercase character from the ISO basic Latin alphabet (A to Z).

Default value: false

        return ;
    }
    
    
Specifies whether IAM user passwords must contain at least one uppercase character from the ISO basic Latin alphabet (A to Z).

Default value: false

Parameters:
requireUppercaseCharacters Specifies whether IAM user passwords must contain at least one uppercase character from the ISO basic Latin alphabet (A to Z).

Default value: false

    public void setRequireUppercaseCharacters(Boolean requireUppercaseCharacters) {
        this. = requireUppercaseCharacters;
    }
    
    
Specifies whether IAM user passwords must contain at least one uppercase character from the ISO basic Latin alphabet (A to Z).

Default value: false

Returns a reference to this object so that method calls can be chained together.

Parameters:
requireUppercaseCharacters Specifies whether IAM user passwords must contain at least one uppercase character from the ISO basic Latin alphabet (A to Z).

Default value: false

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateAccountPasswordPolicyRequest withRequireUppercaseCharacters(Boolean requireUppercaseCharacters) {
        this. = requireUppercaseCharacters;
        return this;
    }

    
Specifies whether IAM user passwords must contain at least one uppercase character from the ISO basic Latin alphabet (A to Z).

Default value: false

Returns:
Specifies whether IAM user passwords must contain at least one uppercase character from the ISO basic Latin alphabet (A to Z).

Default value: false

        return ;
    }

    
Specifies whether IAM user passwords must contain at least one lowercase character from the ISO basic Latin alphabet (a to z).

Default value: false

Returns:
Specifies whether IAM user passwords must contain at least one lowercase character from the ISO basic Latin alphabet (a to z).

Default value: false

        return ;
    }
    
    
Specifies whether IAM user passwords must contain at least one lowercase character from the ISO basic Latin alphabet (a to z).

Default value: false

Parameters:
requireLowercaseCharacters Specifies whether IAM user passwords must contain at least one lowercase character from the ISO basic Latin alphabet (a to z).

Default value: false

    public void setRequireLowercaseCharacters(Boolean requireLowercaseCharacters) {
        this. = requireLowercaseCharacters;
    }
    
    
Specifies whether IAM user passwords must contain at least one lowercase character from the ISO basic Latin alphabet (a to z).

Default value: false

Returns a reference to this object so that method calls can be chained together.

Parameters:
requireLowercaseCharacters Specifies whether IAM user passwords must contain at least one lowercase character from the ISO basic Latin alphabet (a to z).

Default value: false

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateAccountPasswordPolicyRequest withRequireLowercaseCharacters(Boolean requireLowercaseCharacters) {
        this. = requireLowercaseCharacters;
        return this;
    }

    
Specifies whether IAM user passwords must contain at least one lowercase character from the ISO basic Latin alphabet (a to z).

Default value: false

Returns:
Specifies whether IAM user passwords must contain at least one lowercase character from the ISO basic Latin alphabet (a to z).

Default value: false

        return ;
    }

    
Allows all IAM users in your account to use the AWS Management Console to change their own passwords. For more information, see Letting IAM Users Change Their Own Passwords in the Using IAM guide.

Default value: false

Returns:
Allows all IAM users in your account to use the AWS Management Console to change their own passwords. For more information, see Letting IAM Users Change Their Own Passwords in the Using IAM guide.

Default value: false

        return ;
    }
    
    
Allows all IAM users in your account to use the AWS Management Console to change their own passwords. For more information, see Letting IAM Users Change Their Own Passwords in the Using IAM guide.

Default value: false

Parameters:
allowUsersToChangePassword Allows all IAM users in your account to use the AWS Management Console to change their own passwords. For more information, see Letting IAM Users Change Their Own Passwords in the Using IAM guide.

Default value: false

    public void setAllowUsersToChangePassword(Boolean allowUsersToChangePassword) {
        this. = allowUsersToChangePassword;
    }
    
    
Allows all IAM users in your account to use the AWS Management Console to change their own passwords. For more information, see Letting IAM Users Change Their Own Passwords in the Using IAM guide.

Default value: false

Returns a reference to this object so that method calls can be chained together.

Parameters:
allowUsersToChangePassword Allows all IAM users in your account to use the AWS Management Console to change their own passwords. For more information, see Letting IAM Users Change Their Own Passwords in the Using IAM guide.

Default value: false

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateAccountPasswordPolicyRequest withAllowUsersToChangePassword(Boolean allowUsersToChangePassword) {
        this. = allowUsersToChangePassword;
        return this;
    }

    
Allows all IAM users in your account to use the AWS Management Console to change their own passwords. For more information, see Letting IAM Users Change Their Own Passwords in the Using IAM guide.

Default value: false

Returns:
Allows all IAM users in your account to use the AWS Management Console to change their own passwords. For more information, see Letting IAM Users Change Their Own Passwords in the Using IAM guide.

Default value: false

        return ;
    }

    
The number of days that an IAM user password is valid. The default value of 0 means IAM user passwords never expire.

Default value: 0

Constraints:
Range: 1 - 1095

Returns:
The number of days that an IAM user password is valid. The default value of 0 means IAM user passwords never expire.

Default value: 0

    public Integer getMaxPasswordAge() {
        return ;
    }
    
    
The number of days that an IAM user password is valid. The default value of 0 means IAM user passwords never expire.

Default value: 0

Constraints:
Range: 1 - 1095

Parameters:
maxPasswordAge The number of days that an IAM user password is valid. The default value of 0 means IAM user passwords never expire.

Default value: 0

    public void setMaxPasswordAge(Integer maxPasswordAge) {
        this. = maxPasswordAge;
    }
    
    
The number of days that an IAM user password is valid. The default value of 0 means IAM user passwords never expire.

Default value: 0

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 1 - 1095

Parameters:
maxPasswordAge The number of days that an IAM user password is valid. The default value of 0 means IAM user passwords never expire.

Default value: 0

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = maxPasswordAge;
        return this;
    }

    
Specifies the number of previous passwords that IAM users are prevented from reusing. The default value of 0 means IAM users are not prevented from reusing previous passwords.

Default value: 0

Constraints:
Range: 1 - 24

Returns:
Specifies the number of previous passwords that IAM users are prevented from reusing. The default value of 0 means IAM users are not prevented from reusing previous passwords.

Default value: 0

        return ;
    }
    
    
Specifies the number of previous passwords that IAM users are prevented from reusing. The default value of 0 means IAM users are not prevented from reusing previous passwords.

Default value: 0

Constraints:
Range: 1 - 24

Parameters:
passwordReusePrevention Specifies the number of previous passwords that IAM users are prevented from reusing. The default value of 0 means IAM users are not prevented from reusing previous passwords.

Default value: 0

    public void setPasswordReusePrevention(Integer passwordReusePrevention) {
        this. = passwordReusePrevention;
    }
    
    
Specifies the number of previous passwords that IAM users are prevented from reusing. The default value of 0 means IAM users are not prevented from reusing previous passwords.

Default value: 0

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 1 - 24

Parameters:
passwordReusePrevention Specifies the number of previous passwords that IAM users are prevented from reusing. The default value of 0 means IAM users are not prevented from reusing previous passwords.

Default value: 0

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateAccountPasswordPolicyRequest withPasswordReusePrevention(Integer passwordReusePrevention) {
        this. = passwordReusePrevention;
        return this;
    }

    
Prevents IAM users from setting a new password after their password has expired.

Default value: false

Returns:
Prevents IAM users from setting a new password after their password has expired.

Default value: false

    public Boolean isHardExpiry() {
        return ;
    }
    
    
Prevents IAM users from setting a new password after their password has expired.

Default value: false

Parameters:
hardExpiry Prevents IAM users from setting a new password after their password has expired.

Default value: false

    public void setHardExpiry(Boolean hardExpiry) {
        this. = hardExpiry;
    }
    
    
Prevents IAM users from setting a new password after their password has expired.

Default value: false

Returns a reference to this object so that method calls can be chained together.

Parameters:
hardExpiry Prevents IAM users from setting a new password after their password has expired.

Default value: false

Returns:
A reference to this updated object so that method calls can be chained together.
        this. = hardExpiry;
        return this;
    }

    
Prevents IAM users from setting a new password after their password has expired.

Default value: false

Returns:
Prevents IAM users from setting a new password after their password has expired.

Default value: false

    public Boolean getHardExpiry() {
        return ;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getMinimumPasswordLength() != nullsb.append("MinimumPasswordLength: " + getMinimumPasswordLength() + ",");
        if (isRequireSymbols() != nullsb.append("RequireSymbols: " + isRequireSymbols() + ",");
        if (isRequireNumbers() != nullsb.append("RequireNumbers: " + isRequireNumbers() + ",");
        if (isRequireUppercaseCharacters() != nullsb.append("RequireUppercaseCharacters: " + isRequireUppercaseCharacters() + ",");
        if (isRequireLowercaseCharacters() != nullsb.append("RequireLowercaseCharacters: " + isRequireLowercaseCharacters() + ",");
        if (isAllowUsersToChangePassword() != nullsb.append("AllowUsersToChangePassword: " + isAllowUsersToChangePassword() + ",");
        if (getMaxPasswordAge() != nullsb.append("MaxPasswordAge: " + getMaxPasswordAge() + ",");
        if (getPasswordReusePrevention() != nullsb.append("PasswordReusePrevention: " + getPasswordReusePrevention() + ",");
        if (isHardExpiry() != nullsb.append("HardExpiry: " + isHardExpiry() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getMinimumPasswordLength() == null) ? 0 : getMinimumPasswordLength().hashCode()); 
        hashCode = prime * hashCode + ((isRequireSymbols() == null) ? 0 : isRequireSymbols().hashCode()); 
        hashCode = prime * hashCode + ((isRequireNumbers() == null) ? 0 : isRequireNumbers().hashCode()); 
        hashCode = prime * hashCode + ((isRequireUppercaseCharacters() == null) ? 0 : isRequireUppercaseCharacters().hashCode()); 
        hashCode = prime * hashCode + ((isRequireLowercaseCharacters() == null) ? 0 : isRequireLowercaseCharacters().hashCode()); 
        hashCode = prime * hashCode + ((isAllowUsersToChangePassword() == null) ? 0 : isAllowUsersToChangePassword().hashCode()); 
        hashCode = prime * hashCode + ((getMaxPasswordAge() == null) ? 0 : getMaxPasswordAge().hashCode()); 
        hashCode = prime * hashCode + ((getPasswordReusePrevention() == null) ? 0 : getPasswordReusePrevention().hashCode()); 
        hashCode = prime * hashCode + ((isHardExpiry() == null) ? 0 : isHardExpiry().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof UpdateAccountPasswordPolicyRequest == falsereturn false;
        
        if (other.getMinimumPasswordLength() == null ^ this.getMinimumPasswordLength() == nullreturn false;
        if (other.getMinimumPasswordLength() != null && other.getMinimumPasswordLength().equals(this.getMinimumPasswordLength()) == falsereturn false
        if (other.isRequireSymbols() == null ^ this.isRequireSymbols() == nullreturn false;
        if (other.isRequireSymbols() != null && other.isRequireSymbols().equals(this.isRequireSymbols()) == falsereturn false
        if (other.isRequireNumbers() == null ^ this.isRequireNumbers() == nullreturn false;
        if (other.isRequireNumbers() != null && other.isRequireNumbers().equals(this.isRequireNumbers()) == falsereturn false
        if (other.isRequireUppercaseCharacters() == null ^ this.isRequireUppercaseCharacters() == nullreturn false;
        if (other.isRequireUppercaseCharacters() != null && other.isRequireUppercaseCharacters().equals(this.isRequireUppercaseCharacters()) == falsereturn false
        if (other.isRequireLowercaseCharacters() == null ^ this.isRequireLowercaseCharacters() == nullreturn false;
        if (other.isRequireLowercaseCharacters() != null && other.isRequireLowercaseCharacters().equals(this.isRequireLowercaseCharacters()) == falsereturn false
        if (other.isAllowUsersToChangePassword() == null ^ this.isAllowUsersToChangePassword() == nullreturn false;
        if (other.isAllowUsersToChangePassword() != null && other.isAllowUsersToChangePassword().equals(this.isAllowUsersToChangePassword()) == falsereturn false
        if (other.getMaxPasswordAge() == null ^ this.getMaxPasswordAge() == nullreturn false;
        if (other.getMaxPasswordAge() != null && other.getMaxPasswordAge().equals(this.getMaxPasswordAge()) == falsereturn false
        if (other.getPasswordReusePrevention() == null ^ this.getPasswordReusePrevention() == nullreturn false;
        if (other.getPasswordReusePrevention() != null && other.getPasswordReusePrevention().equals(this.getPasswordReusePrevention()) == falsereturn false
        if (other.isHardExpiry() == null ^ this.isHardExpiry() == nullreturn false;
        if (other.isHardExpiry() != null && other.isHardExpiry().equals(this.isHardExpiry()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (UpdateAccountPasswordPolicyRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X