BackupSchedule Class

  • java.lang.Object
    • com.azure.resourcemanager.appservice.models.BackupSchedule

public final class 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 BackupSchedule class.

Method Summary

Modifier and Type Method and Description
int frequencyInterval()

Get the frequencyInterval property: How often the backup should be executed (e.g.

FrequencyUnit frequencyUnit()

Get the frequencyUnit property: The unit of time for how often the backup should be executed (e.g.

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.

OffsetDateTime lastExecutionTime()

Get the lastExecutionTime property: Last time when this schedule was triggered.

int retentionPeriodInDays()

Get the retentionPeriodInDays property: After how many days backups should be deleted.

OffsetDateTime startTime()

Get the startTime property: When the schedule should start working.

void validate()

Validates the instance.

BackupSchedule withFrequencyInterval(int frequencyInterval)

Set the frequencyInterval property: How often the backup should be executed (e.g.

BackupSchedule withFrequencyUnit(FrequencyUnit frequencyUnit)

Set the frequencyUnit property: The unit of time for how often the backup should be executed (e.g.

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.

BackupSchedule withRetentionPeriodInDays(int retentionPeriodInDays)

Set the retentionPeriodInDays property: After how many days backups should be deleted.

BackupSchedule withStartTime(OffsetDateTime startTime)

Set the startTime property: When the schedule should start working.

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:

the frequencyInterval value.

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:

the frequencyUnit value.

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.

lastExecutionTime

public OffsetDateTime lastExecutionTime()

Get the lastExecutionTime property: Last time when this schedule was triggered.

Returns:

the lastExecutionTime value.

retentionPeriodInDays

public int retentionPeriodInDays()

Get the retentionPeriodInDays property: After how many days backups should be deleted.

Returns:

the retentionPeriodInDays value.

startTime

public OffsetDateTime startTime()

Get the startTime property: When the schedule should start working.

Returns:

the startTime value.

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:

frequencyInterval - the frequencyInterval value to set.

Returns:

the BackupSchedule object itself.

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:

frequencyUnit - the frequencyUnit value to set.

Returns:

the BackupSchedule object itself.

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:

keepAtLeastOneBackup - the keepAtLeastOneBackup value to set.

Returns:

the BackupSchedule object itself.

withRetentionPeriodInDays

public BackupSchedule withRetentionPeriodInDays(int retentionPeriodInDays)

Set the retentionPeriodInDays property: After how many days backups should be deleted.

Parameters:

retentionPeriodInDays - the retentionPeriodInDays value to set.

Returns:

the BackupSchedule object itself.

withStartTime

public BackupSchedule withStartTime(OffsetDateTime startTime)

Set the startTime property: When the schedule should start working.

Parameters:

startTime - the startTime value to set.

Returns:

the BackupSchedule object itself.

Applies to