com.pulumi.gcp.bigquery.kotlin.inputs.ConnectionCloudSqlArgs.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.bigquery.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.bigquery.inputs.ConnectionCloudSqlArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
*
* @property credential Cloud SQL properties.
* Structure is documented below.
* @property database Database name.
* @property instanceId Cloud SQL instance ID in the form project:location:instance.
* @property serviceAccountId (Output)
* When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection.
* @property type Type of the Cloud SQL database.
* Possible values are: `DATABASE_TYPE_UNSPECIFIED`, `POSTGRES`, `MYSQL`.
*/
public data class ConnectionCloudSqlArgs(
public val credential: Output,
public val database: Output,
public val instanceId: Output,
public val serviceAccountId: Output? = null,
public val type: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.bigquery.inputs.ConnectionCloudSqlArgs =
com.pulumi.gcp.bigquery.inputs.ConnectionCloudSqlArgs.builder()
.credential(credential.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.database(database.applyValue({ args0 -> args0 }))
.instanceId(instanceId.applyValue({ args0 -> args0 }))
.serviceAccountId(serviceAccountId?.applyValue({ args0 -> args0 }))
.type(type.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ConnectionCloudSqlArgs].
*/
@PulumiTagMarker
public class ConnectionCloudSqlArgsBuilder internal constructor() {
private var credential: Output? = null
private var database: Output? = null
private var instanceId: Output? = null
private var serviceAccountId: Output? = null
private var type: Output? = null
/**
* @param value Cloud SQL properties.
* Structure is documented below.
*/
@JvmName("ynhclmtrjodailpd")
public suspend fun credential(`value`: Output) {
this.credential = value
}
/**
* @param value Database name.
*/
@JvmName("xnkpqqkfudslruah")
public suspend fun database(`value`: Output) {
this.database = value
}
/**
* @param value Cloud SQL instance ID in the form project:location:instance.
*/
@JvmName("hiyprbpkqgsnhpbd")
public suspend fun instanceId(`value`: Output) {
this.instanceId = value
}
/**
* @param value (Output)
* When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection.
*/
@JvmName("yilkyikqbgadiqxw")
public suspend fun serviceAccountId(`value`: Output) {
this.serviceAccountId = value
}
/**
* @param value Type of the Cloud SQL database.
* Possible values are: `DATABASE_TYPE_UNSPECIFIED`, `POSTGRES`, `MYSQL`.
*/
@JvmName("folexmqoxyfstnbv")
public suspend fun type(`value`: Output) {
this.type = value
}
/**
* @param value Cloud SQL properties.
* Structure is documented below.
*/
@JvmName("mblnevhuhsdvmcst")
public suspend fun credential(`value`: ConnectionCloudSqlCredentialArgs) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.credential = mapped
}
/**
* @param argument Cloud SQL properties.
* Structure is documented below.
*/
@JvmName("jlabciauduphompr")
public suspend fun credential(argument: suspend ConnectionCloudSqlCredentialArgsBuilder.() -> Unit) {
val toBeMapped = ConnectionCloudSqlCredentialArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.credential = mapped
}
/**
* @param value Database name.
*/
@JvmName("majynyqcuxwcjetk")
public suspend fun database(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.database = mapped
}
/**
* @param value Cloud SQL instance ID in the form project:location:instance.
*/
@JvmName("jbakgdkbyihxfkep")
public suspend fun instanceId(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.instanceId = mapped
}
/**
* @param value (Output)
* When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection.
*/
@JvmName("lgjkelrrgltnvuos")
public suspend fun serviceAccountId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceAccountId = mapped
}
/**
* @param value Type of the Cloud SQL database.
* Possible values are: `DATABASE_TYPE_UNSPECIFIED`, `POSTGRES`, `MYSQL`.
*/
@JvmName("wxducomuirrnxpph")
public suspend fun type(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.type = mapped
}
internal fun build(): ConnectionCloudSqlArgs = ConnectionCloudSqlArgs(
credential = credential ?: throw PulumiNullFieldException("credential"),
database = database ?: throw PulumiNullFieldException("database"),
instanceId = instanceId ?: throw PulumiNullFieldException("instanceId"),
serviceAccountId = serviceAccountId,
type = type ?: throw PulumiNullFieldException("type"),
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy