Class AutoBackupSettings
- java.lang.Object
-
- com.azure.resourcemanager.sqlvirtualmachine.models.AutoBackupSettings
-
public final class AutoBackupSettings extends Object
Configure backups for databases in your SQL virtual machine.
-
-
Constructor Summary
Constructors Constructor Description AutoBackupSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BackupScheduleType
backupScheduleType()
Get the backupScheduleType property: Backup schedule type.Boolean
backupSystemDbs()
Get the backupSystemDbs property: Include or exclude system databases from auto backup.List<DaysOfWeek>
daysOfWeek()
Get the daysOfWeek property: Days of the week for the backups when FullBackupFrequency is set to Weekly.Boolean
enable()
Get the enable property: Enable or disable autobackup on SQL virtual machine.Boolean
enableEncryption()
Get the enableEncryption property: Enable or disable encryption for backup on SQL virtual machine.FullBackupFrequencyType
fullBackupFrequency()
Get the fullBackupFrequency property: Frequency of full backups.Integer
fullBackupStartTime()
Get the fullBackupStartTime property: Start time of a given day during which full backups can take place.Integer
fullBackupWindowHours()
Get the fullBackupWindowHours property: Duration of the time window of a given day during which full backups can take place.Integer
logBackupFrequency()
Get the logBackupFrequency property: Frequency of log backups.String
password()
Get the password property: Password for encryption on backup.Integer
retentionPeriod()
Get the retentionPeriod property: Retention period of backup: 1-90 days.String
storageAccessKey()
Get the storageAccessKey property: Storage account key where backup will be taken to.String
storageAccountUrl()
Get the storageAccountUrl property: Storage account url where backup will be taken to.String
storageContainerName()
Get the storageContainerName property: Storage container name where backup will be taken to.void
validate()
Validates the instance.AutoBackupSettings
withBackupScheduleType(BackupScheduleType backupScheduleType)
Set the backupScheduleType property: Backup schedule type.AutoBackupSettings
withBackupSystemDbs(Boolean backupSystemDbs)
Set the backupSystemDbs property: Include or exclude system databases from auto backup.AutoBackupSettings
withDaysOfWeek(List<DaysOfWeek> daysOfWeek)
Set the daysOfWeek property: Days of the week for the backups when FullBackupFrequency is set to Weekly.AutoBackupSettings
withEnable(Boolean enable)
Set the enable property: Enable or disable autobackup on SQL virtual machine.AutoBackupSettings
withEnableEncryption(Boolean enableEncryption)
Set the enableEncryption property: Enable or disable encryption for backup on SQL virtual machine.AutoBackupSettings
withFullBackupFrequency(FullBackupFrequencyType fullBackupFrequency)
Set the fullBackupFrequency property: Frequency of full backups.AutoBackupSettings
withFullBackupStartTime(Integer fullBackupStartTime)
Set the fullBackupStartTime property: Start time of a given day during which full backups can take place.AutoBackupSettings
withFullBackupWindowHours(Integer fullBackupWindowHours)
Set the fullBackupWindowHours property: Duration of the time window of a given day during which full backups can take place.AutoBackupSettings
withLogBackupFrequency(Integer logBackupFrequency)
Set the logBackupFrequency property: Frequency of log backups.AutoBackupSettings
withPassword(String password)
Set the password property: Password for encryption on backup.AutoBackupSettings
withRetentionPeriod(Integer retentionPeriod)
Set the retentionPeriod property: Retention period of backup: 1-90 days.AutoBackupSettings
withStorageAccessKey(String storageAccessKey)
Set the storageAccessKey property: Storage account key where backup will be taken to.AutoBackupSettings
withStorageAccountUrl(String storageAccountUrl)
Set the storageAccountUrl property: Storage account url where backup will be taken to.AutoBackupSettings
withStorageContainerName(String storageContainerName)
Set the storageContainerName property: Storage container name where backup will be taken to.
-
-
-
Method Detail
-
enable
public Boolean enable()
Get the enable property: Enable or disable autobackup on SQL virtual machine.- Returns:
- the enable value.
-
withEnable
public AutoBackupSettings withEnable(Boolean enable)
Set the enable property: Enable or disable autobackup on SQL virtual machine.- Parameters:
enable
- the enable value to set.- Returns:
- the AutoBackupSettings object itself.
-
enableEncryption
public Boolean enableEncryption()
Get the enableEncryption property: Enable or disable encryption for backup on SQL virtual machine.- Returns:
- the enableEncryption value.
-
withEnableEncryption
public AutoBackupSettings withEnableEncryption(Boolean enableEncryption)
Set the enableEncryption property: Enable or disable encryption for backup on SQL virtual machine.- Parameters:
enableEncryption
- the enableEncryption value to set.- Returns:
- the AutoBackupSettings object itself.
-
retentionPeriod
public Integer retentionPeriod()
Get the retentionPeriod property: Retention period of backup: 1-90 days.- Returns:
- the retentionPeriod value.
-
withRetentionPeriod
public AutoBackupSettings withRetentionPeriod(Integer retentionPeriod)
Set the retentionPeriod property: Retention period of backup: 1-90 days.- Parameters:
retentionPeriod
- the retentionPeriod value to set.- Returns:
- the AutoBackupSettings object itself.
-
storageAccountUrl
public String storageAccountUrl()
Get the storageAccountUrl property: Storage account url where backup will be taken to.- Returns:
- the storageAccountUrl value.
-
withStorageAccountUrl
public AutoBackupSettings withStorageAccountUrl(String storageAccountUrl)
Set the storageAccountUrl property: Storage account url where backup will be taken to.- Parameters:
storageAccountUrl
- the storageAccountUrl value to set.- Returns:
- the AutoBackupSettings object itself.
-
storageContainerName
public String storageContainerName()
Get the storageContainerName property: Storage container name where backup will be taken to.- Returns:
- the storageContainerName value.
-
withStorageContainerName
public AutoBackupSettings withStorageContainerName(String storageContainerName)
Set the storageContainerName property: Storage container name where backup will be taken to.- Parameters:
storageContainerName
- the storageContainerName value to set.- Returns:
- the AutoBackupSettings object itself.
-
storageAccessKey
public String storageAccessKey()
Get the storageAccessKey property: Storage account key where backup will be taken to.- Returns:
- the storageAccessKey value.
-
withStorageAccessKey
public AutoBackupSettings withStorageAccessKey(String storageAccessKey)
Set the storageAccessKey property: Storage account key where backup will be taken to.- Parameters:
storageAccessKey
- the storageAccessKey value to set.- Returns:
- the AutoBackupSettings object itself.
-
password
public String password()
Get the password property: Password for encryption on backup.- Returns:
- the password value.
-
withPassword
public AutoBackupSettings withPassword(String password)
Set the password property: Password for encryption on backup.- Parameters:
password
- the password value to set.- Returns:
- the AutoBackupSettings object itself.
-
backupSystemDbs
public Boolean backupSystemDbs()
Get the backupSystemDbs property: Include or exclude system databases from auto backup.- Returns:
- the backupSystemDbs value.
-
withBackupSystemDbs
public AutoBackupSettings withBackupSystemDbs(Boolean backupSystemDbs)
Set the backupSystemDbs property: Include or exclude system databases from auto backup.- Parameters:
backupSystemDbs
- the backupSystemDbs value to set.- Returns:
- the AutoBackupSettings object itself.
-
backupScheduleType
public BackupScheduleType backupScheduleType()
Get the backupScheduleType property: Backup schedule type.- Returns:
- the backupScheduleType value.
-
withBackupScheduleType
public AutoBackupSettings withBackupScheduleType(BackupScheduleType backupScheduleType)
Set the backupScheduleType property: Backup schedule type.- Parameters:
backupScheduleType
- the backupScheduleType value to set.- Returns:
- the AutoBackupSettings object itself.
-
fullBackupFrequency
public FullBackupFrequencyType fullBackupFrequency()
Get the fullBackupFrequency property: Frequency of full backups. In both cases, full backups begin during the next scheduled time window.- Returns:
- the fullBackupFrequency value.
-
withFullBackupFrequency
public AutoBackupSettings withFullBackupFrequency(FullBackupFrequencyType fullBackupFrequency)
Set the fullBackupFrequency property: Frequency of full backups. In both cases, full backups begin during the next scheduled time window.- Parameters:
fullBackupFrequency
- the fullBackupFrequency value to set.- Returns:
- the AutoBackupSettings object itself.
-
daysOfWeek
public List<DaysOfWeek> daysOfWeek()
Get the daysOfWeek property: Days of the week for the backups when FullBackupFrequency is set to Weekly.- Returns:
- the daysOfWeek value.
-
withDaysOfWeek
public AutoBackupSettings withDaysOfWeek(List<DaysOfWeek> daysOfWeek)
Set the daysOfWeek property: Days of the week for the backups when FullBackupFrequency is set to Weekly.- Parameters:
daysOfWeek
- the daysOfWeek value to set.- Returns:
- the AutoBackupSettings object itself.
-
fullBackupStartTime
public Integer fullBackupStartTime()
Get the fullBackupStartTime property: Start time of a given day during which full backups can take place. 0-23 hours.- Returns:
- the fullBackupStartTime value.
-
withFullBackupStartTime
public AutoBackupSettings withFullBackupStartTime(Integer fullBackupStartTime)
Set the fullBackupStartTime property: Start time of a given day during which full backups can take place. 0-23 hours.- Parameters:
fullBackupStartTime
- the fullBackupStartTime value to set.- Returns:
- the AutoBackupSettings object itself.
-
fullBackupWindowHours
public Integer fullBackupWindowHours()
Get the fullBackupWindowHours property: Duration of the time window of a given day during which full backups can take place. 1-23 hours.- Returns:
- the fullBackupWindowHours value.
-
withFullBackupWindowHours
public AutoBackupSettings withFullBackupWindowHours(Integer fullBackupWindowHours)
Set the fullBackupWindowHours property: Duration of the time window of a given day during which full backups can take place. 1-23 hours.- Parameters:
fullBackupWindowHours
- the fullBackupWindowHours value to set.- Returns:
- the AutoBackupSettings object itself.
-
logBackupFrequency
public Integer logBackupFrequency()
Get the logBackupFrequency property: Frequency of log backups. 5-60 minutes.- Returns:
- the logBackupFrequency value.
-
withLogBackupFrequency
public AutoBackupSettings withLogBackupFrequency(Integer logBackupFrequency)
Set the logBackupFrequency property: Frequency of log backups. 5-60 minutes.- Parameters:
logBackupFrequency
- the logBackupFrequency value to set.- Returns:
- the AutoBackupSettings object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-