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.alloydb.kotlin.inputs.ClusterAutomatedBackupPolicyArgs.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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.alloydb.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.alloydb.inputs.ClusterAutomatedBackupPolicyArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
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 backupWindow The length of the time window during which a backup can be taken. If a backup does not succeed within this time window, it will be canceled and considered failed.
* The backup window must be at least 5 minutes long. There is no upper bound on the window. If not set, it will default to 1 hour.
* A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
* @property enabled Whether automated backups are enabled.
* @property encryptionConfig EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).
* Structure is documented below.
* @property labels Labels to apply to backups created using this configuration.
* @property location The location where the backup will be stored. Currently, the only supported option is to store the backup in the same region as the cluster.
* @property quantityBasedRetention Quantity-based Backup retention policy to retain recent backups. Conflicts with 'time_based_retention', both can't be set together.
* Structure is documented below.
* @property timeBasedRetention Time-based Backup retention policy. Conflicts with 'quantity_based_retention', both can't be set together.
* Structure is documented below.
* @property weeklySchedule Weekly schedule for the Backup.
* Structure is documented below.
*/
public data class ClusterAutomatedBackupPolicyArgs(
public val backupWindow: Output? = null,
public val enabled: Output? = null,
public val encryptionConfig: Output? = null,
public val labels: Output>? = null,
public val location: Output? = null,
public val quantityBasedRetention: Output? =
null,
public val timeBasedRetention: Output? = null,
public val weeklySchedule: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.alloydb.inputs.ClusterAutomatedBackupPolicyArgs =
com.pulumi.gcp.alloydb.inputs.ClusterAutomatedBackupPolicyArgs.builder()
.backupWindow(backupWindow?.applyValue({ args0 -> args0 }))
.enabled(enabled?.applyValue({ args0 -> args0 }))
.encryptionConfig(encryptionConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.location(location?.applyValue({ args0 -> args0 }))
.quantityBasedRetention(
quantityBasedRetention?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.timeBasedRetention(
timeBasedRetention?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.weeklySchedule(
weeklySchedule?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
).build()
}
/**
* Builder for [ClusterAutomatedBackupPolicyArgs].
*/
@PulumiTagMarker
public class ClusterAutomatedBackupPolicyArgsBuilder internal constructor() {
private var backupWindow: Output? = null
private var enabled: Output? = null
private var encryptionConfig: Output? = null
private var labels: Output>? = null
private var location: Output? = null
private var quantityBasedRetention:
Output? = null
private var timeBasedRetention: Output? = null
private var weeklySchedule: Output? = null
/**
* @param value The length of the time window during which a backup can be taken. If a backup does not succeed within this time window, it will be canceled and considered failed.
* The backup window must be at least 5 minutes long. There is no upper bound on the window. If not set, it will default to 1 hour.
* A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
*/
@JvmName("oevdamucxinorevu")
public suspend fun backupWindow(`value`: Output) {
this.backupWindow = value
}
/**
* @param value Whether automated backups are enabled.
*/
@JvmName("kyyweawxalsbbcnb")
public suspend fun enabled(`value`: Output) {
this.enabled = value
}
/**
* @param value EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).
* Structure is documented below.
*/
@JvmName("xqnaxlsbxnekxcug")
public suspend fun encryptionConfig(`value`: Output) {
this.encryptionConfig = value
}
/**
* @param value Labels to apply to backups created using this configuration.
*/
@JvmName("ghflwpqvomxkurgk")
public suspend fun labels(`value`: Output>) {
this.labels = value
}
/**
* @param value The location where the backup will be stored. Currently, the only supported option is to store the backup in the same region as the cluster.
*/
@JvmName("iwmqxvyraqgtdtur")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Quantity-based Backup retention policy to retain recent backups. Conflicts with 'time_based_retention', both can't be set together.
* Structure is documented below.
*/
@JvmName("hjbyvcfryggufwjy")
public suspend fun quantityBasedRetention(`value`: Output) {
this.quantityBasedRetention = value
}
/**
* @param value Time-based Backup retention policy. Conflicts with 'quantity_based_retention', both can't be set together.
* Structure is documented below.
*/
@JvmName("ugdubjisakydffxc")
public suspend fun timeBasedRetention(`value`: Output) {
this.timeBasedRetention = value
}
/**
* @param value Weekly schedule for the Backup.
* Structure is documented below.
*/
@JvmName("lccphxiuwjdvmtaa")
public suspend fun weeklySchedule(`value`: Output) {
this.weeklySchedule = value
}
/**
* @param value The length of the time window during which a backup can be taken. If a backup does not succeed within this time window, it will be canceled and considered failed.
* The backup window must be at least 5 minutes long. There is no upper bound on the window. If not set, it will default to 1 hour.
* A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
*/
@JvmName("updoxxtufsviengc")
public suspend fun backupWindow(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.backupWindow = mapped
}
/**
* @param value Whether automated backups are enabled.
*/
@JvmName("ivnhhqgaebiirdkf")
public suspend fun enabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enabled = mapped
}
/**
* @param value EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).
* Structure is documented below.
*/
@JvmName("gkhnopxvqgoqtbrb")
public suspend fun encryptionConfig(`value`: ClusterAutomatedBackupPolicyEncryptionConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.encryptionConfig = mapped
}
/**
* @param argument EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).
* Structure is documented below.
*/
@JvmName("nwgvtwpfnhtyrmhq")
public suspend fun encryptionConfig(argument: suspend ClusterAutomatedBackupPolicyEncryptionConfigArgsBuilder.() -> Unit) {
val toBeMapped = ClusterAutomatedBackupPolicyEncryptionConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.encryptionConfig = mapped
}
/**
* @param value Labels to apply to backups created using this configuration.
*/
@JvmName("twiwomvouelnalnf")
public suspend fun labels(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.labels = mapped
}
/**
* @param values Labels to apply to backups created using this configuration.
*/
@JvmName("dvolfvxanbqvwaav")
public fun labels(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.labels = mapped
}
/**
* @param value The location where the backup will be stored. Currently, the only supported option is to store the backup in the same region as the cluster.
*/
@JvmName("fkceakcqdogiketn")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value Quantity-based Backup retention policy to retain recent backups. Conflicts with 'time_based_retention', both can't be set together.
* Structure is documented below.
*/
@JvmName("kalfgnledlgvoban")
public suspend fun quantityBasedRetention(`value`: ClusterAutomatedBackupPolicyQuantityBasedRetentionArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.quantityBasedRetention = mapped
}
/**
* @param argument Quantity-based Backup retention policy to retain recent backups. Conflicts with 'time_based_retention', both can't be set together.
* Structure is documented below.
*/
@JvmName("xkcmpsebcoeysxcm")
public suspend fun quantityBasedRetention(argument: suspend ClusterAutomatedBackupPolicyQuantityBasedRetentionArgsBuilder.() -> Unit) {
val toBeMapped = ClusterAutomatedBackupPolicyQuantityBasedRetentionArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.quantityBasedRetention = mapped
}
/**
* @param value Time-based Backup retention policy. Conflicts with 'quantity_based_retention', both can't be set together.
* Structure is documented below.
*/
@JvmName("fcidhlfspxcfdcrw")
public suspend fun timeBasedRetention(`value`: ClusterAutomatedBackupPolicyTimeBasedRetentionArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.timeBasedRetention = mapped
}
/**
* @param argument Time-based Backup retention policy. Conflicts with 'quantity_based_retention', both can't be set together.
* Structure is documented below.
*/
@JvmName("ybijmrpvmuvemhjt")
public suspend fun timeBasedRetention(argument: suspend ClusterAutomatedBackupPolicyTimeBasedRetentionArgsBuilder.() -> Unit) {
val toBeMapped = ClusterAutomatedBackupPolicyTimeBasedRetentionArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.timeBasedRetention = mapped
}
/**
* @param value Weekly schedule for the Backup.
* Structure is documented below.
*/
@JvmName("golppvevdjrlmvvn")
public suspend fun weeklySchedule(`value`: ClusterAutomatedBackupPolicyWeeklyScheduleArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.weeklySchedule = mapped
}
/**
* @param argument Weekly schedule for the Backup.
* Structure is documented below.
*/
@JvmName("pjenpvoeachqwegf")
public suspend fun weeklySchedule(argument: suspend ClusterAutomatedBackupPolicyWeeklyScheduleArgsBuilder.() -> Unit) {
val toBeMapped = ClusterAutomatedBackupPolicyWeeklyScheduleArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.weeklySchedule = mapped
}
internal fun build(): ClusterAutomatedBackupPolicyArgs = ClusterAutomatedBackupPolicyArgs(
backupWindow = backupWindow,
enabled = enabled,
encryptionConfig = encryptionConfig,
labels = labels,
location = location,
quantityBasedRetention = quantityBasedRetention,
timeBasedRetention = timeBasedRetention,
weeklySchedule = weeklySchedule,
)
}