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

com.pulumi.vault.database.kotlin.inputs.SecretsMountSnowflakeArgs.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: 6.4.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.vault.database.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.vault.database.inputs.SecretsMountSnowflakeArgs.builder
import kotlin.Any
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property allowedRoles A list of roles that are allowed to use this
 * connection.
 * @property connectionUrl Connection string to use to connect to the database.
 * @property data A map of sensitive data to pass to the endpoint. Useful for templated connection strings.
 * Supported list of database secrets engines that can be configured:
 * @property maxConnectionLifetime Maximum number of seconds a connection may be reused.
 * @property maxIdleConnections Maximum number of idle connections to the database.
 * @property maxOpenConnections Maximum number of open connections to the database.
 * @property name Name of the database connection.
 * @property password The root credential password used in the connection URL
 * @property pluginName Specifies the name of the plugin to use.
 * @property rootRotationStatements A list of database statements to be executed to rotate the root user's credentials.
 * @property username The root credential username used in the connection URL
 * @property usernameTemplate Username generation template.
 * @property verifyConnection Whether the connection should be verified on
 * initial configuration or not.
 */
public data class SecretsMountSnowflakeArgs(
    public val allowedRoles: Output>? = null,
    public val connectionUrl: Output? = null,
    public val `data`: Output>? = null,
    public val maxConnectionLifetime: Output? = null,
    public val maxIdleConnections: Output? = null,
    public val maxOpenConnections: Output? = null,
    public val name: Output,
    public val password: Output? = null,
    public val pluginName: Output? = null,
    public val rootRotationStatements: Output>? = null,
    public val username: Output? = null,
    public val usernameTemplate: Output? = null,
    public val verifyConnection: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.database.inputs.SecretsMountSnowflakeArgs =
        com.pulumi.vault.database.inputs.SecretsMountSnowflakeArgs.builder()
            .allowedRoles(allowedRoles?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .connectionUrl(connectionUrl?.applyValue({ args0 -> args0 }))
            .`data`(`data`?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .maxConnectionLifetime(maxConnectionLifetime?.applyValue({ args0 -> args0 }))
            .maxIdleConnections(maxIdleConnections?.applyValue({ args0 -> args0 }))
            .maxOpenConnections(maxOpenConnections?.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .password(password?.applyValue({ args0 -> args0 }))
            .pluginName(pluginName?.applyValue({ args0 -> args0 }))
            .rootRotationStatements(
                rootRotationStatements?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .username(username?.applyValue({ args0 -> args0 }))
            .usernameTemplate(usernameTemplate?.applyValue({ args0 -> args0 }))
            .verifyConnection(verifyConnection?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SecretsMountSnowflakeArgs].
 */
@PulumiTagMarker
public class SecretsMountSnowflakeArgsBuilder internal constructor() {
    private var allowedRoles: Output>? = null

    private var connectionUrl: Output? = null

    private var `data`: Output>? = null

    private var maxConnectionLifetime: Output? = null

    private var maxIdleConnections: Output? = null

    private var maxOpenConnections: Output? = null

    private var name: Output? = null

    private var password: Output? = null

    private var pluginName: Output? = null

    private var rootRotationStatements: Output>? = null

    private var username: Output? = null

    private var usernameTemplate: Output? = null

    private var verifyConnection: Output? = null

    /**
     * @param value A list of roles that are allowed to use this
     * connection.
     */
    @JvmName("hcbranevckdsnbmm")
    public suspend fun allowedRoles(`value`: Output>) {
        this.allowedRoles = value
    }

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

    /**
     * @param values A list of roles that are allowed to use this
     * connection.
     */
    @JvmName("wfmrjjpmgpdpolrb")
    public suspend fun allowedRoles(values: List>) {
        this.allowedRoles = Output.all(values)
    }

    /**
     * @param value Connection string to use to connect to the database.
     */
    @JvmName("aodrytdeccxeagcb")
    public suspend fun connectionUrl(`value`: Output) {
        this.connectionUrl = value
    }

    /**
     * @param value A map of sensitive data to pass to the endpoint. Useful for templated connection strings.
     * Supported list of database secrets engines that can be configured:
     */
    @JvmName("hinfenmnfwtblxrg")
    public suspend fun `data`(`value`: Output>) {
        this.`data` = value
    }

    /**
     * @param value Maximum number of seconds a connection may be reused.
     */
    @JvmName("ifwonjyeimnyyjee")
    public suspend fun maxConnectionLifetime(`value`: Output) {
        this.maxConnectionLifetime = value
    }

    /**
     * @param value Maximum number of idle connections to the database.
     */
    @JvmName("eussybamvrgqxghj")
    public suspend fun maxIdleConnections(`value`: Output) {
        this.maxIdleConnections = value
    }

    /**
     * @param value Maximum number of open connections to the database.
     */
    @JvmName("oacmvafjjqujxegq")
    public suspend fun maxOpenConnections(`value`: Output) {
        this.maxOpenConnections = value
    }

    /**
     * @param value Name of the database connection.
     */
    @JvmName("lanpigueptfloate")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The root credential password used in the connection URL
     */
    @JvmName("nfyfbnkhistjbslf")
    public suspend fun password(`value`: Output) {
        this.password = value
    }

    /**
     * @param value Specifies the name of the plugin to use.
     */
    @JvmName("ohrrlmwetolrtsko")
    public suspend fun pluginName(`value`: Output) {
        this.pluginName = value
    }

    /**
     * @param value A list of database statements to be executed to rotate the root user's credentials.
     */
    @JvmName("vxnlnsyfoagqawui")
    public suspend fun rootRotationStatements(`value`: Output>) {
        this.rootRotationStatements = value
    }

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

    /**
     * @param values A list of database statements to be executed to rotate the root user's credentials.
     */
    @JvmName("rkipwgrpcteytyhc")
    public suspend fun rootRotationStatements(values: List>) {
        this.rootRotationStatements = Output.all(values)
    }

    /**
     * @param value The root credential username used in the connection URL
     */
    @JvmName("pkmewotvkuwrbiqa")
    public suspend fun username(`value`: Output) {
        this.username = value
    }

    /**
     * @param value Username generation template.
     */
    @JvmName("qpvqxqwokvysigij")
    public suspend fun usernameTemplate(`value`: Output) {
        this.usernameTemplate = value
    }

    /**
     * @param value Whether the connection should be verified on
     * initial configuration or not.
     */
    @JvmName("nnwyqrrhgejklslj")
    public suspend fun verifyConnection(`value`: Output) {
        this.verifyConnection = value
    }

    /**
     * @param value A list of roles that are allowed to use this
     * connection.
     */
    @JvmName("brsygnrutwlmipps")
    public suspend fun allowedRoles(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedRoles = mapped
    }

    /**
     * @param values A list of roles that are allowed to use this
     * connection.
     */
    @JvmName("plwemyrwpvnvmtha")
    public suspend fun allowedRoles(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedRoles = mapped
    }

    /**
     * @param value Connection string to use to connect to the database.
     */
    @JvmName("wepyxjxcunrbondt")
    public suspend fun connectionUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectionUrl = mapped
    }

    /**
     * @param value A map of sensitive data to pass to the endpoint. Useful for templated connection strings.
     * Supported list of database secrets engines that can be configured:
     */
    @JvmName("xubbwfqtpmfktblb")
    public suspend fun `data`(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`data` = mapped
    }

    /**
     * @param values A map of sensitive data to pass to the endpoint. Useful for templated connection strings.
     * Supported list of database secrets engines that can be configured:
     */
    @JvmName("quubpesdojxxjlij")
    public fun `data`(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`data` = mapped
    }

    /**
     * @param value Maximum number of seconds a connection may be reused.
     */
    @JvmName("xcvosrbvbxcmjsqs")
    public suspend fun maxConnectionLifetime(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxConnectionLifetime = mapped
    }

    /**
     * @param value Maximum number of idle connections to the database.
     */
    @JvmName("lclmmhljkdeijkvu")
    public suspend fun maxIdleConnections(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxIdleConnections = mapped
    }

    /**
     * @param value Maximum number of open connections to the database.
     */
    @JvmName("gaalpycjskkybreb")
    public suspend fun maxOpenConnections(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxOpenConnections = mapped
    }

    /**
     * @param value Name of the database connection.
     */
    @JvmName("teoppleiokwaulsd")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The root credential password used in the connection URL
     */
    @JvmName("herlopyhkrefjnuk")
    public suspend fun password(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.password = mapped
    }

    /**
     * @param value Specifies the name of the plugin to use.
     */
    @JvmName("eqmnffpvgkjmufsh")
    public suspend fun pluginName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pluginName = mapped
    }

    /**
     * @param value A list of database statements to be executed to rotate the root user's credentials.
     */
    @JvmName("bboherjgqmuvgtxh")
    public suspend fun rootRotationStatements(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rootRotationStatements = mapped
    }

    /**
     * @param values A list of database statements to be executed to rotate the root user's credentials.
     */
    @JvmName("unhvgdkbxqdoiunl")
    public suspend fun rootRotationStatements(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rootRotationStatements = mapped
    }

    /**
     * @param value The root credential username used in the connection URL
     */
    @JvmName("baemahgkdiiwfepq")
    public suspend fun username(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.username = mapped
    }

    /**
     * @param value Username generation template.
     */
    @JvmName("fbvbpiijualsaayk")
    public suspend fun usernameTemplate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.usernameTemplate = mapped
    }

    /**
     * @param value Whether the connection should be verified on
     * initial configuration or not.
     */
    @JvmName("dyxihnuxbtscngpn")
    public suspend fun verifyConnection(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.verifyConnection = mapped
    }

    internal fun build(): SecretsMountSnowflakeArgs = SecretsMountSnowflakeArgs(
        allowedRoles = allowedRoles,
        connectionUrl = connectionUrl,
        `data` = `data`,
        maxConnectionLifetime = maxConnectionLifetime,
        maxIdleConnections = maxIdleConnections,
        maxOpenConnections = maxOpenConnections,
        name = name ?: throw PulumiNullFieldException("name"),
        password = password,
        pluginName = pluginName,
        rootRotationStatements = rootRotationStatements,
        username = username,
        usernameTemplate = usernameTemplate,
        verifyConnection = verifyConnection,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy