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

com.pulumi.awsnative.cognito.kotlin.inputs.UserPoolPasswordPolicyArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.cognito.kotlin.inputs

import com.pulumi.awsnative.cognito.inputs.UserPoolPasswordPolicyArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property minimumLength The minimum length of the password in the policy that you have set. This value can't be less than 6.
 * @property passwordHistorySize The 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 `n` previous passwords, where `n` is the value of `PasswordHistorySize` .
 * Password history isn't enforced and isn't displayed in [DescribeUserPool](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html) responses when you set this value to `0` or don't provide it. To activate this setting, [advanced security features](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html) must be active in your user pool.
 * @property requireLowercase The requirement in a password policy that users must include at least one lowercase letter in their password.
 * @property requireNumbers The requirement in a password policy that users must include at least one number in their password.
 * @property requireSymbols The requirement in a password policy that users must include at least one symbol in their password.
 * @property requireUppercase The requirement in a password policy that users must include at least one uppercase letter in their password.
 * @property temporaryPasswordValidityDays The number of days a temporary password is valid in the password policy. If the user doesn't sign in during this time, an administrator must reset their password. Defaults to `7` . If you submit a value of `0` , Amazon Cognito treats it as a null value and sets `TemporaryPasswordValidityDays` to its default value.
 * > When you set `TemporaryPasswordValidityDays` for a user pool, you can no longer set a value for the legacy `UnusedAccountValidityDays` parameter in that user pool.
 */
public data class UserPoolPasswordPolicyArgs(
    public val minimumLength: Output? = null,
    public val passwordHistorySize: Output? = null,
    public val requireLowercase: Output? = null,
    public val requireNumbers: Output? = null,
    public val requireSymbols: Output? = null,
    public val requireUppercase: Output? = null,
    public val temporaryPasswordValidityDays: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.cognito.inputs.UserPoolPasswordPolicyArgs =
        com.pulumi.awsnative.cognito.inputs.UserPoolPasswordPolicyArgs.builder()
            .minimumLength(minimumLength?.applyValue({ args0 -> args0 }))
            .passwordHistorySize(passwordHistorySize?.applyValue({ args0 -> args0 }))
            .requireLowercase(requireLowercase?.applyValue({ args0 -> args0 }))
            .requireNumbers(requireNumbers?.applyValue({ args0 -> args0 }))
            .requireSymbols(requireSymbols?.applyValue({ args0 -> args0 }))
            .requireUppercase(requireUppercase?.applyValue({ args0 -> args0 }))
            .temporaryPasswordValidityDays(
                temporaryPasswordValidityDays?.applyValue({ args0 ->
                    args0
                }),
            ).build()
}

/**
 * Builder for [UserPoolPasswordPolicyArgs].
 */
@PulumiTagMarker
public class UserPoolPasswordPolicyArgsBuilder internal constructor() {
    private var minimumLength: Output? = null

    private var passwordHistorySize: Output? = null

    private var requireLowercase: Output? = null

    private var requireNumbers: Output? = null

    private var requireSymbols: Output? = null

    private var requireUppercase: Output? = null

    private var temporaryPasswordValidityDays: Output? = null

    /**
     * @param value The minimum length of the password in the policy that you have set. This value can't be less than 6.
     */
    @JvmName("tamvyupubbihfrjg")
    public suspend fun minimumLength(`value`: Output) {
        this.minimumLength = value
    }

    /**
     * @param value The 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 `n` previous passwords, where `n` is the value of `PasswordHistorySize` .
     * Password history isn't enforced and isn't displayed in [DescribeUserPool](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html) responses when you set this value to `0` or don't provide it. To activate this setting, [advanced security features](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html) must be active in your user pool.
     */
    @JvmName("dpcpfsmelfwpytmh")
    public suspend fun passwordHistorySize(`value`: Output) {
        this.passwordHistorySize = value
    }

    /**
     * @param value The requirement in a password policy that users must include at least one lowercase letter in their password.
     */
    @JvmName("eyubcfidmassomjm")
    public suspend fun requireLowercase(`value`: Output) {
        this.requireLowercase = value
    }

    /**
     * @param value The requirement in a password policy that users must include at least one number in their password.
     */
    @JvmName("ruifgqvwtvcemolh")
    public suspend fun requireNumbers(`value`: Output) {
        this.requireNumbers = value
    }

    /**
     * @param value The requirement in a password policy that users must include at least one symbol in their password.
     */
    @JvmName("cahoxqtssechslmf")
    public suspend fun requireSymbols(`value`: Output) {
        this.requireSymbols = value
    }

    /**
     * @param value The requirement in a password policy that users must include at least one uppercase letter in their password.
     */
    @JvmName("vqvrmlnnuadnbpgh")
    public suspend fun requireUppercase(`value`: Output) {
        this.requireUppercase = value
    }

    /**
     * @param value The number of days a temporary password is valid in the password policy. If the user doesn't sign in during this time, an administrator must reset their password. Defaults to `7` . If you submit a value of `0` , Amazon Cognito treats it as a null value and sets `TemporaryPasswordValidityDays` to its default value.
     * > When you set `TemporaryPasswordValidityDays` for a user pool, you can no longer set a value for the legacy `UnusedAccountValidityDays` parameter in that user pool.
     */
    @JvmName("elwgpylgvddgserk")
    public suspend fun temporaryPasswordValidityDays(`value`: Output) {
        this.temporaryPasswordValidityDays = value
    }

    /**
     * @param value The minimum length of the password in the policy that you have set. This value can't be less than 6.
     */
    @JvmName("rxwrepwfirptwwrb")
    public suspend fun minimumLength(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minimumLength = mapped
    }

    /**
     * @param value The 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 `n` previous passwords, where `n` is the value of `PasswordHistorySize` .
     * Password history isn't enforced and isn't displayed in [DescribeUserPool](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html) responses when you set this value to `0` or don't provide it. To activate this setting, [advanced security features](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html) must be active in your user pool.
     */
    @JvmName("yyrgnhtnqmbpckqe")
    public suspend fun passwordHistorySize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.passwordHistorySize = mapped
    }

    /**
     * @param value The requirement in a password policy that users must include at least one lowercase letter in their password.
     */
    @JvmName("xfhwwiikasixetwo")
    public suspend fun requireLowercase(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requireLowercase = mapped
    }

    /**
     * @param value The requirement in a password policy that users must include at least one number in their password.
     */
    @JvmName("rkvoxqxilocdriip")
    public suspend fun requireNumbers(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requireNumbers = mapped
    }

    /**
     * @param value The requirement in a password policy that users must include at least one symbol in their password.
     */
    @JvmName("skoulpdjujbrumsh")
    public suspend fun requireSymbols(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requireSymbols = mapped
    }

    /**
     * @param value The requirement in a password policy that users must include at least one uppercase letter in their password.
     */
    @JvmName("ilqnacotsyebropr")
    public suspend fun requireUppercase(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requireUppercase = mapped
    }

    /**
     * @param value The number of days a temporary password is valid in the password policy. If the user doesn't sign in during this time, an administrator must reset their password. Defaults to `7` . If you submit a value of `0` , Amazon Cognito treats it as a null value and sets `TemporaryPasswordValidityDays` to its default value.
     * > When you set `TemporaryPasswordValidityDays` for a user pool, you can no longer set a value for the legacy `UnusedAccountValidityDays` parameter in that user pool.
     */
    @JvmName("nbkaaiisligavxvb")
    public suspend fun temporaryPasswordValidityDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.temporaryPasswordValidityDays = mapped
    }

    internal fun build(): UserPoolPasswordPolicyArgs = UserPoolPasswordPolicyArgs(
        minimumLength = minimumLength,
        passwordHistorySize = passwordHistorySize,
        requireLowercase = requireLowercase,
        requireNumbers = requireNumbers,
        requireSymbols = requireSymbols,
        requireUppercase = requireUppercase,
        temporaryPasswordValidityDays = temporaryPasswordValidityDays,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy