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

com.pulumi.gcp.sql.kotlin.inputs.UserPasswordPolicyArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.sql.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.sql.inputs.UserPasswordPolicyArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property allowedFailedAttempts Number of failed attempts allowed before the user get locked.
 * @property enableFailedAttemptsCheck If true, the check that will lock user after too many failed login attempts will be enabled.
 * @property enablePasswordVerification If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.
 * @property passwordExpirationDuration Password expiration duration with one week grace period.
 * @property statuses
 */
public data class UserPasswordPolicyArgs(
    public val allowedFailedAttempts: Output? = null,
    public val enableFailedAttemptsCheck: Output? = null,
    public val enablePasswordVerification: Output? = null,
    public val passwordExpirationDuration: Output? = null,
    public val statuses: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.sql.inputs.UserPasswordPolicyArgs =
        com.pulumi.gcp.sql.inputs.UserPasswordPolicyArgs.builder()
            .allowedFailedAttempts(allowedFailedAttempts?.applyValue({ args0 -> args0 }))
            .enableFailedAttemptsCheck(enableFailedAttemptsCheck?.applyValue({ args0 -> args0 }))
            .enablePasswordVerification(enablePasswordVerification?.applyValue({ args0 -> args0 }))
            .passwordExpirationDuration(passwordExpirationDuration?.applyValue({ args0 -> args0 }))
            .statuses(
                statuses?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [UserPasswordPolicyArgs].
 */
@PulumiTagMarker
public class UserPasswordPolicyArgsBuilder internal constructor() {
    private var allowedFailedAttempts: Output? = null

    private var enableFailedAttemptsCheck: Output? = null

    private var enablePasswordVerification: Output? = null

    private var passwordExpirationDuration: Output? = null

    private var statuses: Output>? = null

    /**
     * @param value Number of failed attempts allowed before the user get locked.
     */
    @JvmName("melraakpkuxlytog")
    public suspend fun allowedFailedAttempts(`value`: Output) {
        this.allowedFailedAttempts = value
    }

    /**
     * @param value If true, the check that will lock user after too many failed login attempts will be enabled.
     */
    @JvmName("lcekafnajdglbuvo")
    public suspend fun enableFailedAttemptsCheck(`value`: Output) {
        this.enableFailedAttemptsCheck = value
    }

    /**
     * @param value If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.
     */
    @JvmName("rflmjemgcodpkmlu")
    public suspend fun enablePasswordVerification(`value`: Output) {
        this.enablePasswordVerification = value
    }

    /**
     * @param value Password expiration duration with one week grace period.
     */
    @JvmName("ajkmndvygxrvxpqd")
    public suspend fun passwordExpirationDuration(`value`: Output) {
        this.passwordExpirationDuration = value
    }

    /**
     * @param value
     */
    @JvmName("qphryodoelcddmpt")
    public suspend fun statuses(`value`: Output>) {
        this.statuses = value
    }

    @JvmName("ecixasbbptlcnnyw")
    public suspend fun statuses(vararg values: Output) {
        this.statuses = Output.all(values.asList())
    }

    /**
     * @param values
     */
    @JvmName("aodybfaxanwgyhmn")
    public suspend fun statuses(values: List>) {
        this.statuses = Output.all(values)
    }

    /**
     * @param value Number of failed attempts allowed before the user get locked.
     */
    @JvmName("uybwksumgeqseaff")
    public suspend fun allowedFailedAttempts(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedFailedAttempts = mapped
    }

    /**
     * @param value If true, the check that will lock user after too many failed login attempts will be enabled.
     */
    @JvmName("wmbdnmwhmtjxgxna")
    public suspend fun enableFailedAttemptsCheck(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableFailedAttemptsCheck = mapped
    }

    /**
     * @param value If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.
     */
    @JvmName("sirxmunvduucihhs")
    public suspend fun enablePasswordVerification(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enablePasswordVerification = mapped
    }

    /**
     * @param value Password expiration duration with one week grace period.
     */
    @JvmName("wfoyyvksibdhbkkj")
    public suspend fun passwordExpirationDuration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.passwordExpirationDuration = mapped
    }

    /**
     * @param value
     */
    @JvmName("qmvhaowqegwulegm")
    public suspend fun statuses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.statuses = mapped
    }

    /**
     * @param argument
     */
    @JvmName("lkgrecgtwktvotbs")
    public suspend fun statuses(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            UserPasswordPolicyStatusArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.statuses = mapped
    }

    /**
     * @param argument
     */
    @JvmName("svqmhkqfgqetoior")
    public suspend fun statuses(vararg argument: suspend UserPasswordPolicyStatusArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            UserPasswordPolicyStatusArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.statuses = mapped
    }

    /**
     * @param argument
     */
    @JvmName("egtmjotfruunngwp")
    public suspend fun statuses(argument: suspend UserPasswordPolicyStatusArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            UserPasswordPolicyStatusArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.statuses = mapped
    }

    /**
     * @param values
     */
    @JvmName("tkwkikrdbymhijtw")
    public suspend fun statuses(vararg values: UserPasswordPolicyStatusArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.statuses = mapped
    }

    internal fun build(): UserPasswordPolicyArgs = UserPasswordPolicyArgs(
        allowedFailedAttempts = allowedFailedAttempts,
        enableFailedAttemptsCheck = enableFailedAttemptsCheck,
        enablePasswordVerification = enablePasswordVerification,
        passwordExpirationDuration = passwordExpirationDuration,
        statuses = statuses,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy