diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/MANIFEST.in b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/MANIFEST.in +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json new file mode 100644 index 000000000000..5212c26c2883 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "22cfc83bc35704122d4f614ad64221de08c529fe", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/recoveryservicesbackup/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/recoveryservicesbackup/resource-manager/readme.md" +} \ No newline at end of file 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 3172e5fafac1..08cb714fd10a 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 @@ -14,6 +14,12 @@ from ._configuration import RecoveryServicesBackupClientConfiguration from .operations import RecoveryServicesBackupClientOperationsMixin +from .operations import ProtectionIntentOperations +from .operations import BackupStatusOperations +from .operations import FeatureSupportOperations +from .operations import BackupProtectionIntentOperations +from .operations import BackupUsageSummariesOperations +from .operations import Operations from .operations import BackupResourceVaultConfigsOperations from .operations import BackupResourceEncryptionConfigsOperations from .operations import PrivateEndpointConnectionOperations @@ -49,6 +55,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 @@ -58,12 +65,6 @@ from .operations import BackupResourceStorageConfigsOperations from .operations import RecoveryPointsCrrOperations from .operations import BackupProtectedItemsCrrOperations -from .operations import ProtectionIntentOperations -from .operations import BackupStatusOperations -from .operations import FeatureSupportOperations -from .operations import BackupProtectionIntentOperations -from .operations import BackupUsageSummariesOperations -from .operations import Operations from . import models @@ -73,6 +74,18 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin, :ivar config: Configuration for client. :vartype config: RecoveryServicesBackupClientConfiguration + :ivar protection_intent: ProtectionIntent operations + :vartype protection_intent: azure.mgmt.recoveryservicesbackup.operations.ProtectionIntentOperations + :ivar backup_status: BackupStatus operations + :vartype backup_status: azure.mgmt.recoveryservicesbackup.operations.BackupStatusOperations + :ivar feature_support: FeatureSupport operations + :vartype feature_support: azure.mgmt.recoveryservicesbackup.operations.FeatureSupportOperations + :ivar backup_protection_intent: BackupProtectionIntent operations + :vartype backup_protection_intent: azure.mgmt.recoveryservicesbackup.operations.BackupProtectionIntentOperations + :ivar backup_usage_summaries: BackupUsageSummaries operations + :vartype backup_usage_summaries: azure.mgmt.recoveryservicesbackup.operations.BackupUsageSummariesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.recoveryservicesbackup.operations.Operations :ivar backup_resource_vault_configs: BackupResourceVaultConfigs operations :vartype backup_resource_vault_configs: azure.mgmt.recoveryservicesbackup.operations.BackupResourceVaultConfigsOperations :ivar backup_resource_encryption_configs: BackupResourceEncryptionConfigs operations @@ -143,6 +156,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 @@ -161,18 +176,6 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin, :vartype recovery_points_crr: azure.mgmt.recoveryservicesbackup.operations.RecoveryPointsCrrOperations :ivar backup_protected_items_crr: BackupProtectedItemsCrr operations :vartype backup_protected_items_crr: azure.mgmt.recoveryservicesbackup.operations.BackupProtectedItemsCrrOperations - :ivar protection_intent: ProtectionIntent operations - :vartype protection_intent: azure.mgmt.recoveryservicesbackup.operations.ProtectionIntentOperations - :ivar backup_status: BackupStatus operations - :vartype backup_status: azure.mgmt.recoveryservicesbackup.operations.BackupStatusOperations - :ivar feature_support: FeatureSupport operations - :vartype feature_support: azure.mgmt.recoveryservicesbackup.operations.FeatureSupportOperations - :ivar backup_protection_intent: BackupProtectionIntent operations - :vartype backup_protection_intent: azure.mgmt.recoveryservicesbackup.operations.BackupProtectionIntentOperations - :ivar backup_usage_summaries: BackupUsageSummaries operations - :vartype backup_usage_summaries: azure.mgmt.recoveryservicesbackup.operations.BackupUsageSummariesOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.recoveryservicesbackup.operations.Operations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -192,6 +195,18 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) + self.protection_intent = ProtectionIntentOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_status = BackupStatusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.feature_support = FeatureSupportOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_protection_intent = BackupProtectionIntentOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_usage_summaries = BackupUsageSummariesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) self.backup_resource_vault_configs = BackupResourceVaultConfigsOperations( self._client, self.config, self._serialize, self._deserialize) self.backup_resource_encryption_configs = BackupResourceEncryptionConfigsOperations( @@ -262,6 +277,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( @@ -280,15 +297,3 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.backup_protected_items_crr = BackupProtectedItemsCrrOperations( self._client, self.config, self._serialize, self._deserialize) - self.protection_intent = ProtectionIntentOperations( - self._client, self.config, self._serialize, self._deserialize) - self.backup_status = BackupStatusOperations( - self._client, self.config, self._serialize, self._deserialize) - self.feature_support = FeatureSupportOperations( - self._client, self.config, self._serialize, self._deserialize) - self.backup_protection_intent = BackupProtectionIntentOperations( - self._client, self.config, self._serialize, self._deserialize) - self.backup_usage_summaries = BackupUsageSummariesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) 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 f80b842a8ce8..c386333e1982 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 @@ -111,6 +115,7 @@ from ._models_py3 import BackupStatusRequest from ._models_py3 import BackupStatusResponse from ._models_py3 import BEKDetails + from ._models_py3 import BMSAADPropertiesQueryObject from ._models_py3 import BMSBackupEngineQueryObject from ._models_py3 import BMSBackupEnginesQueryObject from ._models_py3 import BMSBackupSummariesQueryObject @@ -151,7 +156,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 +171,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 +184,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 +199,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 +239,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 +359,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 @@ -373,6 +386,7 @@ from ._models import BackupStatusRequest from ._models import BackupStatusResponse from ._models import BEKDetails + from ._models import BMSAADPropertiesQueryObject from ._models import BMSBackupEngineQueryObject from ._models import BMSBackupEnginesQueryObject from ._models import BMSBackupSummariesQueryObject @@ -413,7 +427,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 +442,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 +455,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 +470,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 +510,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 +582,13 @@ LastBackupStatus, ProtectedItemHealthStatus, RestorePointType, + RecoveryPointTierType, + RecoveryPointTierStatus, OverwriteOptions, RecoveryMode, SQLDataDirectoryType, RestorePointQueryType, RetentionDurationType, - RecoveryPointTierType, - RecoveryPointTierStatus, BackupManagementType, JobStatus, JobOperationType, @@ -592,18 +610,19 @@ AzureFileShareType, InquiryStatus, BackupType, - OperationType, - ContainerType, - WorkloadItemType, - ProtectionStatus, - BackupItemType, - OperationStatusValues, SupportStatus, + WorkloadItemType, UsagesUnit, + ProtectionStatus, FabricName, Type, ValidationStatus, IntentItemType, + OperationType, + ContainerType, + BackupItemType, + OperationStatusValues, + RehydrationPriority, ) __all__ = [ @@ -685,14 +704,18 @@ 'AzureWorkloadRestoreRequest', 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'AzureWorkloadSAPHanaPointInTimeRestoreRequest', + 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'AzureWorkloadSAPHanaRecoveryPoint', 'AzureWorkloadSAPHanaRestoreRequest', + 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'AzureWorkloadSQLAutoProtectionIntent', 'AzureWorkloadSQLPointInTimeRecoveryPoint', 'AzureWorkloadSQLPointInTimeRestoreRequest', + 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'AzureWorkloadSQLRecoveryPoint', 'AzureWorkloadSQLRecoveryPointExtendedInfo', 'AzureWorkloadSQLRestoreRequest', + 'AzureWorkloadSQLRestoreWithRehydrateRequest', 'BackupEngineBase', 'BackupEngineBaseResource', 'BackupEngineExtendedInfo', @@ -708,6 +731,7 @@ 'BackupStatusRequest', 'BackupStatusResponse', 'BEKDetails', + 'BMSAADPropertiesQueryObject', 'BMSBackupEngineQueryObject', 'BMSBackupEnginesQueryObject', 'BMSBackupSummariesQueryObject', @@ -748,7 +772,6 @@ 'EncryptionDetails', 'ErrorAdditionalInfo', 'ErrorDetail', - 'ErrorResponse', 'ErrorResponseException', 'ExportJobsOperationResultInfo', 'ExtendedProperties', 'FeatureSupportRequest', @@ -764,6 +787,7 @@ 'IaaSVMProtectableItem', 'IaasVMRecoveryPoint', 'IaasVMRestoreRequest', + 'IaasVMRestoreWithRehydrationRequest', 'ILRRequest', 'ILRRequestResource', 'InquiryInfo', @@ -776,6 +800,7 @@ 'KEKDetails', 'KeyAndSecretDetails', 'KPIResourceHealthDetails', + 'ListRecoveryPointsRecommendedForMoveRequest', 'LogSchedulePolicy', 'LongTermRetentionPolicy', 'LongTermSchedulePolicy', @@ -790,6 +815,7 @@ 'MabJobTaskDetails', 'MabProtectionPolicy', 'MonthlyRetentionSchedule', + 'MoveRPAcrossTiersRequest', 'NameInfo', 'NewErrorResponse', 'NewErrorResponseException', 'NewErrorResponseError', @@ -829,6 +855,8 @@ 'ProtectionPolicyResource', 'RecoveryPoint', 'RecoveryPointDiskConfiguration', + 'RecoveryPointMoveReadinessInfo', + 'RecoveryPointRehydrationInfo', 'RecoveryPointResource', 'RecoveryPointTierInformation', 'Resource', @@ -868,6 +896,9 @@ 'WorkloadProtectableItem', 'WorkloadProtectableItemResource', 'YearlyRetentionSchedule', + 'ProtectionIntentResourcePaged', + 'BackupManagementUsagePaged', + 'ClientDiscoveryValueForSingleApiPaged', 'RecoveryPointResourcePaged', 'ProtectionPolicyResourcePaged', 'JobResourcePaged', @@ -877,9 +908,6 @@ 'WorkloadItemResourcePaged', 'WorkloadProtectableItemResourcePaged', 'ProtectionContainerResourcePaged', - 'ProtectionIntentResourcePaged', - 'BackupManagementUsagePaged', - 'ClientDiscoveryValueForSingleApiPaged', 'EncryptionAtRestType', 'LastUpdateStatus', 'InfrastructureEncryptionState', @@ -898,13 +926,13 @@ 'LastBackupStatus', 'ProtectedItemHealthStatus', 'RestorePointType', + 'RecoveryPointTierType', + 'RecoveryPointTierStatus', 'OverwriteOptions', 'RecoveryMode', 'SQLDataDirectoryType', 'RestorePointQueryType', 'RetentionDurationType', - 'RecoveryPointTierType', - 'RecoveryPointTierStatus', 'BackupManagementType', 'JobStatus', 'JobOperationType', @@ -926,16 +954,17 @@ 'AzureFileShareType', 'InquiryStatus', 'BackupType', - 'OperationType', - 'ContainerType', - 'WorkloadItemType', - 'ProtectionStatus', - 'BackupItemType', - 'OperationStatusValues', 'SupportStatus', + 'WorkloadItemType', 'UsagesUnit', + 'ProtectionStatus', 'FabricName', 'Type', 'ValidationStatus', 'IntentItemType', + 'OperationType', + 'ContainerType', + 'BackupItemType', + 'OperationStatusValues', + 'RehydrationPriority', ] 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 89f3873765ac..f717abdb8df4 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]'}, } @@ -5318,6 +5338,11 @@ class AzureWorkloadRestoreRequest(RestoreRequest): 'FileRecovery', 'WorkloadRecovery' :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str """ _validation = { @@ -5331,6 +5356,7 @@ class AzureWorkloadRestoreRequest(RestoreRequest): 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, } _subtype_map = { @@ -5344,6 +5370,7 @@ def __init__(self, **kwargs): self.property_bag = kwargs.get('property_bag', None) self.target_info = kwargs.get('target_info', None) self.recovery_mode = kwargs.get('recovery_mode', None) + self.target_virtual_machine_id = kwargs.get('target_virtual_machine_id', None) self.object_type = 'AzureWorkloadRestoreRequest' @@ -5373,6 +5400,11 @@ class AzureWorkloadPointInTimeRestoreRequest(AzureWorkloadRestoreRequest): 'FileRecovery', 'WorkloadRecovery' :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str :param point_in_time: PointInTime value :type point_in_time: datetime """ @@ -5388,6 +5420,7 @@ class AzureWorkloadPointInTimeRestoreRequest(AzureWorkloadRestoreRequest): 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, } @@ -5414,6 +5447,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 +5469,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 +5483,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. @@ -5465,6 +5508,11 @@ class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): 'FileRecovery', 'WorkloadRecovery' :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str """ _validation = { @@ -5478,10 +5526,11 @@ class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, } _subtype_map = { - 'object_type': {'AzureWorkloadSAPHanaPointInTimeRestoreRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreRequest'} + 'object_type': {'AzureWorkloadSAPHanaPointInTimeRestoreRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreRequest', 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest': 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest'} } def __init__(self, **kwargs): @@ -5493,6 +5542,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. @@ -5515,6 +5567,11 @@ class AzureWorkloadSAPHanaPointInTimeRestoreRequest(AzureWorkloadSAPHanaRestoreR 'FileRecovery', 'WorkloadRecovery' :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str :param point_in_time: PointInTime value :type point_in_time: datetime """ @@ -5530,15 +5587,80 @@ class AzureWorkloadSAPHanaPointInTimeRestoreRequest(AzureWorkloadSAPHanaRestoreR 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, '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 target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str + :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'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', '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 +5679,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 +5698,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 +5707,63 @@ 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 target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: 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_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'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', '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 +5839,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 +5865,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 +5897,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 +5926,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 +5942,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. @@ -5760,6 +5967,11 @@ class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): 'FileRecovery', 'WorkloadRecovery' :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str :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 @@ -5782,13 +5994,14 @@ class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', '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]'}, } _subtype_map = { - 'object_type': {'AzureWorkloadSQLPointInTimeRestoreRequest': 'AzureWorkloadSQLPointInTimeRestoreRequest'} + 'object_type': {'AzureWorkloadSQLPointInTimeRestoreRequest': 'AzureWorkloadSQLPointInTimeRestoreRequest', 'AzureWorkloadSQLRestoreWithRehydrateRequest': 'AzureWorkloadSQLRestoreWithRehydrateRequest'} } def __init__(self, **kwargs): @@ -5803,6 +6016,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. @@ -5825,6 +6041,11 @@ class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): 'FileRecovery', 'WorkloadRecovery' :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str :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 @@ -5849,18 +6070,95 @@ class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', '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'}, } + _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 target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str + :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'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', '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 +6190,75 @@ 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 target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str + :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'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', '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. @@ -6421,16 +6788,36 @@ class BEKDetails(Model): """ _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'secret_vault_id': {'key': 'secretVaultId', 'type': 'str'}, - 'secret_data': {'key': 'secretData', 'type': 'str'}, + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'secret_vault_id': {'key': 'secretVaultId', 'type': 'str'}, + 'secret_data': {'key': 'secretData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BEKDetails, self).__init__(**kwargs) + self.secret_url = kwargs.get('secret_url', None) + self.secret_vault_id = kwargs.get('secret_vault_id', None) + self.secret_data = kwargs.get('secret_data', None) + + +class BMSAADPropertiesQueryObject(Model): + """Filters to list backup items. + + :param backup_management_type: Backup management type for the backed up + item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, } def __init__(self, **kwargs): - super(BEKDetails, self).__init__(**kwargs) - self.secret_url = kwargs.get('secret_url', None) - self.secret_vault_id = kwargs.get('secret_vault_id', None) - self.secret_data = kwargs.get('secret_data', None) + super(BMSAADPropertiesQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) class BMSBackupEngineQueryObject(Model): @@ -6651,6 +7038,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 +7047,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 +7056,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 +7258,80 @@ def __init__(self, **kwargs): class CloudError(Model): - """CloudError. + """An error response from the Container Instance service. + + :param error: The error object. + :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 +8312,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 +8792,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 +8823,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 +8842,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 +8945,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 +8972,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 +9389,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 +10084,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 +11246,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 +11339,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 190a6c776b9f..54165a1b945b 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' @@ -5318,6 +5338,11 @@ class AzureWorkloadRestoreRequest(RestoreRequest): 'FileRecovery', 'WorkloadRecovery' :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str """ _validation = { @@ -5331,19 +5356,21 @@ class AzureWorkloadRestoreRequest(RestoreRequest): 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, } _subtype_map = { 'object_type': {'AzureWorkloadPointInTimeRestoreRequest': 'AzureWorkloadPointInTimeRestoreRequest', 'AzureWorkloadSAPHanaRestoreRequest': 'AzureWorkloadSAPHanaRestoreRequest', 'AzureWorkloadSQLRestoreRequest': 'AzureWorkloadSQLRestoreRequest'} } - def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, target_info=None, recovery_mode=None, **kwargs) -> None: + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, target_info=None, recovery_mode=None, target_virtual_machine_id: str=None, **kwargs) -> None: super(AzureWorkloadRestoreRequest, self).__init__(**kwargs) self.recovery_type = recovery_type self.source_resource_id = source_resource_id self.property_bag = property_bag self.target_info = target_info self.recovery_mode = recovery_mode + self.target_virtual_machine_id = target_virtual_machine_id self.object_type = 'AzureWorkloadRestoreRequest' @@ -5373,6 +5400,11 @@ class AzureWorkloadPointInTimeRestoreRequest(AzureWorkloadRestoreRequest): 'FileRecovery', 'WorkloadRecovery' :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str :param point_in_time: PointInTime value :type point_in_time: datetime """ @@ -5388,11 +5420,12 @@ class AzureWorkloadPointInTimeRestoreRequest(AzureWorkloadRestoreRequest): 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, } - 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(AzureWorkloadPointInTimeRestoreRequest, 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) + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, target_info=None, recovery_mode=None, target_virtual_machine_id: str=None, point_in_time=None, **kwargs) -> None: + super(AzureWorkloadPointInTimeRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, **kwargs) self.point_in_time = point_in_time self.object_type = 'AzureWorkloadPointInTimeRestoreRequest' @@ -5414,6 +5447,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 +5469,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 +5483,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. @@ -5465,6 +5508,11 @@ class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): 'FileRecovery', 'WorkloadRecovery' :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str """ _validation = { @@ -5478,14 +5526,15 @@ class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, } _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: - super(AzureWorkloadSAPHanaRestoreRequest, 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) + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, target_info=None, recovery_mode=None, target_virtual_machine_id: str=None, **kwargs) -> None: + super(AzureWorkloadSAPHanaRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, **kwargs) self.object_type = 'AzureWorkloadSAPHanaRestoreRequest' @@ -5493,6 +5542,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. @@ -5515,6 +5567,11 @@ class AzureWorkloadSAPHanaPointInTimeRestoreRequest(AzureWorkloadSAPHanaRestoreR 'FileRecovery', 'WorkloadRecovery' :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str :param point_in_time: PointInTime value :type point_in_time: datetime """ @@ -5530,15 +5587,80 @@ class AzureWorkloadSAPHanaPointInTimeRestoreRequest(AzureWorkloadSAPHanaRestoreR 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, } - 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) + _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, target_virtual_machine_id: str=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, target_virtual_machine_id=target_virtual_machine_id, **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 target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str + :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'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', '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, target_virtual_machine_id: str=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, target_virtual_machine_id=target_virtual_machine_id, 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 +5679,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 +5698,72 @@ 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 target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: 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_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'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', '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, target_virtual_machine_id: str=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, target_virtual_machine_id=target_virtual_machine_id, **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 +5839,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 +5865,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 +5874,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 +5897,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 +5926,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 +5942,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. @@ -5760,6 +5967,11 @@ class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): 'FileRecovery', 'WorkloadRecovery' :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str :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 @@ -5782,17 +5994,18 @@ class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', '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]'}, } _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: - super(AzureWorkloadSQLRestoreRequest, 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) + def __init__(self, *, recovery_type=None, source_resource_id: str=None, property_bag=None, target_info=None, recovery_mode=None, target_virtual_machine_id: str=None, should_use_alternate_target_location: bool=None, is_non_recoverable: bool=None, alternate_directory_paths=None, **kwargs) -> None: + super(AzureWorkloadSQLRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, **kwargs) self.should_use_alternate_target_location = should_use_alternate_target_location self.is_non_recoverable = is_non_recoverable self.alternate_directory_paths = alternate_directory_paths @@ -5803,6 +6016,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. @@ -5825,6 +6041,11 @@ class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): 'FileRecovery', 'WorkloadRecovery' :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :param target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str :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 @@ -5849,18 +6070,95 @@ class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', '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'}, } - 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) + _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, target_virtual_machine_id: str=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, target_virtual_machine_id=target_virtual_machine_id, 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 target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str + :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'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', '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, target_virtual_machine_id: str=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, target_virtual_machine_id=target_virtual_machine_id, 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 +6190,75 @@ 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 target_virtual_machine_id: This is the complete ARM Id of the + target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + :type target_virtual_machine_id: str + :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'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', '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, target_virtual_machine_id: str=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, target_virtual_machine_id=target_virtual_machine_id, 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. @@ -6421,16 +6788,36 @@ class BEKDetails(Model): """ _attribute_map = { - 'secret_url': {'key': 'secretUrl', 'type': 'str'}, - 'secret_vault_id': {'key': 'secretVaultId', 'type': 'str'}, - 'secret_data': {'key': 'secretData', 'type': 'str'}, + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'secret_vault_id': {'key': 'secretVaultId', 'type': 'str'}, + 'secret_data': {'key': 'secretData', 'type': 'str'}, + } + + def __init__(self, *, secret_url: str=None, secret_vault_id: str=None, secret_data: str=None, **kwargs) -> None: + super(BEKDetails, self).__init__(**kwargs) + self.secret_url = secret_url + self.secret_vault_id = secret_vault_id + self.secret_data = secret_data + + +class BMSAADPropertiesQueryObject(Model): + """Filters to list backup items. + + :param backup_management_type: Backup management type for the backed up + item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, } - def __init__(self, *, secret_url: str=None, secret_vault_id: str=None, secret_data: str=None, **kwargs) -> None: - super(BEKDetails, self).__init__(**kwargs) - self.secret_url = secret_url - self.secret_vault_id = secret_vault_id - self.secret_data = secret_data + def __init__(self, *, backup_management_type=None, **kwargs) -> None: + super(BMSAADPropertiesQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type class BMSBackupEngineQueryObject(Model): @@ -6651,6 +7038,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 +7047,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 +7258,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: The error object. + :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 +8312,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 +8792,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 +8823,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 +8842,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 +8945,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 +8972,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 +9389,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 +10084,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 +11246,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 +11339,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/_paged_models.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_paged_models.py index a14a12c9fe0e..05c6af944278 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_paged_models.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_paged_models.py @@ -12,6 +12,45 @@ from msrest.paging import Paged +class ProtectionIntentResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ProtectionIntentResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProtectionIntentResource]'} + } + + def __init__(self, *args, **kwargs): + + super(ProtectionIntentResourcePaged, self).__init__(*args, **kwargs) +class BackupManagementUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupManagementUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupManagementUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupManagementUsagePaged, self).__init__(*args, **kwargs) +class ClientDiscoveryValueForSingleApiPaged(Paged): + """ + A paging container for iterating over a list of :class:`ClientDiscoveryValueForSingleApi ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ClientDiscoveryValueForSingleApi]'} + } + + def __init__(self, *args, **kwargs): + + super(ClientDiscoveryValueForSingleApiPaged, self).__init__(*args, **kwargs) class RecoveryPointResourcePaged(Paged): """ A paging container for iterating over a list of :class:`RecoveryPointResource ` object @@ -129,42 +168,3 @@ class ProtectionContainerResourcePaged(Paged): def __init__(self, *args, **kwargs): super(ProtectionContainerResourcePaged, self).__init__(*args, **kwargs) -class ProtectionIntentResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`ProtectionIntentResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProtectionIntentResource]'} - } - - def __init__(self, *args, **kwargs): - - super(ProtectionIntentResourcePaged, self).__init__(*args, **kwargs) -class BackupManagementUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupManagementUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupManagementUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupManagementUsagePaged, self).__init__(*args, **kwargs) -class ClientDiscoveryValueForSingleApiPaged(Paged): - """ - A paging container for iterating over a list of :class:`ClientDiscoveryValueForSingleApi ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ClientDiscoveryValueForSingleApi]'} - } - - def __init__(self, *args, **kwargs): - - super(ClientDiscoveryValueForSingleApiPaged, self).__init__(*args, **kwargs) 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 2420d27fbb72..8dda4412fac7 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" @@ -489,30 +491,13 @@ class BackupType(str, Enum): incremental = "Incremental" -class OperationType(str, Enum): - - invalid = "Invalid" - register = "Register" - reregister = "Reregister" - - -class ContainerType(str, Enum): +class SupportStatus(str, Enum): invalid = "Invalid" - unknown = "Unknown" - iaas_vm_container = "IaasVMContainer" - iaas_vm_service_container = "IaasVMServiceContainer" - dpm_container = "DPMContainer" - azure_backup_server_container = "AzureBackupServerContainer" - mab_container = "MABContainer" - cluster = "Cluster" - azure_sql_container = "AzureSqlContainer" - windows = "Windows" - vcenter = "VCenter" - vm_app_container = "VMAppContainer" - sqlag_work_load_container = "SQLAGWorkLoadContainer" - storage_container = "StorageContainer" - generic_container = "GenericContainer" + supported = "Supported" + default_off = "DefaultOFF" + default_on = "DefaultON" + not_supported = "NotSupported" class WorkloadItemType(str, Enum): @@ -526,6 +511,16 @@ class WorkloadItemType(str, Enum): sap_ase_database = "SAPAseDatabase" +class UsagesUnit(str, Enum): + + count = "Count" + bytes = "Bytes" + seconds = "Seconds" + percent = "Percent" + count_per_second = "CountPerSecond" + bytes_per_second = "BytesPerSecond" + + class ProtectionStatus(str, Enum): invalid = "Invalid" @@ -535,75 +530,88 @@ class ProtectionStatus(str, Enum): protection_failed = "ProtectionFailed" -class BackupItemType(str, Enum): +class FabricName(str, Enum): invalid = "Invalid" - vm = "VM" - file_folder = "FileFolder" - azure_sql_db = "AzureSqlDb" - sqldb = "SQLDB" - exchange = "Exchange" - sharepoint = "Sharepoint" - vmware_vm = "VMwareVM" - system_state = "SystemState" - client = "Client" - generic_data_source = "GenericDataSource" - sql_data_base = "SQLDataBase" - azure_file_share = "AzureFileShare" - sap_hana_database = "SAPHanaDatabase" - sap_ase_database = "SAPAseDatabase" + azure = "Azure" -class OperationStatusValues(str, Enum): +class Type(str, Enum): + + invalid = "Invalid" + backup_protected_item_count_summary = "BackupProtectedItemCountSummary" + backup_protection_container_count_summary = "BackupProtectionContainerCountSummary" + + +class ValidationStatus(str, Enum): invalid = "Invalid" - in_progress = "InProgress" succeeded = "Succeeded" failed = "Failed" - canceled = "Canceled" -class SupportStatus(str, Enum): +class IntentItemType(str, Enum): invalid = "Invalid" - supported = "Supported" - default_off = "DefaultOFF" - default_on = "DefaultON" - not_supported = "NotSupported" + sql_instance = "SQLInstance" + sql_availability_group_container = "SQLAvailabilityGroupContainer" -class UsagesUnit(str, Enum): +class OperationType(str, Enum): - count = "Count" - bytes = "Bytes" - seconds = "Seconds" - percent = "Percent" - count_per_second = "CountPerSecond" - bytes_per_second = "BytesPerSecond" + invalid = "Invalid" + register = "Register" + reregister = "Reregister" -class FabricName(str, Enum): +class ContainerType(str, Enum): invalid = "Invalid" - azure = "Azure" + unknown = "Unknown" + iaas_vm_container = "IaasVMContainer" + iaas_vm_service_container = "IaasVMServiceContainer" + dpm_container = "DPMContainer" + azure_backup_server_container = "AzureBackupServerContainer" + mab_container = "MABContainer" + cluster = "Cluster" + azure_sql_container = "AzureSqlContainer" + windows = "Windows" + vcenter = "VCenter" + vm_app_container = "VMAppContainer" + sqlag_work_load_container = "SQLAGWorkLoadContainer" + storage_container = "StorageContainer" + generic_container = "GenericContainer" -class Type(str, Enum): +class BackupItemType(str, Enum): invalid = "Invalid" - backup_protected_item_count_summary = "BackupProtectedItemCountSummary" - backup_protection_container_count_summary = "BackupProtectionContainerCountSummary" + vm = "VM" + file_folder = "FileFolder" + azure_sql_db = "AzureSqlDb" + sqldb = "SQLDB" + exchange = "Exchange" + sharepoint = "Sharepoint" + vmware_vm = "VMwareVM" + system_state = "SystemState" + client = "Client" + generic_data_source = "GenericDataSource" + sql_data_base = "SQLDataBase" + azure_file_share = "AzureFileShare" + sap_hana_database = "SAPHanaDatabase" + sap_ase_database = "SAPAseDatabase" -class ValidationStatus(str, Enum): +class OperationStatusValues(str, Enum): invalid = "Invalid" + in_progress = "InProgress" succeeded = "Succeeded" failed = "Failed" + canceled = "Canceled" -class IntentItemType(str, Enum): +class RehydrationPriority(str, Enum): - invalid = "Invalid" - sql_instance = "SQLInstance" - sql_availability_group_container = "SQLAvailabilityGroupContainer" + standard = "Standard" + high = "High" 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 ba76f1610929..ea78a8cfb98c 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 @@ -9,6 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- +from ._protection_intent_operations import ProtectionIntentOperations +from ._backup_status_operations import BackupStatusOperations +from ._feature_support_operations import FeatureSupportOperations +from ._backup_protection_intent_operations import BackupProtectionIntentOperations +from ._backup_usage_summaries_operations import BackupUsageSummariesOperations +from ._operations import Operations from ._backup_resource_vault_configs_operations import BackupResourceVaultConfigsOperations from ._backup_resource_encryption_configs_operations import BackupResourceEncryptionConfigsOperations from ._private_endpoint_connection_operations import PrivateEndpointConnectionOperations @@ -44,6 +50,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 @@ -53,15 +60,15 @@ from ._backup_resource_storage_configs_operations import BackupResourceStorageConfigsOperations from ._recovery_points_crr_operations import RecoveryPointsCrrOperations from ._backup_protected_items_crr_operations import BackupProtectedItemsCrrOperations -from ._protection_intent_operations import ProtectionIntentOperations -from ._backup_status_operations import BackupStatusOperations -from ._feature_support_operations import FeatureSupportOperations -from ._backup_protection_intent_operations import BackupProtectionIntentOperations -from ._backup_usage_summaries_operations import BackupUsageSummariesOperations -from ._operations import Operations from ._recovery_services_backup_client_operations import RecoveryServicesBackupClientOperationsMixin __all__ = [ + 'ProtectionIntentOperations', + 'BackupStatusOperations', + 'FeatureSupportOperations', + 'BackupProtectionIntentOperations', + 'BackupUsageSummariesOperations', + 'Operations', 'BackupResourceVaultConfigsOperations', 'BackupResourceEncryptionConfigsOperations', 'PrivateEndpointConnectionOperations', @@ -97,6 +104,7 @@ 'BackupProtectableItemsOperations', 'BackupProtectionContainersOperations', 'SecurityPINsOperations', + 'RecoveryPointsRecommendedForMoveOperations', 'AadPropertiesOperations', 'CrossRegionRestoreOperations', 'BackupCrrJobDetailsOperations', @@ -106,11 +114,5 @@ 'BackupResourceStorageConfigsOperations', 'RecoveryPointsCrrOperations', 'BackupProtectedItemsCrrOperations', - 'ProtectionIntentOperations', - 'BackupStatusOperations', - 'FeatureSupportOperations', - 'BackupProtectionIntentOperations', - 'BackupUsageSummariesOperations', - 'Operations', 'RecoveryServicesBackupClientOperationsMixin', ] diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_aad_properties_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_aad_properties_operations.py index 068867d59da9..44bb7c7f3e38 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_aad_properties_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_aad_properties_operations.py @@ -39,11 +39,13 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get( - self, azure_region, custom_headers=None, raw=False, **operation_config): + self, azure_region, filter=None, custom_headers=None, raw=False, **operation_config): """Fetches the AAD properties from target region BCM stamp. :param azure_region: Azure region to hit Api :type azure_region: str + :param filter: OData filter options. + :type filter: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -67,6 +69,8 @@ def get( # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') # Construct headers header_parameters = {} 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 671a1c80db6c..9ea4d24fdae7 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-03-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-03-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 bb423d0a8ccf..ab91dc5de726 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-03-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-03-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 730fcf0fa5e0..655d9c541e19 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-03-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-03-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 f4a9970a3ae4..9663a1202b75 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-03-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-03-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 252ee7c53daf..b0d3101433db 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-03-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-03-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 4f23b29ca068..b57c520cf481 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-03-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-03-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 657ac4b94db2..e483faf6c1e8 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-03-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-03-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 2d61d3ca2a74..38b912847130 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-03-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-03-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_protection_intent_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_intent_operations.py index 267a19541377..2cee7fcadf52 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_intent_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_intent_operations.py @@ -25,7 +25,7 @@ class BackupProtectionIntentOperations(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: "2017-07-01". + :ivar api_version: Client Api Version. Constant value: "2021-03-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 = "2017-07-01" + self.api_version = "2021-03-01" self.config = config 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 48ccf427673e..e1d40ea05053 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-03-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-03-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 03a9a53e7d27..af305da4e906 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-03-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-03-01" self.config = config @@ -173,7 +173,7 @@ def update( def put( self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): - """Updates vault security config. + """Updates vault security config. . :param vault_name: The name of the recovery services vault. :type vault_name: str diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_status_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_status_operations.py index 35a4d0f84cf1..ba0f25c47ebc 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_status_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_status_operations.py @@ -25,7 +25,7 @@ class BackupStatusOperations(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: "2017-07-01". + :ivar api_version: Client Api Version. Constant value: "2021-03-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 = "2017-07-01" + self.api_version = "2021-03-01" self.config = config diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py index 48a868512ba5..0e3226eecaa8 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py @@ -25,7 +25,7 @@ class BackupUsageSummariesOperations(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: "2017-07-01". + :ivar api_version: Client Api Version. Constant value: "2021-03-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 = "2017-07-01" + self.api_version = "2021-03-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 c50d7a88cc6c..53726dc0f3e2 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-03-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-03-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 dd008793b9a1..7a09c1114374 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-03-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-03-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 6f9ae58e6f61..16238d463410 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-03-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-03-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 9a480533574d..9ed9529c69c7 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 93640a6c5e8b..16c2aa410b67 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-03-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-03-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/_feature_support_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_feature_support_operations.py index 03ff7cebd8bd..eee2504da744 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_feature_support_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_feature_support_operations.py @@ -25,7 +25,7 @@ class FeatureSupportOperations(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: "2017-07-01". + :ivar api_version: Client Api Version. Constant value: "2021-03-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 = "2017-07-01" + self.api_version = "2021-03-01" self.config = config 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 21b7da3c009f..9efccd8203e4 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-03-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-03-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 11fa4b6c09dd..8ee3745f4e7c 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-03-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-03-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 b887b42cfa88..2e1f71fa3e2d 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-03-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-03-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 cb824fdff887..27c6086f52a7 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-03-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-03-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 79d0b4c2dd67..d7eafe4e33a8 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-03-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-03-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 4ad15161b9b1..a2d78b265a81 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-03-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-03-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/_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operations.py index 3c69d7592b93..a59e6ff4136c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(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: "2016-08-10". + :ivar api_version: Client Api Version. Constant value: "2021-03-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 = "2016-08-10" + self.api_version = "2021-03-01" self.config = config 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 84f7a3c1188f..156726fcbacd 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-03-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-03-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 daa4d1916cf1..4a2f388a1400 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-03-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-03-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 4050cc0343cf..c7ab5ac4566c 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-03-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-03-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 c03445aa80ed..893fb3a85935 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-03-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-03-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 f512b824976d..fe1bec98c7af 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-03-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-03-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 bc83ae22b4cb..2e2a543fa050 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-03-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-03-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 c5d6b56a75ca..e5aca08f65de 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-03-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-03-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 15978097f849..4c9f5bf0cdc5 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-03-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-03-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 c678695288dc..8c253edb087d 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-03-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-03-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_intent_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_intent_operations.py index 16a3e29082c5..a6aea6f4a560 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_intent_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_intent_operations.py @@ -25,7 +25,7 @@ class ProtectionIntentOperations(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: "2017-07-01". + :ivar api_version: Client Api Version. Constant value: "2021-03-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 = "2017-07-01" + self.api_version = "2021-03-01" self.config = config 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 fc5010878ef5..bcc383c1cb2e 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-03-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-03-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 66109b2fa665..1679aa01a7f5 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-03-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-03-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 07e96fecd342..9173062b95d9 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-03-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-03-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 15ef8b69743d..55c0d4d03c3a 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-03-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-03-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 000000000000..b75e43acca70 --- /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-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-03-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 5a7574ed542c..e291063db23b 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-03-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-03-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-03-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-03-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 19a78756422f..8de5500a0ed1 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-03-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-03-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 245e21827da0..8c1fe1104684 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-03-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-03-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'}