Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.gcp.sql.kotlin.inputs.DatabaseInstanceSettingsArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.sql.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsArgs.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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
*
* @property activationPolicy This specifies when the instance should be
* active. Can be either `ALWAYS`, `NEVER` or `ON_DEMAND`.
* @property activeDirectoryConfig
* @property advancedMachineFeatures
* @property availabilityType The availability type of the Cloud SQL
* instance, high availability (`REGIONAL`) or single zone (`ZONAL`).' For all instances, ensure that
* `settings.backup_configuration.enabled` is set to `true`.
* For MySQL instances, ensure that `settings.backup_configuration.binary_log_enabled` is set to `true`.
* For Postgres and SQL Server instances, ensure that `settings.backup_configuration.point_in_time_recovery_enabled`
* is set to `true`. Defaults to `ZONAL`.
* @property backupConfiguration
* @property collation The name of server instance collation.
* @property connectorEnforcement Enables the enforcement of Cloud SQL Auth Proxy or Cloud SQL connectors for all the connections. If enabled, all the direct connections are rejected.
* @property dataCacheConfig Data cache configurations.
* @property databaseFlags
* @property deletionProtectionEnabled Configuration to protect against accidental instance deletion.
* @property denyMaintenancePeriod
* @property diskAutoresize Enables auto-resizing of the storage size. Defaults to `true`. Note that if `disk_size` is set, future `pulumi up` calls will attempt to delete the instance in order to resize the disk to the value specified in disk_size if it has been resized. To avoid this, ensure that `lifecycle.ignore_changes` is applied to `disk_size`.
* @property diskAutoresizeLimit The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
* @property diskSize The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. Note that this value will override the resizing from `disk_autoresize` if that feature is enabled. To avoid this, set `lifecycle.ignore_changes` on this field.
* @property diskType The type of data disk: PD_SSD or PD_HDD. Defaults to `PD_SSD`.
* @property edition The edition of the instance, can be `ENTERPRISE` or `ENTERPRISE_PLUS`.
* @property enableDataplexIntegration Enables [Cloud SQL instance integration with Dataplex](https://cloud.google.com/sql/docs/mysql/dataplex-catalog-integration). MySQL, Postgres and SQL Server instances are supported for this feature. Defaults to `false`.
* @property enableGoogleMlIntegration Enables [Cloud SQL instances to connect to Vertex AI](https://cloud.google.com/sql/docs/postgres/integrate-cloud-sql-with-vertex-ai) and pass requests for real-time predictions and insights. Defaults to `false`.
* @property insightsConfig Configuration of Query Insights.
* @property ipConfiguration
* @property locationPreference
* @property maintenanceWindow Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
* @property passwordValidationPolicy
* @property pricingPlan Pricing plan for this instance, can only be `PER_USE`.
* @property sqlServerAuditConfig
* @property tier The machine type to use. See [tiers](https://cloud.google.com/sql/docs/admin-api/v1beta4/tiers)
* for more details and supported versions. Postgres supports only shared-core machine types,
* and custom machine types such as `db-custom-2-13312`. See the [Custom Machine Type Documentation](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create) to learn about specifying custom machine types.
* @property timeZone The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
* @property userLabels A set of key/value user label pairs to assign to the instance.
* @property version Used to make sure changes to the `settings` block are
* atomic.
*/
public data class DatabaseInstanceSettingsArgs(
public val activationPolicy: Output? = null,
public val activeDirectoryConfig: Output? =
null,
public val advancedMachineFeatures: Output? =
null,
public val availabilityType: Output? = null,
public val backupConfiguration: Output? = null,
public val collation: Output? = null,
public val connectorEnforcement: Output? = null,
public val dataCacheConfig: Output? = null,
public val databaseFlags: Output>? = null,
public val deletionProtectionEnabled: Output? = null,
public val denyMaintenancePeriod: Output? =
null,
public val diskAutoresize: Output? = null,
public val diskAutoresizeLimit: Output? = null,
public val diskSize: Output? = null,
public val diskType: Output? = null,
public val edition: Output? = null,
public val enableDataplexIntegration: Output? = null,
public val enableGoogleMlIntegration: Output? = null,
public val insightsConfig: Output? = null,
public val ipConfiguration: Output? = null,
public val locationPreference: Output? = null,
public val maintenanceWindow: Output? = null,
public val passwordValidationPolicy: Output? =
null,
public val pricingPlan: Output? = null,
public val sqlServerAuditConfig: Output? = null,
public val tier: Output,
public val timeZone: Output? = null,
public val userLabels: Output>? = null,
public val version: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsArgs =
com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsArgs.builder()
.activationPolicy(activationPolicy?.applyValue({ args0 -> args0 }))
.activeDirectoryConfig(
activeDirectoryConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.advancedMachineFeatures(
advancedMachineFeatures?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.availabilityType(availabilityType?.applyValue({ args0 -> args0 }))
.backupConfiguration(
backupConfiguration?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.collation(collation?.applyValue({ args0 -> args0 }))
.connectorEnforcement(connectorEnforcement?.applyValue({ args0 -> args0 }))
.dataCacheConfig(dataCacheConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.databaseFlags(
databaseFlags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.deletionProtectionEnabled(deletionProtectionEnabled?.applyValue({ args0 -> args0 }))
.denyMaintenancePeriod(
denyMaintenancePeriod?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.diskAutoresize(diskAutoresize?.applyValue({ args0 -> args0 }))
.diskAutoresizeLimit(diskAutoresizeLimit?.applyValue({ args0 -> args0 }))
.diskSize(diskSize?.applyValue({ args0 -> args0 }))
.diskType(diskType?.applyValue({ args0 -> args0 }))
.edition(edition?.applyValue({ args0 -> args0 }))
.enableDataplexIntegration(enableDataplexIntegration?.applyValue({ args0 -> args0 }))
.enableGoogleMlIntegration(enableGoogleMlIntegration?.applyValue({ args0 -> args0 }))
.insightsConfig(insightsConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.ipConfiguration(ipConfiguration?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.locationPreference(
locationPreference?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.maintenanceWindow(maintenanceWindow?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.passwordValidationPolicy(
passwordValidationPolicy?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.pricingPlan(pricingPlan?.applyValue({ args0 -> args0 }))
.sqlServerAuditConfig(
sqlServerAuditConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.tier(tier.applyValue({ args0 -> args0 }))
.timeZone(timeZone?.applyValue({ args0 -> args0 }))
.userLabels(
userLabels?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
)
.version(version?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [DatabaseInstanceSettingsArgs].
*/
@PulumiTagMarker
public class DatabaseInstanceSettingsArgsBuilder internal constructor() {
private var activationPolicy: Output? = null
private var activeDirectoryConfig: Output? =
null
private var advancedMachineFeatures: Output? =
null
private var availabilityType: Output? = null
private var backupConfiguration: Output? = null
private var collation: Output? = null
private var connectorEnforcement: Output? = null
private var dataCacheConfig: Output? = null
private var databaseFlags: Output>? = null
private var deletionProtectionEnabled: Output? = null
private var denyMaintenancePeriod: Output? =
null
private var diskAutoresize: Output? = null
private var diskAutoresizeLimit: Output? = null
private var diskSize: Output? = null
private var diskType: Output? = null
private var edition: Output? = null
private var enableDataplexIntegration: Output? = null
private var enableGoogleMlIntegration: Output? = null
private var insightsConfig: Output? = null
private var ipConfiguration: Output? = null
private var locationPreference: Output? = null
private var maintenanceWindow: Output? = null
private var passwordValidationPolicy:
Output? = null
private var pricingPlan: Output? = null
private var sqlServerAuditConfig: Output? = null
private var tier: Output? = null
private var timeZone: Output? = null
private var userLabels: Output>? = null
private var version: Output? = null
/**
* @param value This specifies when the instance should be
* active. Can be either `ALWAYS`, `NEVER` or `ON_DEMAND`.
*/
@JvmName("wqgpeggtwdfikvxy")
public suspend fun activationPolicy(`value`: Output) {
this.activationPolicy = value
}
/**
* @param value
*/
@JvmName("lcmjqdfacyptyvox")
public suspend fun activeDirectoryConfig(`value`: Output) {
this.activeDirectoryConfig = value
}
/**
* @param value
*/
@JvmName("bhenvkvignnfhewd")
public suspend fun advancedMachineFeatures(`value`: Output) {
this.advancedMachineFeatures = value
}
/**
* @param value The availability type of the Cloud SQL
* instance, high availability (`REGIONAL`) or single zone (`ZONAL`).' For all instances, ensure that
* `settings.backup_configuration.enabled` is set to `true`.
* For MySQL instances, ensure that `settings.backup_configuration.binary_log_enabled` is set to `true`.
* For Postgres and SQL Server instances, ensure that `settings.backup_configuration.point_in_time_recovery_enabled`
* is set to `true`. Defaults to `ZONAL`.
*/
@JvmName("hxwpsqknmbpgvsxi")
public suspend fun availabilityType(`value`: Output) {
this.availabilityType = value
}
/**
* @param value
*/
@JvmName("enlldolbscgtkonu")
public suspend fun backupConfiguration(`value`: Output) {
this.backupConfiguration = value
}
/**
* @param value The name of server instance collation.
*/
@JvmName("otcgsgftkwbnloor")
public suspend fun collation(`value`: Output) {
this.collation = value
}
/**
* @param value Enables the enforcement of Cloud SQL Auth Proxy or Cloud SQL connectors for all the connections. If enabled, all the direct connections are rejected.
*/
@JvmName("jghukagmdibfvlrk")
public suspend fun connectorEnforcement(`value`: Output) {
this.connectorEnforcement = value
}
/**
* @param value Data cache configurations.
*/
@JvmName("eewycbmllahocyhr")
public suspend fun dataCacheConfig(`value`: Output) {
this.dataCacheConfig = value
}
/**
* @param value
*/
@JvmName("mptbhncycwjqoetn")
public suspend fun databaseFlags(`value`: Output>) {
this.databaseFlags = value
}
@JvmName("naioqjimpanvxyxe")
public suspend fun databaseFlags(vararg values: Output) {
this.databaseFlags = Output.all(values.asList())
}
/**
* @param values
*/
@JvmName("yxsspgidvbbyxvno")
public suspend fun databaseFlags(values: List>) {
this.databaseFlags = Output.all(values)
}
/**
* @param value Configuration to protect against accidental instance deletion.
*/
@JvmName("byfyxwyooeyiahqu")
public suspend fun deletionProtectionEnabled(`value`: Output) {
this.deletionProtectionEnabled = value
}
/**
* @param value
*/
@JvmName("mvlfkgrxuswffdqk")
public suspend fun denyMaintenancePeriod(`value`: Output) {
this.denyMaintenancePeriod = value
}
/**
* @param value Enables auto-resizing of the storage size. Defaults to `true`. Note that if `disk_size` is set, future `pulumi up` calls will attempt to delete the instance in order to resize the disk to the value specified in disk_size if it has been resized. To avoid this, ensure that `lifecycle.ignore_changes` is applied to `disk_size`.
*/
@JvmName("ikcuknhlwtjhprtd")
public suspend fun diskAutoresize(`value`: Output) {
this.diskAutoresize = 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("xijnvaqysiioddob")
public suspend fun diskAutoresizeLimit(`value`: Output) {
this.diskAutoresizeLimit = value
}
/**
* @param value The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. Note that this value will override the resizing from `disk_autoresize` if that feature is enabled. To avoid this, set `lifecycle.ignore_changes` on this field.
*/
@JvmName("vdsphhaynuabwvbb")
public suspend fun diskSize(`value`: Output) {
this.diskSize = value
}
/**
* @param value The type of data disk: PD_SSD or PD_HDD. Defaults to `PD_SSD`.
*/
@JvmName("yceuuhobvmroevfc")
public suspend fun diskType(`value`: Output) {
this.diskType = value
}
/**
* @param value The edition of the instance, can be `ENTERPRISE` or `ENTERPRISE_PLUS`.
*/
@JvmName("wfugvkcitoxxqgfg")
public suspend fun edition(`value`: Output) {
this.edition = value
}
/**
* @param value Enables [Cloud SQL instance integration with Dataplex](https://cloud.google.com/sql/docs/mysql/dataplex-catalog-integration). MySQL, Postgres and SQL Server instances are supported for this feature. Defaults to `false`.
*/
@JvmName("anacdsbgfdcvvbco")
public suspend fun enableDataplexIntegration(`value`: Output) {
this.enableDataplexIntegration = value
}
/**
* @param value Enables [Cloud SQL instances to connect to Vertex AI](https://cloud.google.com/sql/docs/postgres/integrate-cloud-sql-with-vertex-ai) and pass requests for real-time predictions and insights. Defaults to `false`.
*/
@JvmName("rpalmifolldodrax")
public suspend fun enableGoogleMlIntegration(`value`: Output) {
this.enableGoogleMlIntegration = value
}
/**
* @param value Configuration of Query Insights.
*/
@JvmName("ntdanashrikcdskm")
public suspend fun insightsConfig(`value`: Output) {
this.insightsConfig = value
}
/**
* @param value
*/
@JvmName("aenkgebwejhnmjvv")
public suspend fun ipConfiguration(`value`: Output) {
this.ipConfiguration = value
}
/**
* @param value
*/
@JvmName("msgoxqihkwyaopjp")
public suspend fun locationPreference(`value`: Output) {
this.locationPreference = value
}
/**
* @param value Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
*/
@JvmName("bbwksrcueqabwvqq")
public suspend fun maintenanceWindow(`value`: Output) {
this.maintenanceWindow = value
}
/**
* @param value
*/
@JvmName("iifxttmskpvwofto")
public suspend fun passwordValidationPolicy(`value`: Output) {
this.passwordValidationPolicy = value
}
/**
* @param value Pricing plan for this instance, can only be `PER_USE`.
*/
@JvmName("kbcimjkgneiisoia")
public suspend fun pricingPlan(`value`: Output) {
this.pricingPlan = value
}
/**
* @param value
*/
@JvmName("ymgmeyigrnywslmg")
public suspend fun sqlServerAuditConfig(`value`: Output) {
this.sqlServerAuditConfig = value
}
/**
* @param value The machine type to use. See [tiers](https://cloud.google.com/sql/docs/admin-api/v1beta4/tiers)
* for more details and supported versions. Postgres supports only shared-core machine types,
* and custom machine types such as `db-custom-2-13312`. See the [Custom Machine Type Documentation](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create) to learn about specifying custom machine types.
*/
@JvmName("ofqdekdbthncgssh")
public suspend fun tier(`value`: Output) {
this.tier = value
}
/**
* @param value The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
*/
@JvmName("xwangivpjfhuxyfv")
public suspend fun timeZone(`value`: Output) {
this.timeZone = value
}
/**
* @param value A set of key/value user label pairs to assign to the instance.
*/
@JvmName("cgypfqewhevsmowh")
public suspend fun userLabels(`value`: Output>) {
this.userLabels = value
}
/**
* @param value Used to make sure changes to the `settings` block are
* atomic.
*/
@JvmName("wimgspdmmvmvvtfj")
public suspend fun version(`value`: Output) {
this.version = value
}
/**
* @param value This specifies when the instance should be
* active. Can be either `ALWAYS`, `NEVER` or `ON_DEMAND`.
*/
@JvmName("nciavrkcnqlropci")
public suspend fun activationPolicy(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.activationPolicy = mapped
}
/**
* @param value
*/
@JvmName("rgnartplewfnswrf")
public suspend fun activeDirectoryConfig(`value`: DatabaseInstanceSettingsActiveDirectoryConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.activeDirectoryConfig = mapped
}
/**
* @param argument
*/
@JvmName("enjlivgaqvyfaueu")
public suspend fun activeDirectoryConfig(argument: suspend DatabaseInstanceSettingsActiveDirectoryConfigArgsBuilder.() -> Unit) {
val toBeMapped = DatabaseInstanceSettingsActiveDirectoryConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.activeDirectoryConfig = mapped
}
/**
* @param value
*/
@JvmName("iokgaydogkgxskxc")
public suspend fun advancedMachineFeatures(`value`: DatabaseInstanceSettingsAdvancedMachineFeaturesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.advancedMachineFeatures = mapped
}
/**
* @param argument
*/
@JvmName("ykmefsbiaapffbbu")
public suspend fun advancedMachineFeatures(argument: suspend DatabaseInstanceSettingsAdvancedMachineFeaturesArgsBuilder.() -> Unit) {
val toBeMapped = DatabaseInstanceSettingsAdvancedMachineFeaturesArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.advancedMachineFeatures = mapped
}
/**
* @param value The availability type of the Cloud SQL
* instance, high availability (`REGIONAL`) or single zone (`ZONAL`).' For all instances, ensure that
* `settings.backup_configuration.enabled` is set to `true`.
* For MySQL instances, ensure that `settings.backup_configuration.binary_log_enabled` is set to `true`.
* For Postgres and SQL Server instances, ensure that `settings.backup_configuration.point_in_time_recovery_enabled`
* is set to `true`. Defaults to `ZONAL`.
*/
@JvmName("hvdbnlfeurwvdbwr")
public suspend fun availabilityType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.availabilityType = mapped
}
/**
* @param value
*/
@JvmName("pfiqknntuafveycd")
public suspend fun backupConfiguration(`value`: DatabaseInstanceSettingsBackupConfigurationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.backupConfiguration = mapped
}
/**
* @param argument
*/
@JvmName("wlbxolysnnmfkvwk")
public suspend fun backupConfiguration(argument: suspend DatabaseInstanceSettingsBackupConfigurationArgsBuilder.() -> Unit) {
val toBeMapped = DatabaseInstanceSettingsBackupConfigurationArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.backupConfiguration = mapped
}
/**
* @param value The name of server instance collation.
*/
@JvmName("wnvqfjfvsehuoifq")
public suspend fun collation(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.collation = mapped
}
/**
* @param value Enables the enforcement of Cloud SQL Auth Proxy or Cloud SQL connectors for all the connections. If enabled, all the direct connections are rejected.
*/
@JvmName("hvhpiiexawxoptkh")
public suspend fun connectorEnforcement(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.connectorEnforcement = mapped
}
/**
* @param value Data cache configurations.
*/
@JvmName("uvvojjvoaggdodhc")
public suspend fun dataCacheConfig(`value`: DatabaseInstanceSettingsDataCacheConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.dataCacheConfig = mapped
}
/**
* @param argument Data cache configurations.
*/
@JvmName("bjpqeharrmrhosio")
public suspend fun dataCacheConfig(argument: suspend DatabaseInstanceSettingsDataCacheConfigArgsBuilder.() -> Unit) {
val toBeMapped = DatabaseInstanceSettingsDataCacheConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.dataCacheConfig = mapped
}
/**
* @param value
*/
@JvmName("ssapkpckyaegycml")
public suspend fun databaseFlags(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.databaseFlags = mapped
}
/**
* @param argument
*/
@JvmName("uroetqglglbauhks")
public suspend fun databaseFlags(argument: List Unit>) {
val toBeMapped = argument.toList().map {
DatabaseInstanceSettingsDatabaseFlagArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.databaseFlags = mapped
}
/**
* @param argument
*/
@JvmName("fxylgcicneyswccl")
public suspend fun databaseFlags(vararg argument: suspend DatabaseInstanceSettingsDatabaseFlagArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
DatabaseInstanceSettingsDatabaseFlagArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.databaseFlags = mapped
}
/**
* @param argument
*/
@JvmName("geuikprqsyyugejd")
public suspend fun databaseFlags(argument: suspend DatabaseInstanceSettingsDatabaseFlagArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
DatabaseInstanceSettingsDatabaseFlagArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.databaseFlags = mapped
}
/**
* @param values
*/
@JvmName("qajixaisaddiydag")
public suspend fun databaseFlags(vararg values: DatabaseInstanceSettingsDatabaseFlagArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.databaseFlags = mapped
}
/**
* @param value Configuration to protect against accidental instance deletion.
*/
@JvmName("btsnolggweeosnca")
public suspend fun deletionProtectionEnabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deletionProtectionEnabled = mapped
}
/**
* @param value
*/
@JvmName("rmgkoliikjcaanjv")
public suspend fun denyMaintenancePeriod(`value`: DatabaseInstanceSettingsDenyMaintenancePeriodArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.denyMaintenancePeriod = mapped
}
/**
* @param argument
*/
@JvmName("scxibiwwqonkcgdf")
public suspend fun denyMaintenancePeriod(argument: suspend DatabaseInstanceSettingsDenyMaintenancePeriodArgsBuilder.() -> Unit) {
val toBeMapped = DatabaseInstanceSettingsDenyMaintenancePeriodArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.denyMaintenancePeriod = mapped
}
/**
* @param value Enables auto-resizing of the storage size. Defaults to `true`. Note that if `disk_size` is set, future `pulumi up` calls will attempt to delete the instance in order to resize the disk to the value specified in disk_size if it has been resized. To avoid this, ensure that `lifecycle.ignore_changes` is applied to `disk_size`.
*/
@JvmName("mrknoqyfaefgxspm")
public suspend fun diskAutoresize(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.diskAutoresize = 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("keenvvlxschqhaox")
public suspend fun diskAutoresizeLimit(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.diskAutoresizeLimit = mapped
}
/**
* @param value The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. Note that this value will override the resizing from `disk_autoresize` if that feature is enabled. To avoid this, set `lifecycle.ignore_changes` on this field.
*/
@JvmName("ojljpigumihywjum")
public suspend fun diskSize(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.diskSize = mapped
}
/**
* @param value The type of data disk: PD_SSD or PD_HDD. Defaults to `PD_SSD`.
*/
@JvmName("xociatlaaawlsedg")
public suspend fun diskType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.diskType = mapped
}
/**
* @param value The edition of the instance, can be `ENTERPRISE` or `ENTERPRISE_PLUS`.
*/
@JvmName("pkgpfgtjtmtcincp")
public suspend fun edition(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.edition = mapped
}
/**
* @param value Enables [Cloud SQL instance integration with Dataplex](https://cloud.google.com/sql/docs/mysql/dataplex-catalog-integration). MySQL, Postgres and SQL Server instances are supported for this feature. Defaults to `false`.
*/
@JvmName("dsisibedbahjycjs")
public suspend fun enableDataplexIntegration(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enableDataplexIntegration = mapped
}
/**
* @param value Enables [Cloud SQL instances to connect to Vertex AI](https://cloud.google.com/sql/docs/postgres/integrate-cloud-sql-with-vertex-ai) and pass requests for real-time predictions and insights. Defaults to `false`.
*/
@JvmName("ylhpmslrntbrjrps")
public suspend fun enableGoogleMlIntegration(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enableGoogleMlIntegration = mapped
}
/**
* @param value Configuration of Query Insights.
*/
@JvmName("afendwxuvschaueu")
public suspend fun insightsConfig(`value`: DatabaseInstanceSettingsInsightsConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.insightsConfig = mapped
}
/**
* @param argument Configuration of Query Insights.
*/
@JvmName("iahoqxhjiymnwhnn")
public suspend fun insightsConfig(argument: suspend DatabaseInstanceSettingsInsightsConfigArgsBuilder.() -> Unit) {
val toBeMapped = DatabaseInstanceSettingsInsightsConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.insightsConfig = mapped
}
/**
* @param value
*/
@JvmName("uuuiflhcruxcjqnk")
public suspend fun ipConfiguration(`value`: DatabaseInstanceSettingsIpConfigurationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ipConfiguration = mapped
}
/**
* @param argument
*/
@JvmName("irculmpmcitxeobk")
public suspend fun ipConfiguration(argument: suspend DatabaseInstanceSettingsIpConfigurationArgsBuilder.() -> Unit) {
val toBeMapped = DatabaseInstanceSettingsIpConfigurationArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.ipConfiguration = mapped
}
/**
* @param value
*/
@JvmName("kjnkmiykyejemfxb")
public suspend fun locationPreference(`value`: DatabaseInstanceSettingsLocationPreferenceArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.locationPreference = mapped
}
/**
* @param argument
*/
@JvmName("rdgacnpiqqxhpcdl")
public suspend fun locationPreference(argument: suspend DatabaseInstanceSettingsLocationPreferenceArgsBuilder.() -> Unit) {
val toBeMapped = DatabaseInstanceSettingsLocationPreferenceArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.locationPreference = mapped
}
/**
* @param value Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
*/
@JvmName("vwjhqetlfaaljlwj")
public suspend fun maintenanceWindow(`value`: DatabaseInstanceSettingsMaintenanceWindowArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.maintenanceWindow = mapped
}
/**
* @param argument Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
*/
@JvmName("kmfdkvyuabqkqpjf")
public suspend fun maintenanceWindow(argument: suspend DatabaseInstanceSettingsMaintenanceWindowArgsBuilder.() -> Unit) {
val toBeMapped = DatabaseInstanceSettingsMaintenanceWindowArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.maintenanceWindow = mapped
}
/**
* @param value
*/
@JvmName("kqoobbnpaniirwsw")
public suspend fun passwordValidationPolicy(`value`: DatabaseInstanceSettingsPasswordValidationPolicyArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.passwordValidationPolicy = mapped
}
/**
* @param argument
*/
@JvmName("fhhlqfibpllhlhnw")
public suspend fun passwordValidationPolicy(argument: suspend DatabaseInstanceSettingsPasswordValidationPolicyArgsBuilder.() -> Unit) {
val toBeMapped = DatabaseInstanceSettingsPasswordValidationPolicyArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.passwordValidationPolicy = mapped
}
/**
* @param value Pricing plan for this instance, can only be `PER_USE`.
*/
@JvmName("bpihakddemwmrgvp")
public suspend fun pricingPlan(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.pricingPlan = mapped
}
/**
* @param value
*/
@JvmName("alcnnqhcfssplwbe")
public suspend fun sqlServerAuditConfig(`value`: DatabaseInstanceSettingsSqlServerAuditConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sqlServerAuditConfig = mapped
}
/**
* @param argument
*/
@JvmName("nqbpptyxmlskjkha")
public suspend fun sqlServerAuditConfig(argument: suspend DatabaseInstanceSettingsSqlServerAuditConfigArgsBuilder.() -> Unit) {
val toBeMapped = DatabaseInstanceSettingsSqlServerAuditConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.sqlServerAuditConfig = mapped
}
/**
* @param value The machine type to use. See [tiers](https://cloud.google.com/sql/docs/admin-api/v1beta4/tiers)
* for more details and supported versions. Postgres supports only shared-core machine types,
* and custom machine types such as `db-custom-2-13312`. See the [Custom Machine Type Documentation](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create) to learn about specifying custom machine types.
*/
@JvmName("xkoyngsylqlqbbme")
public suspend fun tier(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tier = mapped
}
/**
* @param value The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
*/
@JvmName("xywkscqxdnpxdhjy")
public suspend fun timeZone(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.timeZone = mapped
}
/**
* @param value A set of key/value user label pairs to assign to the instance.
*/
@JvmName("jntpipyemlxkpmns")
public suspend fun userLabels(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.userLabels = mapped
}
/**
* @param values A set of key/value user label pairs to assign to the instance.
*/
@JvmName("ueevsgqvteepwhgs")
public fun userLabels(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.userLabels = mapped
}
/**
* @param value Used to make sure changes to the `settings` block are
* atomic.
*/
@JvmName("qpopgqhhbagmmsbs")
public suspend fun version(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.version = mapped
}
internal fun build(): DatabaseInstanceSettingsArgs = DatabaseInstanceSettingsArgs(
activationPolicy = activationPolicy,
activeDirectoryConfig = activeDirectoryConfig,
advancedMachineFeatures = advancedMachineFeatures,
availabilityType = availabilityType,
backupConfiguration = backupConfiguration,
collation = collation,
connectorEnforcement = connectorEnforcement,
dataCacheConfig = dataCacheConfig,
databaseFlags = databaseFlags,
deletionProtectionEnabled = deletionProtectionEnabled,
denyMaintenancePeriod = denyMaintenancePeriod,
diskAutoresize = diskAutoresize,
diskAutoresizeLimit = diskAutoresizeLimit,
diskSize = diskSize,
diskType = diskType,
edition = edition,
enableDataplexIntegration = enableDataplexIntegration,
enableGoogleMlIntegration = enableGoogleMlIntegration,
insightsConfig = insightsConfig,
ipConfiguration = ipConfiguration,
locationPreference = locationPreference,
maintenanceWindow = maintenanceWindow,
passwordValidationPolicy = passwordValidationPolicy,
pricingPlan = pricingPlan,
sqlServerAuditConfig = sqlServerAuditConfig,
tier = tier ?: throw PulumiNullFieldException("tier"),
timeZone = timeZone,
userLabels = userLabels,
version = version,
)
}