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

com.pulumi.gcp.databasemigrationservice.kotlin.inputs.ConnectionProfilePostgresqlArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.databasemigrationservice.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.databasemigrationservice.inputs.ConnectionProfilePostgresqlArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property cloudSqlId If the source is a Cloud SQL database, use this field to provide the Cloud SQL instance ID of the source.
 * @property host Required. The IP or hostname of the source MySQL database.
 * @property networkArchitecture (Output)
 * Output only. If the source is a Cloud SQL database, this field indicates the network architecture it's associated with.
 * @property password Required. Input only. The password for the user that Database Migration Service will be using to connect to the database.
 * This field is not returned on request, and the value is encrypted when stored in Database Migration Service.
 * **Note**: This property is sensitive and will not be displayed in the plan.
 * @property passwordSet (Output)
 * Output only. Indicates If this connection profile password is stored.
 * @property port Required. The network port of the source MySQL database.
 * @property ssl SSL configuration for the destination to connect to the source database.
 * Structure is documented below.
 * @property username Required. The username that Database Migration Service will use to connect to the database. The value is encrypted when stored in Database Migration Service.
 */
public data class ConnectionProfilePostgresqlArgs(
    public val cloudSqlId: Output? = null,
    public val host: Output,
    public val networkArchitecture: Output? = null,
    public val password: Output,
    public val passwordSet: Output? = null,
    public val port: Output,
    public val ssl: Output? = null,
    public val username: Output,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.databasemigrationservice.inputs.ConnectionProfilePostgresqlArgs =
        com.pulumi.gcp.databasemigrationservice.inputs.ConnectionProfilePostgresqlArgs.builder()
            .cloudSqlId(cloudSqlId?.applyValue({ args0 -> args0 }))
            .host(host.applyValue({ args0 -> args0 }))
            .networkArchitecture(networkArchitecture?.applyValue({ args0 -> args0 }))
            .password(password.applyValue({ args0 -> args0 }))
            .passwordSet(passwordSet?.applyValue({ args0 -> args0 }))
            .port(port.applyValue({ args0 -> args0 }))
            .ssl(ssl?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .username(username.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ConnectionProfilePostgresqlArgs].
 */
@PulumiTagMarker
public class ConnectionProfilePostgresqlArgsBuilder internal constructor() {
    private var cloudSqlId: Output? = null

    private var host: Output? = null

    private var networkArchitecture: Output? = null

    private var password: Output? = null

    private var passwordSet: Output? = null

    private var port: Output? = null

    private var ssl: Output? = null

    private var username: Output? = null

    /**
     * @param value If the source is a Cloud SQL database, use this field to provide the Cloud SQL instance ID of the source.
     */
    @JvmName("dgvepftgmjywujgj")
    public suspend fun cloudSqlId(`value`: Output) {
        this.cloudSqlId = value
    }

    /**
     * @param value Required. The IP or hostname of the source MySQL database.
     */
    @JvmName("fghmgwnocbfwiegm")
    public suspend fun host(`value`: Output) {
        this.host = value
    }

    /**
     * @param value (Output)
     * Output only. If the source is a Cloud SQL database, this field indicates the network architecture it's associated with.
     */
    @JvmName("lruksajltkpmhwye")
    public suspend fun networkArchitecture(`value`: Output) {
        this.networkArchitecture = value
    }

    /**
     * @param value Required. Input only. The password for the user that Database Migration Service will be using to connect to the database.
     * This field is not returned on request, and the value is encrypted when stored in Database Migration Service.
     * **Note**: This property is sensitive and will not be displayed in the plan.
     */
    @JvmName("qonqxjvgdynipcfk")
    public suspend fun password(`value`: Output) {
        this.password = value
    }

    /**
     * @param value (Output)
     * Output only. Indicates If this connection profile password is stored.
     */
    @JvmName("sdrcltcppxybmdfb")
    public suspend fun passwordSet(`value`: Output) {
        this.passwordSet = value
    }

    /**
     * @param value Required. The network port of the source MySQL database.
     */
    @JvmName("vfckaeousoxiotaa")
    public suspend fun port(`value`: Output) {
        this.port = value
    }

    /**
     * @param value SSL configuration for the destination to connect to the source database.
     * Structure is documented below.
     */
    @JvmName("rkctbmwtbtegrobv")
    public suspend fun ssl(`value`: Output) {
        this.ssl = value
    }

    /**
     * @param value Required. The username that Database Migration Service will use to connect to the database. The value is encrypted when stored in Database Migration Service.
     */
    @JvmName("bkprwpdiscedmpnh")
    public suspend fun username(`value`: Output) {
        this.username = value
    }

    /**
     * @param value If the source is a Cloud SQL database, use this field to provide the Cloud SQL instance ID of the source.
     */
    @JvmName("asmkjpuxbmmdygqu")
    public suspend fun cloudSqlId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cloudSqlId = mapped
    }

    /**
     * @param value Required. The IP or hostname of the source MySQL database.
     */
    @JvmName("aamvlvyokdftsunw")
    public suspend fun host(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.host = mapped
    }

    /**
     * @param value (Output)
     * Output only. If the source is a Cloud SQL database, this field indicates the network architecture it's associated with.
     */
    @JvmName("eumuochnixdtrviy")
    public suspend fun networkArchitecture(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkArchitecture = mapped
    }

    /**
     * @param value Required. Input only. The password for the user that Database Migration Service will be using to connect to the database.
     * This field is not returned on request, and the value is encrypted when stored in Database Migration Service.
     * **Note**: This property is sensitive and will not be displayed in the plan.
     */
    @JvmName("gpcmbagyltibhhvs")
    public suspend fun password(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.password = mapped
    }

    /**
     * @param value (Output)
     * Output only. Indicates If this connection profile password is stored.
     */
    @JvmName("ybjvxjqmkolfehhd")
    public suspend fun passwordSet(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.passwordSet = mapped
    }

    /**
     * @param value Required. The network port of the source MySQL database.
     */
    @JvmName("repxqfhyejavrsrg")
    public suspend fun port(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.port = mapped
    }

    /**
     * @param value SSL configuration for the destination to connect to the source database.
     * Structure is documented below.
     */
    @JvmName("ocmpsjvexsdbuulw")
    public suspend fun ssl(`value`: ConnectionProfilePostgresqlSslArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ssl = mapped
    }

    /**
     * @param argument SSL configuration for the destination to connect to the source database.
     * Structure is documented below.
     */
    @JvmName("gichdfvsamcuprvs")
    public suspend fun ssl(argument: suspend ConnectionProfilePostgresqlSslArgsBuilder.() -> Unit) {
        val toBeMapped = ConnectionProfilePostgresqlSslArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.ssl = mapped
    }

    /**
     * @param value Required. The username that Database Migration Service will use to connect to the database. The value is encrypted when stored in Database Migration Service.
     */
    @JvmName("fxuchuvixvhtontf")
    public suspend fun username(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.username = mapped
    }

    internal fun build(): ConnectionProfilePostgresqlArgs = ConnectionProfilePostgresqlArgs(
        cloudSqlId = cloudSqlId,
        host = host ?: throw PulumiNullFieldException("host"),
        networkArchitecture = networkArchitecture,
        password = password ?: throw PulumiNullFieldException("password"),
        passwordSet = passwordSet,
        port = port ?: throw PulumiNullFieldException("port"),
        ssl = ssl,
        username = username ?: throw PulumiNullFieldException("username"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy