From 05f4daed3373b19cd9dea702ab4447c312bf4105 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sat, 6 Feb 2021 00:48:59 +0000 Subject: [PATCH] CodeGen from PR 12872 in Azure/azure-rest-api-specs Merge 2bbb897904d5e15f3ded92be46d8c635ca54c3b9 into d6e60da2c05d341a2926fa9fec0e566f14e8e9ad --- .../_recovery_services_backup_client.py | 5 + .../recoveryservicesbackup/models/__init__.py | 40 +- .../recoveryservicesbackup/models/_models.py | 670 +++++++++++++++-- .../models/_models_py3.py | 698 ++++++++++++++++-- .../_recovery_services_backup_client_enums.py | 38 +- .../operations/__init__.py | 2 + .../operations/_backup_engines_operations.py | 8 +- .../operations/_backup_jobs_operations.py | 6 +- .../_backup_operation_results_operations.py | 6 +- .../_backup_operation_statuses_operations.py | 6 +- .../operations/_backup_policies_operations.py | 6 +- .../_backup_protectable_items_operations.py | 6 +- .../_backup_protected_items_operations.py | 6 +- ...backup_protection_containers_operations.py | 6 +- ..._resource_encryption_configs_operations.py | 4 +- ...ackup_resource_vault_configs_operations.py | 4 +- .../_backup_workload_items_operations.py | 6 +- .../operations/_backups_operations.py | 6 +- ...e_data_move_operation_result_operations.py | 85 +-- .../_crr_operation_results_operations.py | 62 +- ...xport_jobs_operation_results_operations.py | 6 +- ...m_level_recovery_connections_operations.py | 8 +- .../_job_cancellations_operations.py | 6 +- .../operations/_job_details_operations.py | 6 +- .../_job_operation_results_operations.py | 6 +- .../operations/_jobs_operations.py | 6 +- .../operations/_operation_operations.py | 6 +- ..._private_endpoint_connection_operations.py | 17 +- .../_private_endpoint_operations.py | 6 +- .../_protectable_containers_operations.py | 6 +- ...ected_item_operation_results_operations.py | 6 +- ...cted_item_operation_statuses_operations.py | 6 +- .../operations/_protected_items_operations.py | 12 +- ..._container_operation_results_operations.py | 6 +- ...er_refresh_operation_results_operations.py | 6 +- .../_protection_containers_operations.py | 16 +- .../_protection_policies_operations.py | 10 +- ...ion_policy_operation_results_operations.py | 6 +- ...on_policy_operation_statuses_operations.py | 6 +- .../operations/_recovery_points_operations.py | 8 +- ..._points_recommended_for_move_operations.py | 132 ++++ ...overy_services_backup_client_operations.py | 112 ++- .../operations/_restores_operations.py | 103 ++- .../operations/_security_pi_ns_operations.py | 6 +- 44 files changed, 1748 insertions(+), 430 deletions(-) create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_recommended_for_move_operations.py diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_recovery_services_backup_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_recovery_services_backup_client.py index 3172e5fafac1f..7f69a55b9b56a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_recovery_services_backup_client.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_recovery_services_backup_client.py @@ -49,6 +49,7 @@ from .operations import BackupProtectableItemsOperations from .operations import BackupProtectionContainersOperations from .operations import SecurityPINsOperations +from .operations import RecoveryPointsRecommendedForMoveOperations from .operations import AadPropertiesOperations from .operations import CrossRegionRestoreOperations from .operations import BackupCrrJobDetailsOperations @@ -143,6 +144,8 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin, :vartype backup_protection_containers: azure.mgmt.recoveryservicesbackup.operations.BackupProtectionContainersOperations :ivar security_pi_ns: SecurityPINs operations :vartype security_pi_ns: azure.mgmt.recoveryservicesbackup.operations.SecurityPINsOperations + :ivar recovery_points_recommended_for_move: RecoveryPointsRecommendedForMove operations + :vartype recovery_points_recommended_for_move: azure.mgmt.recoveryservicesbackup.operations.RecoveryPointsRecommendedForMoveOperations :ivar aad_properties: AadProperties operations :vartype aad_properties: azure.mgmt.recoveryservicesbackup.operations.AadPropertiesOperations :ivar cross_region_restore: CrossRegionRestore operations @@ -262,6 +265,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.security_pi_ns = SecurityPINsOperations( self._client, self.config, self._serialize, self._deserialize) + self.recovery_points_recommended_for_move = RecoveryPointsRecommendedForMoveOperations( + self._client, self.config, self._serialize, self._deserialize) self.aad_properties = AadPropertiesOperations( self._client, self.config, self._serialize, self._deserialize) self.cross_region_restore = CrossRegionRestoreOperations( diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py index f80b842a8ce8b..37abe8e79a710 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py @@ -88,14 +88,18 @@ from ._models_py3 import AzureWorkloadRestoreRequest from ._models_py3 import AzureWorkloadSAPHanaPointInTimeRecoveryPoint from ._models_py3 import AzureWorkloadSAPHanaPointInTimeRestoreRequest + from ._models_py3 import AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest from ._models_py3 import AzureWorkloadSAPHanaRecoveryPoint from ._models_py3 import AzureWorkloadSAPHanaRestoreRequest + from ._models_py3 import AzureWorkloadSAPHanaRestoreWithRehydrateRequest from ._models_py3 import AzureWorkloadSQLAutoProtectionIntent from ._models_py3 import AzureWorkloadSQLPointInTimeRecoveryPoint from ._models_py3 import AzureWorkloadSQLPointInTimeRestoreRequest + from ._models_py3 import AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest from ._models_py3 import AzureWorkloadSQLRecoveryPoint from ._models_py3 import AzureWorkloadSQLRecoveryPointExtendedInfo from ._models_py3 import AzureWorkloadSQLRestoreRequest + from ._models_py3 import AzureWorkloadSQLRestoreWithRehydrateRequest from ._models_py3 import BackupEngineBase from ._models_py3 import BackupEngineBaseResource from ._models_py3 import BackupEngineExtendedInfo @@ -151,7 +155,6 @@ from ._models_py3 import EncryptionDetails from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorDetail - from ._models_py3 import ErrorResponse, ErrorResponseException from ._models_py3 import ExportJobsOperationResultInfo from ._models_py3 import ExtendedProperties from ._models_py3 import FeatureSupportRequest @@ -167,6 +170,7 @@ from ._models_py3 import IaaSVMProtectableItem from ._models_py3 import IaasVMRecoveryPoint from ._models_py3 import IaasVMRestoreRequest + from ._models_py3 import IaasVMRestoreWithRehydrationRequest from ._models_py3 import ILRRequest from ._models_py3 import ILRRequestResource from ._models_py3 import InquiryInfo @@ -179,6 +183,7 @@ from ._models_py3 import KEKDetails from ._models_py3 import KeyAndSecretDetails from ._models_py3 import KPIResourceHealthDetails + from ._models_py3 import ListRecoveryPointsRecommendedForMoveRequest from ._models_py3 import LogSchedulePolicy from ._models_py3 import LongTermRetentionPolicy from ._models_py3 import LongTermSchedulePolicy @@ -193,6 +198,7 @@ from ._models_py3 import MabJobTaskDetails from ._models_py3 import MabProtectionPolicy from ._models_py3 import MonthlyRetentionSchedule + from ._models_py3 import MoveRPAcrossTiersRequest from ._models_py3 import NameInfo from ._models_py3 import NewErrorResponse, NewErrorResponseException from ._models_py3 import NewErrorResponseError @@ -232,6 +238,8 @@ from ._models_py3 import ProtectionPolicyResource from ._models_py3 import RecoveryPoint from ._models_py3 import RecoveryPointDiskConfiguration + from ._models_py3 import RecoveryPointMoveReadinessInfo + from ._models_py3 import RecoveryPointRehydrationInfo from ._models_py3 import RecoveryPointResource from ._models_py3 import RecoveryPointTierInformation from ._models_py3 import Resource @@ -350,14 +358,18 @@ from ._models import AzureWorkloadRestoreRequest from ._models import AzureWorkloadSAPHanaPointInTimeRecoveryPoint from ._models import AzureWorkloadSAPHanaPointInTimeRestoreRequest + from ._models import AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest from ._models import AzureWorkloadSAPHanaRecoveryPoint from ._models import AzureWorkloadSAPHanaRestoreRequest + from ._models import AzureWorkloadSAPHanaRestoreWithRehydrateRequest from ._models import AzureWorkloadSQLAutoProtectionIntent from ._models import AzureWorkloadSQLPointInTimeRecoveryPoint from ._models import AzureWorkloadSQLPointInTimeRestoreRequest + from ._models import AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest from ._models import AzureWorkloadSQLRecoveryPoint from ._models import AzureWorkloadSQLRecoveryPointExtendedInfo from ._models import AzureWorkloadSQLRestoreRequest + from ._models import AzureWorkloadSQLRestoreWithRehydrateRequest from ._models import BackupEngineBase from ._models import BackupEngineBaseResource from ._models import BackupEngineExtendedInfo @@ -413,7 +425,6 @@ from ._models import EncryptionDetails from ._models import ErrorAdditionalInfo from ._models import ErrorDetail - from ._models import ErrorResponse, ErrorResponseException from ._models import ExportJobsOperationResultInfo from ._models import ExtendedProperties from ._models import FeatureSupportRequest @@ -429,6 +440,7 @@ from ._models import IaaSVMProtectableItem from ._models import IaasVMRecoveryPoint from ._models import IaasVMRestoreRequest + from ._models import IaasVMRestoreWithRehydrationRequest from ._models import ILRRequest from ._models import ILRRequestResource from ._models import InquiryInfo @@ -441,6 +453,7 @@ from ._models import KEKDetails from ._models import KeyAndSecretDetails from ._models import KPIResourceHealthDetails + from ._models import ListRecoveryPointsRecommendedForMoveRequest from ._models import LogSchedulePolicy from ._models import LongTermRetentionPolicy from ._models import LongTermSchedulePolicy @@ -455,6 +468,7 @@ from ._models import MabJobTaskDetails from ._models import MabProtectionPolicy from ._models import MonthlyRetentionSchedule + from ._models import MoveRPAcrossTiersRequest from ._models import NameInfo from ._models import NewErrorResponse, NewErrorResponseException from ._models import NewErrorResponseError @@ -494,6 +508,8 @@ from ._models import ProtectionPolicyResource from ._models import RecoveryPoint from ._models import RecoveryPointDiskConfiguration + from ._models import RecoveryPointMoveReadinessInfo + from ._models import RecoveryPointRehydrationInfo from ._models import RecoveryPointResource from ._models import RecoveryPointTierInformation from ._models import Resource @@ -564,13 +580,13 @@ LastBackupStatus, ProtectedItemHealthStatus, RestorePointType, + RecoveryPointTierType, + RecoveryPointTierStatus, OverwriteOptions, RecoveryMode, SQLDataDirectoryType, RestorePointQueryType, RetentionDurationType, - RecoveryPointTierType, - RecoveryPointTierStatus, BackupManagementType, JobStatus, JobOperationType, @@ -598,6 +614,7 @@ ProtectionStatus, BackupItemType, OperationStatusValues, + RehydrationPriority, SupportStatus, UsagesUnit, FabricName, @@ -685,14 +702,18 @@ 'AzureWorkloadRestoreRequest', 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'AzureWorkloadSAPHanaPointInTimeRestoreRequest', + 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'AzureWorkloadSAPHanaRecoveryPoint', 'AzureWorkloadSAPHanaRestoreRequest', + 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'AzureWorkloadSQLAutoProtectionIntent', 'AzureWorkloadSQLPointInTimeRecoveryPoint', 'AzureWorkloadSQLPointInTimeRestoreRequest', + 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'AzureWorkloadSQLRecoveryPoint', 'AzureWorkloadSQLRecoveryPointExtendedInfo', 'AzureWorkloadSQLRestoreRequest', + 'AzureWorkloadSQLRestoreWithRehydrateRequest', 'BackupEngineBase', 'BackupEngineBaseResource', 'BackupEngineExtendedInfo', @@ -748,7 +769,6 @@ 'EncryptionDetails', 'ErrorAdditionalInfo', 'ErrorDetail', - 'ErrorResponse', 'ErrorResponseException', 'ExportJobsOperationResultInfo', 'ExtendedProperties', 'FeatureSupportRequest', @@ -764,6 +784,7 @@ 'IaaSVMProtectableItem', 'IaasVMRecoveryPoint', 'IaasVMRestoreRequest', + 'IaasVMRestoreWithRehydrationRequest', 'ILRRequest', 'ILRRequestResource', 'InquiryInfo', @@ -776,6 +797,7 @@ 'KEKDetails', 'KeyAndSecretDetails', 'KPIResourceHealthDetails', + 'ListRecoveryPointsRecommendedForMoveRequest', 'LogSchedulePolicy', 'LongTermRetentionPolicy', 'LongTermSchedulePolicy', @@ -790,6 +812,7 @@ 'MabJobTaskDetails', 'MabProtectionPolicy', 'MonthlyRetentionSchedule', + 'MoveRPAcrossTiersRequest', 'NameInfo', 'NewErrorResponse', 'NewErrorResponseException', 'NewErrorResponseError', @@ -829,6 +852,8 @@ 'ProtectionPolicyResource', 'RecoveryPoint', 'RecoveryPointDiskConfiguration', + 'RecoveryPointMoveReadinessInfo', + 'RecoveryPointRehydrationInfo', 'RecoveryPointResource', 'RecoveryPointTierInformation', 'Resource', @@ -898,13 +923,13 @@ 'LastBackupStatus', 'ProtectedItemHealthStatus', 'RestorePointType', + 'RecoveryPointTierType', + 'RecoveryPointTierStatus', 'OverwriteOptions', 'RecoveryMode', 'SQLDataDirectoryType', 'RestorePointQueryType', 'RetentionDurationType', - 'RecoveryPointTierType', - 'RecoveryPointTierStatus', 'BackupManagementType', 'JobStatus', 'JobOperationType', @@ -932,6 +957,7 @@ 'ProtectionStatus', 'BackupItemType', 'OperationStatusValues', + 'RehydrationPriority', 'SupportStatus', 'UsagesUnit', 'FabricName', diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models.py index 89f3873765ac3..ac055746a6479 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models.py @@ -5216,6 +5216,13 @@ class AzureWorkloadRecoveryPoint(RecoveryPoint): 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param recovery_point_move_readiness_info: Eligibility of RP to be moved + to another tier + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] """ _validation = { @@ -5228,6 +5235,8 @@ class AzureWorkloadRecoveryPoint(RecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, } _subtype_map = { @@ -5238,6 +5247,8 @@ def __init__(self, **kwargs): super(AzureWorkloadRecoveryPoint, self).__init__(**kwargs) self.recovery_point_time_in_utc = None self.type = None + self.recovery_point_tier_details = kwargs.get('recovery_point_tier_details', None) + self.recovery_point_move_readiness_info = kwargs.get('recovery_point_move_readiness_info', None) self.object_type = 'AzureWorkloadRecoveryPoint' @@ -5261,6 +5272,13 @@ class AzureWorkloadPointInTimeRecoveryPoint(AzureWorkloadRecoveryPoint): 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param recovery_point_move_readiness_info: Eligibility of RP to be moved + to another tier + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] :param time_ranges: List of log ranges :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] @@ -5276,6 +5294,8 @@ class AzureWorkloadPointInTimeRecoveryPoint(AzureWorkloadRecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, } @@ -5414,6 +5434,13 @@ class AzureWorkloadSAPHanaPointInTimeRecoveryPoint(AzureWorkloadPointInTimeRecov 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param recovery_point_move_readiness_info: Eligibility of RP to be moved + to another tier + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] :param time_ranges: List of log ranges :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] @@ -5429,6 +5456,8 @@ class AzureWorkloadSAPHanaPointInTimeRecoveryPoint(AzureWorkloadPointInTimeRecov 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, } @@ -5441,7 +5470,8 @@ class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): """AzureWorkload SAP Hana-specific restore. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSAPHanaPointInTimeRestoreRequest + sub-classes are: AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest All required parameters must be populated in order to send to Azure. @@ -5481,7 +5511,7 @@ class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): } _subtype_map = { - 'object_type': {'AzureWorkloadSAPHanaPointInTimeRestoreRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreRequest'} + 'object_type': {'AzureWorkloadSAPHanaPointInTimeRestoreRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreRequest', 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest': 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest'} } def __init__(self, **kwargs): @@ -5493,6 +5523,9 @@ class AzureWorkloadSAPHanaPointInTimeRestoreRequest(AzureWorkloadSAPHanaRestoreR """AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest + All required parameters must be populated in order to send to Azure. :param object_type: Required. Constant filled by server. @@ -5533,12 +5566,70 @@ class AzureWorkloadSAPHanaPointInTimeRestoreRequest(AzureWorkloadSAPHanaRestoreR 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, } + _subtype_map = { + 'object_type': {'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest'} + } + def __init__(self, **kwargs): super(AzureWorkloadSAPHanaPointInTimeRestoreRequest, self).__init__(**kwargs) self.point_in_time = kwargs.get('point_in_time', None) self.object_type = 'AzureWorkloadSAPHanaPointInTimeRestoreRequest' +class AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSAPHanaPointInTimeRestoreRequest): + """AzureWorkload SAP Hana-specific restore with integrated rehydration of + recovery point. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', + 'Offline' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param recovery_mode: Defines whether the current recovery mode is file + restore or database restore. Possible values include: 'Invalid', + 'FileRecovery', 'WorkloadRecovery' + :type recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param point_in_time: PointInTime value + :type point_in_time: datetime + :param recovery_point_rehydration_info: RP Rehydration Info + :type recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, self).__init__(**kwargs) + self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) + self.object_type = 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest' + + class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): """SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints. @@ -5557,6 +5648,13 @@ class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param recovery_point_move_readiness_info: Eligibility of RP to be moved + to another tier + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] """ _validation = { @@ -5569,6 +5667,8 @@ class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, } def __init__(self, **kwargs): @@ -5576,6 +5676,57 @@ def __init__(self, **kwargs): self.object_type = 'AzureWorkloadSAPHanaRecoveryPoint' +class AzureWorkloadSAPHanaRestoreWithRehydrateRequest(AzureWorkloadSAPHanaRestoreRequest): + """AzureWorkload SAP Hana-specific restore with integrated rehydration of + recovery point. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', + 'Offline' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param recovery_mode: Defines whether the current recovery mode is file + restore or database restore. Possible values include: 'Invalid', + 'FileRecovery', 'WorkloadRecovery' + :type recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param recovery_point_rehydration_info: RP Rehydration Info + :type recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadSAPHanaRestoreWithRehydrateRequest, self).__init__(**kwargs) + self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) + self.object_type = 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest' + + class AzureWorkloadSQLAutoProtectionIntent(AzureWorkloadAutoProtectionIntent): """Azure Workload SQL Auto Protection intent item. @@ -5651,6 +5802,13 @@ class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param recovery_point_move_readiness_info: Eligibility of RP to be moved + to another tier + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] :param extended_info: Extended Info that provides data directory details. Will be populated in two cases: When a specific recovery point is accessed using GetRecoveryPoint @@ -5670,6 +5828,8 @@ class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, } @@ -5700,6 +5860,13 @@ class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param recovery_point_move_readiness_info: Eligibility of RP to be moved + to another tier + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] :param extended_info: Extended Info that provides data directory details. Will be populated in two cases: When a specific recovery point is accessed using GetRecoveryPoint @@ -5722,6 +5889,8 @@ class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, } @@ -5736,7 +5905,8 @@ class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): """AzureWorkload SQL -specific restore. Specifically for full/diff restore. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSQLPointInTimeRestoreRequest + sub-classes are: AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest All required parameters must be populated in order to send to Azure. @@ -5788,7 +5958,7 @@ class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): } _subtype_map = { - 'object_type': {'AzureWorkloadSQLPointInTimeRestoreRequest': 'AzureWorkloadSQLPointInTimeRestoreRequest'} + 'object_type': {'AzureWorkloadSQLPointInTimeRestoreRequest': 'AzureWorkloadSQLPointInTimeRestoreRequest', 'AzureWorkloadSQLRestoreWithRehydrateRequest': 'AzureWorkloadSQLRestoreWithRehydrateRequest'} } def __init__(self, **kwargs): @@ -5803,6 +5973,9 @@ class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): """AzureWorkload SQL -specific restore. Specifically for PointInTime/Log restore. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest + All required parameters must be populated in order to send to Azure. :param object_type: Required. Constant filled by server. @@ -5855,12 +6028,82 @@ class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, } + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest': 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest'} + } + def __init__(self, **kwargs): super(AzureWorkloadSQLPointInTimeRestoreRequest, self).__init__(**kwargs) self.point_in_time = kwargs.get('point_in_time', None) self.object_type = 'AzureWorkloadSQLPointInTimeRestoreRequest' +class AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSQLPointInTimeRestoreRequest): + """AzureWorkload SQL-specific restore with integrated rehydration of recovery + point. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', + 'Offline' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param recovery_mode: Defines whether the current recovery mode is file + restore or database restore. Possible values include: 'Invalid', + 'FileRecovery', 'WorkloadRecovery' + :type recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param should_use_alternate_target_location: Default option set to true. + If this is set to false, alternate data directory must be provided + :type should_use_alternate_target_location: bool + :param is_non_recoverable: SQL specific property where user can chose to + set no-recovery when restore operation is tried + :type is_non_recoverable: bool + :param alternate_directory_paths: Data directory details + :type alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + :param point_in_time: PointInTime value + :type point_in_time: datetime + :param recovery_point_rehydration_info: RP Rehydration Info + :type recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, self).__init__(**kwargs) + self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) + self.object_type = 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest' + + class AzureWorkloadSQLRecoveryPointExtendedInfo(Model): """Extended info class details. @@ -5892,6 +6135,69 @@ def __init__(self, **kwargs): self.data_directory_paths = None +class AzureWorkloadSQLRestoreWithRehydrateRequest(AzureWorkloadSQLRestoreRequest): + """AzureWorkload SQL-specific restore with integrated rehydration of recovery + point. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', + 'Offline' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param recovery_mode: Defines whether the current recovery mode is file + restore or database restore. Possible values include: 'Invalid', + 'FileRecovery', 'WorkloadRecovery' + :type recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param should_use_alternate_target_location: Default option set to true. + If this is set to false, alternate data directory must be provided + :type should_use_alternate_target_location: bool + :param is_non_recoverable: SQL specific property where user can chose to + set no-recovery when restore operation is tried + :type is_non_recoverable: bool + :param alternate_directory_paths: Data directory details + :type alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + :param recovery_point_rehydration_info: RP Rehydration Info + :type recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__(self, **kwargs): + super(AzureWorkloadSQLRestoreWithRehydrateRequest, self).__init__(**kwargs) + self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) + self.object_type = 'AzureWorkloadSQLRestoreWithRehydrateRequest' + + class BackupEngineBaseResource(Resource): """The base backup engine class. All workload specific backup engines derive from this class. @@ -6651,6 +6957,8 @@ class BMSRPQueryObject(Model): :param extended_info: In Get Recovery Point, it tells whether extended information about recovery point is asked. :type extended_info: bool + :param move_ready_rp_only: Whether the RP can be moved to another tier + :type move_ready_rp_only: bool """ _attribute_map = { @@ -6658,6 +6966,7 @@ class BMSRPQueryObject(Model): 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, 'restore_point_query_type': {'key': 'restorePointQueryType', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'bool'}, + 'move_ready_rp_only': {'key': 'moveReadyRPOnly', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -6666,6 +6975,7 @@ def __init__(self, **kwargs): self.end_date = kwargs.get('end_date', None) self.restore_point_query_type = kwargs.get('restore_point_query_type', None) self.extended_info = kwargs.get('extended_info', None) + self.move_ready_rp_only = kwargs.get('move_ready_rp_only', None) class BMSWorkloadItemQueryObject(Model): @@ -6867,12 +7177,80 @@ def __init__(self, **kwargs): class CloudError(Model): - """CloudError. + """An error response from the Container Instance service. + + :param error: Details of the Error Response. + :type error: ~azure.mgmt.recoveryservicesbackup.models.CloudErrorBody """ _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, } + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the Container Instance service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for + display in a user interface. + :vartype message: str + :ivar target: The target of the particular error. For example, the name of + the property in error. + :vartype target: str + :ivar details: A list of additional details about the error. + :vartype details: + list[~azure.mgmt.recoveryservicesbackup.models.CloudErrorBody] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.recoveryservicesbackup.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + class ContainerIdentityInfo(Model): """Container identity information. @@ -7853,67 +8231,6 @@ def __init__(self, **kwargs): self.recommendations = None -class ErrorResponse(Model): - """Error Response. - - Common error response for all Azure Resource Manager APIs to return error - details for failed operations. (This also follows the OData error response - format.). - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: - list[~azure.mgmt.recoveryservicesbackup.models.ErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.recoveryservicesbackup.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) - - class OperationResultInfoBase(Model): """Base class for operation result info. @@ -8394,6 +8711,10 @@ class IaasVMRecoveryPoint(RecoveryPoint): :param zones: Identifies the zone of the VM at the time of backup. Applicable only for zone-pinned Vms :type zones: list[str] + :param recovery_point_move_readiness_info: Eligibility of RP to be moved + to another tier + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] """ _validation = { @@ -8421,6 +8742,7 @@ class IaasVMRecoveryPoint(RecoveryPoint): 'os_type': {'key': 'osType', 'type': 'str'}, 'recovery_point_disk_configuration': {'key': 'recoveryPointDiskConfiguration', 'type': 'RecoveryPointDiskConfiguration'}, 'zones': {'key': 'zones', 'type': '[str]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, } def __init__(self, **kwargs): @@ -8439,12 +8761,16 @@ def __init__(self, **kwargs): self.os_type = kwargs.get('os_type', None) self.recovery_point_disk_configuration = kwargs.get('recovery_point_disk_configuration', None) self.zones = kwargs.get('zones', None) + self.recovery_point_move_readiness_info = kwargs.get('recovery_point_move_readiness_info', None) self.object_type = 'IaasVMRecoveryPoint' class IaasVMRestoreRequest(RestoreRequest): """IaaS VM workload-specific restore. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: IaasVMRestoreWithRehydrationRequest + All required parameters must be populated in order to send to Azure. :param object_type: Required. Constant filled by server. @@ -8538,6 +8864,10 @@ class IaasVMRestoreRequest(RestoreRequest): 'zones': {'key': 'zones', 'type': '[str]'}, } + _subtype_map = { + 'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'} + } + def __init__(self, **kwargs): super(IaasVMRestoreRequest, self).__init__(**kwargs) self.recovery_point_id = kwargs.get('recovery_point_id', None) @@ -8561,6 +8891,113 @@ def __init__(self, **kwargs): self.object_type = 'IaasVMRestoreRequest' +class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest): + """IaaS VM workload-specific restore with integrated rehydration of recovery + point. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_id: ID of the backup copy to be recovered. + :type recovery_point_id: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', + 'Offline' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM which is being + recovered. + :type source_resource_id: str + :param target_virtual_machine_id: This is the complete ARM Id of the VM + that will be created. + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str + :param target_resource_group_id: This is the ARM Id of the resource group + that you want to create for this Virtual machine and other artifacts. + For e.g. /subscriptions/{subId}/resourcegroups/{rg} + :type target_resource_group_id: str + :param storage_account_id: Fully qualified ARM ID of the storage account + to which the VM has to be restored. + :type storage_account_id: str + :param virtual_network_id: This is the virtual network Id of the vnet that + will be attached to the virtual machine. + User will be validated for join action permissions in the linked access. + :type virtual_network_id: str + :param subnet_id: Subnet ID, is the subnet ID associated with the to be + restored VM. For Classic VMs it would be + {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it + would be ARM resource ID used to represent + the subnet. + :type subnet_id: str + :param target_domain_name_id: Fully qualified ARM ID of the domain name to + be associated to the VM being restored. This applies only to Classic + Virtual Machines. + :type target_domain_name_id: str + :param region: Region in which the virtual machine is restored. + :type region: str + :param affinity_group: Affinity group associated to VM to be restored. + Used only for Classic Compute Virtual Machines. + :type affinity_group: str + :param create_new_cloud_service: Should a new cloud service be created + while restoring the VM. If this is false, VM will be restored to the same + cloud service as it was at the time of backup. + :type create_new_cloud_service: bool + :param original_storage_account_option: Original Storage Account Option + :type original_storage_account_option: bool + :param encryption_details: Details needed if the VM was encrypted at the + time of backup. + :type encryption_details: + ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails + :param restore_disk_lun_list: List of Disk LUNs for partial restore + :type restore_disk_lun_list: list[int] + :param restore_with_managed_disks: Flag to denote of an Unmanaged disk VM + should be restored with Managed disks. + :type restore_with_managed_disks: bool + :param disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM + needs to be encrypted at rest during restore with customer managed key. + :type disk_encryption_set_id: str + :param zones: Target zone where the VM and its disks should be restored. + :type zones: list[str] + :param recovery_point_rehydration_info: RP Rehydration Info + :type recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, + 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, + 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, + 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, + 'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'}, + 'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'}, + 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__(self, **kwargs): + super(IaasVMRestoreWithRehydrationRequest, self).__init__(**kwargs) + self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) + self.object_type = 'IaasVMRestoreWithRehydrationRequest' + + class ILRRequestResource(Resource): """Parameters to Provision ILR API. @@ -8871,6 +9308,26 @@ def __init__(self, **kwargs): self.resource_health_details = kwargs.get('resource_health_details', None) +class ListRecoveryPointsRecommendedForMoveRequest(Model): + """ListRecoveryPointsRecommendedForMoveRequest Request. + + :param object_type: Gets the class type. + :type object_type: str + :param excluded_rp_list: List of Recovery Points excluded from Move + :type excluded_rp_list: list[str] + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'excluded_rp_list': {'key': 'excludedRPList', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ListRecoveryPointsRecommendedForMoveRequest, self).__init__(**kwargs) + self.object_type = kwargs.get('object_type', None) + self.excluded_rp_list = kwargs.get('excluded_rp_list', None) + + class SchedulePolicy(Model): """Base class for backup schedule. @@ -9546,6 +10003,35 @@ def __init__(self, **kwargs): self.retention_duration = kwargs.get('retention_duration', None) +class MoveRPAcrossTiersRequest(Model): + """MoveRPAcrossTiersRequest. + + :param object_type: Gets the class type. + :type object_type: str + :param source_tier_type: Source tier from where RP needs to be moved. + Possible values include: 'Invalid', 'InstantRP', 'HardenedRP', + 'ArchivedRP' + :type source_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :param target_tier_type: Target tier where RP needs to be moved. Possible + values include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' + :type target_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'source_tier_type': {'key': 'sourceTierType', 'type': 'RecoveryPointTierType'}, + 'target_tier_type': {'key': 'targetTierType', 'type': 'RecoveryPointTierType'}, + } + + def __init__(self, **kwargs): + super(MoveRPAcrossTiersRequest, self).__init__(**kwargs) + self.object_type = kwargs.get('object_type', None) + self.source_tier_type = kwargs.get('source_tier_type', None) + self.target_tier_type = kwargs.get('target_tier_type', None) + + class NameInfo(Model): """The name of usage. @@ -10679,6 +11165,50 @@ def __init__(self, **kwargs): self.excluded_disk_list = kwargs.get('excluded_disk_list', None) +class RecoveryPointMoveReadinessInfo(Model): + """RecoveryPointMoveReadinessInfo. + + :param is_ready_for_move: + :type is_ready_for_move: bool + :param additional_info: + :type additional_info: str + """ + + _attribute_map = { + 'is_ready_for_move': {'key': 'isReadyForMove', 'type': 'bool'}, + 'additional_info': {'key': 'additionalInfo', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecoveryPointMoveReadinessInfo, self).__init__(**kwargs) + self.is_ready_for_move = kwargs.get('is_ready_for_move', None) + self.additional_info = kwargs.get('additional_info', None) + + +class RecoveryPointRehydrationInfo(Model): + """RP Rehydration Info. + + :param rehydration_retention_duration: How long the rehydrated RP should + be kept + Should be ISO8601 Duration format e.g. "P7D" + :type rehydration_retention_duration: str + :param rehydration_priority: Rehydration Priority. Possible values + include: 'Standard', 'High' + :type rehydration_priority: str or + ~azure.mgmt.recoveryservicesbackup.models.RehydrationPriority + """ + + _attribute_map = { + 'rehydration_retention_duration': {'key': 'rehydrationRetentionDuration', 'type': 'str'}, + 'rehydration_priority': {'key': 'rehydrationPriority', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecoveryPointRehydrationInfo, self).__init__(**kwargs) + self.rehydration_retention_duration = kwargs.get('rehydration_retention_duration', None) + self.rehydration_priority = kwargs.get('rehydration_priority', None) + + class RecoveryPointResource(Resource): """Base class for backup copies. Workload-specific backup copies are derived from this class. @@ -10728,24 +11258,28 @@ class RecoveryPointTierInformation(Model): """Recovery point tier information. :param type: Recovery point tier type. Possible values include: 'Invalid', - 'InstantRP', 'HardenedRP' + 'InstantRP', 'HardenedRP', 'ArchivedRP' :type type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType :param status: Recovery point tier status. Possible values include: - 'Invalid', 'Valid', 'Disabled', 'Deleted' + 'Invalid', 'Valid', 'Disabled', 'Deleted', 'Rehydrated' :type status: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus + :param extended_info: Recovery point tier status. + :type extended_info: dict[str, str] """ _attribute_map = { 'type': {'key': 'type', 'type': 'RecoveryPointTierType'}, 'status': {'key': 'status', 'type': 'RecoveryPointTierStatus'}, + 'extended_info': {'key': 'extendedInfo', 'type': '{str}'}, } def __init__(self, **kwargs): super(RecoveryPointTierInformation, self).__init__(**kwargs) self.type = kwargs.get('type', None) self.status = kwargs.get('status', None) + self.extended_info = kwargs.get('extended_info', None) class ResourceList(Model): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models_py3.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models_py3.py index 190a6c776b9ff..2aadcd1dd56da 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models_py3.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models_py3.py @@ -5216,6 +5216,13 @@ class AzureWorkloadRecoveryPoint(RecoveryPoint): 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param recovery_point_move_readiness_info: Eligibility of RP to be moved + to another tier + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] """ _validation = { @@ -5228,16 +5235,20 @@ class AzureWorkloadRecoveryPoint(RecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, } _subtype_map = { 'object_type': {'AzureWorkloadPointInTimeRecoveryPoint': 'AzureWorkloadPointInTimeRecoveryPoint', 'AzureWorkloadSAPHanaRecoveryPoint': 'AzureWorkloadSAPHanaRecoveryPoint', 'AzureWorkloadSQLRecoveryPoint': 'AzureWorkloadSQLRecoveryPoint'} } - def __init__(self, **kwargs) -> None: + def __init__(self, *, recovery_point_tier_details=None, recovery_point_move_readiness_info=None, **kwargs) -> None: super(AzureWorkloadRecoveryPoint, self).__init__(**kwargs) self.recovery_point_time_in_utc = None self.type = None + self.recovery_point_tier_details = recovery_point_tier_details + self.recovery_point_move_readiness_info = recovery_point_move_readiness_info self.object_type = 'AzureWorkloadRecoveryPoint' @@ -5261,6 +5272,13 @@ class AzureWorkloadPointInTimeRecoveryPoint(AzureWorkloadRecoveryPoint): 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param recovery_point_move_readiness_info: Eligibility of RP to be moved + to another tier + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] :param time_ranges: List of log ranges :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] @@ -5276,6 +5294,8 @@ class AzureWorkloadPointInTimeRecoveryPoint(AzureWorkloadRecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, } @@ -5283,8 +5303,8 @@ class AzureWorkloadPointInTimeRecoveryPoint(AzureWorkloadRecoveryPoint): 'object_type': {'AzureWorkloadSAPHanaPointInTimeRecoveryPoint': 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint'} } - def __init__(self, *, time_ranges=None, **kwargs) -> None: - super(AzureWorkloadPointInTimeRecoveryPoint, self).__init__(**kwargs) + def __init__(self, *, recovery_point_tier_details=None, recovery_point_move_readiness_info=None, time_ranges=None, **kwargs) -> None: + super(AzureWorkloadPointInTimeRecoveryPoint, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, **kwargs) self.time_ranges = time_ranges self.object_type = 'AzureWorkloadPointInTimeRecoveryPoint' @@ -5414,6 +5434,13 @@ class AzureWorkloadSAPHanaPointInTimeRecoveryPoint(AzureWorkloadPointInTimeRecov 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param recovery_point_move_readiness_info: Eligibility of RP to be moved + to another tier + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] :param time_ranges: List of log ranges :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] @@ -5429,11 +5456,13 @@ class AzureWorkloadSAPHanaPointInTimeRecoveryPoint(AzureWorkloadPointInTimeRecov 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, } - def __init__(self, *, time_ranges=None, **kwargs) -> None: - super(AzureWorkloadSAPHanaPointInTimeRecoveryPoint, self).__init__(time_ranges=time_ranges, **kwargs) + def __init__(self, *, recovery_point_tier_details=None, recovery_point_move_readiness_info=None, time_ranges=None, **kwargs) -> None: + super(AzureWorkloadSAPHanaPointInTimeRecoveryPoint, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, time_ranges=time_ranges, **kwargs) self.object_type = 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint' @@ -5441,7 +5470,8 @@ class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): """AzureWorkload SAP Hana-specific restore. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSAPHanaPointInTimeRestoreRequest + sub-classes are: AzureWorkloadSAPHanaPointInTimeRestoreRequest, + AzureWorkloadSAPHanaRestoreWithRehydrateRequest All required parameters must be populated in order to send to Azure. @@ -5481,7 +5511,7 @@ class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): } _subtype_map = { - 'object_type': {'AzureWorkloadSAPHanaPointInTimeRestoreRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreRequest'} + 'object_type': {'AzureWorkloadSAPHanaPointInTimeRestoreRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreRequest', 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest': 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest'} } def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, target_info=None, recovery_mode=None, **kwargs) -> None: @@ -5493,6 +5523,9 @@ class AzureWorkloadSAPHanaPointInTimeRestoreRequest(AzureWorkloadSAPHanaRestoreR """AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest + All required parameters must be populated in order to send to Azure. :param object_type: Required. Constant filled by server. @@ -5533,12 +5566,70 @@ class AzureWorkloadSAPHanaPointInTimeRestoreRequest(AzureWorkloadSAPHanaRestoreR 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, } + _subtype_map = { + 'object_type': {'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest'} + } + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, target_info=None, recovery_mode=None, point_in_time=None, **kwargs) -> None: super(AzureWorkloadSAPHanaPointInTimeRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, **kwargs) self.point_in_time = point_in_time self.object_type = 'AzureWorkloadSAPHanaPointInTimeRestoreRequest' +class AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSAPHanaPointInTimeRestoreRequest): + """AzureWorkload SAP Hana-specific restore with integrated rehydration of + recovery point. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', + 'Offline' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param recovery_mode: Defines whether the current recovery mode is file + restore or database restore. Possible values include: 'Invalid', + 'FileRecovery', 'WorkloadRecovery' + :type recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param point_in_time: PointInTime value + :type point_in_time: datetime + :param recovery_point_rehydration_info: RP Rehydration Info + :type recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, target_info=None, recovery_mode=None, point_in_time=None, recovery_point_rehydration_info=None, **kwargs) -> None: + super(AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, point_in_time=point_in_time, **kwargs) + self.recovery_point_rehydration_info = recovery_point_rehydration_info + self.object_type = 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest' + + class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): """SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints. @@ -5557,6 +5648,13 @@ class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param recovery_point_move_readiness_info: Eligibility of RP to be moved + to another tier + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] """ _validation = { @@ -5569,13 +5667,66 @@ class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, } - def __init__(self, **kwargs) -> None: - super(AzureWorkloadSAPHanaRecoveryPoint, self).__init__(**kwargs) + def __init__(self, *, recovery_point_tier_details=None, recovery_point_move_readiness_info=None, **kwargs) -> None: + super(AzureWorkloadSAPHanaRecoveryPoint, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, **kwargs) self.object_type = 'AzureWorkloadSAPHanaRecoveryPoint' +class AzureWorkloadSAPHanaRestoreWithRehydrateRequest(AzureWorkloadSAPHanaRestoreRequest): + """AzureWorkload SAP Hana-specific restore with integrated rehydration of + recovery point. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', + 'Offline' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param recovery_mode: Defines whether the current recovery mode is file + restore or database restore. Possible values include: 'Invalid', + 'FileRecovery', 'WorkloadRecovery' + :type recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param recovery_point_rehydration_info: RP Rehydration Info + :type recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, target_info=None, recovery_mode=None, recovery_point_rehydration_info=None, **kwargs) -> None: + super(AzureWorkloadSAPHanaRestoreWithRehydrateRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, **kwargs) + self.recovery_point_rehydration_info = recovery_point_rehydration_info + self.object_type = 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest' + + class AzureWorkloadSQLAutoProtectionIntent(AzureWorkloadAutoProtectionIntent): """Azure Workload SQL Auto Protection intent item. @@ -5651,6 +5802,13 @@ class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param recovery_point_move_readiness_info: Eligibility of RP to be moved + to another tier + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] :param extended_info: Extended Info that provides data directory details. Will be populated in two cases: When a specific recovery point is accessed using GetRecoveryPoint @@ -5670,6 +5828,8 @@ class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, } @@ -5677,8 +5837,8 @@ class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): 'object_type': {'AzureWorkloadSQLPointInTimeRecoveryPoint': 'AzureWorkloadSQLPointInTimeRecoveryPoint'} } - def __init__(self, *, extended_info=None, **kwargs) -> None: - super(AzureWorkloadSQLRecoveryPoint, self).__init__(**kwargs) + def __init__(self, *, recovery_point_tier_details=None, recovery_point_move_readiness_info=None, extended_info=None, **kwargs) -> None: + super(AzureWorkloadSQLRecoveryPoint, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, **kwargs) self.extended_info = extended_info self.object_type = 'AzureWorkloadSQLRecoveryPoint' @@ -5700,6 +5860,13 @@ class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param recovery_point_move_readiness_info: Eligibility of RP to be moved + to another tier + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] :param extended_info: Extended Info that provides data directory details. Will be populated in two cases: When a specific recovery point is accessed using GetRecoveryPoint @@ -5722,12 +5889,14 @@ class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, } - def __init__(self, *, extended_info=None, time_ranges=None, **kwargs) -> None: - super(AzureWorkloadSQLPointInTimeRecoveryPoint, self).__init__(extended_info=extended_info, **kwargs) + def __init__(self, *, recovery_point_tier_details=None, recovery_point_move_readiness_info=None, extended_info=None, time_ranges=None, **kwargs) -> None: + super(AzureWorkloadSQLPointInTimeRecoveryPoint, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, extended_info=extended_info, **kwargs) self.time_ranges = time_ranges self.object_type = 'AzureWorkloadSQLPointInTimeRecoveryPoint' @@ -5736,7 +5905,8 @@ class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): """AzureWorkload SQL -specific restore. Specifically for full/diff restore. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSQLPointInTimeRestoreRequest + sub-classes are: AzureWorkloadSQLPointInTimeRestoreRequest, + AzureWorkloadSQLRestoreWithRehydrateRequest All required parameters must be populated in order to send to Azure. @@ -5788,7 +5958,7 @@ class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): } _subtype_map = { - 'object_type': {'AzureWorkloadSQLPointInTimeRestoreRequest': 'AzureWorkloadSQLPointInTimeRestoreRequest'} + 'object_type': {'AzureWorkloadSQLPointInTimeRestoreRequest': 'AzureWorkloadSQLPointInTimeRestoreRequest', 'AzureWorkloadSQLRestoreWithRehydrateRequest': 'AzureWorkloadSQLRestoreWithRehydrateRequest'} } def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, target_info=None, recovery_mode=None, should_use_alternate_target_location: bool=None, is_non_recoverable: bool=None, alternate_directory_paths=None, **kwargs) -> None: @@ -5803,6 +5973,9 @@ class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): """AzureWorkload SQL -specific restore. Specifically for PointInTime/Log restore. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest + All required parameters must be populated in order to send to Azure. :param object_type: Required. Constant filled by server. @@ -5855,12 +6028,82 @@ class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, } + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest': 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest'} + } + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, target_info=None, recovery_mode=None, should_use_alternate_target_location: bool=None, is_non_recoverable: bool=None, alternate_directory_paths=None, point_in_time=None, **kwargs) -> None: super(AzureWorkloadSQLPointInTimeRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, should_use_alternate_target_location=should_use_alternate_target_location, is_non_recoverable=is_non_recoverable, alternate_directory_paths=alternate_directory_paths, **kwargs) self.point_in_time = point_in_time self.object_type = 'AzureWorkloadSQLPointInTimeRestoreRequest' +class AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSQLPointInTimeRestoreRequest): + """AzureWorkload SQL-specific restore with integrated rehydration of recovery + point. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', + 'Offline' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param recovery_mode: Defines whether the current recovery mode is file + restore or database restore. Possible values include: 'Invalid', + 'FileRecovery', 'WorkloadRecovery' + :type recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param should_use_alternate_target_location: Default option set to true. + If this is set to false, alternate data directory must be provided + :type should_use_alternate_target_location: bool + :param is_non_recoverable: SQL specific property where user can chose to + set no-recovery when restore operation is tried + :type is_non_recoverable: bool + :param alternate_directory_paths: Data directory details + :type alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + :param point_in_time: PointInTime value + :type point_in_time: datetime + :param recovery_point_rehydration_info: RP Rehydration Info + :type recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, target_info=None, recovery_mode=None, should_use_alternate_target_location: bool=None, is_non_recoverable: bool=None, alternate_directory_paths=None, point_in_time=None, recovery_point_rehydration_info=None, **kwargs) -> None: + super(AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, should_use_alternate_target_location=should_use_alternate_target_location, is_non_recoverable=is_non_recoverable, alternate_directory_paths=alternate_directory_paths, point_in_time=point_in_time, **kwargs) + self.recovery_point_rehydration_info = recovery_point_rehydration_info + self.object_type = 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest' + + class AzureWorkloadSQLRecoveryPointExtendedInfo(Model): """Extended info class details. @@ -5892,6 +6135,69 @@ def __init__(self, **kwargs) -> None: self.data_directory_paths = None +class AzureWorkloadSQLRestoreWithRehydrateRequest(AzureWorkloadSQLRestoreRequest): + """AzureWorkload SQL-specific restore with integrated rehydration of recovery + point. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', + 'Offline' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM on which + workload that was running is being recovered. + :type source_resource_id: str + :param property_bag: Workload specific property bag. + :type property_bag: dict[str, str] + :param target_info: Details of target database + :type target_info: + ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :param recovery_mode: Defines whether the current recovery mode is file + restore or database restore. Possible values include: 'Invalid', + 'FileRecovery', 'WorkloadRecovery' + :type recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param should_use_alternate_target_location: Default option set to true. + If this is set to false, alternate data directory must be provided + :type should_use_alternate_target_location: bool + :param is_non_recoverable: SQL specific property where user can chose to + set no-recovery when restore operation is tried + :type is_non_recoverable: bool + :param alternate_directory_paths: Data directory details + :type alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + :param recovery_point_rehydration_info: RP Rehydration Info + :type recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, target_info=None, recovery_mode=None, should_use_alternate_target_location: bool=None, is_non_recoverable: bool=None, alternate_directory_paths=None, recovery_point_rehydration_info=None, **kwargs) -> None: + super(AzureWorkloadSQLRestoreWithRehydrateRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, should_use_alternate_target_location=should_use_alternate_target_location, is_non_recoverable=is_non_recoverable, alternate_directory_paths=alternate_directory_paths, **kwargs) + self.recovery_point_rehydration_info = recovery_point_rehydration_info + self.object_type = 'AzureWorkloadSQLRestoreWithRehydrateRequest' + + class BackupEngineBaseResource(Resource): """The base backup engine class. All workload specific backup engines derive from this class. @@ -6651,6 +6957,8 @@ class BMSRPQueryObject(Model): :param extended_info: In Get Recovery Point, it tells whether extended information about recovery point is asked. :type extended_info: bool + :param move_ready_rp_only: Whether the RP can be moved to another tier + :type move_ready_rp_only: bool """ _attribute_map = { @@ -6658,14 +6966,16 @@ class BMSRPQueryObject(Model): 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, 'restore_point_query_type': {'key': 'restorePointQueryType', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'bool'}, + 'move_ready_rp_only': {'key': 'moveReadyRPOnly', 'type': 'bool'}, } - def __init__(self, *, start_date=None, end_date=None, restore_point_query_type=None, extended_info: bool=None, **kwargs) -> None: + def __init__(self, *, start_date=None, end_date=None, restore_point_query_type=None, extended_info: bool=None, move_ready_rp_only: bool=None, **kwargs) -> None: super(BMSRPQueryObject, self).__init__(**kwargs) self.start_date = start_date self.end_date = end_date self.restore_point_query_type = restore_point_query_type self.extended_info = extended_info + self.move_ready_rp_only = move_ready_rp_only class BMSWorkloadItemQueryObject(Model): @@ -6867,12 +7177,80 @@ def __init__(self, *, script_content: str=None, script_extension: str=None, os_t class CloudError(Model): - """CloudError. + """An error response from the Container Instance service. + + :param error: Details of the Error Response. + :type error: ~azure.mgmt.recoveryservicesbackup.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """An error response from the Container Instance service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for + display in a user interface. + :vartype message: str + :ivar target: The target of the particular error. For example, the name of + the property in error. + :vartype target: str + :ivar details: A list of additional details about the error. + :vartype details: + list[~azure.mgmt.recoveryservicesbackup.models.CloudErrorBody] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.recoveryservicesbackup.models.ErrorAdditionalInfo] """ + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } + def __init__(self, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + class ContainerIdentityInfo(Model): """Container identity information. @@ -7853,67 +8231,6 @@ def __init__(self, **kwargs) -> None: self.recommendations = None -class ErrorResponse(Model): - """Error Response. - - Common error response for all Azure Resource Manager APIs to return error - details for failed operations. (This also follows the OData error response - format.). - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: - list[~azure.mgmt.recoveryservicesbackup.models.ErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.recoveryservicesbackup.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) - - class OperationResultInfoBase(Model): """Base class for operation result info. @@ -8394,6 +8711,10 @@ class IaasVMRecoveryPoint(RecoveryPoint): :param zones: Identifies the zone of the VM at the time of backup. Applicable only for zone-pinned Vms :type zones: list[str] + :param recovery_point_move_readiness_info: Eligibility of RP to be moved + to another tier + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] """ _validation = { @@ -8421,9 +8742,10 @@ class IaasVMRecoveryPoint(RecoveryPoint): 'os_type': {'key': 'osType', 'type': 'str'}, 'recovery_point_disk_configuration': {'key': 'recoveryPointDiskConfiguration', 'type': 'RecoveryPointDiskConfiguration'}, 'zones': {'key': 'zones', 'type': '[str]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, } - def __init__(self, *, key_and_secret=None, is_instant_ilr_session_active: bool=None, recovery_point_tier_details=None, is_managed_virtual_machine: bool=None, virtual_machine_size: str=None, original_storage_account_option: bool=None, os_type: str=None, recovery_point_disk_configuration=None, zones=None, **kwargs) -> None: + def __init__(self, *, key_and_secret=None, is_instant_ilr_session_active: bool=None, recovery_point_tier_details=None, is_managed_virtual_machine: bool=None, virtual_machine_size: str=None, original_storage_account_option: bool=None, os_type: str=None, recovery_point_disk_configuration=None, zones=None, recovery_point_move_readiness_info=None, **kwargs) -> None: super(IaasVMRecoveryPoint, self).__init__(**kwargs) self.recovery_point_type = None self.recovery_point_time = None @@ -8439,12 +8761,16 @@ def __init__(self, *, key_and_secret=None, is_instant_ilr_session_active: bool=N self.os_type = os_type self.recovery_point_disk_configuration = recovery_point_disk_configuration self.zones = zones + self.recovery_point_move_readiness_info = recovery_point_move_readiness_info self.object_type = 'IaasVMRecoveryPoint' class IaasVMRestoreRequest(RestoreRequest): """IaaS VM workload-specific restore. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: IaasVMRestoreWithRehydrationRequest + All required parameters must be populated in order to send to Azure. :param object_type: Required. Constant filled by server. @@ -8538,6 +8864,10 @@ class IaasVMRestoreRequest(RestoreRequest): 'zones': {'key': 'zones', 'type': '[str]'}, } + _subtype_map = { + 'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'} + } + def __init__(self, *, recovery_point_id: str=None, recovery_type=None, source_resource_id: str=None, target_virtual_machine_id: str=None, target_resource_group_id: str=None, storage_account_id: str=None, virtual_network_id: str=None, subnet_id: str=None, target_domain_name_id: str=None, region: str=None, affinity_group: str=None, create_new_cloud_service: bool=None, original_storage_account_option: bool=None, encryption_details=None, restore_disk_lun_list=None, restore_with_managed_disks: bool=None, disk_encryption_set_id: str=None, zones=None, **kwargs) -> None: super(IaasVMRestoreRequest, self).__init__(**kwargs) self.recovery_point_id = recovery_point_id @@ -8561,6 +8891,113 @@ def __init__(self, *, recovery_point_id: str=None, recovery_type=None, source_re self.object_type = 'IaasVMRestoreRequest' +class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest): + """IaaS VM workload-specific restore with integrated rehydration of recovery + point. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param recovery_point_id: ID of the backup copy to be recovered. + :type recovery_point_id: str + :param recovery_type: Type of this recovery. Possible values include: + 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', + 'Offline' + :type recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM which is being + recovered. + :type source_resource_id: str + :param target_virtual_machine_id: This is the complete ARM Id of the VM + that will be created. + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str + :param target_resource_group_id: This is the ARM Id of the resource group + that you want to create for this Virtual machine and other artifacts. + For e.g. /subscriptions/{subId}/resourcegroups/{rg} + :type target_resource_group_id: str + :param storage_account_id: Fully qualified ARM ID of the storage account + to which the VM has to be restored. + :type storage_account_id: str + :param virtual_network_id: This is the virtual network Id of the vnet that + will be attached to the virtual machine. + User will be validated for join action permissions in the linked access. + :type virtual_network_id: str + :param subnet_id: Subnet ID, is the subnet ID associated with the to be + restored VM. For Classic VMs it would be + {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it + would be ARM resource ID used to represent + the subnet. + :type subnet_id: str + :param target_domain_name_id: Fully qualified ARM ID of the domain name to + be associated to the VM being restored. This applies only to Classic + Virtual Machines. + :type target_domain_name_id: str + :param region: Region in which the virtual machine is restored. + :type region: str + :param affinity_group: Affinity group associated to VM to be restored. + Used only for Classic Compute Virtual Machines. + :type affinity_group: str + :param create_new_cloud_service: Should a new cloud service be created + while restoring the VM. If this is false, VM will be restored to the same + cloud service as it was at the time of backup. + :type create_new_cloud_service: bool + :param original_storage_account_option: Original Storage Account Option + :type original_storage_account_option: bool + :param encryption_details: Details needed if the VM was encrypted at the + time of backup. + :type encryption_details: + ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails + :param restore_disk_lun_list: List of Disk LUNs for partial restore + :type restore_disk_lun_list: list[int] + :param restore_with_managed_disks: Flag to denote of an Unmanaged disk VM + should be restored with Managed disks. + :type restore_with_managed_disks: bool + :param disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM + needs to be encrypted at rest during restore with customer managed key. + :type disk_encryption_set_id: str + :param zones: Target zone where the VM and its disks should be restored. + :type zones: list[str] + :param recovery_point_rehydration_info: RP Rehydration Info + :type recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, + 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, + 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, + 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, + 'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'}, + 'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'}, + 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__(self, *, recovery_point_id: str=None, recovery_type=None, source_resource_id: str=None, target_virtual_machine_id: str=None, target_resource_group_id: str=None, storage_account_id: str=None, virtual_network_id: str=None, subnet_id: str=None, target_domain_name_id: str=None, region: str=None, affinity_group: str=None, create_new_cloud_service: bool=None, original_storage_account_option: bool=None, encryption_details=None, restore_disk_lun_list=None, restore_with_managed_disks: bool=None, disk_encryption_set_id: str=None, zones=None, recovery_point_rehydration_info=None, **kwargs) -> None: + super(IaasVMRestoreWithRehydrationRequest, self).__init__(recovery_point_id=recovery_point_id, recovery_type=recovery_type, source_resource_id=source_resource_id, target_virtual_machine_id=target_virtual_machine_id, target_resource_group_id=target_resource_group_id, storage_account_id=storage_account_id, virtual_network_id=virtual_network_id, subnet_id=subnet_id, target_domain_name_id=target_domain_name_id, region=region, affinity_group=affinity_group, create_new_cloud_service=create_new_cloud_service, original_storage_account_option=original_storage_account_option, encryption_details=encryption_details, restore_disk_lun_list=restore_disk_lun_list, restore_with_managed_disks=restore_with_managed_disks, disk_encryption_set_id=disk_encryption_set_id, zones=zones, **kwargs) + self.recovery_point_rehydration_info = recovery_point_rehydration_info + self.object_type = 'IaasVMRestoreWithRehydrationRequest' + + class ILRRequestResource(Resource): """Parameters to Provision ILR API. @@ -8871,6 +9308,26 @@ def __init__(self, *, resource_health_status=None, resource_health_details=None, self.resource_health_details = resource_health_details +class ListRecoveryPointsRecommendedForMoveRequest(Model): + """ListRecoveryPointsRecommendedForMoveRequest Request. + + :param object_type: Gets the class type. + :type object_type: str + :param excluded_rp_list: List of Recovery Points excluded from Move + :type excluded_rp_list: list[str] + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'excluded_rp_list': {'key': 'excludedRPList', 'type': '[str]'}, + } + + def __init__(self, *, object_type: str=None, excluded_rp_list=None, **kwargs) -> None: + super(ListRecoveryPointsRecommendedForMoveRequest, self).__init__(**kwargs) + self.object_type = object_type + self.excluded_rp_list = excluded_rp_list + + class SchedulePolicy(Model): """Base class for backup schedule. @@ -9546,6 +10003,35 @@ def __init__(self, *, retention_schedule_format_type=None, retention_schedule_da self.retention_duration = retention_duration +class MoveRPAcrossTiersRequest(Model): + """MoveRPAcrossTiersRequest. + + :param object_type: Gets the class type. + :type object_type: str + :param source_tier_type: Source tier from where RP needs to be moved. + Possible values include: 'Invalid', 'InstantRP', 'HardenedRP', + 'ArchivedRP' + :type source_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :param target_tier_type: Target tier where RP needs to be moved. Possible + values include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' + :type target_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'source_tier_type': {'key': 'sourceTierType', 'type': 'RecoveryPointTierType'}, + 'target_tier_type': {'key': 'targetTierType', 'type': 'RecoveryPointTierType'}, + } + + def __init__(self, *, object_type: str=None, source_tier_type=None, target_tier_type=None, **kwargs) -> None: + super(MoveRPAcrossTiersRequest, self).__init__(**kwargs) + self.object_type = object_type + self.source_tier_type = source_tier_type + self.target_tier_type = target_tier_type + + class NameInfo(Model): """The name of usage. @@ -10679,6 +11165,50 @@ def __init__(self, *, number_of_disks_included_in_backup: int=None, number_of_di self.excluded_disk_list = excluded_disk_list +class RecoveryPointMoveReadinessInfo(Model): + """RecoveryPointMoveReadinessInfo. + + :param is_ready_for_move: + :type is_ready_for_move: bool + :param additional_info: + :type additional_info: str + """ + + _attribute_map = { + 'is_ready_for_move': {'key': 'isReadyForMove', 'type': 'bool'}, + 'additional_info': {'key': 'additionalInfo', 'type': 'str'}, + } + + def __init__(self, *, is_ready_for_move: bool=None, additional_info: str=None, **kwargs) -> None: + super(RecoveryPointMoveReadinessInfo, self).__init__(**kwargs) + self.is_ready_for_move = is_ready_for_move + self.additional_info = additional_info + + +class RecoveryPointRehydrationInfo(Model): + """RP Rehydration Info. + + :param rehydration_retention_duration: How long the rehydrated RP should + be kept + Should be ISO8601 Duration format e.g. "P7D" + :type rehydration_retention_duration: str + :param rehydration_priority: Rehydration Priority. Possible values + include: 'Standard', 'High' + :type rehydration_priority: str or + ~azure.mgmt.recoveryservicesbackup.models.RehydrationPriority + """ + + _attribute_map = { + 'rehydration_retention_duration': {'key': 'rehydrationRetentionDuration', 'type': 'str'}, + 'rehydration_priority': {'key': 'rehydrationPriority', 'type': 'str'}, + } + + def __init__(self, *, rehydration_retention_duration: str=None, rehydration_priority=None, **kwargs) -> None: + super(RecoveryPointRehydrationInfo, self).__init__(**kwargs) + self.rehydration_retention_duration = rehydration_retention_duration + self.rehydration_priority = rehydration_priority + + class RecoveryPointResource(Resource): """Base class for backup copies. Workload-specific backup copies are derived from this class. @@ -10728,24 +11258,28 @@ class RecoveryPointTierInformation(Model): """Recovery point tier information. :param type: Recovery point tier type. Possible values include: 'Invalid', - 'InstantRP', 'HardenedRP' + 'InstantRP', 'HardenedRP', 'ArchivedRP' :type type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType :param status: Recovery point tier status. Possible values include: - 'Invalid', 'Valid', 'Disabled', 'Deleted' + 'Invalid', 'Valid', 'Disabled', 'Deleted', 'Rehydrated' :type status: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus + :param extended_info: Recovery point tier status. + :type extended_info: dict[str, str] """ _attribute_map = { 'type': {'key': 'type', 'type': 'RecoveryPointTierType'}, 'status': {'key': 'status', 'type': 'RecoveryPointTierStatus'}, + 'extended_info': {'key': 'extendedInfo', 'type': '{str}'}, } - def __init__(self, *, type=None, status=None, **kwargs) -> None: + def __init__(self, *, type=None, status=None, extended_info=None, **kwargs) -> None: super(RecoveryPointTierInformation, self).__init__(**kwargs) self.type = type self.status = status + self.extended_info = extended_info class ResourceList(Model): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_recovery_services_backup_client_enums.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_recovery_services_backup_client_enums.py index 2420d27fbb72f..a9543e46fc117 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_recovery_services_backup_client_enums.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_recovery_services_backup_client_enums.py @@ -177,6 +177,23 @@ class RestorePointType(str, Enum): incremental = "Incremental" +class RecoveryPointTierType(str, Enum): + + invalid = "Invalid" + instant_rp = "InstantRP" + hardened_rp = "HardenedRP" + archived_rp = "ArchivedRP" + + +class RecoveryPointTierStatus(str, Enum): + + invalid = "Invalid" + valid = "Valid" + disabled = "Disabled" + deleted = "Deleted" + rehydrated = "Rehydrated" + + class OverwriteOptions(str, Enum): invalid = "Invalid" @@ -218,21 +235,6 @@ class RetentionDurationType(str, Enum): years = "Years" -class RecoveryPointTierType(str, Enum): - - invalid = "Invalid" - instant_rp = "InstantRP" - hardened_rp = "HardenedRP" - - -class RecoveryPointTierStatus(str, Enum): - - invalid = "Invalid" - valid = "Valid" - disabled = "Disabled" - deleted = "Deleted" - - class BackupManagementType(str, Enum): invalid = "Invalid" @@ -563,6 +565,12 @@ class OperationStatusValues(str, Enum): canceled = "Canceled" +class RehydrationPriority(str, Enum): + + standard = "Standard" + high = "High" + + class SupportStatus(str, Enum): invalid = "Invalid" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py index ba76f16109293..991f8ebd6d1d8 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py @@ -44,6 +44,7 @@ from ._backup_protectable_items_operations import BackupProtectableItemsOperations from ._backup_protection_containers_operations import BackupProtectionContainersOperations from ._security_pi_ns_operations import SecurityPINsOperations +from ._recovery_points_recommended_for_move_operations import RecoveryPointsRecommendedForMoveOperations from ._aad_properties_operations import AadPropertiesOperations from ._cross_region_restore_operations import CrossRegionRestoreOperations from ._backup_crr_job_details_operations import BackupCrrJobDetailsOperations @@ -97,6 +98,7 @@ 'BackupProtectableItemsOperations', 'BackupProtectionContainersOperations', 'SecurityPINsOperations', + 'RecoveryPointsRecommendedForMoveOperations', 'AadPropertiesOperations', 'CrossRegionRestoreOperations', 'BackupCrrJobDetailsOperations', diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py index 671a1c80db6c6..750c8b5d41021 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py @@ -25,7 +25,7 @@ class BackupEnginesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -119,7 +119,7 @@ def internal_paging(next_link=None): deserialized = models.BackupEngineBaseResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines'} def get( self, vault_name, resource_group_name, backup_engine_name, filter=None, skip_token=None, custom_headers=None, raw=False, **operation_config): @@ -193,4 +193,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_jobs_operations.py index bb423d0a8ccfa..f9a3d0f03caa1 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_jobs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_jobs_operations.py @@ -25,7 +25,7 @@ class BackupJobsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -118,4 +118,4 @@ def internal_paging(next_link=None): deserialized = models.JobResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_results_operations.py index 730fcf0fa5e03..529ad3101656c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_results_operations.py @@ -25,7 +25,7 @@ class BackupOperationResultsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -100,4 +100,4 @@ def get( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_statuses_operations.py index f4a9970a3ae46..29fd464758cd1 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_statuses_operations.py @@ -25,7 +25,7 @@ class BackupOperationStatusesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -107,4 +107,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_policies_operations.py index 252ee7c53daf9..02f19302ccfc1 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_policies_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_policies_operations.py @@ -25,7 +25,7 @@ class BackupPoliciesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -116,4 +116,4 @@ def internal_paging(next_link=None): deserialized = models.ProtectionPolicyResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protectable_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protectable_items_operations.py index 4f23b29ca0680..7857904a98eef 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protectable_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protectable_items_operations.py @@ -25,7 +25,7 @@ class BackupProtectableItemsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -120,4 +120,4 @@ def internal_paging(next_link=None): deserialized = models.WorkloadProtectableItemResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py index 657ac4b94db21..995c60f782303 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py @@ -25,7 +25,7 @@ class BackupProtectedItemsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -119,4 +119,4 @@ def internal_paging(next_link=None): deserialized = models.ProtectedItemResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py index 2d61d3ca2a748..b67512777e8e3 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py @@ -25,7 +25,7 @@ class BackupProtectionContainersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -114,4 +114,4 @@ def internal_paging(next_link=None): deserialized = models.ProtectionContainerResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_encryption_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_encryption_configs_operations.py index 48ccf427673ea..fba63292a3642 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_encryption_configs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_encryption_configs_operations.py @@ -24,7 +24,7 @@ class BackupResourceEncryptionConfigsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_vault_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_vault_configs_operations.py index 03a9a53e7d278..8531d316fed21 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_vault_configs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_vault_configs_operations.py @@ -24,7 +24,7 @@ class BackupResourceVaultConfigsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py index c50d7a88cc6ca..3f0571cc07a5f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py @@ -25,7 +25,7 @@ class BackupWorkloadItemsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -126,4 +126,4 @@ def internal_paging(next_link=None): deserialized = models.WorkloadItemResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backups_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backups_operations.py index dd008793b9a11..75acbc9778f9c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backups_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backups_operations.py @@ -25,7 +25,7 @@ class BackupsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -110,4 +110,4 @@ def trigger( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - trigger.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup'} + trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py index 6f9ae58e6f61c..bfec17d1855f2 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py @@ -11,8 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -26,7 +24,7 @@ class BMSPrepareDataMoveOperationResultOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -36,13 +34,34 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config - - def _get_initial( + def get( self, vault_name, resource_group_name, operation_id, custom_headers=None, raw=False, **operation_config): + """Fetches Operation Result for Prepare Data Move. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param operation_id: + :type operation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VaultStorageConfigOperationResultResponse or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.VaultStorageConfigOperationResultResponse + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`NewErrorResponseException` + """ # Construct URL url = self.get.metadata['url'] path_format_arguments = { @@ -75,7 +94,6 @@ def _get_initial( raise models.NewErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VaultStorageConfigOperationResultResponse', response) @@ -84,57 +102,4 @@ def _get_initial( return client_raw_response return deserialized - - def get( - self, vault_name, resource_group_name, operation_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Fetches Operation Result for Prepare Data Move. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the - recovery services vault is present. - :type resource_group_name: str - :param operation_id: - :type operation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - VaultStorageConfigOperationResultResponse or - ClientRawResponse if - raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.recoveryservicesbackup.models.VaultStorageConfigOperationResultResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.recoveryservicesbackup.models.VaultStorageConfigOperationResultResponse]] - :raises: - :class:`NewErrorResponseException` - """ - raw_result = self._get_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - operation_id=operation_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('VaultStorageConfigOperationResultResponse', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationResults/{operationId}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_results_operations.py index 9a480533574da..9ed9529c69c7f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_results_operations.py @@ -11,8 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -40,9 +38,24 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - - def _get_initial( + def get( self, azure_region, operation_id, custom_headers=None, raw=False, **operation_config): + """ + + :param azure_region: Azure region to hit Api + :type azure_region: str + :param operation_id: + :type operation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`NewErrorResponseException` + """ # Construct URL url = self.get.metadata['url'] path_format_arguments = { @@ -75,45 +88,4 @@ def _get_initial( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - - def get( - self, azure_region, operation_id, custom_headers=None, raw=False, polling=True, **operation_config): - """ - - :param azure_region: Azure region to hit Api - :type azure_region: str - :param operation_id: - :type operation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`NewErrorResponseException` - """ - raw_result = self._get_initial( - azure_region=azure_region, - operation_id=operation_id, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py index 93640a6c5e8b5..234e75dc77e14 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py @@ -25,7 +25,7 @@ class ExportJobsOperationResultsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -109,4 +109,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_item_level_recovery_connections_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_item_level_recovery_connections_operations.py index 21b7da3c009fd..b73290c4990ba 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_item_level_recovery_connections_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_item_level_recovery_connections_operations.py @@ -25,7 +25,7 @@ class ItemLevelRecoveryConnectionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -118,7 +118,7 @@ def provision( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - provision.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery'} + provision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery'} def revoke( self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers=None, raw=False, **operation_config): @@ -191,4 +191,4 @@ def revoke( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - revoke.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery'} + revoke.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_cancellations_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_cancellations_operations.py index 11fa4b6c09dd4..c2bb13103b510 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_cancellations_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_cancellations_operations.py @@ -25,7 +25,7 @@ class JobCancellationsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -96,4 +96,4 @@ def trigger( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - trigger.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel'} + trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_details_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_details_operations.py index b887b42cfa88d..59f6026a3afb5 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_details_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_details_operations.py @@ -25,7 +25,7 @@ class JobDetailsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -102,4 +102,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_operation_results_operations.py index cb824fdff8879..414a1f8ee84cf 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_operation_results_operations.py @@ -25,7 +25,7 @@ class JobOperationResultsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -98,4 +98,4 @@ def get( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_jobs_operations.py index 79d0b4c2dd67a..8b07d5b5f1264 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_jobs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_jobs_operations.py @@ -25,7 +25,7 @@ class JobsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -96,4 +96,4 @@ def export( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - export.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport'} + export.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operation_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operation_operations.py index 4ad15161b9b17..5f57f9fdc6f92 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operation_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operation_operations.py @@ -25,7 +25,7 @@ class OperationOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -108,4 +108,4 @@ def validate( return client_raw_response return deserialized - validate.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperation'} + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperation'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_connection_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_connection_operations.py index 84f7a3c1188f5..ec30059dc0f0e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_connection_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_connection_operations.py @@ -27,7 +27,7 @@ class PrivateEndpointConnectionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -106,7 +106,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} def _put_initial( @@ -217,7 +217,7 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - put.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} def _delete_initial( @@ -250,7 +250,9 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - raise models.ErrorResponseException(self._deserialize, response) + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp if raw: client_raw_response = ClientRawResponse(None, response) @@ -277,8 +279,7 @@ def delete( ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorResponseException` + :raises: :class:`CloudError` """ raw_result = self._delete_initial( vault_name=vault_name, @@ -301,4 +302,4 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py index daa4d1916cf1a..47f1b1d34ce25 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py @@ -24,7 +24,7 @@ class PrivateEndpointOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -104,4 +104,4 @@ def get_operation_status( return client_raw_response return deserialized - get_operation_status.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}'} + get_operation_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protectable_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protectable_containers_operations.py index 4050cc0343cf9..9c704481703af 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protectable_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protectable_containers_operations.py @@ -25,7 +25,7 @@ class ProtectableContainersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -117,4 +117,4 @@ def internal_paging(next_link=None): deserialized = models.ProtectableContainerResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_results_operations.py index c03445aa80ed1..ae71cd4954266 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_results_operations.py @@ -25,7 +25,7 @@ class ProtectedItemOperationResultsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -114,4 +114,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_statuses_operations.py index f512b824976de..41fb62ca86ba9 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_statuses_operations.py @@ -25,7 +25,7 @@ class ProtectedItemOperationStatusesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -118,4 +118,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_items_operations.py index bc83ae22b4cb5..ff14526aa4a87 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_items_operations.py @@ -25,7 +25,7 @@ class ProtectedItemsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -117,7 +117,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} def create_or_update( self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -199,7 +199,7 @@ def create_or_update( return client_raw_response return deserialized - create_or_update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} def delete( self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, custom_headers=None, raw=False, **operation_config): @@ -257,7 +257,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -265,4 +265,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_operation_results_operations.py index c5d6b56a75ca3..4279ae7139f3b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_operation_results_operations.py @@ -25,7 +25,7 @@ class ProtectionContainerOperationResultsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -111,4 +111,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_refresh_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_refresh_operation_results_operations.py index 15978097f8496..98e5efcc2f344 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_refresh_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_refresh_operation_results_operations.py @@ -25,7 +25,7 @@ class ProtectionContainerRefreshOperationResultsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -99,4 +99,4 @@ def get( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_containers_operations.py index c678695288dc2..8154d14b4bd5c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_containers_operations.py @@ -25,7 +25,7 @@ class ProtectionContainersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -108,7 +108,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} def register( self, vault_name, resource_group_name, fabric_name, container_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -187,7 +187,7 @@ def register( return client_raw_response return deserialized - register.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} + register.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} def unregister( self, vault_name, resource_group_name, fabric_name, container_name, custom_headers=None, raw=False, **operation_config): @@ -243,7 +243,7 @@ def unregister( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -251,7 +251,7 @@ def unregister( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - unregister.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} + unregister.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} def inquire( self, vault_name, resource_group_name, fabric_name, container_name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -319,7 +319,7 @@ def inquire( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - inquire.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire'} + inquire.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire'} def refresh( self, vault_name, resource_group_name, fabric_name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -383,4 +383,4 @@ def refresh( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - refresh.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers'} + refresh.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policies_operations.py index fc5010878ef53..5b3d943e016ee 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policies_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policies_operations.py @@ -27,7 +27,7 @@ class ProtectionPoliciesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -108,7 +108,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} def create_or_update( self, vault_name, resource_group_name, policy_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -183,7 +183,7 @@ def create_or_update( return client_raw_response return deserialized - create_or_update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} def _delete_initial( @@ -269,4 +269,4 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_results_operations.py index 66109b2fa6654..ccc61f305b93f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_results_operations.py @@ -25,7 +25,7 @@ class ProtectionPolicyOperationResultsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -108,4 +108,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_statuses_operations.py index 07e96fecd3427..6b21e67a4e17d 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_statuses_operations.py @@ -25,7 +25,7 @@ class ProtectionPolicyOperationStatusesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -112,4 +112,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_operations.py index 15ef8b69743d6..922c09031434e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_operations.py @@ -66,7 +66,7 @@ def list( ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResourcePaged[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource] :raises: :class:`CloudError` """ - api_version = "2020-10-01" + api_version = "2021-01-01" def prepare_request(next_link=None): if not next_link: @@ -125,7 +125,7 @@ def internal_paging(next_link=None): deserialized = models.RecoveryPointResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints'} def get( self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, custom_headers=None, raw=False, **operation_config): @@ -160,7 +160,7 @@ def get( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2020-10-01" + api_version = "2021-01-01" # Construct URL url = self.get.metadata['url'] @@ -207,7 +207,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}'} def get_access_token( self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, parameters, custom_headers=None, raw=False, **operation_config): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_recommended_for_move_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_recommended_for_move_operations.py new file mode 100644 index 0000000000000..d8bf6b4645ea9 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_recommended_for_move_operations.py @@ -0,0 +1,132 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class RecoveryPointsRecommendedForMoveOperations(object): + """RecoveryPointsRecommendedForMoveOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2021-01-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-01-01" + + self.config = config + + def list( + self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, object_type=None, excluded_rp_list=None, custom_headers=None, raw=False, **operation_config): + """Lists the recovery points recommended for move to another tier. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param fabric_name: + :type fabric_name: str + :param container_name: + :type container_name: str + :param protected_item_name: + :type protected_item_name: str + :param object_type: Gets the class type. + :type object_type: str + :param excluded_rp_list: List of Recovery Points excluded from Move + :type excluded_rp_list: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RecoveryPointResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResourcePaged[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource] + :raises: :class:`CloudError` + """ + parameters = models.ListRecoveryPointsRecommendedForMoveRequest(object_type=object_type, excluded_rp_list=excluded_rp_list) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + 'protectedItemName': self._serialize.url("protected_item_name", protected_item_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ListRecoveryPointsRecommendedForMoveRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecoveryPointResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPointsRecommendedForMove'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_services_backup_client_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_services_backup_client_operations.py index 5a7574ed542c5..f01690b034f9c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_services_backup_client_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_services_backup_client_operations.py @@ -41,7 +41,7 @@ def get_operation_status( :raises: :class:`NewErrorResponseException` """ - api_version = "2020-10-01" + api_version = "2021-01-01" # Construct URL url = self.get_operation_status.metadata['url'] @@ -88,7 +88,7 @@ def get_operation_status( def _bms_prepare_data_move_initial( self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2020-10-01" + api_version = "2021-01-01" # Construct URL url = self.bms_prepare_data_move.metadata['url'] @@ -177,7 +177,7 @@ def get_long_running_output(response): def _bms_trigger_data_move_initial( self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): - api_version = "2020-10-01" + api_version = "2021-01-01" # Construct URL url = self.bms_trigger_data_move.metadata['url'] @@ -262,3 +262,109 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) bms_trigger_data_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/triggerDataMove'} + + + def _move_recovery_point_initial( + self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, parameters, custom_headers=None, raw=False, **operation_config): + api_version = "2021-01-01" + + # Construct URL + url = self.move_recovery_point.metadata['url'] + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str'), + 'protectedItemName': self._serialize.url("protected_item_name", protected_item_name, 'str'), + 'recoveryPointId': self._serialize.url("recovery_point_id", recovery_point_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'MoveRPAcrossTiersRequest') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def move_recovery_point( + self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Move recovery point from one datastore to another store. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param fabric_name: + :type fabric_name: str + :param container_name: + :type container_name: str + :param protected_item_name: + :type protected_item_name: str + :param recovery_point_id: + :type recovery_point_id: str + :param parameters: Move Resource Across Tiers Request + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.MoveRPAcrossTiersRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._move_recovery_point_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + move_recovery_point.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/move'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_restores_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_restores_operations.py index 19a78756422f2..a12d72945b403 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_restores_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_restores_operations.py @@ -12,6 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +27,7 @@ class RestoresOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,43 +37,13 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config - def trigger( - self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, parameters, custom_headers=None, raw=False, **operation_config): - """Restores the specified backed up data. This is an asynchronous - operation. To know the status of this API call, use - GetProtectedItemOperationResult API. - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the - recovery services vault is present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up items. - :type fabric_name: str - :param container_name: Container name associated with the backed up - items. - :type container_name: str - :param protected_item_name: Backed up item to be restored. - :type protected_item_name: str - :param recovery_point_id: Recovery point ID which represents the - backed up data to be restored. - :type recovery_point_id: str - :param parameters: resource restore request - :type parameters: - ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _trigger_initial( + self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.trigger.metadata['url'] path_format_arguments = { @@ -114,4 +86,65 @@ def trigger( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - trigger.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'} + + def trigger( + self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores the specified backed up data. This is an asynchronous + operation. To know the status of this API call, use + GetProtectedItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the + recovery services vault is present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up items. + :type fabric_name: str + :param container_name: Container name associated with the backed up + items. + :type container_name: str + :param protected_item_name: Backed up item to be restored. + :type protected_item_name: str + :param recovery_point_id: Recovery point ID which represents the + backed up data to be restored. + :type recovery_point_id: str + :param parameters: resource restore request + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._trigger_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_security_pi_ns_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_security_pi_ns_operations.py index 245e21827da0a..4b54be285b84b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_security_pi_ns_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_security_pi_ns_operations.py @@ -25,7 +25,7 @@ class SecurityPINsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2020-10-01". + :ivar api_version: Client Api Version. Constant value: "2021-01-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2021-01-01" self.config = config @@ -99,4 +99,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN'}