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

com.pulumi.azurenative.sqlvirtualmachine.kotlin.inputs.AutoBackupSettingsArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.sqlvirtualmachine.kotlin.inputs

import com.pulumi.azurenative.sqlvirtualmachine.inputs.AutoBackupSettingsArgs.builder
import com.pulumi.azurenative.sqlvirtualmachine.kotlin.enums.AutoBackupDaysOfWeek
import com.pulumi.azurenative.sqlvirtualmachine.kotlin.enums.BackupScheduleType
import com.pulumi.azurenative.sqlvirtualmachine.kotlin.enums.FullBackupFrequencyType
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Configure backups for databases in your SQL virtual machine.
 * @property backupScheduleType Backup schedule type.
 * @property backupSystemDbs Include or exclude system databases from auto backup.
 * @property daysOfWeek Days of the week for the backups when FullBackupFrequency is set to Weekly.
 * @property enable Enable or disable autobackup on SQL virtual machine.
 * @property enableEncryption Enable or disable encryption for backup on SQL virtual machine.
 * @property fullBackupFrequency Frequency of full backups. In both cases, full backups begin during the next scheduled time window.
 * @property fullBackupStartTime Start time of a given day during which full backups can take place. 0-23 hours.
 * @property fullBackupWindowHours Duration of the time window of a given day during which full backups can take place. 1-23 hours.
 * @property logBackupFrequency Frequency of log backups. 5-60 minutes.
 * @property password Password for encryption on backup.
 * @property retentionPeriod Retention period of backup: 1-90 days.
 * @property storageAccessKey Storage account key where backup will be taken to.
 * @property storageAccountUrl Storage account url where backup will be taken to.
 * @property storageContainerName Storage container name where backup will be taken to.
 */
public data class AutoBackupSettingsArgs(
    public val backupScheduleType: Output>? = null,
    public val backupSystemDbs: Output? = null,
    public val daysOfWeek: Output>>? = null,
    public val enable: Output? = null,
    public val enableEncryption: Output? = null,
    public val fullBackupFrequency: Output>? = null,
    public val fullBackupStartTime: Output? = null,
    public val fullBackupWindowHours: Output? = null,
    public val logBackupFrequency: Output? = null,
    public val password: Output? = null,
    public val retentionPeriod: Output? = null,
    public val storageAccessKey: Output? = null,
    public val storageAccountUrl: Output? = null,
    public val storageContainerName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.sqlvirtualmachine.inputs.AutoBackupSettingsArgs =
        com.pulumi.azurenative.sqlvirtualmachine.inputs.AutoBackupSettingsArgs.builder()
            .backupScheduleType(
                backupScheduleType?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .backupSystemDbs(backupSystemDbs?.applyValue({ args0 -> args0 }))
            .daysOfWeek(
                daysOfWeek?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform(
                            { args0 -> args0 },
                            { args0 -> args0.let({ args0 -> args0.toJava() }) },
                        )
                    })
                }),
            )
            .enable(enable?.applyValue({ args0 -> args0 }))
            .enableEncryption(enableEncryption?.applyValue({ args0 -> args0 }))
            .fullBackupFrequency(
                fullBackupFrequency?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .fullBackupStartTime(fullBackupStartTime?.applyValue({ args0 -> args0 }))
            .fullBackupWindowHours(fullBackupWindowHours?.applyValue({ args0 -> args0 }))
            .logBackupFrequency(logBackupFrequency?.applyValue({ args0 -> args0 }))
            .password(password?.applyValue({ args0 -> args0 }))
            .retentionPeriod(retentionPeriod?.applyValue({ args0 -> args0 }))
            .storageAccessKey(storageAccessKey?.applyValue({ args0 -> args0 }))
            .storageAccountUrl(storageAccountUrl?.applyValue({ args0 -> args0 }))
            .storageContainerName(storageContainerName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AutoBackupSettingsArgs].
 */
@PulumiTagMarker
public class AutoBackupSettingsArgsBuilder internal constructor() {
    private var backupScheduleType: Output>? = null

    private var backupSystemDbs: Output? = null

    private var daysOfWeek: Output>>? = null

    private var enable: Output? = null

    private var enableEncryption: Output? = null

    private var fullBackupFrequency: Output>? = null

    private var fullBackupStartTime: Output? = null

    private var fullBackupWindowHours: Output? = null

    private var logBackupFrequency: Output? = null

    private var password: Output? = null

    private var retentionPeriod: Output? = null

    private var storageAccessKey: Output? = null

    private var storageAccountUrl: Output? = null

    private var storageContainerName: Output? = null

    /**
     * @param value Backup schedule type.
     */
    @JvmName("lfdcarlbisklvstv")
    public suspend fun backupScheduleType(`value`: Output>) {
        this.backupScheduleType = value
    }

    /**
     * @param value Include or exclude system databases from auto backup.
     */
    @JvmName("tcmorlkjqevylfxa")
    public suspend fun backupSystemDbs(`value`: Output) {
        this.backupSystemDbs = value
    }

    /**
     * @param value Days of the week for the backups when FullBackupFrequency is set to Weekly.
     */
    @JvmName("rwarxgvrstttrcxa")
    public suspend fun daysOfWeek(`value`: Output>>) {
        this.daysOfWeek = value
    }

    @JvmName("bobgftepngrdigcv")
    public suspend fun daysOfWeek(vararg values: Output>) {
        this.daysOfWeek = Output.all(values.asList())
    }

    /**
     * @param values Days of the week for the backups when FullBackupFrequency is set to Weekly.
     */
    @JvmName("qsdbwnrccephewbx")
    public suspend fun daysOfWeek(values: List>>) {
        this.daysOfWeek = Output.all(values)
    }

    /**
     * @param value Enable or disable autobackup on SQL virtual machine.
     */
    @JvmName("gxekucvvmvydmkfy")
    public suspend fun enable(`value`: Output) {
        this.enable = value
    }

    /**
     * @param value Enable or disable encryption for backup on SQL virtual machine.
     */
    @JvmName("mvlnetoidsnfieei")
    public suspend fun enableEncryption(`value`: Output) {
        this.enableEncryption = value
    }

    /**
     * @param value Frequency of full backups. In both cases, full backups begin during the next scheduled time window.
     */
    @JvmName("kxtwogpqlntifhin")
    public suspend fun fullBackupFrequency(`value`: Output>) {
        this.fullBackupFrequency = value
    }

    /**
     * @param value Start time of a given day during which full backups can take place. 0-23 hours.
     */
    @JvmName("hdouhbxkhwqdnogf")
    public suspend fun fullBackupStartTime(`value`: Output) {
        this.fullBackupStartTime = value
    }

    /**
     * @param value Duration of the time window of a given day during which full backups can take place. 1-23 hours.
     */
    @JvmName("kwdannainqxygelc")
    public suspend fun fullBackupWindowHours(`value`: Output) {
        this.fullBackupWindowHours = value
    }

    /**
     * @param value Frequency of log backups. 5-60 minutes.
     */
    @JvmName("ehnxbswdpbogwaqj")
    public suspend fun logBackupFrequency(`value`: Output) {
        this.logBackupFrequency = value
    }

    /**
     * @param value Password for encryption on backup.
     */
    @JvmName("ferxxlennuaeetgq")
    public suspend fun password(`value`: Output) {
        this.password = value
    }

    /**
     * @param value Retention period of backup: 1-90 days.
     */
    @JvmName("aeafmnryibmxdfae")
    public suspend fun retentionPeriod(`value`: Output) {
        this.retentionPeriod = value
    }

    /**
     * @param value Storage account key where backup will be taken to.
     */
    @JvmName("coymtraddkskmxme")
    public suspend fun storageAccessKey(`value`: Output) {
        this.storageAccessKey = value
    }

    /**
     * @param value Storage account url where backup will be taken to.
     */
    @JvmName("afdpxbcetbhydfqr")
    public suspend fun storageAccountUrl(`value`: Output) {
        this.storageAccountUrl = value
    }

    /**
     * @param value Storage container name where backup will be taken to.
     */
    @JvmName("klglfrrmboxphmgg")
    public suspend fun storageContainerName(`value`: Output) {
        this.storageContainerName = value
    }

    /**
     * @param value Backup schedule type.
     */
    @JvmName("dcbiloxfjmssngac")
    public suspend fun backupScheduleType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backupScheduleType = mapped
    }

    /**
     * @param value Backup schedule type.
     */
    @JvmName("vsbyrwmnenaasdkw")
    public fun backupScheduleType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.backupScheduleType = mapped
    }

    /**
     * @param value Backup schedule type.
     */
    @JvmName("oienfvuewujhxctg")
    public fun backupScheduleType(`value`: BackupScheduleType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.backupScheduleType = mapped
    }

    /**
     * @param value Include or exclude system databases from auto backup.
     */
    @JvmName("xmsrvbgnchafohsn")
    public suspend fun backupSystemDbs(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backupSystemDbs = mapped
    }

    /**
     * @param value Days of the week for the backups when FullBackupFrequency is set to Weekly.
     */
    @JvmName("ifwxjoceultjnair")
    public suspend fun daysOfWeek(`value`: List>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.daysOfWeek = mapped
    }

    /**
     * @param values Days of the week for the backups when FullBackupFrequency is set to Weekly.
     */
    @JvmName("jejyawcbtantscmo")
    public suspend fun daysOfWeek(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.daysOfWeek = mapped
    }

    /**
     * @param value Enable or disable autobackup on SQL virtual machine.
     */
    @JvmName("uyoxqumkrogvfeon")
    public suspend fun enable(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enable = mapped
    }

    /**
     * @param value Enable or disable encryption for backup on SQL virtual machine.
     */
    @JvmName("mvpbukgvayauqiuk")
    public suspend fun enableEncryption(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableEncryption = mapped
    }

    /**
     * @param value Frequency of full backups. In both cases, full backups begin during the next scheduled time window.
     */
    @JvmName("cccmlchjqjnospmj")
    public suspend fun fullBackupFrequency(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fullBackupFrequency = mapped
    }

    /**
     * @param value Frequency of full backups. In both cases, full backups begin during the next scheduled time window.
     */
    @JvmName("wkguapldtcsgknrw")
    public fun fullBackupFrequency(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.fullBackupFrequency = mapped
    }

    /**
     * @param value Frequency of full backups. In both cases, full backups begin during the next scheduled time window.
     */
    @JvmName("kbrglqrhjgbxijsb")
    public fun fullBackupFrequency(`value`: FullBackupFrequencyType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.fullBackupFrequency = mapped
    }

    /**
     * @param value Start time of a given day during which full backups can take place. 0-23 hours.
     */
    @JvmName("ituhqdwswiswxque")
    public suspend fun fullBackupStartTime(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fullBackupStartTime = mapped
    }

    /**
     * @param value Duration of the time window of a given day during which full backups can take place. 1-23 hours.
     */
    @JvmName("swxgugrldtfhtrju")
    public suspend fun fullBackupWindowHours(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fullBackupWindowHours = mapped
    }

    /**
     * @param value Frequency of log backups. 5-60 minutes.
     */
    @JvmName("clyowsmuvmpvbysi")
    public suspend fun logBackupFrequency(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logBackupFrequency = mapped
    }

    /**
     * @param value Password for encryption on backup.
     */
    @JvmName("cunqvhprkkvmxlqk")
    public suspend fun password(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.password = mapped
    }

    /**
     * @param value Retention period of backup: 1-90 days.
     */
    @JvmName("gnivcvgiupuxbhbh")
    public suspend fun retentionPeriod(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retentionPeriod = mapped
    }

    /**
     * @param value Storage account key where backup will be taken to.
     */
    @JvmName("vrkwbpyfbfowiboo")
    public suspend fun storageAccessKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccessKey = mapped
    }

    /**
     * @param value Storage account url where backup will be taken to.
     */
    @JvmName("mpjrqsmayfbtysma")
    public suspend fun storageAccountUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccountUrl = mapped
    }

    /**
     * @param value Storage container name where backup will be taken to.
     */
    @JvmName("uyiactvksgyrqtwh")
    public suspend fun storageContainerName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageContainerName = mapped
    }

    internal fun build(): AutoBackupSettingsArgs = AutoBackupSettingsArgs(
        backupScheduleType = backupScheduleType,
        backupSystemDbs = backupSystemDbs,
        daysOfWeek = daysOfWeek,
        enable = enable,
        enableEncryption = enableEncryption,
        fullBackupFrequency = fullBackupFrequency,
        fullBackupStartTime = fullBackupStartTime,
        fullBackupWindowHours = fullBackupWindowHours,
        logBackupFrequency = logBackupFrequency,
        password = password,
        retentionPeriod = retentionPeriod,
        storageAccessKey = storageAccessKey,
        storageAccountUrl = storageAccountUrl,
        storageContainerName = storageContainerName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy