Class BackupSchedule
java.lang.Object
com.azure.resourcemanager.appservice.models.BackupSchedule
Description of a backup schedule. Describes how often should be the backup performed and what should be the retention
policy.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Get the frequencyInterval property: How often the backup should be executed (e.g.Get the frequencyUnit property: The unit of time for how often the backup should be executed (e.g.boolean
Get the keepAtLeastOneBackup property: True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.Get the lastExecutionTime property: Last time when this schedule was triggered.int
Get the retentionPeriodInDays property: After how many days backups should be deleted.Get the startTime property: When the schedule should start working.void
validate()
Validates the instance.withFrequencyInterval
(int frequencyInterval) Set the frequencyInterval property: How often the backup should be executed (e.g.withFrequencyUnit
(FrequencyUnit frequencyUnit) Set the frequencyUnit property: The unit of time for how often the backup should be executed (e.g.withKeepAtLeastOneBackup
(boolean keepAtLeastOneBackup) Set the keepAtLeastOneBackup property: True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.withRetentionPeriodInDays
(int retentionPeriodInDays) Set the retentionPeriodInDays property: After how many days backups should be deleted.withStartTime
(OffsetDateTime startTime) Set the startTime property: When the schedule should start working.
-
Constructor Details
-
BackupSchedule
public BackupSchedule()
-
-
Method Details
-
frequencyInterval
public int frequencyInterval()Get the frequencyInterval property: How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day).- Returns:
- the frequencyInterval value.
-
withFrequencyInterval
Set the frequencyInterval property: How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day).- Parameters:
frequencyInterval
- the frequencyInterval value to set.- Returns:
- the BackupSchedule object itself.
-
frequencyUnit
Get the frequencyUnit property: The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7).- Returns:
- the frequencyUnit value.
-
withFrequencyUnit
Set the frequencyUnit property: The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7).- Parameters:
frequencyUnit
- the frequencyUnit value to set.- Returns:
- the BackupSchedule object itself.
-
keepAtLeastOneBackup
public boolean keepAtLeastOneBackup()Get the keepAtLeastOneBackup property: True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.- Returns:
- the keepAtLeastOneBackup value.
-
withKeepAtLeastOneBackup
Set the keepAtLeastOneBackup property: True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.- Parameters:
keepAtLeastOneBackup
- the keepAtLeastOneBackup value to set.- Returns:
- the BackupSchedule object itself.
-
retentionPeriodInDays
public int retentionPeriodInDays()Get the retentionPeriodInDays property: After how many days backups should be deleted.- Returns:
- the retentionPeriodInDays value.
-
withRetentionPeriodInDays
Set the retentionPeriodInDays property: After how many days backups should be deleted.- Parameters:
retentionPeriodInDays
- the retentionPeriodInDays value to set.- Returns:
- the BackupSchedule object itself.
-
startTime
Get the startTime property: When the schedule should start working.- Returns:
- the startTime value.
-
withStartTime
Set the startTime property: When the schedule should start working.- Parameters:
startTime
- the startTime value to set.- Returns:
- the BackupSchedule object itself.
-
lastExecutionTime
Get the lastExecutionTime property: Last time when this schedule was triggered.- Returns:
- the lastExecutionTime value.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-