Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
from msrest import Serializer, Deserializer

from ._configuration import RecoveryServicesBackupClientConfiguration
from .operations import BackupPoliciesOperations
from .operations import ProtectionPoliciesOperations
from .operations import ProtectionPolicyOperationResultsOperations
from .operations import BackupResourceVaultConfigsOperations
from .operations import ProtectedItemsOperations
from .operations import ProtectedItemOperationResultsOperations
from .operations import RecoveryPointsOperations
from .operations import RestoresOperations
from .operations import BackupPoliciesOperations
from .operations import ProtectionPoliciesOperations
from .operations import ProtectionPolicyOperationResultsOperations
from .operations import BackupJobsOperations
from .operations import JobDetailsOperations
from .operations import JobCancellationsOperations
Expand Down Expand Up @@ -60,6 +60,12 @@ class RecoveryServicesBackupClient(SDKClient):
:ivar config: Configuration for client.
:vartype config: RecoveryServicesBackupClientConfiguration

:ivar backup_policies: BackupPolicies operations
:vartype backup_policies: azure.mgmt.recoveryservicesbackup.operations.BackupPoliciesOperations
:ivar protection_policies: ProtectionPolicies operations
:vartype protection_policies: azure.mgmt.recoveryservicesbackup.operations.ProtectionPoliciesOperations
:ivar protection_policy_operation_results: ProtectionPolicyOperationResults operations
:vartype protection_policy_operation_results: azure.mgmt.recoveryservicesbackup.operations.ProtectionPolicyOperationResultsOperations
:ivar backup_resource_vault_configs: BackupResourceVaultConfigs operations
:vartype backup_resource_vault_configs: azure.mgmt.recoveryservicesbackup.operations.BackupResourceVaultConfigsOperations
:ivar protected_items: ProtectedItems operations
Expand All @@ -70,12 +76,6 @@ class RecoveryServicesBackupClient(SDKClient):
:vartype recovery_points: azure.mgmt.recoveryservicesbackup.operations.RecoveryPointsOperations
:ivar restores: Restores operations
:vartype restores: azure.mgmt.recoveryservicesbackup.operations.RestoresOperations
:ivar backup_policies: BackupPolicies operations
:vartype backup_policies: azure.mgmt.recoveryservicesbackup.operations.BackupPoliciesOperations
:ivar protection_policies: ProtectionPolicies operations
:vartype protection_policies: azure.mgmt.recoveryservicesbackup.operations.ProtectionPoliciesOperations
:ivar protection_policy_operation_results: ProtectionPolicyOperationResults operations
:vartype protection_policy_operation_results: azure.mgmt.recoveryservicesbackup.operations.ProtectionPolicyOperationResultsOperations
:ivar backup_jobs: BackupJobs operations
:vartype backup_jobs: azure.mgmt.recoveryservicesbackup.operations.BackupJobsOperations
:ivar job_details: JobDetails operations
Expand Down Expand Up @@ -155,6 +155,12 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.backup_policies = BackupPoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.protection_policies = ProtectionPoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.protection_policy_operation_results = ProtectionPolicyOperationResultsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.backup_resource_vault_configs = BackupResourceVaultConfigsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.protected_items = ProtectedItemsOperations(
Expand All @@ -165,12 +171,6 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.restores = RestoresOperations(
self._client, self.config, self._serialize, self._deserialize)
self.backup_policies = BackupPoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.protection_policies = ProtectionPoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.protection_policy_operation_results = ProtectionPolicyOperationResultsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.backup_jobs = BackupJobsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.job_details = JobDetailsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,20 @@
from ._paged_models import WorkloadItemResourcePaged
from ._paged_models import WorkloadProtectableItemResourcePaged
from ._recovery_services_backup_client_enums import (
WorkloadType,
PolicyType,
RetentionDurationType,
DayOfWeek,
RetentionScheduleFormat,
WeekOfMonth,
MonthOfYear,
BackupManagementType,
ScheduleRunType,
ProtectionState,
HealthStatus,
RecoveryType,
CopyOptions,
RestoreRequestType,
WorkloadType,
PolicyType,
JobSupportedAction,
ProtectedItemState,
LastBackupStatus,
Expand All @@ -508,22 +515,15 @@
EnhancedSecurityState,
SoftDeleteFeatureState,
RestorePointQueryType,
RetentionDurationType,
RecoveryPointTierType,
RecoveryPointTierStatus,
BackupManagementType,
JobStatus,
JobOperationType,
DayOfWeek,
RetentionScheduleFormat,
WeekOfMonth,
MonthOfYear,
MabServerType,
HttpStatusCode,
DataSourceType,
CreateMode,
HealthState,
ScheduleRunType,
SupportStatus,
WorkloadItemType,
UsagesUnit,
Expand Down Expand Up @@ -774,8 +774,8 @@
'WorkloadProtectableItem',
'WorkloadProtectableItemResource',
'YearlyRetentionSchedule',
'RecoveryPointResourcePaged',
'ProtectionPolicyResourcePaged',
'RecoveryPointResourcePaged',
'JobResourcePaged',
'ProtectedItemResourcePaged',
'ProtectionIntentResourcePaged',
Expand All @@ -786,13 +786,20 @@
'WorkloadProtectableItemResourcePaged',
'ProtectionContainerResourcePaged',
'ClientDiscoveryValueForSingleApiPaged',
'WorkloadType',
'PolicyType',
'RetentionDurationType',
'DayOfWeek',
'RetentionScheduleFormat',
'WeekOfMonth',
'MonthOfYear',
'BackupManagementType',
'ScheduleRunType',
'ProtectionState',
'HealthStatus',
'RecoveryType',
'CopyOptions',
'RestoreRequestType',
'WorkloadType',
'PolicyType',
'JobSupportedAction',
'ProtectedItemState',
'LastBackupStatus',
Expand All @@ -806,22 +813,15 @@
'EnhancedSecurityState',
'SoftDeleteFeatureState',
'RestorePointQueryType',
'RetentionDurationType',
'RecoveryPointTierType',
'RecoveryPointTierStatus',
'BackupManagementType',
'JobStatus',
'JobOperationType',
'DayOfWeek',
'RetentionScheduleFormat',
'WeekOfMonth',
'MonthOfYear',
'MabServerType',
'HttpStatusCode',
'DataSourceType',
'CreateMode',
'HealthState',
'ScheduleRunType',
'SupportStatus',
'WorkloadItemType',
'UsagesUnit',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -847,9 +847,10 @@ class ProtectionPolicy(Model):
from this class.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: AzureVmWorkloadProtectionPolicy,
AzureFileShareProtectionPolicy, AzureIaaSVMProtectionPolicy,
AzureSqlProtectionPolicy, GenericProtectionPolicy, MabProtectionPolicy
sub-classes are: AzureFileShareProtectionPolicy,
AzureIaaSVMProtectionPolicy, AzureSqlProtectionPolicy,
AzureVmWorkloadProtectionPolicy, GenericProtectionPolicy,
MabProtectionPolicy

All required parameters must be populated in order to send to Azure.

Expand All @@ -869,7 +870,7 @@ class ProtectionPolicy(Model):
}

_subtype_map = {
'backup_management_type': {'AzureWorkload': 'AzureVmWorkloadProtectionPolicy', 'AzureStorage': 'AzureFileShareProtectionPolicy', 'AzureIaasVM': 'AzureIaaSVMProtectionPolicy', 'AzureSql': 'AzureSqlProtectionPolicy', 'GenericProtectionPolicy': 'GenericProtectionPolicy', 'MAB': 'MabProtectionPolicy'}
'backup_management_type': {'AzureStorage': 'AzureFileShareProtectionPolicy', 'AzureIaasVM': 'AzureIaaSVMProtectionPolicy', 'AzureSql': 'AzureSqlProtectionPolicy', 'AzureWorkload': 'AzureVmWorkloadProtectionPolicy', 'GenericProtectionPolicy': 'GenericProtectionPolicy', 'MAB': 'MabProtectionPolicy'}
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -2176,6 +2177,9 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy):
:type protected_items_count: int
:param backup_management_type: Required. Constant filled by server.
:type backup_management_type: str
:param instant_rp_details:
:type instant_rp_details:
~azure.mgmt.recoveryservicesbackup.models.InstantRPAdditionalDetails
:param schedule_policy: Backup schedule specified as part of backup
policy.
:type schedule_policy:
Expand All @@ -2199,6 +2203,7 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy):
_attribute_map = {
'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'},
'backup_management_type': {'key': 'backupManagementType', 'type': 'str'},
'instant_rp_details': {'key': 'instantRPDetails', 'type': 'InstantRPAdditionalDetails'},
'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'},
'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'},
'instant_rp_retention_range_in_days': {'key': 'instantRpRetentionRangeInDays', 'type': 'int'},
Expand All @@ -2207,6 +2212,7 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy):

