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

com.pulumi.vault.database.kotlin.inputs.SecretsMountElasticsearchArgs.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.SecretsMountElasticsearchArgs.builder
import kotlin.Any
import kotlin.Boolean
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 caCert The path to a PEM-encoded CA cert file to use to verify the Elasticsearch server's identity
 * @property caPath The path to a directory of PEM-encoded CA cert files to use to verify the Elasticsearch server's identity
 * @property clientCert The path to the certificate for the Elasticsearch client to present for communication
 * @property clientKey The path to the key for the Elasticsearch client to use for communication
 * @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 insecure Whether to disable certificate verification
 * @property name Name of the database connection.
 * @property password The password to be 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 tlsServerName This, if set, is used to set the SNI host when connecting via TLS
 * @property url The URL for Elasticsearch's API
 * @property username The username to be used in the connection URL
 * @property usernameTemplate Template describing how dynamic usernames are generated.
 * @property verifyConnection Whether the connection should be verified on
 * initial configuration or not.
 */
public data class SecretsMountElasticsearchArgs(
    public val allowedRoles: Output>? = null,
    public val caCert: Output? = null,
    public val caPath: Output? = null,
    public val clientCert: Output? = null,
    public val clientKey: Output? = null,
    public val `data`: Output>? = null,
    public val insecure: Output? = null,
    public val name: Output,
    public val password: Output,
    public val pluginName: Output? = null,
    public val rootRotationStatements: Output>? = null,
    public val tlsServerName: Output? = null,
    public val url: Output,
    public val username: Output,
    public val usernameTemplate: Output? = null,
    public val verifyConnection: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.database.inputs.SecretsMountElasticsearchArgs =
        com.pulumi.vault.database.inputs.SecretsMountElasticsearchArgs.builder()
            .allowedRoles(allowedRoles?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .caCert(caCert?.applyValue({ args0 -> args0 }))
            .caPath(caPath?.applyValue({ args0 -> args0 }))
            .clientCert(clientCert?.applyValue({ args0 -> args0 }))
            .clientKey(clientKey?.applyValue({ args0 -> args0 }))
            .`data`(`data`?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .insecure(insecure?.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
                    })
                }),
            )
            .tlsServerName(tlsServerName?.applyValue({ args0 -> args0 }))
            .url(url.applyValue({ args0 -> args0 }))
            .username(username.applyValue({ args0 -> args0 }))
            .usernameTemplate(usernameTemplate?.applyValue({ args0 -> args0 }))
            .verifyConnection(verifyConnection?.applyValue({ args0 -> args0 })).build()
}

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

    private var caCert: Output? = null

    private var caPath: Output? = null

    private var clientCert: Output? = null

    private var clientKey: Output? = null

    private var `data`: Output>? = null

    private var insecure: Output? = null

    private var name: Output? = null

    private var password: Output? = null

    private var pluginName: Output? = null

    private var rootRotationStatements: Output>? = null

    private var tlsServerName: Output? = null

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

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

    /**
     * @param value The path to a PEM-encoded CA cert file to use to verify the Elasticsearch server's identity
     */
    @JvmName("sxhmnrnkslufbxmj")
    public suspend fun caCert(`value`: Output) {
        this.caCert = value
    }

    /**
     * @param value The path to a directory of PEM-encoded CA cert files to use to verify the Elasticsearch server's identity
     */
    @JvmName("cvhwxlpmqcnjohxb")
    public suspend fun caPath(`value`: Output) {
        this.caPath = value
    }

    /**
     * @param value The path to the certificate for the Elasticsearch client to present for communication
     */
    @JvmName("jrcmddfqdnyqskhj")
    public suspend fun clientCert(`value`: Output) {
        this.clientCert = value
    }

    /**
     * @param value The path to the key for the Elasticsearch client to use for communication
     */
    @JvmName("rwpfkarsdrdtluxl")
    public suspend fun clientKey(`value`: Output) {
        this.clientKey = 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("vnocklmqhiycrbuf")
    public suspend fun `data`(`value`: Output>) {
        this.`data` = value
    }

    /**
     * @param value Whether to disable certificate verification
     */
    @JvmName("eyjndthscorlwhgg")
    public suspend fun insecure(`value`: Output) {
        this.insecure = value
    }

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

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

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

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

    /**
     * @param value This, if set, is used to set the SNI host when connecting via TLS
     */
    @JvmName("tgoemcxseuygcpwy")
    public suspend fun tlsServerName(`value`: Output) {
        this.tlsServerName = value
    }

    /**
     * @param value The URL for Elasticsearch's API
     */
    @JvmName("poqgnihryelfdwhl")
    public suspend fun url(`value`: Output) {
        this.url = value
    }

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

    /**
     * @param value Template describing how dynamic usernames are generated.
     */
    @JvmName("hfinphdnvvmtbdgh")
    public suspend fun usernameTemplate(`value`: Output) {
        this.usernameTemplate = value
    }

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

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

    /**
     * @param value The path to a PEM-encoded CA cert file to use to verify the Elasticsearch server's identity
     */
    @JvmName("fldtpqouyuxvgoeq")
    public suspend fun caCert(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.caCert = mapped
    }

    /**
     * @param value The path to a directory of PEM-encoded CA cert files to use to verify the Elasticsearch server's identity
     */
    @JvmName("jqtinlankqwbxflu")
    public suspend fun caPath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.caPath = mapped
    }

    /**
     * @param value The path to the certificate for the Elasticsearch client to present for communication
     */
    @JvmName("wgfbwgfoijlgsanq")
    public suspend fun clientCert(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientCert = mapped
    }

    /**
     * @param value The path to the key for the Elasticsearch client to use for communication
     */
    @JvmName("uneqoofwgooueolr")
    public suspend fun clientKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientKey = 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("fqwpcucywbdjwhrc")
    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("fjbwmrdrlxranyux")
    public fun `data`(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`data` = mapped
    }

    /**
     * @param value Whether to disable certificate verification
     */
    @JvmName("vekxqqlicadqpnop")
    public suspend fun insecure(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.insecure = mapped
    }

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

    /**
     * @param value The password to be used in the connection URL
     */
    @JvmName("ujwgduveiumrbmbb")
    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("ydywwbcrhktojxir")
    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("ixgiwpadoctluauj")
    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("jxyklpmnvftouaou")
    public suspend fun rootRotationStatements(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rootRotationStatements = mapped
    }

    /**
     * @param value This, if set, is used to set the SNI host when connecting via TLS
     */
    @JvmName("hiyxkarprpjhlhjp")
    public suspend fun tlsServerName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tlsServerName = mapped
    }

    /**
     * @param value The URL for Elasticsearch's API
     */
    @JvmName("lluhpbuikwnyavwk")
    public suspend fun url(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.url = mapped
    }

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

    /**
     * @param value Template describing how dynamic usernames are generated.
     */
    @JvmName("pcbmqxxeghgradhp")
    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("fyqnpymnvqqhcxdh")
    public suspend fun verifyConnection(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.verifyConnection = mapped
    }

    internal fun build(): SecretsMountElasticsearchArgs = SecretsMountElasticsearchArgs(
        allowedRoles = allowedRoles,
        caCert = caCert,
        caPath = caPath,
        clientCert = clientCert,
        clientKey = clientKey,
        `data` = `data`,
        insecure = insecure,
        name = name ?: throw PulumiNullFieldException("name"),
        password = password ?: throw PulumiNullFieldException("password"),
        pluginName = pluginName,
        rootRotationStatements = rootRotationStatements,
        tlsServerName = tlsServerName,
        url = url ?: throw PulumiNullFieldException("url"),
        username = username ?: throw PulumiNullFieldException("username"),
        usernameTemplate = usernameTemplate,
        verifyConnection = verifyConnection,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy