com.pulumi.gcp.databasemigrationservice.kotlin.inputs.ConnectionProfileMysqlArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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.ConnectionProfileMysqlArgs.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 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 ConnectionProfileMysqlArgs(
public val cloudSqlId: Output? = null,
public val host: Output,
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.ConnectionProfileMysqlArgs =
com.pulumi.gcp.databasemigrationservice.inputs.ConnectionProfileMysqlArgs.builder()
.cloudSqlId(cloudSqlId?.applyValue({ args0 -> args0 }))
.host(host.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 [ConnectionProfileMysqlArgs].
*/
@PulumiTagMarker
public class ConnectionProfileMysqlArgsBuilder internal constructor() {
private var cloudSqlId: Output? = null
private var host: 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("xlndgxfxbjchoast")
public suspend fun cloudSqlId(`value`: Output) {
this.cloudSqlId = value
}
/**
* @param value Required. The IP or hostname of the source MySQL database.
*/
@JvmName("tfkjabocetcvycwa")
public suspend fun host(`value`: Output) {
this.host = 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("folmnvmjpmdugtoa")
public suspend fun password(`value`: Output) {
this.password = value
}
/**
* @param value (Output)
* Output only. Indicates If this connection profile password is stored.
*/
@JvmName("rhckjftogfeohkyx")
public suspend fun passwordSet(`value`: Output) {
this.passwordSet = value
}
/**
* @param value Required. The network port of the source MySQL database.
*/
@JvmName("ihvvrojqqweemecs")
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("fdvgwxserjwxceab")
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("yhebennsfdegpwnm")
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("qrfvwvixrfxuvhct")
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("xnqrrglvturonepk")
public suspend fun host(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.host = 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("yijbcdugxuaidexu")
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("phpocfxraryxbrnc")
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("hlkwlwklmukggsaj")
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("fgpctaxcbrluqkje")
public suspend fun ssl(`value`: ConnectionProfileMysqlSslArgs?) {
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("yxorfophuqvmofay")
public suspend fun ssl(argument: suspend ConnectionProfileMysqlSslArgsBuilder.() -> Unit) {
val toBeMapped = ConnectionProfileMysqlSslArgsBuilder().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("acycdjdyvwkgdjgf")
public suspend fun username(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.username = mapped
}
internal fun build(): ConnectionProfileMysqlArgs = ConnectionProfileMysqlArgs(
cloudSqlId = cloudSqlId,
host = host ?: throw PulumiNullFieldException("host"),
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