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

com.pulumi.vault.database.kotlin.inputs.SecretsMountMysqlAuroraArgs.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.SecretsMountMysqlAuroraArgs.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 SecretsMountMysqlAuroraArgs(
    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.SecretsMountMysqlAuroraArgs =
        com.pulumi.vault.database.inputs.SecretsMountMysqlAuroraArgs.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 [SecretsMountMysqlAuroraArgs].
 */
@PulumiTagMarker
public class SecretsMountMysqlAuroraArgsBuilder 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("fumumcjdriuddbbq")
    public suspend fun allowedRoles(`value`: Output>) {
        this.allowedRoles = value
    }

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

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

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

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

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

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

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

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

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

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

    /**
     * @param value A JSON encoded credential for use with IAM authorization
     */
    @JvmName("mnohtwcnovkwwuas")
    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("bnafkiewrxqokonb")
    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("yiyjkdinsbjjkdga")
    public suspend fun tlsCertificateKey(`value`: Output) {
        this.tlsCertificateKey = value
    }

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

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

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

    /**
     * @param value A list of roles that are allowed to use this
     * connection.
     */
    @JvmName("ppafkghdslvvcblr")
    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("odexvorpsfwfgefs")
    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("sqttufvbrdgimkmy")
    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("xwgtaeefoypiymfe")
    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("fdlhdvmfkxjrbajg")
    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("edldmtetcvfqmagl")
    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("tfbjxoihiarhifmc")
    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("qpfhlmnvxmwkhgpo")
    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("qjyecscgqwmoajkv")
    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("fbihupdqikcopsdv")
    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("qewldhalhdhhvibv")
    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("fbutqcsqnkaqmwaq")
    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("lmfbgdmyaklbwxmr")
    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("lolfmjhnmcetpdhg")
    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("uiwycrxpimtxvggc")
    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("vpjbtivojeyfyicf")
    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("hjagrsdbxlbdnvvm")
    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("yqbqjsfhmfqdkwco")
    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("cilggirgcmnjyxhy")
    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("tpynsoltjrvjgbsv")
    public suspend fun verifyConnection(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.verifyConnection = mapped
    }

    internal fun build(): SecretsMountMysqlAuroraArgs = SecretsMountMysqlAuroraArgs(
        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