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

com.pulumi.vault.database.kotlin.inputs.SecretsMountMysqlArgs.kt Maven / Gradle / Ivy

@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.SecretsMountMysqlArgs.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 authType Specify alternative authorization type. (Only 'gcp_iam' is valid currently)
 * @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 serviceAccountJson A JSON encoded credential for use with IAM authorization
 * @property tlsCa x509 CA file for validating the certificate presented by the MySQL server. Must be PEM encoded.
 * @property tlsCertificateKey x509 certificate for connecting to the database. This must be a PEM encoded version of the private key and the certificate combined.
 * @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 SecretsMountMysqlArgs(
    public val allowedRoles: Output>? = null,
    public val authType: 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 serviceAccountJson: Output? = null,
    public val tlsCa: Output? = null,
    public val tlsCertificateKey: 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.SecretsMountMysqlArgs =
        com.pulumi.vault.database.inputs.SecretsMountMysqlArgs.builder()
            .allowedRoles(allowedRoles?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .authType(authType?.applyValue({ 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
                    })
                }),
            )
            .serviceAccountJson(serviceAccountJson?.applyValue({ args0 -> args0 }))
            .tlsCa(tlsCa?.applyValue({ args0 -> args0 }))
            .tlsCertificateKey(tlsCertificateKey?.applyValue({ args0 -> args0 }))
            .username(username?.applyValue({ args0 -> args0 }))
            .usernameTemplate(usernameTemplate?.applyValue({ args0 -> args0 }))
            .verifyConnection(verifyConnection?.applyValue({ args0 -> args0 })).build()
}

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

    private var authType: 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 serviceAccountJson: Output? = null

    private var tlsCa: Output? = null

    private var tlsCertificateKey: 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("iftqpebpampfaasp")
    public suspend fun allowedRoles(`value`: Output>) {
        this.allowedRoles = value
    }

    @JvmName("cprkiknhnpbwmoqo")
    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("jkrsipoojwdbytpa")
    public suspend fun allowedRoles(values: List>) {
        this.allowedRoles = Output.all(values)
    }

    /**
     * @param value Specify alternative authorization type. (Only 'gcp_iam' is valid currently)
     */
    @JvmName("ckttfnkxsmpyrfwk")
    public suspend fun authType(`value`: Output) {
        this.authType = value
    }

    /**
     * @param value Connection string to use to connect to the database.
     */
    @JvmName("yiwnrwgtyrxlytnv")
    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("wsfgjyqyerxvxmhe")
    public suspend fun `data`(`value`: Output>) {
        this.`data` = value
    }

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

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

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

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

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

    /**
     * @param value Specifies the name of the plugin to use.
     */
    @JvmName("dklqeqtwtdsacmpb")
    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("iqyhgphtfglqrskw")
    public suspend fun rootRotationStatements(`value`: Output>) {
        this.rootRotationStatements = value
    }

    @JvmName("ogiqowvxxrnqdcfc")
    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("mqccojthkpdmmsdp")
    public suspend fun rootRotationStatements(values: List>) {
        this.rootRotationStatements = Output.all(values)
    }

    /**
     * @param value A JSON encoded credential for use with IAM authorization
     */
    @JvmName("fkogeaeurbsnsgxg")
    public suspend fun serviceAccountJson(`value`: Output) {
        this.serviceAccountJson = value
    }

    /**
     * @param value x509 CA file for validating the certificate presented by the MySQL server. Must be PEM encoded.
     */
    @JvmName("mesvvrbwndwnodjb")
    public suspend fun tlsCa(`value`: Output) {
        this.tlsCa = value
    }

    /**
     * @param value x509 certificate for connecting to the database. This must be a PEM encoded version of the private key and the certificate combined.
     */
    @JvmName("ctntmbfpuppesfwd")
    public suspend fun tlsCertificateKey(`value`: Output) {
        this.tlsCertificateKey = value
    }

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

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

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

    /**
     * @param value A list of roles that are allowed to use this
     * connection.
     */
    @JvmName("xvjnpxeggxclqrlx")
    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("dfjtulsijxmggwvd")
    public suspend fun allowedRoles(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedRoles = mapped
    }

    /**
     * @param value Specify alternative authorization type. (Only 'gcp_iam' is valid currently)
     */
    @JvmName("wjqgwdsubrfqkene")
    public suspend fun authType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authType = mapped
    }

    /**
     * @param value Connection string to use to connect to the database.
     */
    @JvmName("ffgmgtfowpxpgxvw")
    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("wmwpauxfgwfysupx")
    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("jfjfxcsmclusnvxj")
    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("ofwlosegdlaaghvq")
    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("umvmfhxkmxaiykui")
    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("wrgbgojekkqlsynx")
    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("mkfekenutwrwanlk")
    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("wxvmoakfagiqrpeo")
    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("hyboxmsxvevjwbrl")
    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("siwwmedkiibeopyy")
    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("rxorrdphhbwdtquu")
    public suspend fun rootRotationStatements(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rootRotationStatements = mapped
    }

    /**
     * @param value A JSON encoded credential for use with IAM authorization
     */
    @JvmName("jvgiqustqmdjqpqd")
    public suspend fun serviceAccountJson(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccountJson = mapped
    }

    /**
     * @param value x509 CA file for validating the certificate presented by the MySQL server. Must be PEM encoded.
     */
    @JvmName("sumardkxjdvtjqdp")
    public suspend fun tlsCa(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tlsCa = mapped
    }

    /**
     * @param value x509 certificate for connecting to the database. This must be a PEM encoded version of the private key and the certificate combined.
     */
    @JvmName("jngcdrhlimdjmeci")
    public suspend fun tlsCertificateKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tlsCertificateKey = mapped
    }

    /**
     * @param value The root credential username used in the connection URL
     */
    @JvmName("wdkyhbvnkleevrll")
    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("qtixdfbegoblrtln")
    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("teibvcgvtxdncqme")
    public suspend fun verifyConnection(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.verifyConnection = mapped
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy