All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.cognito.outputs.UserPoolPasswordPolicy Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.cognito.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.Integer;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class UserPoolPasswordPolicy {
    /**
     * @return Minimum length of the password policy that you have set.
     * 
     */
    private @Nullable Integer minimumLength;
    /**
     * @return Number of previous passwords that you want Amazon Cognito to restrict each user from reusing. Users can't set a password that matches any of number of previous passwords specified by this argument. A value of 0 means that password history is not enforced. Valid values are between 0 and 24.
     * 
     * **Note:** This argument requires advanced security features to be active in the user pool.
     * 
     */
    private @Nullable Integer passwordHistorySize;
    /**
     * @return Whether you have required users to use at least one lowercase letter in their password.
     * 
     */
    private @Nullable Boolean requireLowercase;
    /**
     * @return Whether you have required users to use at least one number in their password.
     * 
     */
    private @Nullable Boolean requireNumbers;
    /**
     * @return Whether you have required users to use at least one symbol in their password.
     * 
     */
    private @Nullable Boolean requireSymbols;
    /**
     * @return Whether you have required users to use at least one uppercase letter in their password.
     * 
     */
    private @Nullable Boolean requireUppercase;
    /**
     * @return In the password policy you have set, refers to the number of days a temporary password is valid. If the user does not sign-in during this time, their password will need to be reset by an administrator.
     * 
     */
    private @Nullable Integer temporaryPasswordValidityDays;

    private UserPoolPasswordPolicy() {}
    /**
     * @return Minimum length of the password policy that you have set.
     * 
     */
    public Optional minimumLength() {
        return Optional.ofNullable(this.minimumLength);
    }
    /**
     * @return Number of previous passwords that you want Amazon Cognito to restrict each user from reusing. Users can't set a password that matches any of number of previous passwords specified by this argument. A value of 0 means that password history is not enforced. Valid values are between 0 and 24.
     * 
     * **Note:** This argument requires advanced security features to be active in the user pool.
     * 
     */
    public Optional passwordHistorySize() {
        return Optional.ofNullable(this.passwordHistorySize);
    }
    /**
     * @return Whether you have required users to use at least one lowercase letter in their password.
     * 
     */
    public Optional requireLowercase() {
        return Optional.ofNullable(this.requireLowercase);
    }
    /**
     * @return Whether you have required users to use at least one number in their password.
     * 
     */
    public Optional requireNumbers() {
        return Optional.ofNullable(this.requireNumbers);
    }
    /**
     * @return Whether you have required users to use at least one symbol in their password.
     * 
     */
    public Optional requireSymbols() {
        return Optional.ofNullable(this.requireSymbols);
    }
    /**
     * @return Whether you have required users to use at least one uppercase letter in their password.
     * 
     */
    public Optional requireUppercase() {
        return Optional.ofNullable(this.requireUppercase);
    }
    /**
     * @return In the password policy you have set, refers to the number of days a temporary password is valid. If the user does not sign-in during this time, their password will need to be reset by an administrator.
     * 
     */
    public Optional temporaryPasswordValidityDays() {
        return Optional.ofNullable(this.temporaryPasswordValidityDays);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(UserPoolPasswordPolicy defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Integer minimumLength;
        private @Nullable Integer passwordHistorySize;
        private @Nullable Boolean requireLowercase;
        private @Nullable Boolean requireNumbers;
        private @Nullable Boolean requireSymbols;
        private @Nullable Boolean requireUppercase;
        private @Nullable Integer temporaryPasswordValidityDays;
        public Builder() {}
        public Builder(UserPoolPasswordPolicy defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.minimumLength = defaults.minimumLength;
    	      this.passwordHistorySize = defaults.passwordHistorySize;
    	      this.requireLowercase = defaults.requireLowercase;
    	      this.requireNumbers = defaults.requireNumbers;
    	      this.requireSymbols = defaults.requireSymbols;
    	      this.requireUppercase = defaults.requireUppercase;
    	      this.temporaryPasswordValidityDays = defaults.temporaryPasswordValidityDays;
        }

        @CustomType.Setter
        public Builder minimumLength(@Nullable Integer minimumLength) {

            this.minimumLength = minimumLength;
            return this;
        }
        @CustomType.Setter
        public Builder passwordHistorySize(@Nullable Integer passwordHistorySize) {

            this.passwordHistorySize = passwordHistorySize;
            return this;
        }
        @CustomType.Setter
        public Builder requireLowercase(@Nullable Boolean requireLowercase) {

            this.requireLowercase = requireLowercase;
            return this;
        }
        @CustomType.Setter
        public Builder requireNumbers(@Nullable Boolean requireNumbers) {

            this.requireNumbers = requireNumbers;
            return this;
        }
        @CustomType.Setter
        public Builder requireSymbols(@Nullable Boolean requireSymbols) {

            this.requireSymbols = requireSymbols;
            return this;
        }
        @CustomType.Setter
        public Builder requireUppercase(@Nullable Boolean requireUppercase) {

            this.requireUppercase = requireUppercase;
            return this;
        }
        @CustomType.Setter
        public Builder temporaryPasswordValidityDays(@Nullable Integer temporaryPasswordValidityDays) {

            this.temporaryPasswordValidityDays = temporaryPasswordValidityDays;
            return this;
        }
        public UserPoolPasswordPolicy build() {
            final var _resultValue = new UserPoolPasswordPolicy();
            _resultValue.minimumLength = minimumLength;
            _resultValue.passwordHistorySize = passwordHistorySize;
            _resultValue.requireLowercase = requireLowercase;
            _resultValue.requireNumbers = requireNumbers;
            _resultValue.requireSymbols = requireSymbols;
            _resultValue.requireUppercase = requireUppercase;
            _resultValue.temporaryPasswordValidityDays = temporaryPasswordValidityDays;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy