com.pulumi.gcp.alloydb.kotlin.outputs.ClusterAutomatedBackupPolicy.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.alloydb.kotlin.outputs
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
/**
*
* @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 ClusterAutomatedBackupPolicy(
public val backupWindow: String? = null,
public val enabled: Boolean? = null,
public val encryptionConfig: ClusterAutomatedBackupPolicyEncryptionConfig? = null,
public val labels: Map? = null,
public val location: String? = null,
public val quantityBasedRetention: ClusterAutomatedBackupPolicyQuantityBasedRetention? = null,
public val timeBasedRetention: ClusterAutomatedBackupPolicyTimeBasedRetention? = null,
public val weeklySchedule: ClusterAutomatedBackupPolicyWeeklySchedule? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.gcp.alloydb.outputs.ClusterAutomatedBackupPolicy): ClusterAutomatedBackupPolicy = ClusterAutomatedBackupPolicy(
backupWindow = javaType.backupWindow().map({ args0 -> args0 }).orElse(null),
enabled = javaType.enabled().map({ args0 -> args0 }).orElse(null),
encryptionConfig = javaType.encryptionConfig().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.alloydb.kotlin.outputs.ClusterAutomatedBackupPolicyEncryptionConfig.Companion.toKotlin(args0)
})
}).orElse(null),
labels = javaType.labels().map({ args0 -> args0.key.to(args0.value) }).toMap(),
location = javaType.location().map({ args0 -> args0 }).orElse(null),
quantityBasedRetention = javaType.quantityBasedRetention().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.alloydb.kotlin.outputs.ClusterAutomatedBackupPolicyQuantityBasedRetention.Companion.toKotlin(args0)
})
}).orElse(null),
timeBasedRetention = javaType.timeBasedRetention().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.alloydb.kotlin.outputs.ClusterAutomatedBackupPolicyTimeBasedRetention.Companion.toKotlin(args0)
})
}).orElse(null),
weeklySchedule = javaType.weeklySchedule().map({ args0 ->
args0.let({ args0 ->
com.pulumi.gcp.alloydb.kotlin.outputs.ClusterAutomatedBackupPolicyWeeklySchedule.Companion.toKotlin(args0)
})
}).orElse(null),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy