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

com.pulumi.gcp.databasemigrationservice.kotlin.inputs.ConnectionProfileCloudsqlSettingsArgs.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.13.1.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.ConnectionProfileCloudsqlSettingsArgs.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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property activationPolicy The activation policy specifies when the instance is activated; it is applicable only when the instance state is 'RUNNABLE'.
 * Possible values are: `ALWAYS`, `NEVER`.
 * @property autoStorageIncrease If you enable this setting, Cloud SQL checks your available storage every 30 seconds. If the available storage falls below a threshold size, Cloud SQL automatically adds additional storage capacity.
 * If the available storage repeatedly falls below the threshold size, Cloud SQL continues to add storage until it reaches the maximum of 30 TB.
 * @property cmekKeyName The KMS key name used for the csql instance.
 * @property collation The Cloud SQL default instance level collation.
 * @property dataDiskSizeGb The storage capacity available to the database, in GB. The minimum (and default) size is 10GB.
 * @property dataDiskType The type of storage.
 * Possible values are: `PD_SSD`, `PD_HDD`.
 * @property databaseFlags The database flags passed to the Cloud SQL instance at startup.
 * @property databaseVersion The database engine type and version.
 * Currently supported values located at https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.connectionProfiles#sqldatabaseversion
 * @property edition The edition of the given Cloud SQL instance.
 * Possible values are: `ENTERPRISE`, `ENTERPRISE_PLUS`.
 * @property ipConfig The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled.
 * Structure is documented below.
 * @property rootPassword Input only. Initial root password.
 * **Note**: This property is sensitive and will not be displayed in the plan.
 * @property rootPasswordSet (Output)
 * Output only. Indicates If this connection profile root password is stored.
 * @property sourceId The Database Migration Service source connection profile ID, in the format: projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID
 * @property storageAutoResizeLimit The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
 * @property tier The tier (or machine type) for this instance, for example: db-n1-standard-1 (MySQL instances) or db-custom-1-3840 (PostgreSQL instances).
 * For more information, see https://cloud.google.com/sql/docs/mysql/instance-settings
 * @property userLabels The resource labels for a Cloud SQL instance to use to annotate any related underlying resources such as Compute Engine VMs.
 * @property zone The Google Cloud Platform zone where your Cloud SQL datdabse instance is located.
 */
public data class ConnectionProfileCloudsqlSettingsArgs(
    public val activationPolicy: Output? = null,
    public val autoStorageIncrease: Output? = null,
    public val cmekKeyName: Output? = null,
    public val collation: Output? = null,
    public val dataDiskSizeGb: Output? = null,
    public val dataDiskType: Output? = null,
    public val databaseFlags: Output>? = null,
    public val databaseVersion: Output? = null,
    public val edition: Output? = null,
    public val ipConfig: Output? = null,
    public val rootPassword: Output? = null,
    public val rootPasswordSet: Output? = null,
    public val sourceId: Output,
    public val storageAutoResizeLimit: Output? = null,
    public val tier: Output? = null,
    public val userLabels: Output>? = null,
    public val zone: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.databasemigrationservice.inputs.ConnectionProfileCloudsqlSettingsArgs =
        com.pulumi.gcp.databasemigrationservice.inputs.ConnectionProfileCloudsqlSettingsArgs.builder()
            .activationPolicy(activationPolicy?.applyValue({ args0 -> args0 }))
            .autoStorageIncrease(autoStorageIncrease?.applyValue({ args0 -> args0 }))
            .cmekKeyName(cmekKeyName?.applyValue({ args0 -> args0 }))
            .collation(collation?.applyValue({ args0 -> args0 }))
            .dataDiskSizeGb(dataDiskSizeGb?.applyValue({ args0 -> args0 }))
            .dataDiskType(dataDiskType?.applyValue({ args0 -> args0 }))
            .databaseFlags(
                databaseFlags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .databaseVersion(databaseVersion?.applyValue({ args0 -> args0 }))
            .edition(edition?.applyValue({ args0 -> args0 }))
            .ipConfig(ipConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .rootPassword(rootPassword?.applyValue({ args0 -> args0 }))
            .rootPasswordSet(rootPasswordSet?.applyValue({ args0 -> args0 }))
            .sourceId(sourceId.applyValue({ args0 -> args0 }))
            .storageAutoResizeLimit(storageAutoResizeLimit?.applyValue({ args0 -> args0 }))
            .tier(tier?.applyValue({ args0 -> args0 }))
            .userLabels(
                userLabels?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .zone(zone?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ConnectionProfileCloudsqlSettingsArgs].
 */
@PulumiTagMarker
public class ConnectionProfileCloudsqlSettingsArgsBuilder internal constructor() {
    private var activationPolicy: Output? = null

    private var autoStorageIncrease: Output? = null

    private var cmekKeyName: Output? = null

    private var collation: Output? = null

    private var dataDiskSizeGb: Output? = null

    private var dataDiskType: Output? = null

    private var databaseFlags: Output>? = null

    private var databaseVersion: Output? = null

    private var edition: Output? = null

    private var ipConfig: Output? = null

    private var rootPassword: Output? = null

    private var rootPasswordSet: Output? = null

    private var sourceId: Output? = null

    private var storageAutoResizeLimit: Output? = null

    private var tier: Output? = null

    private var userLabels: Output>? = null

    private var zone: Output? = null

    /**
     * @param value The activation policy specifies when the instance is activated; it is applicable only when the instance state is 'RUNNABLE'.
     * Possible values are: `ALWAYS`, `NEVER`.
     */
    @JvmName("ecpipqiggufckcdi")
    public suspend fun activationPolicy(`value`: Output) {
        this.activationPolicy = value
    }

    /**
     * @param value If you enable this setting, Cloud SQL checks your available storage every 30 seconds. If the available storage falls below a threshold size, Cloud SQL automatically adds additional storage capacity.
     * If the available storage repeatedly falls below the threshold size, Cloud SQL continues to add storage until it reaches the maximum of 30 TB.
     */
    @JvmName("rohaypqapyvrlwoc")
    public suspend fun autoStorageIncrease(`value`: Output) {
        this.autoStorageIncrease = value
    }

    /**
     * @param value The KMS key name used for the csql instance.
     */
    @JvmName("jyvufrespujhtfuf")
    public suspend fun cmekKeyName(`value`: Output) {
        this.cmekKeyName = value
    }

    /**
     * @param value The Cloud SQL default instance level collation.
     */
    @JvmName("ygttygpsmfsyrpbp")
    public suspend fun collation(`value`: Output) {
        this.collation = value
    }

    /**
     * @param value The storage capacity available to the database, in GB. The minimum (and default) size is 10GB.
     */
    @JvmName("yumwdqjbemvexixu")
    public suspend fun dataDiskSizeGb(`value`: Output) {
        this.dataDiskSizeGb = value
    }

    /**
     * @param value The type of storage.
     * Possible values are: `PD_SSD`, `PD_HDD`.
     */
    @JvmName("sgvlnetvdtfvgbgv")
    public suspend fun dataDiskType(`value`: Output) {
        this.dataDiskType = value
    }

    /**
     * @param value The database flags passed to the Cloud SQL instance at startup.
     */
    @JvmName("nopiytchrjyerxnq")
    public suspend fun databaseFlags(`value`: Output>) {
        this.databaseFlags = value
    }

    /**
     * @param value The database engine type and version.
     * Currently supported values located at https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.connectionProfiles#sqldatabaseversion
     */
    @JvmName("hkhlqrwixjhttygc")
    public suspend fun databaseVersion(`value`: Output) {
        this.databaseVersion = value
    }

    /**
     * @param value The edition of the given Cloud SQL instance.
     * Possible values are: `ENTERPRISE`, `ENTERPRISE_PLUS`.
     */
    @JvmName("lxdeuxoyvxqumpkb")
    public suspend fun edition(`value`: Output) {
        this.edition = value
    }

    /**
     * @param value The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled.
     * Structure is documented below.
     */
    @JvmName("wpegtladctifwgms")
    public suspend fun ipConfig(`value`: Output) {
        this.ipConfig = value
    }

    /**
     * @param value Input only. Initial root password.
     * **Note**: This property is sensitive and will not be displayed in the plan.
     */
    @JvmName("mpwebfajemmxrvsx")
    public suspend fun rootPassword(`value`: Output) {
        this.rootPassword = value
    }

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

    /**
     * @param value The Database Migration Service source connection profile ID, in the format: projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID
     */
    @JvmName("mametfgikenwqaok")
    public suspend fun sourceId(`value`: Output) {
        this.sourceId = value
    }

    /**
     * @param value The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
     */
    @JvmName("wyvwlwaqlojodmsv")
    public suspend fun storageAutoResizeLimit(`value`: Output) {
        this.storageAutoResizeLimit = value
    }

    /**
     * @param value The tier (or machine type) for this instance, for example: db-n1-standard-1 (MySQL instances) or db-custom-1-3840 (PostgreSQL instances).
     * For more information, see https://cloud.google.com/sql/docs/mysql/instance-settings
     */
    @JvmName("rjmipavrhcnolvmv")
    public suspend fun tier(`value`: Output) {
        this.tier = value
    }

    /**
     * @param value The resource labels for a Cloud SQL instance to use to annotate any related underlying resources such as Compute Engine VMs.
     */
    @JvmName("ahjicjvuqimwayja")
    public suspend fun userLabels(`value`: Output>) {
        this.userLabels = value
    }

    /**
     * @param value The Google Cloud Platform zone where your Cloud SQL datdabse instance is located.
     */
    @JvmName("rupwdjfmdgrmxsxj")
    public suspend fun zone(`value`: Output) {
        this.zone = value
    }

    /**
     * @param value The activation policy specifies when the instance is activated; it is applicable only when the instance state is 'RUNNABLE'.
     * Possible values are: `ALWAYS`, `NEVER`.
     */
    @JvmName("vdqaxaswyrysipea")
    public suspend fun activationPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.activationPolicy = mapped
    }

    /**
     * @param value If you enable this setting, Cloud SQL checks your available storage every 30 seconds. If the available storage falls below a threshold size, Cloud SQL automatically adds additional storage capacity.
     * If the available storage repeatedly falls below the threshold size, Cloud SQL continues to add storage until it reaches the maximum of 30 TB.
     */
    @JvmName("lgitytqxlpwwqshg")
    public suspend fun autoStorageIncrease(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoStorageIncrease = mapped
    }

    /**
     * @param value The KMS key name used for the csql instance.
     */
    @JvmName("jvjiegfbddqcmvum")
    public suspend fun cmekKeyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cmekKeyName = mapped
    }

    /**
     * @param value The Cloud SQL default instance level collation.
     */
    @JvmName("lotoiqpucrvxhnsf")
    public suspend fun collation(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.collation = mapped
    }

    /**
     * @param value The storage capacity available to the database, in GB. The minimum (and default) size is 10GB.
     */
    @JvmName("mbhicpfcixtadaya")
    public suspend fun dataDiskSizeGb(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataDiskSizeGb = mapped
    }

    /**
     * @param value The type of storage.
     * Possible values are: `PD_SSD`, `PD_HDD`.
     */
    @JvmName("eiahxjslqjyxovci")
    public suspend fun dataDiskType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataDiskType = mapped
    }

    /**
     * @param value The database flags passed to the Cloud SQL instance at startup.
     */
    @JvmName("mgyrqdtyxjxfeggs")
    public suspend fun databaseFlags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.databaseFlags = mapped
    }

    /**
     * @param values The database flags passed to the Cloud SQL instance at startup.
     */
    @JvmName("jgkbgpvwhxgxcses")
    public fun databaseFlags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.databaseFlags = mapped
    }

    /**
     * @param value The database engine type and version.
     * Currently supported values located at https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.connectionProfiles#sqldatabaseversion
     */
    @JvmName("xhthujgrpholmnko")
    public suspend fun databaseVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.databaseVersion = mapped
    }

    /**
     * @param value The edition of the given Cloud SQL instance.
     * Possible values are: `ENTERPRISE`, `ENTERPRISE_PLUS`.
     */
    @JvmName("jhyyfavaeodpispc")
    public suspend fun edition(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.edition = mapped
    }

    /**
     * @param value The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled.
     * Structure is documented below.
     */
    @JvmName("mmgtrukqajlgrtmg")
    public suspend fun ipConfig(`value`: ConnectionProfileCloudsqlSettingsIpConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipConfig = mapped
    }

    /**
     * @param argument The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled.
     * Structure is documented below.
     */
    @JvmName("eahqmkqnnprvjwkh")
    public suspend fun ipConfig(argument: suspend ConnectionProfileCloudsqlSettingsIpConfigArgsBuilder.() -> Unit) {
        val toBeMapped = ConnectionProfileCloudsqlSettingsIpConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.ipConfig = mapped
    }

    /**
     * @param value Input only. Initial root password.
     * **Note**: This property is sensitive and will not be displayed in the plan.
     */
    @JvmName("cvrypylmqmwiiukk")
    public suspend fun rootPassword(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rootPassword = mapped
    }

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

    /**
     * @param value The Database Migration Service source connection profile ID, in the format: projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID
     */
    @JvmName("twoqlsalyymeauqq")
    public suspend fun sourceId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceId = mapped
    }

    /**
     * @param value The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
     */
    @JvmName("pdrlpgxtxykbpxgu")
    public suspend fun storageAutoResizeLimit(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAutoResizeLimit = mapped
    }

    /**
     * @param value The tier (or machine type) for this instance, for example: db-n1-standard-1 (MySQL instances) or db-custom-1-3840 (PostgreSQL instances).
     * For more information, see https://cloud.google.com/sql/docs/mysql/instance-settings
     */
    @JvmName("sxjuatjjwedughyv")
    public suspend fun tier(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tier = mapped
    }

    /**
     * @param value The resource labels for a Cloud SQL instance to use to annotate any related underlying resources such as Compute Engine VMs.
     */
    @JvmName("hulqnaidwhnqfvuo")
    public suspend fun userLabels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userLabels = mapped
    }

    /**
     * @param values The resource labels for a Cloud SQL instance to use to annotate any related underlying resources such as Compute Engine VMs.
     */
    @JvmName("diesffbwsxxcqjna")
    public fun userLabels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.userLabels = mapped
    }

    /**
     * @param value The Google Cloud Platform zone where your Cloud SQL datdabse instance is located.
     */
    @JvmName("fcfqnchdyedktqab")
    public suspend fun zone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zone = mapped
    }

    internal fun build(): ConnectionProfileCloudsqlSettingsArgs =
        ConnectionProfileCloudsqlSettingsArgs(
            activationPolicy = activationPolicy,
            autoStorageIncrease = autoStorageIncrease,
            cmekKeyName = cmekKeyName,
            collation = collation,
            dataDiskSizeGb = dataDiskSizeGb,
            dataDiskType = dataDiskType,
            databaseFlags = databaseFlags,
            databaseVersion = databaseVersion,
            edition = edition,
            ipConfig = ipConfig,
            rootPassword = rootPassword,
            rootPasswordSet = rootPasswordSet,
            sourceId = sourceId ?: throw PulumiNullFieldException("sourceId"),
            storageAutoResizeLimit = storageAutoResizeLimit,
            tier = tier,
            userLabels = userLabels,
            zone = zone,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy