com.pulumi.awsnative.lightsail.kotlin.DatabaseArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-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.awsnative.lightsail.kotlin
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.lightsail.DatabaseArgs.builder
import com.pulumi.awsnative.lightsail.kotlin.inputs.DatabaseRelationalDatabaseParameterArgs
import com.pulumi.awsnative.lightsail.kotlin.inputs.DatabaseRelationalDatabaseParameterArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Resource Type definition for AWS::Lightsail::Database
* @property availabilityZone The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
* @property backupRetention When true, enables automated backup retention for your database. Updates are applied during the next maintenance window because this can result in an outage.
* @property caCertificateIdentifier Indicates the certificate that needs to be associated with the database.
* @property masterDatabaseName The name of the database to create when the Lightsail database resource is created. For MySQL, if this parameter isn't specified, no database is created in the database resource. For PostgreSQL, if this parameter isn't specified, a database named postgres is created in the database resource.
* @property masterUserPassword The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
* @property masterUsername The name for the master user.
* @property preferredBackupWindow The daily time range during which automated backups are created for your new database if automated backups are enabled.
* @property preferredMaintenanceWindow The weekly time range during which system maintenance can occur on your new database.
* @property publiclyAccessible Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
* @property relationalDatabaseBlueprintId The blueprint ID for your new database. A blueprint describes the major engine version of a database.
* @property relationalDatabaseBundleId The bundle ID for your new database. A bundle describes the performance specifications for your database.
* @property relationalDatabaseName The name to use for your new Lightsail database resource.
* @property relationalDatabaseParameters Update one or more parameters of the relational database.
* @property rotateMasterUserPassword When true, the master user password is changed to a new strong password generated by Lightsail. Use the get relational database master user password operation to get the new password.
* @property tags An array of key-value pairs to apply to this resource.
*/
public data class DatabaseArgs(
public val availabilityZone: Output? = null,
public val backupRetention: Output? = null,
public val caCertificateIdentifier: Output? = null,
public val masterDatabaseName: Output? = null,
public val masterUserPassword: Output? = null,
public val masterUsername: Output? = null,
public val preferredBackupWindow: Output? = null,
public val preferredMaintenanceWindow: Output? = null,
public val publiclyAccessible: Output? = null,
public val relationalDatabaseBlueprintId: Output? = null,
public val relationalDatabaseBundleId: Output? = null,
public val relationalDatabaseName: Output? = null,
public val relationalDatabaseParameters: Output>? =
null,
public val rotateMasterUserPassword: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.lightsail.DatabaseArgs =
com.pulumi.awsnative.lightsail.DatabaseArgs.builder()
.availabilityZone(availabilityZone?.applyValue({ args0 -> args0 }))
.backupRetention(backupRetention?.applyValue({ args0 -> args0 }))
.caCertificateIdentifier(caCertificateIdentifier?.applyValue({ args0 -> args0 }))
.masterDatabaseName(masterDatabaseName?.applyValue({ args0 -> args0 }))
.masterUserPassword(masterUserPassword?.applyValue({ args0 -> args0 }))
.masterUsername(masterUsername?.applyValue({ args0 -> args0 }))
.preferredBackupWindow(preferredBackupWindow?.applyValue({ args0 -> args0 }))
.preferredMaintenanceWindow(preferredMaintenanceWindow?.applyValue({ args0 -> args0 }))
.publiclyAccessible(publiclyAccessible?.applyValue({ args0 -> args0 }))
.relationalDatabaseBlueprintId(relationalDatabaseBlueprintId?.applyValue({ args0 -> args0 }))
.relationalDatabaseBundleId(relationalDatabaseBundleId?.applyValue({ args0 -> args0 }))
.relationalDatabaseName(relationalDatabaseName?.applyValue({ args0 -> args0 }))
.relationalDatabaseParameters(
relationalDatabaseParameters?.applyValue({ args0 ->
args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.rotateMasterUserPassword(rotateMasterUserPassword?.applyValue({ args0 -> args0 }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [DatabaseArgs].
*/
@PulumiTagMarker
public class DatabaseArgsBuilder internal constructor() {
private var availabilityZone: Output? = null
private var backupRetention: Output? = null
private var caCertificateIdentifier: Output? = null
private var masterDatabaseName: Output? = null
private var masterUserPassword: Output? = null
private var masterUsername: Output? = null
private var preferredBackupWindow: Output? = null
private var preferredMaintenanceWindow: Output? = null
private var publiclyAccessible: Output? = null
private var relationalDatabaseBlueprintId: Output? = null
private var relationalDatabaseBundleId: Output? = null
private var relationalDatabaseName: Output? = null
private var relationalDatabaseParameters: Output>? =
null
private var rotateMasterUserPassword: Output? = null
private var tags: Output>? = null
/**
* @param value The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.
*/
@JvmName("eatbdpqqlmdcdprr")
public suspend fun availabilityZone(`value`: Output) {
this.availabilityZone = value
}
/**
* @param value When true, enables automated backup retention for your database. Updates are applied during the next maintenance window because this can result in an outage.
*/
@JvmName("canybkxwhyrehqtk")
public suspend fun backupRetention(`value`: Output) {
this.backupRetention = value
}
/**
* @param value Indicates the certificate that needs to be associated with the database.
*/
@JvmName("alxwhcucdjohvpnn")
public suspend fun caCertificateIdentifier(`value`: Output) {
this.caCertificateIdentifier = value
}
/**
* @param value The name of the database to create when the Lightsail database resource is created. For MySQL, if this parameter isn't specified, no database is created in the database resource. For PostgreSQL, if this parameter isn't specified, a database named postgres is created in the database resource.
*/
@JvmName("kghkguuulmkejflo")
public suspend fun masterDatabaseName(`value`: Output) {
this.masterDatabaseName = value
}
/**
* @param value The password for the master user. The password can include any printable ASCII character except "/", """, or "@". It cannot contain spaces.
*/
@JvmName("tnopsflgqmojllui")
public suspend fun masterUserPassword(`value`: Output) {
this.masterUserPassword = value
}
/**
* @param value The name for the master user.
*/
@JvmName("tvwtxobrvdiwirgl")
public suspend fun masterUsername(`value`: Output) {
this.masterUsername = value
}
/**
* @param value The daily time range during which automated backups are created for your new database if automated backups are enabled.
*/
@JvmName("ggimadkigpsesksu")
public suspend fun preferredBackupWindow(`value`: Output) {
this.preferredBackupWindow = value
}
/**
* @param value The weekly time range during which system maintenance can occur on your new database.
*/
@JvmName("utrliddqjjnsvtvi")
public suspend fun preferredMaintenanceWindow(`value`: Output) {
this.preferredMaintenanceWindow = value
}
/**
* @param value Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.
*/
@JvmName("rlxfamenyoimtksw")
public suspend fun publiclyAccessible(`value`: Output) {
this.publiclyAccessible = value
}
/**
* @param value The blueprint ID for your new database. A blueprint describes the major engine version of a database.
*/
@JvmName("opsmuatcwspiwcth")
public suspend fun relationalDatabaseBlueprintId(`value`: Output) {
this.relationalDatabaseBlueprintId = value
}
/**
* @param value The bundle ID for your new database. A bundle describes the performance specifications for your database.
*/
@JvmName("gdwxdcyqhksrsrtv")
public suspend fun relationalDatabaseBundleId(`value`: Output) {
this.relationalDatabaseBundleId = value
}
/**
* @param value The name to use for your new Lightsail database resource.
*/
@JvmName("qhgrfffnuntgievf")
public suspend fun relationalDatabaseName(`value`: Output) {
this.relationalDatabaseName = value
}
/**
* @param value Update one or more parameters of the relational database.
*/
@JvmName("pgxvrkiemobfgrll")
public suspend fun relationalDatabaseParameters(`value`: Output>) {
this.relationalDatabaseParameters = value
}
@JvmName("noyonfgofijtpgil")
public suspend fun relationalDatabaseParameters(vararg values: Output) {
this.relationalDatabaseParameters = Output.all(values.asList())
}
/**
* @param values Update one or more parameters of the relational database.
*/
@JvmName("vrxdcehlsqtureww")
public suspend fun relationalDatabaseParameters(values: List