def __init__(self, **kwargs):
super(AzureIaaSVMProtectionPolicy, self).__init__(**kwargs)
self.instant_rp_details = kwargs.get('instant_rp_details', None)
self.schedule_policy = kwargs.get('schedule_policy', None)
self.retention_policy = kwargs.get('retention_policy', None)
self.instant_rp_retention_range_in_days = kwargs.get('instant_rp_retention_range_in_days', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -847,9 +847,10 @@ class ProtectionPolicy(Model):
from this class.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: AzureVmWorkloadProtectionPolicy,
AzureFileShareProtectionPolicy, AzureIaaSVMProtectionPolicy,
AzureSqlProtectionPolicy, GenericProtectionPolicy, MabProtectionPolicy
sub-classes are: AzureFileShareProtectionPolicy,
AzureIaaSVMProtectionPolicy, AzureSqlProtectionPolicy,
AzureVmWorkloadProtectionPolicy, GenericProtectionPolicy,
MabProtectionPolicy

All required parameters must be populated in order to send to Azure.

Expand All @@ -869,7 +870,7 @@ class ProtectionPolicy(Model):
}

_subtype_map = {
'backup_management_type': {'AzureWorkload': 'AzureVmWorkloadProtectionPolicy', 'AzureStorage': 'AzureFileShareProtectionPolicy', 'AzureIaasVM': 'AzureIaaSVMProtectionPolicy', 'AzureSql': 'AzureSqlProtectionPolicy', 'GenericProtectionPolicy': 'GenericProtectionPolicy', 'MAB': 'MabProtectionPolicy'}
'backup_management_type': {'AzureStorage': 'AzureFileShareProtectionPolicy', 'AzureIaasVM': 'AzureIaaSVMProtectionPolicy', 'AzureSql': 'AzureSqlProtectionPolicy', 'AzureWorkload': 'AzureVmWorkloadProtectionPolicy', 'GenericProtectionPolicy': 'GenericProtectionPolicy', 'MAB': 'MabProtectionPolicy'}
}

