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

com.pulumi.awsnative.elasticache.kotlin.UserArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.elasticache.kotlin

import com.pulumi.awsnative.elasticache.UserArgs.builder
import com.pulumi.awsnative.elasticache.kotlin.enums.UserEngine
import com.pulumi.awsnative.elasticache.kotlin.inputs.AuthenticationModePropertiesArgs
import com.pulumi.awsnative.elasticache.kotlin.inputs.AuthenticationModePropertiesArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::ElastiCache::User
 * @property accessString Access permissions string used for this user account.
 * @property authenticationMode Specifies the authentication mode to use. Below is an example of the possible JSON values:
 * ```
 * { Passwords: ["*****", "******"] // If Type is password.
 * }
 * ```
 * @property engine Must be redis.
 * @property noPasswordRequired Indicates a password is not required for this user account.
 * @property passwords Passwords used for this user account. You can create up to two passwords for each user.
 * @property tags An array of key-value pairs to apply to this user.
 * @property userId The ID of the user.
 * @property userName The username of the user.
 */
public data class UserArgs(
    public val accessString: Output? = null,
    public val authenticationMode: Output? = null,
    public val engine: Output? = null,
    public val noPasswordRequired: Output? = null,
    public val passwords: Output>? = null,
    public val tags: Output>? = null,
    public val userId: Output? = null,
    public val userName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.elasticache.UserArgs =
        com.pulumi.awsnative.elasticache.UserArgs.builder()
            .accessString(accessString?.applyValue({ args0 -> args0 }))
            .authenticationMode(
                authenticationMode?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .engine(engine?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .noPasswordRequired(noPasswordRequired?.applyValue({ args0 -> args0 }))
            .passwords(passwords?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .userId(userId?.applyValue({ args0 -> args0 }))
            .userName(userName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [UserArgs].
 */
@PulumiTagMarker
public class UserArgsBuilder internal constructor() {
    private var accessString: Output? = null

    private var authenticationMode: Output? = null

    private var engine: Output? = null

    private var noPasswordRequired: Output? = null

    private var passwords: Output>? = null

    private var tags: Output>? = null

    private var userId: Output? = null

    private var userName: Output? = null

    /**
     * @param value Access permissions string used for this user account.
     */
    @JvmName("vblnlsvphhnrdslo")
    public suspend fun accessString(`value`: Output) {
        this.accessString = value
    }

    /**
     * @param value Specifies the authentication mode to use. Below is an example of the possible JSON values:
     * ```
     * { Passwords: ["*****", "******"] // If Type is password.
     * }
     * ```
     */
    @JvmName("waycanjkbeawbofn")
    public suspend fun authenticationMode(`value`: Output) {
        this.authenticationMode = value
    }

    /**
     * @param value Must be redis.
     */
    @JvmName("ikkutgoyofxhqrfh")
    public suspend fun engine(`value`: Output) {
        this.engine = value
    }

    /**
     * @param value Indicates a password is not required for this user account.
     */
    @JvmName("ovbejekediqwogix")
    public suspend fun noPasswordRequired(`value`: Output) {
        this.noPasswordRequired = value
    }

    /**
     * @param value Passwords used for this user account. You can create up to two passwords for each user.
     */
    @JvmName("phxcidvakafemsqi")
    public suspend fun passwords(`value`: Output>) {
        this.passwords = value
    }

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

    /**
     * @param values Passwords used for this user account. You can create up to two passwords for each user.
     */
    @JvmName("rinwwqswvridbeyt")
    public suspend fun passwords(values: List>) {
        this.passwords = Output.all(values)
    }

    /**
     * @param value An array of key-value pairs to apply to this user.
     */
    @JvmName("nhlqvstasafdjiwe")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value pairs to apply to this user.
     */
    @JvmName("mvrandnmjexcwhhx")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The ID of the user.
     */
    @JvmName("irdpdaqaffbmfjvf")
    public suspend fun userId(`value`: Output) {
        this.userId = value
    }

    /**
     * @param value The username of the user.
     */
    @JvmName("qlbudaowcpyogcbr")
    public suspend fun userName(`value`: Output) {
        this.userName = value
    }

    /**
     * @param value Access permissions string used for this user account.
     */
    @JvmName("yewgnudilrcdcvri")
    public suspend fun accessString(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessString = mapped
    }

    /**
     * @param value Specifies the authentication mode to use. Below is an example of the possible JSON values:
     * ```
     * { Passwords: ["*****", "******"] // If Type is password.
     * }
     * ```
     */
    @JvmName("juqqkxtqwpaffbye")
    public suspend fun authenticationMode(`value`: AuthenticationModePropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authenticationMode = mapped
    }

    /**
     * @param argument Specifies the authentication mode to use. Below is an example of the possible JSON values:
     * ```
     * { Passwords: ["*****", "******"] // If Type is password.
     * }
     * ```
     */
    @JvmName("bcgfcyegxkyfupcg")
    public suspend fun authenticationMode(argument: suspend AuthenticationModePropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = AuthenticationModePropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.authenticationMode = mapped
    }

    /**
     * @param value Must be redis.
     */
    @JvmName("aoiidndhwmnlvqyq")
    public suspend fun engine(`value`: UserEngine?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.engine = mapped
    }

    /**
     * @param value Indicates a password is not required for this user account.
     */
    @JvmName("blhicheqbovxrrgd")
    public suspend fun noPasswordRequired(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noPasswordRequired = mapped
    }

    /**
     * @param value Passwords used for this user account. You can create up to two passwords for each user.
     */
    @JvmName("ijcgaapxtsbwxvoy")
    public suspend fun passwords(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.passwords = mapped
    }

    /**
     * @param values Passwords used for this user account. You can create up to two passwords for each user.
     */
    @JvmName("jqbjslkgqgkycufc")
    public suspend fun passwords(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.passwords = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this user.
     */
    @JvmName("jhigbhomxcokynhu")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this user.
     */
    @JvmName("clhadjqcrhskxsmo")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this user.
     */
    @JvmName("saudeofrpckkpmxk")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this user.
     */
    @JvmName("rmmqgyixgrxawyjn")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this user.
     */
    @JvmName("wtldjntfywgxshyo")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The ID of the user.
     */
    @JvmName("dpsfdgqclwcemcjw")
    public suspend fun userId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userId = mapped
    }

    /**
     * @param value The username of the user.
     */
    @JvmName("vrgfkekynjrewxuh")
    public suspend fun userName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userName = mapped
    }

    internal fun build(): UserArgs = UserArgs(
        accessString = accessString,
        authenticationMode = authenticationMode,
        engine = engine,
        noPasswordRequired = noPasswordRequired,
        passwords = passwords,
        tags = tags,
        userId = userId,
        userName = userName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy