BackupSchedule Class
- java.
lang. Object - com.
azure. resourcemanager. appservice. models. BackupSchedule
- com.
Implements
public final class BackupSchedule
implements JsonSerializable<BackupSchedule>
Description of a backup schedule. Describes how often should be the backup performed and what should be the retention policy.
Constructor Summary
Constructor | Description |
---|---|
BackupSchedule() |
Creates an instance of Backup |
Method Summary
Modifier and Type | Method and Description |
---|---|
int |
frequencyInterval()
Get the frequency |
Frequency |
frequencyUnit()
Get the frequency |
static
Backup |
fromJson(JsonReader jsonReader)
Reads an instance of Backup |
boolean |
keepAtLeastOneBackup()
Get the keep |
Offset |
lastExecutionTime()
Get the last |
int |
retentionPeriodInDays()
Get the retention |
Offset |
startTime()
Get the start |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Backup |
withFrequencyInterval(int frequencyInterval)
Set the frequency |
Backup |
withFrequencyUnit(FrequencyUnit frequencyUnit)
Set the frequency |
Backup |
withKeepAtLeastOneBackup(boolean keepAtLeastOneBackup)
Set the keep |
Backup |
withRetentionPeriodInDays(int retentionPeriodInDays)
Set the retention |
Backup |
withStartTime(OffsetDateTime startTime)
Set the start |
Methods inherited from java.lang.Object
Constructor Details
BackupSchedule
public BackupSchedule()
Creates an instance of BackupSchedule class.
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:
frequencyUnit
public FrequencyUnit 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:
fromJson
public static BackupSchedule fromJson(JsonReader jsonReader)
Reads an instance of BackupSchedule from the JsonReader.
Parameters:
Returns:
Throws:
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:
lastExecutionTime
public OffsetDateTime lastExecutionTime()
Get the lastExecutionTime property: Last time when this schedule was triggered.
Returns:
retentionPeriodInDays
public int retentionPeriodInDays()
Get the retentionPeriodInDays property: After how many days backups should be deleted.
Returns:
startTime
public OffsetDateTime startTime()
Get the startTime property: When the schedule should start working.
Returns:
toJson
validate
public void validate()
Validates the instance.
withFrequencyInterval
public BackupSchedule withFrequencyInterval(int frequencyInterval)
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:
Returns:
withFrequencyUnit
public BackupSchedule withFrequencyUnit(FrequencyUnit frequencyUnit)
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:
Returns:
withKeepAtLeastOneBackup
public BackupSchedule 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.
Parameters:
Returns:
withRetentionPeriodInDays
public BackupSchedule withRetentionPeriodInDays(int retentionPeriodInDays)
Set the retentionPeriodInDays property: After how many days backups should be deleted.
Parameters:
Returns:
withStartTime
public BackupSchedule withStartTime(OffsetDateTime startTime)
Set the startTime property: When the schedule should start working.
Parameters:
Returns:
Applies to
Azure SDK for Java