def __init__(self, *, protected_items_count: int=None, **kwargs) -> None:
Expand Down Expand Up @@ -2176,6 +2177,9 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy):
:type protected_items_count: int
:param backup_management_type: Required. Constant filled by server.
:type backup_management_type: str
:param instant_rp_details:
:type instant_rp_details:
~azure.mgmt.recoveryservicesbackup.models.InstantRPAdditionalDetails
:param schedule_policy: Backup schedule specified as part of backup
policy.
:type schedule_policy:
Expand All @@ -2199,14 +2203,16 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy):
_attribute_map = {
'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'},
'backup_management_type': {'key': 'backupManagementType', 'type': 'str'},
'instant_rp_details': {'key': 'instantRPDetails', 'type': 'InstantRPAdditionalDetails'},
'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'},
'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'},
'instant_rp_retention_range_in_days': {'key': 'instantRpRetentionRangeInDays', 'type': 'int'},
'time_zone': {'key': 'timeZone', 'type': 'str'},
}

def __init__(self, *, protected_items_count: int=None, schedule_policy=None, retention_policy=None, instant_rp_retention_range_in_days: int=None, time_zone: str=None, **kwargs) -> None:
def __init__(self, *, protected_items_count: int=None, instant_rp_details=None, schedule_policy=None, retention_policy=None, instant_rp_retention_range_in_days: int=None, time_zone: str=None, **kwargs) -> None:
super(AzureIaaSVMProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs)
self.instant_rp_details = instant_rp_details
self.schedule_policy = schedule_policy
self.retention_policy = retention_policy
self.instant_rp_retention_range_in_days = instant_rp_retention_range_in_days
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,32 @@
from msrest.paging import Paged


class RecoveryPointResourcePaged(Paged):
class ProtectionPolicyResourcePaged(Paged):
"""
A paging container for iterating over a list of :class:`RecoveryPointResource <azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource>` object
A paging container for iterating over a list of :class:`ProtectionPolicyResource <azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[RecoveryPointResource]'}
'current_page': {'key': 'value', 'type': '[ProtectionPolicyResource]'}
}

def __init__(self, *args, **kwargs):

super(RecoveryPointResourcePaged, self).__init__(*args, **kwargs)
class ProtectionPolicyResourcePaged(Paged):
super(ProtectionPolicyResourcePaged, self).__init__(*args, **kwargs)
class RecoveryPointResourcePaged(Paged):
"""
A paging container for iterating over a list of :class:`ProtectionPolicyResource <azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource>` object
A paging container for iterating over a list of :class:`RecoveryPointResource <azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[ProtectionPolicyResource]'}
'current_page': {'key': 'value', 'type': '[RecoveryPointResource]'}
}

def __init__(self, *args, **kwargs):

super(ProtectionPolicyResourcePaged, self).__init__(*args, **kwargs)
super(RecoveryPointResourcePaged, self).__init__(*args, **kwargs)
class JobResourcePaged(Paged):
"""
A paging container for iterating over a list of :class:`JobResource <azure.mgmt.recoveryservicesbackup.models.JobResource>` object
Expand Down
Loading