1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.serialization import Model
class BackupSchedule(Model):
"""Description of a backup schedule. Describes how often should be the backup
performed and what should be the retention policy.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param frequency_interval: Required. 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). Default value: 7 .
:type frequency_interval: int
:param frequency_unit: Required. 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). Possible values include: 'Day',
'Hour'. Default value: "Day" .
:type frequency_unit: str or ~azure.mgmt.web.models.FrequencyUnit
:param keep_at_least_one_backup: Required. True if the retention policy
should always keep at least one backup in the storage account, regardless
how old it is; false otherwise. Default value: True .
:type keep_at_least_one_backup: bool
:param retention_period_in_days: Required. After how many days backups
should be deleted. Default value: 30 .
:type retention_period_in_days: int
:param start_time: When the schedule should start working.
:type start_time: datetime
:ivar last_execution_time: Last time when this schedule was triggered.
:vartype last_execution_time: datetime
"""
_validation = {
'frequency_interval': {'required': True},
'frequency_unit': {'required': True},
'keep_at_least_one_backup': {'required': True},
'retention_period_in_days': {'required': True},
'last_execution_time': {'readonly': True},
}
_attribute_map = {
'frequency_interval': {'key': 'frequencyInterval', 'type': 'int'},
'frequency_unit': {'key': 'frequencyUnit', 'type': 'FrequencyUnit'},
'keep_at_least_one_backup': {'key': 'keepAtLeastOneBackup', 'type': 'bool'},
'retention_period_in_days': {'key': 'retentionPeriodInDays', 'type': 'int'},
'start_time': {'key': 'startTime', 'type': 'iso-8601'},
'last_execution_time': {'key': 'lastExecutionTime', 'type': 'iso-8601'},
}
def __init__(self, **kwargs):
super(BackupSchedule, self).__init__(**kwargs)
self.frequency_interval = kwargs.get('frequency_interval', 7)
self.frequency_unit = kwargs.get('frequency_unit', "Day")
self.keep_at_least_one_backup = kwargs.get('keep_at_least_one_backup', True)
self.retention_period_in_days = kwargs.get('retention_period_in_days', 30)
self.start_time = kwargs.get('start_time', None)
self.last_execution_time = None
|