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 85a49fbd5e78..6961f31482ef 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 @@ -15,7 +15,8 @@ from ._configuration import RecoveryServicesBackupClientConfiguration from .operations import RecoveryServicesBackupClientOperationsMixin from .operations import PrivateEndpointConnectionOperations -from .operations import BackupResourceVaultConfigsOperations +from .operations import PrivateEndpointOperations +from .operations import BMSPrepareDataMoveOperationResultOperations from .operations import ProtectedItemsOperations from .operations import ProtectedItemOperationResultsOperations from .operations import RecoveryPointsOperations @@ -31,11 +32,6 @@ from .operations import JobsOperations from .operations import BackupProtectedItemsOperations from .operations import OperationOperations -from .operations import ProtectionIntentOperations -from .operations import BackupStatusOperations -from .operations import FeatureSupportOperations -from .operations import BackupProtectionIntentOperations -from .operations import BackupUsageSummariesOperations from .operations import BackupEnginesOperations from .operations import ProtectionContainerRefreshOperationResultsOperations from .operations import ProtectableContainersOperations @@ -51,7 +47,20 @@ from .operations import BackupProtectableItemsOperations from .operations import BackupProtectionContainersOperations from .operations import SecurityPINsOperations +from .operations import AadPropertiesOperations +from .operations import CrossRegionRestoreOperations +from .operations import BackupCrrJobDetailsOperations +from .operations import BackupCrrJobsOperations +from .operations import CrrOperationResultsOperations +from .operations import CrrOperationStatusOperations 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 @@ -64,8 +73,10 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin, :ivar private_endpoint_connection: PrivateEndpointConnection operations :vartype private_endpoint_connection: azure.mgmt.recoveryservicesbackup.operations.PrivateEndpointConnectionOperations - :ivar backup_resource_vault_configs: BackupResourceVaultConfigs operations - :vartype backup_resource_vault_configs: azure.mgmt.recoveryservicesbackup.operations.BackupResourceVaultConfigsOperations + :ivar private_endpoint: PrivateEndpoint operations + :vartype private_endpoint: azure.mgmt.recoveryservicesbackup.operations.PrivateEndpointOperations + :ivar bms_prepare_data_move_operation_result: BMSPrepareDataMoveOperationResult operations + :vartype bms_prepare_data_move_operation_result: azure.mgmt.recoveryservicesbackup.operations.BMSPrepareDataMoveOperationResultOperations :ivar protected_items: ProtectedItems operations :vartype protected_items: azure.mgmt.recoveryservicesbackup.operations.ProtectedItemsOperations :ivar protected_item_operation_results: ProtectedItemOperationResults operations @@ -96,16 +107,6 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin, :vartype backup_protected_items: azure.mgmt.recoveryservicesbackup.operations.BackupProtectedItemsOperations :ivar operation: Operation operations :vartype operation: azure.mgmt.recoveryservicesbackup.operations.OperationOperations - :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 backup_engines: BackupEngines operations :vartype backup_engines: azure.mgmt.recoveryservicesbackup.operations.BackupEnginesOperations :ivar protection_container_refresh_operation_results: ProtectionContainerRefreshOperationResults operations @@ -136,8 +137,34 @@ 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 aad_properties: AadProperties operations + :vartype aad_properties: azure.mgmt.recoveryservicesbackup.operations.AadPropertiesOperations + :ivar cross_region_restore: CrossRegionRestore operations + :vartype cross_region_restore: azure.mgmt.recoveryservicesbackup.operations.CrossRegionRestoreOperations + :ivar backup_crr_job_details: BackupCrrJobDetails operations + :vartype backup_crr_job_details: azure.mgmt.recoveryservicesbackup.operations.BackupCrrJobDetailsOperations + :ivar backup_crr_jobs: BackupCrrJobs operations + :vartype backup_crr_jobs: azure.mgmt.recoveryservicesbackup.operations.BackupCrrJobsOperations + :ivar crr_operation_results: CrrOperationResults operations + :vartype crr_operation_results: azure.mgmt.recoveryservicesbackup.operations.CrrOperationResultsOperations + :ivar crr_operation_status: CrrOperationStatus operations + :vartype crr_operation_status: azure.mgmt.recoveryservicesbackup.operations.CrrOperationStatusOperations :ivar backup_resource_storage_configs: BackupResourceStorageConfigs operations :vartype backup_resource_storage_configs: azure.mgmt.recoveryservicesbackup.operations.BackupResourceStorageConfigsOperations + :ivar recovery_points_crr: RecoveryPointsCrr operations + :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 @@ -161,7 +188,9 @@ def __init__( self.private_endpoint_connection = PrivateEndpointConnectionOperations( self._client, self.config, self._serialize, self._deserialize) - self.backup_resource_vault_configs = BackupResourceVaultConfigsOperations( + self.private_endpoint = PrivateEndpointOperations( + self._client, self.config, self._serialize, self._deserialize) + self.bms_prepare_data_move_operation_result = BMSPrepareDataMoveOperationResultOperations( self._client, self.config, self._serialize, self._deserialize) self.protected_items = ProtectedItemsOperations( self._client, self.config, self._serialize, self._deserialize) @@ -193,16 +222,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.operation = OperationOperations( 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.backup_engines = BackupEnginesOperations( self._client, self.config, self._serialize, self._deserialize) self.protection_container_refresh_operation_results = ProtectionContainerRefreshOperationResultsOperations( @@ -233,7 +252,33 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.security_pi_ns = SecurityPINsOperations( 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( + self._client, self.config, self._serialize, self._deserialize) + self.backup_crr_job_details = BackupCrrJobDetailsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.backup_crr_jobs = BackupCrrJobsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.crr_operation_results = CrrOperationResultsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.crr_operation_status = CrrOperationStatusOperations( + self._client, self.config, self._serialize, self._deserialize) self.backup_resource_storage_configs = BackupResourceStorageConfigsOperations( self._client, self.config, self._serialize, self._deserialize) + self.recovery_points_crr = RecoveryPointsCrrOperations( + 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 5e9531dfbb33..9b27eb7d783e 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 @@ -10,6 +10,8 @@ # -------------------------------------------------------------------------- try: + from ._models_py3 import AADProperties + from ._models_py3 import AADPropertiesResource from ._models_py3 import AzureBackupGoalFeatureSupportRequest from ._models_py3 import AzureBackupServerContainer from ._models_py3 import AzureBackupServerEngine @@ -102,8 +104,6 @@ from ._models_py3 import BackupRequestResource from ._models_py3 import BackupResourceConfig from ._models_py3 import BackupResourceConfigResource - from ._models_py3 import BackupResourceVaultConfig - from ._models_py3 import BackupResourceVaultConfigResource from ._models_py3 import BackupStatusRequest from ._models_py3 import BackupStatusResponse from ._models_py3 import BEKDetails @@ -123,6 +123,12 @@ from ._models_py3 import ClientDiscoveryValueForSingleApi from ._models_py3 import ClientScriptForConnect from ._models_py3 import ContainerIdentityInfo + from ._models_py3 import CrossRegionRestoreRequest + from ._models_py3 import CrossRegionRestoreRequestResource + from ._models_py3 import CrrAccessToken + from ._models_py3 import CrrAccessTokenResource + from ._models_py3 import CrrJobRequest + from ._models_py3 import CrrJobRequestResource from ._models_py3 import DailyRetentionFormat from ._models_py3 import DailyRetentionSchedule from ._models_py3 import Day @@ -151,7 +157,6 @@ from ._models_py3 import GenericProtectionPolicy from ._models_py3 import GenericRecoveryPoint from ._models_py3 import GetProtectedItemQueryObject - from ._models_py3 import HealthDetails from ._models_py3 import IaasVMBackupRequest from ._models_py3 import IaaSVMContainer from ._models_py3 import IaasVMILRRegistrationRequest @@ -169,6 +174,7 @@ from ._models_py3 import JobResource from ._models_py3 import KEKDetails from ._models_py3 import KeyAndSecretDetails + from ._models_py3 import KPIResourceHealthDetails from ._models_py3 import LogSchedulePolicy from ._models_py3 import LongTermRetentionPolicy from ._models_py3 import LongTermSchedulePolicy @@ -184,6 +190,8 @@ from ._models_py3 import MabProtectionPolicy from ._models_py3 import MonthlyRetentionSchedule from ._models_py3 import NameInfo + from ._models_py3 import NewErrorResponse, NewErrorResponseException + from ._models_py3 import NewErrorResponseError from ._models_py3 import OperationResultInfo from ._models_py3 import OperationResultInfoBase from ._models_py3 import OperationResultInfoBaseResource @@ -193,9 +201,12 @@ from ._models_py3 import OperationStatusJobExtendedInfo from ._models_py3 import OperationStatusJobsExtendedInfo from ._models_py3 import OperationStatusProvisionILRExtendedInfo + from ._models_py3 import OperationStatusRecoveryPointExtendedInfo from ._models_py3 import OperationWorkerResponse from ._models_py3 import PointInTimeRange from ._models_py3 import PreBackupValidation + from ._models_py3 import PrepareDataMoveRequest + from ._models_py3 import PrepareDataMoveResponse from ._models_py3 import PreValidateEnableBackupRequest from ._models_py3 import PreValidateEnableBackupResponse from ._models_py3 import PrivateEndpoint @@ -220,6 +231,7 @@ from ._models_py3 import RecoveryPointResource from ._models_py3 import RecoveryPointTierInformation from ._models_py3 import Resource + from ._models_py3 import ResourceHealthDetails from ._models_py3 import ResourceList from ._models_py3 import RestoreFileSpecs from ._models_py3 import RestoreRequest @@ -236,13 +248,19 @@ from ._models_py3 import TargetAFSRestoreInfo from ._models_py3 import TargetRestoreInfo from ._models_py3 import TokenInformation + from ._models_py3 import TriggerDataMoveRequest from ._models_py3 import ValidateIaasVMRestoreOperationRequest from ._models_py3 import ValidateOperationRequest from ._models_py3 import ValidateOperationResponse from ._models_py3 import ValidateOperationsResponse from ._models_py3 import ValidateRestoreOperationRequest + from ._models_py3 import VaultJob + from ._models_py3 import VaultJobErrorInfo + from ._models_py3 import VaultJobExtendedInfo + from ._models_py3 import VaultStorageConfigOperationResultResponse from ._models_py3 import WeeklyRetentionFormat from ._models_py3 import WeeklyRetentionSchedule + from ._models_py3 import WorkloadCrrAccessToken from ._models_py3 import WorkloadInquiryDetails from ._models_py3 import WorkloadItem from ._models_py3 import WorkloadItemResource @@ -250,6 +268,8 @@ from ._models_py3 import WorkloadProtectableItemResource from ._models_py3 import YearlyRetentionSchedule except (SyntaxError, ImportError): + from ._models import AADProperties + from ._models import AADPropertiesResource from ._models import AzureBackupGoalFeatureSupportRequest from ._models import AzureBackupServerContainer from ._models import AzureBackupServerEngine @@ -342,8 +362,6 @@ from ._models import BackupRequestResource from ._models import BackupResourceConfig from ._models import BackupResourceConfigResource - from ._models import BackupResourceVaultConfig - from ._models import BackupResourceVaultConfigResource from ._models import BackupStatusRequest from ._models import BackupStatusResponse from ._models import BEKDetails @@ -363,6 +381,12 @@ from ._models import ClientDiscoveryValueForSingleApi from ._models import ClientScriptForConnect from ._models import ContainerIdentityInfo + from ._models import CrossRegionRestoreRequest + from ._models import CrossRegionRestoreRequestResource + from ._models import CrrAccessToken + from ._models import CrrAccessTokenResource + from ._models import CrrJobRequest + from ._models import CrrJobRequestResource from ._models import DailyRetentionFormat from ._models import DailyRetentionSchedule from ._models import Day @@ -391,7 +415,6 @@ from ._models import GenericProtectionPolicy from ._models import GenericRecoveryPoint from ._models import GetProtectedItemQueryObject - from ._models import HealthDetails from ._models import IaasVMBackupRequest from ._models import IaaSVMContainer from ._models import IaasVMILRRegistrationRequest @@ -409,6 +432,7 @@ from ._models import JobResource from ._models import KEKDetails from ._models import KeyAndSecretDetails + from ._models import KPIResourceHealthDetails from ._models import LogSchedulePolicy from ._models import LongTermRetentionPolicy from ._models import LongTermSchedulePolicy @@ -424,6 +448,8 @@ from ._models import MabProtectionPolicy from ._models import MonthlyRetentionSchedule from ._models import NameInfo + from ._models import NewErrorResponse, NewErrorResponseException + from ._models import NewErrorResponseError from ._models import OperationResultInfo from ._models import OperationResultInfoBase from ._models import OperationResultInfoBaseResource @@ -433,9 +459,12 @@ from ._models import OperationStatusJobExtendedInfo from ._models import OperationStatusJobsExtendedInfo from ._models import OperationStatusProvisionILRExtendedInfo + from ._models import OperationStatusRecoveryPointExtendedInfo from ._models import OperationWorkerResponse from ._models import PointInTimeRange from ._models import PreBackupValidation + from ._models import PrepareDataMoveRequest + from ._models import PrepareDataMoveResponse from ._models import PreValidateEnableBackupRequest from ._models import PreValidateEnableBackupResponse from ._models import PrivateEndpoint @@ -460,6 +489,7 @@ from ._models import RecoveryPointResource from ._models import RecoveryPointTierInformation from ._models import Resource + from ._models import ResourceHealthDetails from ._models import ResourceList from ._models import RestoreFileSpecs from ._models import RestoreRequest @@ -476,13 +506,19 @@ from ._models import TargetAFSRestoreInfo from ._models import TargetRestoreInfo from ._models import TokenInformation + from ._models import TriggerDataMoveRequest from ._models import ValidateIaasVMRestoreOperationRequest from ._models import ValidateOperationRequest from ._models import ValidateOperationResponse from ._models import ValidateOperationsResponse from ._models import ValidateRestoreOperationRequest + from ._models import VaultJob + from ._models import VaultJobErrorInfo + from ._models import VaultJobExtendedInfo + from ._models import VaultStorageConfigOperationResultResponse from ._models import WeeklyRetentionFormat from ._models import WeeklyRetentionSchedule + from ._models import WorkloadCrrAccessToken from ._models import WorkloadInquiryDetails from ._models import WorkloadItem from ._models import WorkloadItemResource @@ -502,10 +538,10 @@ from ._paged_models import WorkloadItemResourcePaged from ._paged_models import WorkloadProtectableItemResourcePaged from ._recovery_services_backup_client_enums import ( - OperationStatusValues, ProvisioningState, PrivateEndpointConnectionStatus, ProtectionState, + ResourceHealthStatus, HealthStatus, RecoveryType, CopyOptions, @@ -520,10 +556,6 @@ OverwriteOptions, RecoveryMode, SQLDataDirectoryType, - StorageType, - StorageTypeState, - EnhancedSecurityState, - SoftDeleteFeatureState, RestorePointQueryType, RetentionDurationType, RecoveryPointTierType, @@ -536,28 +568,34 @@ WeekOfMonth, MonthOfYear, MabServerType, + DataMoveLevel, HttpStatusCode, DataSourceType, CreateMode, HealthState, ScheduleRunType, - SupportStatus, - WorkloadItemType, - UsagesUnit, - ProtectionStatus, - FabricName, - Type, - ValidationStatus, - IntentItemType, AzureFileShareType, InquiryStatus, BackupType, OperationType, ContainerType, + WorkloadItemType, + ProtectionStatus, BackupItemType, + OperationStatusValues, + StorageType, + StorageTypeState, + SupportStatus, + UsagesUnit, + FabricName, + Type, + ValidationStatus, + IntentItemType, ) __all__ = [ + 'AADProperties', + 'AADPropertiesResource', 'AzureBackupGoalFeatureSupportRequest', 'AzureBackupServerContainer', 'AzureBackupServerEngine', @@ -650,8 +688,6 @@ 'BackupRequestResource', 'BackupResourceConfig', 'BackupResourceConfigResource', - 'BackupResourceVaultConfig', - 'BackupResourceVaultConfigResource', 'BackupStatusRequest', 'BackupStatusResponse', 'BEKDetails', @@ -671,6 +707,12 @@ 'ClientDiscoveryValueForSingleApi', 'ClientScriptForConnect', 'ContainerIdentityInfo', + 'CrossRegionRestoreRequest', + 'CrossRegionRestoreRequestResource', + 'CrrAccessToken', + 'CrrAccessTokenResource', + 'CrrJobRequest', + 'CrrJobRequestResource', 'DailyRetentionFormat', 'DailyRetentionSchedule', 'Day', @@ -699,7 +741,6 @@ 'GenericProtectionPolicy', 'GenericRecoveryPoint', 'GetProtectedItemQueryObject', - 'HealthDetails', 'IaasVMBackupRequest', 'IaaSVMContainer', 'IaasVMILRRegistrationRequest', @@ -717,6 +758,7 @@ 'JobResource', 'KEKDetails', 'KeyAndSecretDetails', + 'KPIResourceHealthDetails', 'LogSchedulePolicy', 'LongTermRetentionPolicy', 'LongTermSchedulePolicy', @@ -732,6 +774,8 @@ 'MabProtectionPolicy', 'MonthlyRetentionSchedule', 'NameInfo', + 'NewErrorResponse', 'NewErrorResponseException', + 'NewErrorResponseError', 'OperationResultInfo', 'OperationResultInfoBase', 'OperationResultInfoBaseResource', @@ -741,9 +785,12 @@ 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo', + 'OperationStatusRecoveryPointExtendedInfo', 'OperationWorkerResponse', 'PointInTimeRange', 'PreBackupValidation', + 'PrepareDataMoveRequest', + 'PrepareDataMoveResponse', 'PreValidateEnableBackupRequest', 'PreValidateEnableBackupResponse', 'PrivateEndpoint', @@ -768,6 +815,7 @@ 'RecoveryPointResource', 'RecoveryPointTierInformation', 'Resource', + 'ResourceHealthDetails', 'ResourceList', 'RestoreFileSpecs', 'RestoreRequest', @@ -784,13 +832,19 @@ 'TargetAFSRestoreInfo', 'TargetRestoreInfo', 'TokenInformation', + 'TriggerDataMoveRequest', 'ValidateIaasVMRestoreOperationRequest', 'ValidateOperationRequest', 'ValidateOperationResponse', 'ValidateOperationsResponse', 'ValidateRestoreOperationRequest', + 'VaultJob', + 'VaultJobErrorInfo', + 'VaultJobExtendedInfo', + 'VaultStorageConfigOperationResultResponse', 'WeeklyRetentionFormat', 'WeeklyRetentionSchedule', + 'WorkloadCrrAccessToken', 'WorkloadInquiryDetails', 'WorkloadItem', 'WorkloadItemResource', @@ -801,18 +855,18 @@ 'ProtectionPolicyResourcePaged', 'JobResourcePaged', 'ProtectedItemResourcePaged', - 'ProtectionIntentResourcePaged', - 'BackupManagementUsagePaged', 'BackupEngineBaseResourcePaged', 'ProtectableContainerResourcePaged', 'WorkloadItemResourcePaged', 'WorkloadProtectableItemResourcePaged', 'ProtectionContainerResourcePaged', + 'ProtectionIntentResourcePaged', + 'BackupManagementUsagePaged', 'ClientDiscoveryValueForSingleApiPaged', - 'OperationStatusValues', 'ProvisioningState', 'PrivateEndpointConnectionStatus', 'ProtectionState', + 'ResourceHealthStatus', 'HealthStatus', 'RecoveryType', 'CopyOptions', @@ -827,10 +881,6 @@ 'OverwriteOptions', 'RecoveryMode', 'SQLDataDirectoryType', - 'StorageType', - 'StorageTypeState', - 'EnhancedSecurityState', - 'SoftDeleteFeatureState', 'RestorePointQueryType', 'RetentionDurationType', 'RecoveryPointTierType', @@ -843,23 +893,27 @@ 'WeekOfMonth', 'MonthOfYear', 'MabServerType', + 'DataMoveLevel', 'HttpStatusCode', 'DataSourceType', 'CreateMode', 'HealthState', 'ScheduleRunType', - 'SupportStatus', - 'WorkloadItemType', - 'UsagesUnit', - 'ProtectionStatus', - 'FabricName', - 'Type', - 'ValidationStatus', - 'IntentItemType', 'AzureFileShareType', 'InquiryStatus', 'BackupType', 'OperationType', 'ContainerType', + 'WorkloadItemType', + 'ProtectionStatus', 'BackupItemType', + 'OperationStatusValues', + 'StorageType', + 'StorageTypeState', + 'SupportStatus', + 'UsagesUnit', + 'FabricName', + 'Type', + 'ValidationStatus', + 'IntentItemType', ] 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 34ff6d9b22a5..093e7eafa07d 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 @@ -13,6 +13,128 @@ from msrest.exceptions import HttpOperationError +class AADProperties(Model): + """AADProperties. + + :param service_principal_client_id: + :type service_principal_client_id: str + :param tenant_id: + :type tenant_id: str + :param authority: + :type authority: str + :param audience: + :type audience: str + :param service_principal_object_id: + :type service_principal_object_id: str + """ + + _attribute_map = { + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'authority': {'key': 'authority', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + 'service_principal_object_id': {'key': 'servicePrincipalObjectId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AADProperties, self).__init__(**kwargs) + self.service_principal_client_id = kwargs.get('service_principal_client_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.authority = kwargs.get('authority', None) + self.audience = kwargs.get('audience', None) + self.service_principal_object_id = kwargs.get('service_principal_object_id', None) + + +class Resource(Model): + """ARM Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.e_tag = kwargs.get('e_tag', None) + + +class AADPropertiesResource(Resource): + """AADPropertiesResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: AADPropertiesResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.AADProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AADProperties'}, + } + + def __init__(self, **kwargs): + super(AADPropertiesResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + class FeatureSupportRequest(Model): """Base class for feature request. @@ -742,24 +864,23 @@ class AzureFileshareProtectedItem(ProtectedItem): 'ProtectionStopped', 'ProtectionPaused' :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState - :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' - :type health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: - list[~azure.mgmt.recoveryservicesbackup.models.HealthDetails] :param last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. :type last_backup_status: str :param last_backup_time: Timestamp of the last backup operation on this backup item. :type last_backup_time: datetime + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] :param extended_info: Additional information with this backup item. :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo + :param health_status: backups running status for this backup item. + Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + 'Invalid' + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus """ _validation = { @@ -784,11 +905,11 @@ class AzureFileshareProtectedItem(ProtectedItem): 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'health_details': {'key': 'healthDetails', 'type': '[HealthDetails]'}, 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureFileshareProtectedItemExtendedInfo'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, } def __init__(self, **kwargs): @@ -796,11 +917,11 @@ def __init__(self, **kwargs): self.friendly_name = kwargs.get('friendly_name', None) self.protection_status = kwargs.get('protection_status', None) self.protection_state = kwargs.get('protection_state', None) - self.health_status = kwargs.get('health_status', None) - self.health_details = kwargs.get('health_details', None) self.last_backup_status = kwargs.get('last_backup_status', None) self.last_backup_time = kwargs.get('last_backup_time', None) + self.kpis_healths = kwargs.get('kpis_healths', None) self.extended_info = kwargs.get('extended_info', None) + self.health_status = kwargs.get('health_status', None) self.protected_item_type = 'AzureFileShareProtectedItem' @@ -1435,14 +1556,15 @@ class AzureIaaSVMProtectedItem(ProtectedItem): :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' + include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus :param health_details: Health details on this backup item. :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] :param last_backup_status: Last backup operation status. :type last_backup_status: str :param last_backup_time: Timestamp of the last backup operation on this @@ -1483,6 +1605,7 @@ class AzureIaaSVMProtectedItem(ProtectedItem): 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, @@ -1502,6 +1625,7 @@ def __init__(self, **kwargs): self.protection_state = kwargs.get('protection_state', None) self.health_status = kwargs.get('health_status', None) self.health_details = kwargs.get('health_details', None) + self.kpis_healths = kwargs.get('kpis_healths', None) self.last_backup_status = kwargs.get('last_backup_status', None) self.last_backup_time = kwargs.get('last_backup_time', None) self.protected_item_data_id = kwargs.get('protected_item_data_id', None) @@ -1575,14 +1699,15 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' + include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus :param health_details: Health details on this backup item. :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] :param last_backup_status: Last backup operation status. :type last_backup_status: str :param last_backup_time: Timestamp of the last backup operation on this @@ -1623,6 +1748,7 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, @@ -1794,14 +1920,15 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' + include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus :param health_details: Health details on this backup item. :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] :param last_backup_status: Last backup operation status. :type last_backup_status: str :param last_backup_time: Timestamp of the last backup operation on this @@ -1842,6 +1969,7 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, @@ -1894,7 +2022,7 @@ def __init__(self, **kwargs): self.recommendations = None -class HealthDetails(Model): +class ResourceHealthDetails(Model): """Health Details for backup items. Variables are only populated by the server, and will be ignored when @@ -1925,14 +2053,14 @@ class HealthDetails(Model): } def __init__(self, **kwargs): - super(HealthDetails, self).__init__(**kwargs) + super(ResourceHealthDetails, self).__init__(**kwargs) self.code = None self.title = None self.message = None self.recommendations = None -class AzureIaaSVMHealthDetails(HealthDetails): +class AzureIaaSVMHealthDetails(ResourceHealthDetails): """Azure IaaS VM workload-specific Health Details. Variables are only populated by the server, and will be ignored when @@ -1971,7 +2099,7 @@ class Job(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: AzureIaaSVMJob, AzureStorageJob, AzureWorkloadJob, DpmJob, - MabJob + MabJob, VaultJob All required parameters must be populated in order to send to Azure. @@ -2014,7 +2142,7 @@ class Job(Model): } _subtype_map = { - 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob'} + 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob', 'VaultJob': 'VaultJob'} } def __init__(self, **kwargs): @@ -3506,18 +3634,12 @@ class AzureVmWorkloadProtectedItem(ProtectedItem): 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' :type protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' - :type health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: - list[~azure.mgmt.recoveryservicesbackup.models.HealthDetails] :param extended_info: Additional information for this backup item. :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ _validation = { @@ -3550,9 +3672,8 @@ class AzureVmWorkloadProtectedItem(ProtectedItem): 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'health_details': {'key': 'healthDetails', 'type': '[HealthDetails]'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, } _subtype_map = { @@ -3572,9 +3693,8 @@ def __init__(self, **kwargs): self.last_backup_error_detail = kwargs.get('last_backup_error_detail', None) self.protected_item_data_source_id = kwargs.get('protected_item_data_source_id', None) self.protected_item_health_status = kwargs.get('protected_item_health_status', None) - self.health_status = kwargs.get('health_status', None) - self.health_details = kwargs.get('health_details', None) self.extended_info = kwargs.get('extended_info', None) + self.kpis_healths = kwargs.get('kpis_healths', None) self.protected_item_type = 'AzureVmWorkloadProtectedItem' @@ -3740,18 +3860,12 @@ class AzureVmWorkloadSAPAseDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' :type protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' - :type health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: - list[~azure.mgmt.recoveryservicesbackup.models.HealthDetails] :param extended_info: Additional information for this backup item. :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ _validation = { @@ -3784,9 +3898,8 @@ class AzureVmWorkloadSAPAseDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'health_details': {'key': 'healthDetails', 'type': '[HealthDetails]'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, } def __init__(self, **kwargs): @@ -4129,18 +4242,12 @@ class AzureVmWorkloadSAPHanaDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' :type protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' - :type health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: - list[~azure.mgmt.recoveryservicesbackup.models.HealthDetails] :param extended_info: Additional information for this backup item. :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ _validation = { @@ -4173,9 +4280,8 @@ class AzureVmWorkloadSAPHanaDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'health_details': {'key': 'healthDetails', 'type': '[HealthDetails]'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, } def __init__(self, **kwargs): @@ -4588,18 +4694,12 @@ class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' :type protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' - :type health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: - list[~azure.mgmt.recoveryservicesbackup.models.HealthDetails] :param extended_info: Additional information for this backup item. :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ _validation = { @@ -4632,9 +4732,8 @@ class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'health_details': {'key': 'healthDetails', 'type': '[HealthDetails]'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, } def __init__(self, **kwargs): @@ -4888,7 +4987,7 @@ class AzureWorkloadBackupRequest(BackupRequest): :type object_type: str :param backup_type: Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible values include: 'Invalid', 'Full', 'Differential', - 'Log', 'CopyOnlyFull' + 'Log', 'CopyOnlyFull', 'Incremental' :type backup_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupType :param enable_compression: Bool for Compression setting @@ -5114,7 +5213,7 @@ class AzureWorkloadRecoveryPoint(RecoveryPoint): created :vartype recovery_point_time_in_utc: datetime :ivar type: Type of restore point. Possible values include: 'Invalid', - 'Full', 'Log', 'Differential' + 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType """ @@ -5159,7 +5258,7 @@ class AzureWorkloadPointInTimeRecoveryPoint(AzureWorkloadRecoveryPoint): created :vartype recovery_point_time_in_utc: datetime :ivar type: Type of restore point. Possible values include: 'Invalid', - 'Full', 'Log', 'Differential' + 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType :param time_ranges: List of log ranges @@ -5312,7 +5411,7 @@ class AzureWorkloadSAPHanaPointInTimeRecoveryPoint(AzureWorkloadPointInTimeRecov created :vartype recovery_point_time_in_utc: datetime :ivar type: Type of restore point. Possible values include: 'Invalid', - 'Full', 'Log', 'Differential' + 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType :param time_ranges: List of log ranges @@ -5455,7 +5554,7 @@ class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): created :vartype recovery_point_time_in_utc: datetime :ivar type: Type of restore point. Possible values include: 'Invalid', - 'Full', 'Log', 'Differential' + 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType """ @@ -5549,7 +5648,7 @@ class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): created :vartype recovery_point_time_in_utc: datetime :ivar type: Type of restore point. Possible values include: 'Invalid', - 'Full', 'Log', 'Differential' + 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType :param extended_info: Extended Info that provides data directory details. @@ -5598,7 +5697,7 @@ class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): created :vartype recovery_point_time_in_utc: datetime :ivar type: Type of restore point. Possible values include: 'Invalid', - 'Full', 'Log', 'Differential' + 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType :param extended_info: Extended Info that provides data directory details. @@ -5793,52 +5892,6 @@ def __init__(self, **kwargs): self.data_directory_paths = None -class Resource(Model): - """ARM Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id represents the complete path to the resource. - :vartype id: str - :ivar name: Resource name associated with the resource. - :vartype name: str - :ivar type: Resource type represents the complete path of the form - Namespace/ResourceType/ResourceType/... - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param e_tag: Optional ETag. - :type e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.e_tag = kwargs.get('e_tag', None) - - class BackupEngineBaseResource(Resource): """The base backup engine class. All workload specific backup engines derive from this class. @@ -6019,11 +6072,13 @@ class BackupResourceConfig(Model): """The resource storage details. :param storage_model_type: Storage type. Possible values include: - 'Invalid', 'GeoRedundant', 'LocallyRedundant' + 'Invalid', 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', + 'ReadAccessGeoZoneRedundant' :type storage_model_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType :param storage_type: Storage type. Possible values include: 'Invalid', - 'GeoRedundant', 'LocallyRedundant' + 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', + 'ReadAccessGeoZoneRedundant' :type storage_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType :param storage_type_state: Locked or Unlocked. Once a machine is @@ -6031,12 +6086,16 @@ class BackupResourceConfig(Model): Possible values include: 'Invalid', 'Locked', 'Unlocked' :type storage_type_state: str or ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState + :param cross_region_restore_flag: Opt in details of Cross Region Restore + feature. + :type cross_region_restore_flag: bool """ _attribute_map = { 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, 'storage_type': {'key': 'storageType', 'type': 'str'}, 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, + 'cross_region_restore_flag': {'key': 'crossRegionRestoreFlag', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -6044,6 +6103,7 @@ def __init__(self, **kwargs): self.storage_model_type = kwargs.get('storage_model_type', None) self.storage_type = kwargs.get('storage_type', None) self.storage_type_state = kwargs.get('storage_type_state', None) + self.cross_region_restore_flag = kwargs.get('cross_region_restore_flag', None) class BackupResourceConfigResource(Resource): @@ -6091,94 +6151,6 @@ def __init__(self, **kwargs): self.properties = kwargs.get('properties', None) -class BackupResourceVaultConfig(Model): - """Backup resource vault config details. - - :param storage_model_type: Storage type. Possible values include: - 'Invalid', 'GeoRedundant', 'LocallyRedundant' - :type storage_model_type: str or - ~azure.mgmt.recoveryservicesbackup.models.StorageType - :param storage_type: Storage type. Possible values include: 'Invalid', - 'GeoRedundant', 'LocallyRedundant' - :type storage_type: str or - ~azure.mgmt.recoveryservicesbackup.models.StorageType - :param storage_type_state: Locked or Unlocked. Once a machine is - registered against a resource, the storageTypeState is always Locked. - Possible values include: 'Invalid', 'Locked', 'Unlocked' - :type storage_type_state: str or - ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState - :param enhanced_security_state: Enabled or Disabled. Possible values - include: 'Invalid', 'Enabled', 'Disabled' - :type enhanced_security_state: str or - ~azure.mgmt.recoveryservicesbackup.models.EnhancedSecurityState - :param soft_delete_feature_state: Soft Delete feature state. Possible - values include: 'Invalid', 'Enabled', 'Disabled' - :type soft_delete_feature_state: str or - ~azure.mgmt.recoveryservicesbackup.models.SoftDeleteFeatureState - """ - - _attribute_map = { - 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, - 'enhanced_security_state': {'key': 'enhancedSecurityState', 'type': 'str'}, - 'soft_delete_feature_state': {'key': 'softDeleteFeatureState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(BackupResourceVaultConfig, self).__init__(**kwargs) - self.storage_model_type = kwargs.get('storage_model_type', None) - self.storage_type = kwargs.get('storage_type', None) - self.storage_type_state = kwargs.get('storage_type_state', None) - self.enhanced_security_state = kwargs.get('enhanced_security_state', None) - self.soft_delete_feature_state = kwargs.get('soft_delete_feature_state', None) - - -class BackupResourceVaultConfigResource(Resource): - """Backup resource vault config details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id represents the complete path to the resource. - :vartype id: str - :ivar name: Resource name associated with the resource. - :vartype name: str - :ivar type: Resource type represents the complete path of the form - Namespace/ResourceType/ResourceType/... - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param e_tag: Optional ETag. - :type e_tag: str - :param properties: BackupResourceVaultConfigResource properties - :type properties: - ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfig - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BackupResourceVaultConfig'}, - } - - def __init__(self, **kwargs): - super(BackupResourceVaultConfigResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - class BackupStatusRequest(Model): """BackupStatus request. @@ -6499,7 +6471,7 @@ class BMSRPQueryObject(Model): :type end_date: datetime :param restore_point_query_type: RestorePoint type. Possible values include: 'Invalid', 'Full', 'Log', 'Differential', 'FullAndDifferential', - 'All' + 'All', 'Incremental' :type restore_point_query_type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointQueryType :param extended_info: In Get Recovery Point, it tells whether extended @@ -6757,12 +6729,312 @@ def __init__(self, **kwargs): self.audience = kwargs.get('audience', None) -class DailyRetentionFormat(Model): - """Daily retention format. +class CrossRegionRestoreRequest(Model): + """CrossRegionRestoreRequest. - :param days_of_the_month: List of days of the month. - :type days_of_the_month: - list[~azure.mgmt.recoveryservicesbackup.models.Day] + :param cross_region_restore_access_details: Access details for cross + region restore + :type cross_region_restore_access_details: + ~azure.mgmt.recoveryservicesbackup.models.CrrAccessToken + :param restore_request: Request object for triggering restore + :type restore_request: + ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + """ + + _attribute_map = { + 'cross_region_restore_access_details': {'key': 'crossRegionRestoreAccessDetails', 'type': 'CrrAccessToken'}, + 'restore_request': {'key': 'restoreRequest', 'type': 'RestoreRequest'}, + } + + def __init__(self, **kwargs): + super(CrossRegionRestoreRequest, self).__init__(**kwargs) + self.cross_region_restore_access_details = kwargs.get('cross_region_restore_access_details', None) + self.restore_request = kwargs.get('restore_request', None) + + +class CrossRegionRestoreRequestResource(Resource): + """CrossRegionRestoreRequestResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: CrossRegionRestoreRequestResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.CrossRegionRestoreRequest + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CrossRegionRestoreRequest'}, + } + + def __init__(self, **kwargs): + super(CrossRegionRestoreRequestResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class CrrAccessToken(Model): + """CrrAccessToken. + + :param object_type: Type of the specific object - used for deserializing + :type object_type: str + :param access_token_string: Access token used for authentication + :type access_token_string: str + :param subscription_id: Subscription Id of the source vault + :type subscription_id: str + :param resource_group_name: Resource Group name of the source vault + :type resource_group_name: str + :param resource_name: Resource Name of the source vault + :type resource_name: str + :param resource_id: Resource Id of the source vault + :type resource_id: str + :param protection_container_id: Protected item container id + :type protection_container_id: long + :param recovery_point_id: Recovery Point Id + :type recovery_point_id: str + :param recovery_point_time: Recovery Point Time + :type recovery_point_time: str + :param container_name: Container Unique name + :type container_name: str + :param container_type: Container Type + :type container_type: str + :param backup_management_type: Backup Management Type + :type backup_management_type: str + :param datasource_type: Datasource Type + :type datasource_type: str + :param datasource_name: Datasource Friendly Name + :type datasource_name: str + :param datasource_id: Datasource Id + :type datasource_id: str + :param datasource_container_name: Datasource Container Unique Name + :type datasource_container_name: str + :param coordinator_service_stamp_id: CoordinatorServiceStampId to be used + by BCM in restore call + :type coordinator_service_stamp_id: str + :param coordinator_service_stamp_uri: CoordinatorServiceStampUri to be + used by BCM in restore call + :type coordinator_service_stamp_uri: str + :param protection_service_stamp_id: ProtectionServiceStampId to be used by + BCM in restore call + :type protection_service_stamp_id: str + :param protection_service_stamp_uri: ProtectionServiceStampUri to be used + by BCM in restore call + :type protection_service_stamp_uri: str + :param token_extended_information: Extended Information about the token + like FileSpec etc. + :type token_extended_information: str + :param rp_tier_information: Recovery point Tier Information + :type rp_tier_information: dict[str, str] + :param rp_original_sa_option: Recovery point information: Original SA + option + :type rp_original_sa_option: bool + :param rp_is_managed_virtual_machine: Recovery point information: Managed + virtual machine + :type rp_is_managed_virtual_machine: bool + :param rp_vm_size_description: Recovery point information: VM size + description + :type rp_vm_size_description: str + :param b_ms_active_region: Active region name of BMS Stamp + :type b_ms_active_region: str + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'access_token_string': {'key': 'accessTokenString', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'protection_container_id': {'key': 'protectionContainerId', 'type': 'long'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'datasource_type': {'key': 'datasourceType', 'type': 'str'}, + 'datasource_name': {'key': 'datasourceName', 'type': 'str'}, + 'datasource_id': {'key': 'datasourceId', 'type': 'str'}, + 'datasource_container_name': {'key': 'datasourceContainerName', 'type': 'str'}, + 'coordinator_service_stamp_id': {'key': 'coordinatorServiceStampId', 'type': 'str'}, + 'coordinator_service_stamp_uri': {'key': 'coordinatorServiceStampUri', 'type': 'str'}, + 'protection_service_stamp_id': {'key': 'protectionServiceStampId', 'type': 'str'}, + 'protection_service_stamp_uri': {'key': 'protectionServiceStampUri', 'type': 'str'}, + 'token_extended_information': {'key': 'tokenExtendedInformation', 'type': 'str'}, + 'rp_tier_information': {'key': 'rpTierInformation', 'type': '{str}'}, + 'rp_original_sa_option': {'key': 'rpOriginalSAOption', 'type': 'bool'}, + 'rp_is_managed_virtual_machine': {'key': 'rpIsManagedVirtualMachine', 'type': 'bool'}, + 'rp_vm_size_description': {'key': 'rpVMSizeDescription', 'type': 'str'}, + 'b_ms_active_region': {'key': 'bMSActiveRegion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CrrAccessToken, self).__init__(**kwargs) + self.object_type = kwargs.get('object_type', None) + self.access_token_string = kwargs.get('access_token_string', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.resource_name = kwargs.get('resource_name', None) + self.resource_id = kwargs.get('resource_id', None) + self.protection_container_id = kwargs.get('protection_container_id', None) + self.recovery_point_id = kwargs.get('recovery_point_id', None) + self.recovery_point_time = kwargs.get('recovery_point_time', None) + self.container_name = kwargs.get('container_name', None) + self.container_type = kwargs.get('container_type', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.datasource_type = kwargs.get('datasource_type', None) + self.datasource_name = kwargs.get('datasource_name', None) + self.datasource_id = kwargs.get('datasource_id', None) + self.datasource_container_name = kwargs.get('datasource_container_name', None) + self.coordinator_service_stamp_id = kwargs.get('coordinator_service_stamp_id', None) + self.coordinator_service_stamp_uri = kwargs.get('coordinator_service_stamp_uri', None) + self.protection_service_stamp_id = kwargs.get('protection_service_stamp_id', None) + self.protection_service_stamp_uri = kwargs.get('protection_service_stamp_uri', None) + self.token_extended_information = kwargs.get('token_extended_information', None) + self.rp_tier_information = kwargs.get('rp_tier_information', None) + self.rp_original_sa_option = kwargs.get('rp_original_sa_option', None) + self.rp_is_managed_virtual_machine = kwargs.get('rp_is_managed_virtual_machine', None) + self.rp_vm_size_description = kwargs.get('rp_vm_size_description', None) + self.b_ms_active_region = kwargs.get('b_ms_active_region', None) + + +class CrrAccessTokenResource(Resource): + """CrrAccessTokenResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: CrrAccessTokenResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.CrrAccessToken + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CrrAccessToken'}, + } + + def __init__(self, **kwargs): + super(CrrAccessTokenResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class CrrJobRequest(Model): + """Request object for fetching CRR jobs. + + :param resource_id: Entire ARM resource id of the resource + :type resource_id: str + :param job_name: Job Name of the job to be fetched + :type job_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'job_name': {'key': 'jobName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CrrJobRequest, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.job_name = kwargs.get('job_name', None) + + +class CrrJobRequestResource(Resource): + """Request object for fetching CRR jobs. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: CrrJobRequestResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.CrrJobRequest + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CrrJobRequest'}, + } + + def __init__(self, **kwargs): + super(CrrJobRequestResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class DailyRetentionFormat(Model): + """Daily retention format. + + :param days_of_the_month: List of days of the month. + :type days_of_the_month: + list[~azure.mgmt.recoveryservicesbackup.models.Day] """ _attribute_map = { @@ -8034,6 +8306,12 @@ class IaasVMRestoreRequest(RestoreRequest): ~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 """ _validation = { @@ -8057,6 +8335,8 @@ class IaasVMRestoreRequest(RestoreRequest): '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'}, } def __init__(self, **kwargs): @@ -8076,6 +8356,8 @@ def __init__(self, **kwargs): self.original_storage_account_option = kwargs.get('original_storage_account_option', None) self.encryption_details = kwargs.get('encryption_details', None) self.restore_disk_lun_list = kwargs.get('restore_disk_lun_list', None) + self.restore_with_managed_disks = kwargs.get('restore_with_managed_disks', None) + self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) self.object_type = 'IaasVMRestoreRequest' @@ -8235,7 +8517,8 @@ class JobQueryObject(Model): ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param operation: Type of operation. Possible values include: 'Invalid', 'Register', 'UnRegister', 'ConfigureBackup', 'Backup', 'Restore', - 'DisableBackup', 'DeleteBackupData', 'CrossRegionRestore', 'Undelete' + 'DisableBackup', 'DeleteBackupData', 'CrossRegionRestore', 'Undelete', + 'UpdateCustomerManagedKey' :type operation: str or ~azure.mgmt.recoveryservicesbackup.models.JobOperationType :param job_id: JobID represents the job uniquely. @@ -8364,6 +8647,30 @@ def __init__(self, **kwargs): self.encryption_mechanism = kwargs.get('encryption_mechanism', None) +class KPIResourceHealthDetails(Model): + """KPI Resource Health Details. + + :param resource_health_status: Resource Health Status. Possible values + include: 'Healthy', 'TransientDegraded', 'PersistentDegraded', + 'TransientUnhealthy', 'PersistentUnhealthy', 'Invalid' + :type resource_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ResourceHealthStatus + :param resource_health_details: Resource Health Status + :type resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.models.ResourceHealthDetails] + """ + + _attribute_map = { + 'resource_health_status': {'key': 'resourceHealthStatus', 'type': 'str'}, + 'resource_health_details': {'key': 'resourceHealthDetails', 'type': '[ResourceHealthDetails]'}, + } + + def __init__(self, **kwargs): + super(KPIResourceHealthDetails, self).__init__(**kwargs) + self.resource_health_status = kwargs.get('resource_health_status', None) + self.resource_health_details = kwargs.get('resource_health_details', None) + + class SchedulePolicy(Model): """Base class for backup schedule. @@ -9059,6 +9366,80 @@ def __init__(self, **kwargs): self.localized_value = kwargs.get('localized_value', None) +class NewErrorResponse(Model): + """The resource management error response. + + :param error: The error object. + :type error: + ~azure.mgmt.recoveryservicesbackup.models.NewErrorResponseError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'NewErrorResponseError'}, + } + + def __init__(self, **kwargs): + super(NewErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class NewErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'NewErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(NewErrorResponseException, self).__init__(deserialize, response, 'NewErrorResponse', *args) + + +class NewErrorResponseError(Model): + """The error object. + + 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.NewErrorResponse] + :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': '[NewErrorResponse]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__(self, **kwargs): + super(NewErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + class OperationResultInfo(OperationResultInfoBase): """Operation result info. @@ -9225,7 +9606,8 @@ class OperationStatusExtendedInfo(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: OperationStatusJobExtendedInfo, - OperationStatusJobsExtendedInfo, OperationStatusProvisionILRExtendedInfo + OperationStatusJobsExtendedInfo, OperationStatusProvisionILRExtendedInfo, + OperationStatusRecoveryPointExtendedInfo All required parameters must be populated in order to send to Azure. @@ -9242,7 +9624,7 @@ class OperationStatusExtendedInfo(Model): } _subtype_map = { - 'object_type': {'OperationStatusJobExtendedInfo': 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo': 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo': 'OperationStatusProvisionILRExtendedInfo'} + 'object_type': {'OperationStatusJobExtendedInfo': 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo': 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo': 'OperationStatusProvisionILRExtendedInfo', 'OperationStatusRecoveryPointExtendedInfo': 'OperationStatusRecoveryPointExtendedInfo'} } def __init__(self, **kwargs): @@ -9334,6 +9716,39 @@ def __init__(self, **kwargs): self.object_type = 'OperationStatusProvisionILRExtendedInfo' +class OperationStatusRecoveryPointExtendedInfo(OperationStatusExtendedInfo): + """Operation status extended info for Updated 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 updated_recovery_point: Recovery Point info with updated source + snapshot URI + :type updated_recovery_point: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPoint + :param deleted_backup_item_version: In case the share is in soft-deleted + state, populate this field with deleted backup item + :type deleted_backup_item_version: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'updated_recovery_point': {'key': 'updatedRecoveryPoint', 'type': 'RecoveryPoint'}, + 'deleted_backup_item_version': {'key': 'deletedBackupItemVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationStatusRecoveryPointExtendedInfo, self).__init__(**kwargs) + self.updated_recovery_point = kwargs.get('updated_recovery_point', None) + self.deleted_backup_item_version = kwargs.get('deleted_backup_item_version', None) + self.object_type = 'OperationStatusRecoveryPointExtendedInfo' + + class PointInTimeRange(Model): """Provides details for log ranges. @@ -9382,6 +9797,108 @@ def __init__(self, **kwargs): self.message = kwargs.get('message', None) +class PrepareDataMoveRequest(Model): + """Prepare DataMove Request. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. ARM Id of target vault + :type target_resource_id: str + :param target_region: Required. Target Region + :type target_region: str + :param data_move_level: Required. DataMove Level. Possible values include: + 'Invalid', 'Vault', 'Container' + :type data_move_level: str or + ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel + :param source_container_arm_ids: Source Container ArmIds + This needs to be populated only if DataMoveLevel is set to container + :type source_container_arm_ids: list[str] + :param ignore_moved: Ignore the artifacts which are already moved. + :type ignore_moved: bool + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'target_region': {'required': True}, + 'data_move_level': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'target_region': {'key': 'targetRegion', 'type': 'str'}, + 'data_move_level': {'key': 'dataMoveLevel', 'type': 'str'}, + 'source_container_arm_ids': {'key': 'sourceContainerArmIds', 'type': '[str]'}, + 'ignore_moved': {'key': 'ignoreMoved', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(PrepareDataMoveRequest, self).__init__(**kwargs) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.target_region = kwargs.get('target_region', None) + self.data_move_level = kwargs.get('data_move_level', None) + self.source_container_arm_ids = kwargs.get('source_container_arm_ids', None) + self.ignore_moved = kwargs.get('ignore_moved', None) + + +class VaultStorageConfigOperationResultResponse(Model): + """Operation result response for Vault Storage Config. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PrepareDataMoveResponse + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'PrepareDataMoveResponse': 'PrepareDataMoveResponse'} + } + + def __init__(self, **kwargs): + super(VaultStorageConfigOperationResultResponse, self).__init__(**kwargs) + self.object_type = None + + +class PrepareDataMoveResponse(VaultStorageConfigOperationResultResponse): + """Prepare DataMove Response. + + 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 correlation_id: Co-relationId for move operation + :type correlation_id: str + :param source_vault_properties: Source Vault Properties + :type source_vault_properties: dict[str, str] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'source_vault_properties': {'key': 'sourceVaultProperties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(PrepareDataMoveResponse, self).__init__(**kwargs) + self.correlation_id = kwargs.get('correlation_id', None) + self.source_vault_properties = kwargs.get('source_vault_properties', None) + self.object_type = 'PrepareDataMoveResponse' + + class PreValidateEnableBackupRequest(Model): """Contract to validate if backup can be enabled on the given resource in a given vault and given configuration. @@ -10300,7 +10817,7 @@ class SubProtectionPolicy(Model): """Sub-protection policy which includes schedule and retention. :param policy_type: Type of backup policy type. Possible values include: - 'Invalid', 'Full', 'Differential', 'Log', 'CopyOnlyFull' + 'Invalid', 'Full', 'Differential', 'Log', 'CopyOnlyFull', 'Incremental' :type policy_type: str or ~azure.mgmt.recoveryservicesbackup.models.PolicyType :param schedule_policy: Backup schedule specified as part of backup @@ -10403,6 +10920,53 @@ def __init__(self, **kwargs): self.security_pin = kwargs.get('security_pin', None) +class TriggerDataMoveRequest(Model): + """Trigger DataMove Request. + + All required parameters must be populated in order to send to Azure. + + :param source_resource_id: Required. ARM Id of source vault + :type source_resource_id: str + :param source_region: Required. Source Region + :type source_region: str + :param data_move_level: Required. DataMove Level. Possible values include: + 'Invalid', 'Vault', 'Container' + :type data_move_level: str or + ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel + :param correlation_id: Required. Correlation Id + :type correlation_id: str + :param source_container_arm_ids: Source Container ArmIds + :type source_container_arm_ids: list[str] + :param pause_gc: Pause GC + :type pause_gc: bool + """ + + _validation = { + 'source_resource_id': {'required': True}, + 'source_region': {'required': True}, + 'data_move_level': {'required': True}, + 'correlation_id': {'required': True}, + } + + _attribute_map = { + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'source_region': {'key': 'sourceRegion', 'type': 'str'}, + 'data_move_level': {'key': 'dataMoveLevel', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'source_container_arm_ids': {'key': 'sourceContainerArmIds', 'type': '[str]'}, + 'pause_gc': {'key': 'pauseGC', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(TriggerDataMoveRequest, self).__init__(**kwargs) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.source_region = kwargs.get('source_region', None) + self.data_move_level = kwargs.get('data_move_level', None) + self.correlation_id = kwargs.get('correlation_id', None) + self.source_container_arm_ids = kwargs.get('source_container_arm_ids', None) + self.pause_gc = kwargs.get('pause_gc', None) + + class ValidateOperationRequest(Model): """Base class for validate operation request. @@ -10526,6 +11090,115 @@ def __init__(self, **kwargs): self.validate_operation_response = kwargs.get('validate_operation_response', None) +class VaultJob(Job): + """Vault level Job. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time elapsed during the execution of this job. + :type duration: timedelta + :param actions_info: Gets or sets the state/actions applicable on this job + like cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param error_details: Error details on execution of this job. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.VaultJobErrorInfo] + :param extended_info: Additional information about the job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.VaultJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'error_details': {'key': 'errorDetails', 'type': '[VaultJobErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'VaultJobExtendedInfo'}, + } + + def __init__(self, **kwargs): + super(VaultJob, self).__init__(**kwargs) + self.duration = kwargs.get('duration', None) + self.actions_info = kwargs.get('actions_info', None) + self.error_details = kwargs.get('error_details', None) + self.extended_info = kwargs.get('extended_info', None) + self.job_type = 'VaultJob' + + +class VaultJobErrorInfo(Model): + """Vault Job specific error information. + + :param error_code: Error code. + :type error_code: int + :param error_string: Localized error string. + :type error_string: str + :param recommendations: List of localized recommendations for above error + code. + :type recommendations: list[str] + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VaultJobErrorInfo, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.error_string = kwargs.get('error_string', None) + self.recommendations = kwargs.get('recommendations', None) + + +class VaultJobExtendedInfo(Model): + """Vault Job for CMK - has CMK specific info. + + :param property_bag: Job properties. + :type property_bag: dict[str, str] + """ + + _attribute_map = { + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VaultJobExtendedInfo, self).__init__(**kwargs) + self.property_bag = kwargs.get('property_bag', None) + + class WeeklyRetentionFormat(Model): """Weekly retention format. @@ -10574,6 +11247,140 @@ def __init__(self, **kwargs): self.retention_duration = kwargs.get('retention_duration', None) +class WorkloadCrrAccessToken(CrrAccessToken): + """WorkloadCrrAccessToken. + + :param object_type: Type of the specific object - used for deserializing + :type object_type: str + :param access_token_string: Access token used for authentication + :type access_token_string: str + :param subscription_id: Subscription Id of the source vault + :type subscription_id: str + :param resource_group_name: Resource Group name of the source vault + :type resource_group_name: str + :param resource_name: Resource Name of the source vault + :type resource_name: str + :param resource_id: Resource Id of the source vault + :type resource_id: str + :param protection_container_id: Protected item container id + :type protection_container_id: long + :param recovery_point_id: Recovery Point Id + :type recovery_point_id: str + :param recovery_point_time: Recovery Point Time + :type recovery_point_time: str + :param container_name: Container Unique name + :type container_name: str + :param container_type: Container Type + :type container_type: str + :param backup_management_type: Backup Management Type + :type backup_management_type: str + :param datasource_type: Datasource Type + :type datasource_type: str + :param datasource_name: Datasource Friendly Name + :type datasource_name: str + :param datasource_id: Datasource Id + :type datasource_id: str + :param datasource_container_name: Datasource Container Unique Name + :type datasource_container_name: str + :param coordinator_service_stamp_id: CoordinatorServiceStampId to be used + by BCM in restore call + :type coordinator_service_stamp_id: str + :param coordinator_service_stamp_uri: CoordinatorServiceStampUri to be + used by BCM in restore call + :type coordinator_service_stamp_uri: str + :param protection_service_stamp_id: ProtectionServiceStampId to be used by + BCM in restore call + :type protection_service_stamp_id: str + :param protection_service_stamp_uri: ProtectionServiceStampUri to be used + by BCM in restore call + :type protection_service_stamp_uri: str + :param token_extended_information: Extended Information about the token + like FileSpec etc. + :type token_extended_information: str + :param rp_tier_information: Recovery point Tier Information + :type rp_tier_information: dict[str, str] + :param rp_original_sa_option: Recovery point information: Original SA + option + :type rp_original_sa_option: bool + :param rp_is_managed_virtual_machine: Recovery point information: Managed + virtual machine + :type rp_is_managed_virtual_machine: bool + :param rp_vm_size_description: Recovery point information: VM size + description + :type rp_vm_size_description: str + :param b_ms_active_region: Active region name of BMS Stamp + :type b_ms_active_region: str + :param protectable_object_unique_name: + :type protectable_object_unique_name: str + :param protectable_object_friendly_name: + :type protectable_object_friendly_name: str + :param protectable_object_workload_type: + :type protectable_object_workload_type: str + :param protectable_object_protection_state: + :type protectable_object_protection_state: str + :param protectable_object_container_host_os_name: + :type protectable_object_container_host_os_name: str + :param protectable_object_parent_logical_container_name: + :type protectable_object_parent_logical_container_name: str + :param container_id: Container Id + :type container_id: str + :param policy_name: Policy Name + :type policy_name: str + :param policy_id: Policy Id + :type policy_id: str + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'access_token_string': {'key': 'accessTokenString', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'protection_container_id': {'key': 'protectionContainerId', 'type': 'long'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'datasource_type': {'key': 'datasourceType', 'type': 'str'}, + 'datasource_name': {'key': 'datasourceName', 'type': 'str'}, + 'datasource_id': {'key': 'datasourceId', 'type': 'str'}, + 'datasource_container_name': {'key': 'datasourceContainerName', 'type': 'str'}, + 'coordinator_service_stamp_id': {'key': 'coordinatorServiceStampId', 'type': 'str'}, + 'coordinator_service_stamp_uri': {'key': 'coordinatorServiceStampUri', 'type': 'str'}, + 'protection_service_stamp_id': {'key': 'protectionServiceStampId', 'type': 'str'}, + 'protection_service_stamp_uri': {'key': 'protectionServiceStampUri', 'type': 'str'}, + 'token_extended_information': {'key': 'tokenExtendedInformation', 'type': 'str'}, + 'rp_tier_information': {'key': 'rpTierInformation', 'type': '{str}'}, + 'rp_original_sa_option': {'key': 'rpOriginalSAOption', 'type': 'bool'}, + 'rp_is_managed_virtual_machine': {'key': 'rpIsManagedVirtualMachine', 'type': 'bool'}, + 'rp_vm_size_description': {'key': 'rpVMSizeDescription', 'type': 'str'}, + 'b_ms_active_region': {'key': 'bMSActiveRegion', 'type': 'str'}, + 'protectable_object_unique_name': {'key': 'protectableObjectUniqueName', 'type': 'str'}, + 'protectable_object_friendly_name': {'key': 'protectableObjectFriendlyName', 'type': 'str'}, + 'protectable_object_workload_type': {'key': 'protectableObjectWorkloadType', 'type': 'str'}, + 'protectable_object_protection_state': {'key': 'protectableObjectProtectionState', 'type': 'str'}, + 'protectable_object_container_host_os_name': {'key': 'protectableObjectContainerHostOsName', 'type': 'str'}, + 'protectable_object_parent_logical_container_name': {'key': 'protectableObjectParentLogicalContainerName', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkloadCrrAccessToken, self).__init__(**kwargs) + self.protectable_object_unique_name = kwargs.get('protectable_object_unique_name', None) + self.protectable_object_friendly_name = kwargs.get('protectable_object_friendly_name', None) + self.protectable_object_workload_type = kwargs.get('protectable_object_workload_type', None) + self.protectable_object_protection_state = kwargs.get('protectable_object_protection_state', None) + self.protectable_object_container_host_os_name = kwargs.get('protectable_object_container_host_os_name', None) + self.protectable_object_parent_logical_container_name = kwargs.get('protectable_object_parent_logical_container_name', None) + self.container_id = kwargs.get('container_id', None) + self.policy_name = kwargs.get('policy_name', None) + self.policy_id = kwargs.get('policy_id', None) + + class WorkloadInquiryDetails(Model): """Details of an inquired protectable item. 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 f65b7770d307..1fd29a8292e4 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 @@ -13,6 +13,128 @@ from msrest.exceptions import HttpOperationError +class AADProperties(Model): + """AADProperties. + + :param service_principal_client_id: + :type service_principal_client_id: str + :param tenant_id: + :type tenant_id: str + :param authority: + :type authority: str + :param audience: + :type audience: str + :param service_principal_object_id: + :type service_principal_object_id: str + """ + + _attribute_map = { + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'authority': {'key': 'authority', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + 'service_principal_object_id': {'key': 'servicePrincipalObjectId', 'type': 'str'}, + } + + def __init__(self, *, service_principal_client_id: str=None, tenant_id: str=None, authority: str=None, audience: str=None, service_principal_object_id: str=None, **kwargs) -> None: + super(AADProperties, self).__init__(**kwargs) + self.service_principal_client_id = service_principal_client_id + self.tenant_id = tenant_id + self.authority = authority + self.audience = audience + self.service_principal_object_id = service_principal_object_id + + +class Resource(Model): + """ARM Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.e_tag = e_tag + + +class AADPropertiesResource(Resource): + """AADPropertiesResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: AADPropertiesResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.AADProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AADProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(AADPropertiesResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + class FeatureSupportRequest(Model): """Base class for feature request. @@ -742,24 +864,23 @@ class AzureFileshareProtectedItem(ProtectedItem): 'ProtectionStopped', 'ProtectionPaused' :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState - :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' - :type health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: - list[~azure.mgmt.recoveryservicesbackup.models.HealthDetails] :param last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. :type last_backup_status: str :param last_backup_time: Timestamp of the last backup operation on this backup item. :type last_backup_time: datetime + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] :param extended_info: Additional information with this backup item. :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo + :param health_status: backups running status for this backup item. + Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + 'Invalid' + :type health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.HealthStatus """ _validation = { @@ -784,23 +905,23 @@ class AzureFileshareProtectedItem(ProtectedItem): 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'health_details': {'key': 'healthDetails', 'type': '[HealthDetails]'}, 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureFileshareProtectedItemExtendedInfo'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, } - def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, protection_status: str=None, protection_state=None, health_status=None, health_details=None, last_backup_status: str=None, last_backup_time=None, extended_info=None, **kwargs) -> None: + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, protection_status: str=None, protection_state=None, last_backup_status: str=None, last_backup_time=None, kpis_healths=None, extended_info=None, health_status=None, **kwargs) -> None: super(AzureFileshareProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, **kwargs) self.friendly_name = friendly_name self.protection_status = protection_status self.protection_state = protection_state - self.health_status = health_status - self.health_details = health_details self.last_backup_status = last_backup_status self.last_backup_time = last_backup_time + self.kpis_healths = kpis_healths self.extended_info = extended_info + self.health_status = health_status self.protected_item_type = 'AzureFileShareProtectedItem' @@ -1435,14 +1556,15 @@ class AzureIaaSVMProtectedItem(ProtectedItem): :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' + include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus :param health_details: Health details on this backup item. :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] :param last_backup_status: Last backup operation status. :type last_backup_status: str :param last_backup_time: Timestamp of the last backup operation on this @@ -1483,6 +1605,7 @@ class AzureIaaSVMProtectedItem(ProtectedItem): 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, @@ -1494,7 +1617,7 @@ class AzureIaaSVMProtectedItem(ProtectedItem): 'protected_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectedItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectedItem'} } - def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, virtual_machine_id: str=None, protection_status: str=None, protection_state=None, health_status=None, health_details=None, last_backup_status: str=None, last_backup_time=None, protected_item_data_id: str=None, extended_info=None, extended_properties=None, **kwargs) -> None: + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, virtual_machine_id: str=None, protection_status: str=None, protection_state=None, health_status=None, health_details=None, kpis_healths=None, last_backup_status: str=None, last_backup_time=None, protected_item_data_id: str=None, extended_info=None, extended_properties=None, **kwargs) -> None: super(AzureIaaSVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, **kwargs) self.friendly_name = friendly_name self.virtual_machine_id = virtual_machine_id @@ -1502,6 +1625,7 @@ def __init__(self, *, backup_management_type=None, workload_type=None, container self.protection_state = protection_state self.health_status = health_status self.health_details = health_details + self.kpis_healths = kpis_healths self.last_backup_status = last_backup_status self.last_backup_time = last_backup_time self.protected_item_data_id = protected_item_data_id @@ -1575,14 +1699,15 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' + include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus :param health_details: Health details on this backup item. :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] :param last_backup_status: Last backup operation status. :type last_backup_status: str :param last_backup_time: Timestamp of the last backup operation on this @@ -1623,6 +1748,7 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, @@ -1630,8 +1756,8 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): 'extended_properties': {'key': 'extendedProperties', 'type': 'ExtendedProperties'}, } - def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, virtual_machine_id: str=None, protection_status: str=None, protection_state=None, health_status=None, health_details=None, last_backup_status: str=None, last_backup_time=None, protected_item_data_id: str=None, extended_info=None, extended_properties=None, **kwargs) -> None: - super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, extended_properties=extended_properties, **kwargs) + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, virtual_machine_id: str=None, protection_status: str=None, protection_state=None, health_status=None, health_details=None, kpis_healths=None, last_backup_status: str=None, last_backup_time=None, protected_item_data_id: str=None, extended_info=None, extended_properties=None, **kwargs) -> None: + super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, kpis_healths=kpis_healths, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, extended_properties=extended_properties, **kwargs) self.protected_item_type = 'Microsoft.ClassicCompute/virtualMachines' @@ -1794,14 +1920,15 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' + include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus :param health_details: Health details on this backup item. :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] :param last_backup_status: Last backup operation status. :type last_backup_status: str :param last_backup_time: Timestamp of the last backup operation on this @@ -1842,6 +1969,7 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, @@ -1849,8 +1977,8 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): 'extended_properties': {'key': 'extendedProperties', 'type': 'ExtendedProperties'}, } - def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, virtual_machine_id: str=None, protection_status: str=None, protection_state=None, health_status=None, health_details=None, last_backup_status: str=None, last_backup_time=None, protected_item_data_id: str=None, extended_info=None, extended_properties=None, **kwargs) -> None: - super(AzureIaaSComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, extended_properties=extended_properties, **kwargs) + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, virtual_machine_id: str=None, protection_status: str=None, protection_state=None, health_status=None, health_details=None, kpis_healths=None, last_backup_status: str=None, last_backup_time=None, protected_item_data_id: str=None, extended_info=None, extended_properties=None, **kwargs) -> None: + super(AzureIaaSComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, kpis_healths=kpis_healths, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, extended_properties=extended_properties, **kwargs) self.protected_item_type = 'Microsoft.Compute/virtualMachines' @@ -1894,7 +2022,7 @@ def __init__(self, **kwargs) -> None: self.recommendations = None -class HealthDetails(Model): +class ResourceHealthDetails(Model): """Health Details for backup items. Variables are only populated by the server, and will be ignored when @@ -1925,14 +2053,14 @@ class HealthDetails(Model): } def __init__(self, **kwargs) -> None: - super(HealthDetails, self).__init__(**kwargs) + super(ResourceHealthDetails, self).__init__(**kwargs) self.code = None self.title = None self.message = None self.recommendations = None -class AzureIaaSVMHealthDetails(HealthDetails): +class AzureIaaSVMHealthDetails(ResourceHealthDetails): """Azure IaaS VM workload-specific Health Details. Variables are only populated by the server, and will be ignored when @@ -1971,7 +2099,7 @@ class Job(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: AzureIaaSVMJob, AzureStorageJob, AzureWorkloadJob, DpmJob, - MabJob + MabJob, VaultJob All required parameters must be populated in order to send to Azure. @@ -2014,7 +2142,7 @@ class Job(Model): } _subtype_map = { - 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob'} + 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob', 'VaultJob': 'VaultJob'} } def __init__(self, *, entity_friendly_name: str=None, backup_management_type=None, operation: str=None, status: str=None, start_time=None, end_time=None, activity_id: str=None, **kwargs) -> None: @@ -3506,18 +3634,12 @@ class AzureVmWorkloadProtectedItem(ProtectedItem): 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' :type protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' - :type health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: - list[~azure.mgmt.recoveryservicesbackup.models.HealthDetails] :param extended_info: Additional information for this backup item. :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ _validation = { @@ -3550,16 +3672,15 @@ class AzureVmWorkloadProtectedItem(ProtectedItem): 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'health_details': {'key': 'healthDetails', 'type': '[HealthDetails]'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, } _subtype_map = { 'protected_item_type': {'AzureVmWorkloadSAPAseDatabase': 'AzureVmWorkloadSAPAseDatabaseProtectedItem', 'AzureVmWorkloadSAPHanaDatabase': 'AzureVmWorkloadSAPHanaDatabaseProtectedItem', 'AzureVmWorkloadSQLDatabase': 'AzureVmWorkloadSQLDatabaseProtectedItem'} } - def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, server_name: str=None, parent_name: str=None, parent_type: str=None, protection_status: str=None, protection_state=None, last_backup_status=None, last_backup_time=None, last_backup_error_detail=None, protected_item_data_source_id: str=None, protected_item_health_status=None, health_status=None, health_details=None, extended_info=None, **kwargs) -> None: + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, server_name: str=None, parent_name: str=None, parent_type: str=None, protection_status: str=None, protection_state=None, last_backup_status=None, last_backup_time=None, last_backup_error_detail=None, protected_item_data_source_id: str=None, protected_item_health_status=None, extended_info=None, kpis_healths=None, **kwargs) -> None: super(AzureVmWorkloadProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, **kwargs) self.friendly_name = friendly_name self.server_name = server_name @@ -3572,9 +3693,8 @@ def __init__(self, *, backup_management_type=None, workload_type=None, container self.last_backup_error_detail = last_backup_error_detail self.protected_item_data_source_id = protected_item_data_source_id self.protected_item_health_status = protected_item_health_status - self.health_status = health_status - self.health_details = health_details self.extended_info = extended_info + self.kpis_healths = kpis_healths self.protected_item_type = 'AzureVmWorkloadProtectedItem' @@ -3740,18 +3860,12 @@ class AzureVmWorkloadSAPAseDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' :type protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' - :type health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: - list[~azure.mgmt.recoveryservicesbackup.models.HealthDetails] :param extended_info: Additional information for this backup item. :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ _validation = { @@ -3784,13 +3898,12 @@ class AzureVmWorkloadSAPAseDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'health_details': {'key': 'healthDetails', 'type': '[HealthDetails]'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, } - def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, server_name: str=None, parent_name: str=None, parent_type: str=None, protection_status: str=None, protection_state=None, last_backup_status=None, last_backup_time=None, last_backup_error_detail=None, protected_item_data_source_id: str=None, protected_item_health_status=None, health_status=None, health_details=None, extended_info=None, **kwargs) -> None: - super(AzureVmWorkloadSAPAseDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, health_status=health_status, health_details=health_details, extended_info=extended_info, **kwargs) + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, server_name: str=None, parent_name: str=None, parent_type: str=None, protection_status: str=None, protection_state=None, last_backup_status=None, last_backup_time=None, last_backup_error_detail=None, protected_item_data_source_id: str=None, protected_item_health_status=None, extended_info=None, kpis_healths=None, **kwargs) -> None: + super(AzureVmWorkloadSAPAseDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) self.protected_item_type = 'AzureVmWorkloadSAPAseDatabase' @@ -4129,18 +4242,12 @@ class AzureVmWorkloadSAPHanaDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' :type protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' - :type health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: - list[~azure.mgmt.recoveryservicesbackup.models.HealthDetails] :param extended_info: Additional information for this backup item. :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ _validation = { @@ -4173,13 +4280,12 @@ class AzureVmWorkloadSAPHanaDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'health_details': {'key': 'healthDetails', 'type': '[HealthDetails]'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, } - def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, server_name: str=None, parent_name: str=None, parent_type: str=None, protection_status: str=None, protection_state=None, last_backup_status=None, last_backup_time=None, last_backup_error_detail=None, protected_item_data_source_id: str=None, protected_item_health_status=None, health_status=None, health_details=None, extended_info=None, **kwargs) -> None: - super(AzureVmWorkloadSAPHanaDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, health_status=health_status, health_details=health_details, extended_info=extended_info, **kwargs) + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, server_name: str=None, parent_name: str=None, parent_type: str=None, protection_status: str=None, protection_state=None, last_backup_status=None, last_backup_time=None, last_backup_error_detail=None, protected_item_data_source_id: str=None, protected_item_health_status=None, extended_info=None, kpis_healths=None, **kwargs) -> None: + super(AzureVmWorkloadSAPHanaDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) self.protected_item_type = 'AzureVmWorkloadSAPHanaDatabase' @@ -4588,18 +4694,12 @@ class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' :type protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param health_status: Health status of protected item. Possible values - include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Healthy', - 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', - 'PersistentUnhealthy', 'Invalid' - :type health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: - list[~azure.mgmt.recoveryservicesbackup.models.HealthDetails] :param extended_info: Additional information for this backup item. :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :param kpis_healths: Health details of different KPIs + :type kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ _validation = { @@ -4632,13 +4732,12 @@ class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'health_details': {'key': 'healthDetails', 'type': '[HealthDetails]'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, } - def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, server_name: str=None, parent_name: str=None, parent_type: str=None, protection_status: str=None, protection_state=None, last_backup_status=None, last_backup_time=None, last_backup_error_detail=None, protected_item_data_source_id: str=None, protected_item_health_status=None, health_status=None, health_details=None, extended_info=None, **kwargs) -> None: - super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, health_status=health_status, health_details=health_details, extended_info=extended_info, **kwargs) + def __init__(self, *, backup_management_type=None, workload_type=None, container_name: str=None, source_resource_id: str=None, policy_id: str=None, last_recovery_point=None, backup_set_name: str=None, create_mode=None, deferred_delete_time_in_utc=None, is_scheduled_for_deferred_delete: bool=None, deferred_delete_time_remaining: str=None, is_deferred_delete_schedule_upcoming: bool=None, is_rehydrate: bool=None, friendly_name: str=None, server_name: str=None, parent_name: str=None, parent_type: str=None, protection_status: str=None, protection_state=None, last_backup_status=None, last_backup_time=None, last_backup_error_detail=None, protected_item_data_source_id: str=None, protected_item_health_status=None, extended_info=None, kpis_healths=None, **kwargs) -> None: + super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) self.protected_item_type = 'AzureVmWorkloadSQLDatabase' @@ -4888,7 +4987,7 @@ class AzureWorkloadBackupRequest(BackupRequest): :type object_type: str :param backup_type: Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible values include: 'Invalid', 'Full', 'Differential', - 'Log', 'CopyOnlyFull' + 'Log', 'CopyOnlyFull', 'Incremental' :type backup_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupType :param enable_compression: Bool for Compression setting @@ -5114,7 +5213,7 @@ class AzureWorkloadRecoveryPoint(RecoveryPoint): created :vartype recovery_point_time_in_utc: datetime :ivar type: Type of restore point. Possible values include: 'Invalid', - 'Full', 'Log', 'Differential' + 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType """ @@ -5159,7 +5258,7 @@ class AzureWorkloadPointInTimeRecoveryPoint(AzureWorkloadRecoveryPoint): created :vartype recovery_point_time_in_utc: datetime :ivar type: Type of restore point. Possible values include: 'Invalid', - 'Full', 'Log', 'Differential' + 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType :param time_ranges: List of log ranges @@ -5312,7 +5411,7 @@ class AzureWorkloadSAPHanaPointInTimeRecoveryPoint(AzureWorkloadPointInTimeRecov created :vartype recovery_point_time_in_utc: datetime :ivar type: Type of restore point. Possible values include: 'Invalid', - 'Full', 'Log', 'Differential' + 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType :param time_ranges: List of log ranges @@ -5455,7 +5554,7 @@ class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): created :vartype recovery_point_time_in_utc: datetime :ivar type: Type of restore point. Possible values include: 'Invalid', - 'Full', 'Log', 'Differential' + 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType """ @@ -5549,7 +5648,7 @@ class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): created :vartype recovery_point_time_in_utc: datetime :ivar type: Type of restore point. Possible values include: 'Invalid', - 'Full', 'Log', 'Differential' + 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType :param extended_info: Extended Info that provides data directory details. @@ -5598,7 +5697,7 @@ class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): created :vartype recovery_point_time_in_utc: datetime :ivar type: Type of restore point. Possible values include: 'Invalid', - 'Full', 'Log', 'Differential' + 'Full', 'Log', 'Differential', 'Incremental' :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType :param extended_info: Extended Info that provides data directory details. @@ -5793,52 +5892,6 @@ def __init__(self, **kwargs) -> None: self.data_directory_paths = None -class Resource(Model): - """ARM Resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id represents the complete path to the resource. - :vartype id: str - :ivar name: Resource name associated with the resource. - :vartype name: str - :ivar type: Resource type represents the complete path of the form - Namespace/ResourceType/ResourceType/... - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param e_tag: Optional ETag. - :type e_tag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, e_tag: str=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - self.e_tag = e_tag - - class BackupEngineBaseResource(Resource): """The base backup engine class. All workload specific backup engines derive from this class. @@ -6019,11 +6072,13 @@ class BackupResourceConfig(Model): """The resource storage details. :param storage_model_type: Storage type. Possible values include: - 'Invalid', 'GeoRedundant', 'LocallyRedundant' + 'Invalid', 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', + 'ReadAccessGeoZoneRedundant' :type storage_model_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType :param storage_type: Storage type. Possible values include: 'Invalid', - 'GeoRedundant', 'LocallyRedundant' + 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', + 'ReadAccessGeoZoneRedundant' :type storage_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType :param storage_type_state: Locked or Unlocked. Once a machine is @@ -6031,19 +6086,24 @@ class BackupResourceConfig(Model): Possible values include: 'Invalid', 'Locked', 'Unlocked' :type storage_type_state: str or ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState + :param cross_region_restore_flag: Opt in details of Cross Region Restore + feature. + :type cross_region_restore_flag: bool """ _attribute_map = { 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, 'storage_type': {'key': 'storageType', 'type': 'str'}, 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, + 'cross_region_restore_flag': {'key': 'crossRegionRestoreFlag', 'type': 'bool'}, } - def __init__(self, *, storage_model_type=None, storage_type=None, storage_type_state=None, **kwargs) -> None: + def __init__(self, *, storage_model_type=None, storage_type=None, storage_type_state=None, cross_region_restore_flag: bool=None, **kwargs) -> None: super(BackupResourceConfig, self).__init__(**kwargs) self.storage_model_type = storage_model_type self.storage_type = storage_type self.storage_type_state = storage_type_state + self.cross_region_restore_flag = cross_region_restore_flag class BackupResourceConfigResource(Resource): @@ -6091,94 +6151,6 @@ def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties self.properties = properties -class BackupResourceVaultConfig(Model): - """Backup resource vault config details. - - :param storage_model_type: Storage type. Possible values include: - 'Invalid', 'GeoRedundant', 'LocallyRedundant' - :type storage_model_type: str or - ~azure.mgmt.recoveryservicesbackup.models.StorageType - :param storage_type: Storage type. Possible values include: 'Invalid', - 'GeoRedundant', 'LocallyRedundant' - :type storage_type: str or - ~azure.mgmt.recoveryservicesbackup.models.StorageType - :param storage_type_state: Locked or Unlocked. Once a machine is - registered against a resource, the storageTypeState is always Locked. - Possible values include: 'Invalid', 'Locked', 'Unlocked' - :type storage_type_state: str or - ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState - :param enhanced_security_state: Enabled or Disabled. Possible values - include: 'Invalid', 'Enabled', 'Disabled' - :type enhanced_security_state: str or - ~azure.mgmt.recoveryservicesbackup.models.EnhancedSecurityState - :param soft_delete_feature_state: Soft Delete feature state. Possible - values include: 'Invalid', 'Enabled', 'Disabled' - :type soft_delete_feature_state: str or - ~azure.mgmt.recoveryservicesbackup.models.SoftDeleteFeatureState - """ - - _attribute_map = { - 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, - 'enhanced_security_state': {'key': 'enhancedSecurityState', 'type': 'str'}, - 'soft_delete_feature_state': {'key': 'softDeleteFeatureState', 'type': 'str'}, - } - - def __init__(self, *, storage_model_type=None, storage_type=None, storage_type_state=None, enhanced_security_state=None, soft_delete_feature_state=None, **kwargs) -> None: - super(BackupResourceVaultConfig, self).__init__(**kwargs) - self.storage_model_type = storage_model_type - self.storage_type = storage_type - self.storage_type_state = storage_type_state - self.enhanced_security_state = enhanced_security_state - self.soft_delete_feature_state = soft_delete_feature_state - - -class BackupResourceVaultConfigResource(Resource): - """Backup resource vault config details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id represents the complete path to the resource. - :vartype id: str - :ivar name: Resource name associated with the resource. - :vartype name: str - :ivar type: Resource type represents the complete path of the form - Namespace/ResourceType/ResourceType/... - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param e_tag: Optional ETag. - :type e_tag: str - :param properties: BackupResourceVaultConfigResource properties - :type properties: - ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfig - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BackupResourceVaultConfig'}, - } - - def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: - super(BackupResourceVaultConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - class BackupStatusRequest(Model): """BackupStatus request. @@ -6499,7 +6471,7 @@ class BMSRPQueryObject(Model): :type end_date: datetime :param restore_point_query_type: RestorePoint type. Possible values include: 'Invalid', 'Full', 'Log', 'Differential', 'FullAndDifferential', - 'All' + 'All', 'Incremental' :type restore_point_query_type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointQueryType :param extended_info: In Get Recovery Point, it tells whether extended @@ -6757,12 +6729,312 @@ def __init__(self, *, unique_name: str=None, aad_tenant_id: str=None, service_pr self.audience = audience -class DailyRetentionFormat(Model): - """Daily retention format. +class CrossRegionRestoreRequest(Model): + """CrossRegionRestoreRequest. - :param days_of_the_month: List of days of the month. - :type days_of_the_month: - list[~azure.mgmt.recoveryservicesbackup.models.Day] + :param cross_region_restore_access_details: Access details for cross + region restore + :type cross_region_restore_access_details: + ~azure.mgmt.recoveryservicesbackup.models.CrrAccessToken + :param restore_request: Request object for triggering restore + :type restore_request: + ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + """ + + _attribute_map = { + 'cross_region_restore_access_details': {'key': 'crossRegionRestoreAccessDetails', 'type': 'CrrAccessToken'}, + 'restore_request': {'key': 'restoreRequest', 'type': 'RestoreRequest'}, + } + + def __init__(self, *, cross_region_restore_access_details=None, restore_request=None, **kwargs) -> None: + super(CrossRegionRestoreRequest, self).__init__(**kwargs) + self.cross_region_restore_access_details = cross_region_restore_access_details + self.restore_request = restore_request + + +class CrossRegionRestoreRequestResource(Resource): + """CrossRegionRestoreRequestResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: CrossRegionRestoreRequestResource properties + :type properties: + ~azure.mgmt.recoveryservicesbackup.models.CrossRegionRestoreRequest + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CrossRegionRestoreRequest'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(CrossRegionRestoreRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class CrrAccessToken(Model): + """CrrAccessToken. + + :param object_type: Type of the specific object - used for deserializing + :type object_type: str + :param access_token_string: Access token used for authentication + :type access_token_string: str + :param subscription_id: Subscription Id of the source vault + :type subscription_id: str + :param resource_group_name: Resource Group name of the source vault + :type resource_group_name: str + :param resource_name: Resource Name of the source vault + :type resource_name: str + :param resource_id: Resource Id of the source vault + :type resource_id: str + :param protection_container_id: Protected item container id + :type protection_container_id: long + :param recovery_point_id: Recovery Point Id + :type recovery_point_id: str + :param recovery_point_time: Recovery Point Time + :type recovery_point_time: str + :param container_name: Container Unique name + :type container_name: str + :param container_type: Container Type + :type container_type: str + :param backup_management_type: Backup Management Type + :type backup_management_type: str + :param datasource_type: Datasource Type + :type datasource_type: str + :param datasource_name: Datasource Friendly Name + :type datasource_name: str + :param datasource_id: Datasource Id + :type datasource_id: str + :param datasource_container_name: Datasource Container Unique Name + :type datasource_container_name: str + :param coordinator_service_stamp_id: CoordinatorServiceStampId to be used + by BCM in restore call + :type coordinator_service_stamp_id: str + :param coordinator_service_stamp_uri: CoordinatorServiceStampUri to be + used by BCM in restore call + :type coordinator_service_stamp_uri: str + :param protection_service_stamp_id: ProtectionServiceStampId to be used by + BCM in restore call + :type protection_service_stamp_id: str + :param protection_service_stamp_uri: ProtectionServiceStampUri to be used + by BCM in restore call + :type protection_service_stamp_uri: str + :param token_extended_information: Extended Information about the token + like FileSpec etc. + :type token_extended_information: str + :param rp_tier_information: Recovery point Tier Information + :type rp_tier_information: dict[str, str] + :param rp_original_sa_option: Recovery point information: Original SA + option + :type rp_original_sa_option: bool + :param rp_is_managed_virtual_machine: Recovery point information: Managed + virtual machine + :type rp_is_managed_virtual_machine: bool + :param rp_vm_size_description: Recovery point information: VM size + description + :type rp_vm_size_description: str + :param b_ms_active_region: Active region name of BMS Stamp + :type b_ms_active_region: str + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'access_token_string': {'key': 'accessTokenString', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'protection_container_id': {'key': 'protectionContainerId', 'type': 'long'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'datasource_type': {'key': 'datasourceType', 'type': 'str'}, + 'datasource_name': {'key': 'datasourceName', 'type': 'str'}, + 'datasource_id': {'key': 'datasourceId', 'type': 'str'}, + 'datasource_container_name': {'key': 'datasourceContainerName', 'type': 'str'}, + 'coordinator_service_stamp_id': {'key': 'coordinatorServiceStampId', 'type': 'str'}, + 'coordinator_service_stamp_uri': {'key': 'coordinatorServiceStampUri', 'type': 'str'}, + 'protection_service_stamp_id': {'key': 'protectionServiceStampId', 'type': 'str'}, + 'protection_service_stamp_uri': {'key': 'protectionServiceStampUri', 'type': 'str'}, + 'token_extended_information': {'key': 'tokenExtendedInformation', 'type': 'str'}, + 'rp_tier_information': {'key': 'rpTierInformation', 'type': '{str}'}, + 'rp_original_sa_option': {'key': 'rpOriginalSAOption', 'type': 'bool'}, + 'rp_is_managed_virtual_machine': {'key': 'rpIsManagedVirtualMachine', 'type': 'bool'}, + 'rp_vm_size_description': {'key': 'rpVMSizeDescription', 'type': 'str'}, + 'b_ms_active_region': {'key': 'bMSActiveRegion', 'type': 'str'}, + } + + def __init__(self, *, object_type: str=None, access_token_string: str=None, subscription_id: str=None, resource_group_name: str=None, resource_name: str=None, resource_id: str=None, protection_container_id: int=None, recovery_point_id: str=None, recovery_point_time: str=None, container_name: str=None, container_type: str=None, backup_management_type: str=None, datasource_type: str=None, datasource_name: str=None, datasource_id: str=None, datasource_container_name: str=None, coordinator_service_stamp_id: str=None, coordinator_service_stamp_uri: str=None, protection_service_stamp_id: str=None, protection_service_stamp_uri: str=None, token_extended_information: str=None, rp_tier_information=None, rp_original_sa_option: bool=None, rp_is_managed_virtual_machine: bool=None, rp_vm_size_description: str=None, b_ms_active_region: str=None, **kwargs) -> None: + super(CrrAccessToken, self).__init__(**kwargs) + self.object_type = object_type + self.access_token_string = access_token_string + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.resource_name = resource_name + self.resource_id = resource_id + self.protection_container_id = protection_container_id + self.recovery_point_id = recovery_point_id + self.recovery_point_time = recovery_point_time + self.container_name = container_name + self.container_type = container_type + self.backup_management_type = backup_management_type + self.datasource_type = datasource_type + self.datasource_name = datasource_name + self.datasource_id = datasource_id + self.datasource_container_name = datasource_container_name + self.coordinator_service_stamp_id = coordinator_service_stamp_id + self.coordinator_service_stamp_uri = coordinator_service_stamp_uri + self.protection_service_stamp_id = protection_service_stamp_id + self.protection_service_stamp_uri = protection_service_stamp_uri + self.token_extended_information = token_extended_information + self.rp_tier_information = rp_tier_information + self.rp_original_sa_option = rp_original_sa_option + self.rp_is_managed_virtual_machine = rp_is_managed_virtual_machine + self.rp_vm_size_description = rp_vm_size_description + self.b_ms_active_region = b_ms_active_region + + +class CrrAccessTokenResource(Resource): + """CrrAccessTokenResource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: CrrAccessTokenResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.CrrAccessToken + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CrrAccessToken'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(CrrAccessTokenResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class CrrJobRequest(Model): + """Request object for fetching CRR jobs. + + :param resource_id: Entire ARM resource id of the resource + :type resource_id: str + :param job_name: Job Name of the job to be fetched + :type job_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'job_name': {'key': 'jobName', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, job_name: str=None, **kwargs) -> None: + super(CrrJobRequest, self).__init__(**kwargs) + self.resource_id = resource_id + self.job_name = job_name + + +class CrrJobRequestResource(Resource): + """Request object for fetching CRR jobs. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: CrrJobRequestResource properties + :type properties: ~azure.mgmt.recoveryservicesbackup.models.CrrJobRequest + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CrrJobRequest'}, + } + + def __init__(self, *, location: str=None, tags=None, e_tag: str=None, properties=None, **kwargs) -> None: + super(CrrJobRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class DailyRetentionFormat(Model): + """Daily retention format. + + :param days_of_the_month: List of days of the month. + :type days_of_the_month: + list[~azure.mgmt.recoveryservicesbackup.models.Day] """ _attribute_map = { @@ -8034,6 +8306,12 @@ class IaasVMRestoreRequest(RestoreRequest): ~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 """ _validation = { @@ -8057,9 +8335,11 @@ class IaasVMRestoreRequest(RestoreRequest): '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'}, } - 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, **kwargs) -> None: + 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, **kwargs) -> None: super(IaasVMRestoreRequest, self).__init__(**kwargs) self.recovery_point_id = recovery_point_id self.recovery_type = recovery_type @@ -8076,6 +8356,8 @@ def __init__(self, *, recovery_point_id: str=None, recovery_type=None, source_re self.original_storage_account_option = original_storage_account_option self.encryption_details = encryption_details self.restore_disk_lun_list = restore_disk_lun_list + self.restore_with_managed_disks = restore_with_managed_disks + self.disk_encryption_set_id = disk_encryption_set_id self.object_type = 'IaasVMRestoreRequest' @@ -8235,7 +8517,8 @@ class JobQueryObject(Model): ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType :param operation: Type of operation. Possible values include: 'Invalid', 'Register', 'UnRegister', 'ConfigureBackup', 'Backup', 'Restore', - 'DisableBackup', 'DeleteBackupData', 'CrossRegionRestore', 'Undelete' + 'DisableBackup', 'DeleteBackupData', 'CrossRegionRestore', 'Undelete', + 'UpdateCustomerManagedKey' :type operation: str or ~azure.mgmt.recoveryservicesbackup.models.JobOperationType :param job_id: JobID represents the job uniquely. @@ -8364,6 +8647,30 @@ def __init__(self, *, kek_details=None, bek_details=None, encryption_mechanism: self.encryption_mechanism = encryption_mechanism +class KPIResourceHealthDetails(Model): + """KPI Resource Health Details. + + :param resource_health_status: Resource Health Status. Possible values + include: 'Healthy', 'TransientDegraded', 'PersistentDegraded', + 'TransientUnhealthy', 'PersistentUnhealthy', 'Invalid' + :type resource_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ResourceHealthStatus + :param resource_health_details: Resource Health Status + :type resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.models.ResourceHealthDetails] + """ + + _attribute_map = { + 'resource_health_status': {'key': 'resourceHealthStatus', 'type': 'str'}, + 'resource_health_details': {'key': 'resourceHealthDetails', 'type': '[ResourceHealthDetails]'}, + } + + def __init__(self, *, resource_health_status=None, resource_health_details=None, **kwargs) -> None: + super(KPIResourceHealthDetails, self).__init__(**kwargs) + self.resource_health_status = resource_health_status + self.resource_health_details = resource_health_details + + class SchedulePolicy(Model): """Base class for backup schedule. @@ -9059,6 +9366,80 @@ def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> N self.localized_value = localized_value +class NewErrorResponse(Model): + """The resource management error response. + + :param error: The error object. + :type error: + ~azure.mgmt.recoveryservicesbackup.models.NewErrorResponseError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'NewErrorResponseError'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(NewErrorResponse, self).__init__(**kwargs) + self.error = error + + +class NewErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'NewErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(NewErrorResponseException, self).__init__(deserialize, response, 'NewErrorResponse', *args) + + +class NewErrorResponseError(Model): + """The error object. + + 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.NewErrorResponse] + :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': '[NewErrorResponse]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__(self, **kwargs) -> None: + super(NewErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + class OperationResultInfo(OperationResultInfoBase): """Operation result info. @@ -9225,7 +9606,8 @@ class OperationStatusExtendedInfo(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: OperationStatusJobExtendedInfo, - OperationStatusJobsExtendedInfo, OperationStatusProvisionILRExtendedInfo + OperationStatusJobsExtendedInfo, OperationStatusProvisionILRExtendedInfo, + OperationStatusRecoveryPointExtendedInfo All required parameters must be populated in order to send to Azure. @@ -9242,7 +9624,7 @@ class OperationStatusExtendedInfo(Model): } _subtype_map = { - 'object_type': {'OperationStatusJobExtendedInfo': 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo': 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo': 'OperationStatusProvisionILRExtendedInfo'} + 'object_type': {'OperationStatusJobExtendedInfo': 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo': 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo': 'OperationStatusProvisionILRExtendedInfo', 'OperationStatusRecoveryPointExtendedInfo': 'OperationStatusRecoveryPointExtendedInfo'} } def __init__(self, **kwargs) -> None: @@ -9334,6 +9716,39 @@ def __init__(self, *, recovery_target=None, **kwargs) -> None: self.object_type = 'OperationStatusProvisionILRExtendedInfo' +class OperationStatusRecoveryPointExtendedInfo(OperationStatusExtendedInfo): + """Operation status extended info for Updated 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 updated_recovery_point: Recovery Point info with updated source + snapshot URI + :type updated_recovery_point: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPoint + :param deleted_backup_item_version: In case the share is in soft-deleted + state, populate this field with deleted backup item + :type deleted_backup_item_version: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'updated_recovery_point': {'key': 'updatedRecoveryPoint', 'type': 'RecoveryPoint'}, + 'deleted_backup_item_version': {'key': 'deletedBackupItemVersion', 'type': 'str'}, + } + + def __init__(self, *, updated_recovery_point=None, deleted_backup_item_version: str=None, **kwargs) -> None: + super(OperationStatusRecoveryPointExtendedInfo, self).__init__(**kwargs) + self.updated_recovery_point = updated_recovery_point + self.deleted_backup_item_version = deleted_backup_item_version + self.object_type = 'OperationStatusRecoveryPointExtendedInfo' + + class PointInTimeRange(Model): """Provides details for log ranges. @@ -9382,6 +9797,108 @@ def __init__(self, *, status=None, code: str=None, message: str=None, **kwargs) self.message = message +class PrepareDataMoveRequest(Model): + """Prepare DataMove Request. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. ARM Id of target vault + :type target_resource_id: str + :param target_region: Required. Target Region + :type target_region: str + :param data_move_level: Required. DataMove Level. Possible values include: + 'Invalid', 'Vault', 'Container' + :type data_move_level: str or + ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel + :param source_container_arm_ids: Source Container ArmIds + This needs to be populated only if DataMoveLevel is set to container + :type source_container_arm_ids: list[str] + :param ignore_moved: Ignore the artifacts which are already moved. + :type ignore_moved: bool + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'target_region': {'required': True}, + 'data_move_level': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'target_region': {'key': 'targetRegion', 'type': 'str'}, + 'data_move_level': {'key': 'dataMoveLevel', 'type': 'str'}, + 'source_container_arm_ids': {'key': 'sourceContainerArmIds', 'type': '[str]'}, + 'ignore_moved': {'key': 'ignoreMoved', 'type': 'bool'}, + } + + def __init__(self, *, target_resource_id: str, target_region: str, data_move_level, source_container_arm_ids=None, ignore_moved: bool=None, **kwargs) -> None: + super(PrepareDataMoveRequest, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + self.target_region = target_region + self.data_move_level = data_move_level + self.source_container_arm_ids = source_container_arm_ids + self.ignore_moved = ignore_moved + + +class VaultStorageConfigOperationResultResponse(Model): + """Operation result response for Vault Storage Config. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PrepareDataMoveResponse + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'PrepareDataMoveResponse': 'PrepareDataMoveResponse'} + } + + def __init__(self, **kwargs) -> None: + super(VaultStorageConfigOperationResultResponse, self).__init__(**kwargs) + self.object_type = None + + +class PrepareDataMoveResponse(VaultStorageConfigOperationResultResponse): + """Prepare DataMove Response. + + 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 correlation_id: Co-relationId for move operation + :type correlation_id: str + :param source_vault_properties: Source Vault Properties + :type source_vault_properties: dict[str, str] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'source_vault_properties': {'key': 'sourceVaultProperties', 'type': '{str}'}, + } + + def __init__(self, *, correlation_id: str=None, source_vault_properties=None, **kwargs) -> None: + super(PrepareDataMoveResponse, self).__init__(**kwargs) + self.correlation_id = correlation_id + self.source_vault_properties = source_vault_properties + self.object_type = 'PrepareDataMoveResponse' + + class PreValidateEnableBackupRequest(Model): """Contract to validate if backup can be enabled on the given resource in a given vault and given configuration. @@ -10300,7 +10817,7 @@ class SubProtectionPolicy(Model): """Sub-protection policy which includes schedule and retention. :param policy_type: Type of backup policy type. Possible values include: - 'Invalid', 'Full', 'Differential', 'Log', 'CopyOnlyFull' + 'Invalid', 'Full', 'Differential', 'Log', 'CopyOnlyFull', 'Incremental' :type policy_type: str or ~azure.mgmt.recoveryservicesbackup.models.PolicyType :param schedule_policy: Backup schedule specified as part of backup @@ -10403,6 +10920,53 @@ def __init__(self, *, token: str=None, expiry_time_in_utc_ticks: int=None, secur self.security_pin = security_pin +class TriggerDataMoveRequest(Model): + """Trigger DataMove Request. + + All required parameters must be populated in order to send to Azure. + + :param source_resource_id: Required. ARM Id of source vault + :type source_resource_id: str + :param source_region: Required. Source Region + :type source_region: str + :param data_move_level: Required. DataMove Level. Possible values include: + 'Invalid', 'Vault', 'Container' + :type data_move_level: str or + ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel + :param correlation_id: Required. Correlation Id + :type correlation_id: str + :param source_container_arm_ids: Source Container ArmIds + :type source_container_arm_ids: list[str] + :param pause_gc: Pause GC + :type pause_gc: bool + """ + + _validation = { + 'source_resource_id': {'required': True}, + 'source_region': {'required': True}, + 'data_move_level': {'required': True}, + 'correlation_id': {'required': True}, + } + + _attribute_map = { + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'source_region': {'key': 'sourceRegion', 'type': 'str'}, + 'data_move_level': {'key': 'dataMoveLevel', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'source_container_arm_ids': {'key': 'sourceContainerArmIds', 'type': '[str]'}, + 'pause_gc': {'key': 'pauseGC', 'type': 'bool'}, + } + + def __init__(self, *, source_resource_id: str, source_region: str, data_move_level, correlation_id: str, source_container_arm_ids=None, pause_gc: bool=None, **kwargs) -> None: + super(TriggerDataMoveRequest, self).__init__(**kwargs) + self.source_resource_id = source_resource_id + self.source_region = source_region + self.data_move_level = data_move_level + self.correlation_id = correlation_id + self.source_container_arm_ids = source_container_arm_ids + self.pause_gc = pause_gc + + class ValidateOperationRequest(Model): """Base class for validate operation request. @@ -10526,6 +11090,115 @@ def __init__(self, *, validate_operation_response=None, **kwargs) -> None: self.validate_operation_response = validate_operation_response +class VaultJob(Job): + """Vault level Job. + + All required parameters must be populated in order to send to Azure. + + :param entity_friendly_name: Friendly name of the entity on which the + current job is executing. + :type entity_friendly_name: str + :param backup_management_type: Backup management type to execute the + current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', + 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + 'DefaultBackup' + :type backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :param operation: The operation name. + :type operation: str + :param status: Job status. + :type status: str + :param start_time: The start time. + :type start_time: datetime + :param end_time: The end time. + :type end_time: datetime + :param activity_id: ActivityId of job. + :type activity_id: str + :param job_type: Required. Constant filled by server. + :type job_type: str + :param duration: Time elapsed during the execution of this job. + :type duration: timedelta + :param actions_info: Gets or sets the state/actions applicable on this job + like cancel/retry. + :type actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :param error_details: Error details on execution of this job. + :type error_details: + list[~azure.mgmt.recoveryservicesbackup.models.VaultJobErrorInfo] + :param extended_info: Additional information about the job. + :type extended_info: + ~azure.mgmt.recoveryservicesbackup.models.VaultJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[JobSupportedAction]'}, + 'error_details': {'key': 'errorDetails', 'type': '[VaultJobErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'VaultJobExtendedInfo'}, + } + + def __init__(self, *, entity_friendly_name: str=None, backup_management_type=None, operation: str=None, status: str=None, start_time=None, end_time=None, activity_id: str=None, duration=None, actions_info=None, error_details=None, extended_info=None, **kwargs) -> None: + super(VaultJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.duration = duration + self.actions_info = actions_info + self.error_details = error_details + self.extended_info = extended_info + self.job_type = 'VaultJob' + + +class VaultJobErrorInfo(Model): + """Vault Job specific error information. + + :param error_code: Error code. + :type error_code: int + :param error_string: Localized error string. + :type error_string: str + :param recommendations: List of localized recommendations for above error + code. + :type recommendations: list[str] + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__(self, *, error_code: int=None, error_string: str=None, recommendations=None, **kwargs) -> None: + super(VaultJobErrorInfo, self).__init__(**kwargs) + self.error_code = error_code + self.error_string = error_string + self.recommendations = recommendations + + +class VaultJobExtendedInfo(Model): + """Vault Job for CMK - has CMK specific info. + + :param property_bag: Job properties. + :type property_bag: dict[str, str] + """ + + _attribute_map = { + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + } + + def __init__(self, *, property_bag=None, **kwargs) -> None: + super(VaultJobExtendedInfo, self).__init__(**kwargs) + self.property_bag = property_bag + + class WeeklyRetentionFormat(Model): """Weekly retention format. @@ -10574,6 +11247,140 @@ def __init__(self, *, days_of_the_week=None, retention_times=None, retention_dur self.retention_duration = retention_duration +class WorkloadCrrAccessToken(CrrAccessToken): + """WorkloadCrrAccessToken. + + :param object_type: Type of the specific object - used for deserializing + :type object_type: str + :param access_token_string: Access token used for authentication + :type access_token_string: str + :param subscription_id: Subscription Id of the source vault + :type subscription_id: str + :param resource_group_name: Resource Group name of the source vault + :type resource_group_name: str + :param resource_name: Resource Name of the source vault + :type resource_name: str + :param resource_id: Resource Id of the source vault + :type resource_id: str + :param protection_container_id: Protected item container id + :type protection_container_id: long + :param recovery_point_id: Recovery Point Id + :type recovery_point_id: str + :param recovery_point_time: Recovery Point Time + :type recovery_point_time: str + :param container_name: Container Unique name + :type container_name: str + :param container_type: Container Type + :type container_type: str + :param backup_management_type: Backup Management Type + :type backup_management_type: str + :param datasource_type: Datasource Type + :type datasource_type: str + :param datasource_name: Datasource Friendly Name + :type datasource_name: str + :param datasource_id: Datasource Id + :type datasource_id: str + :param datasource_container_name: Datasource Container Unique Name + :type datasource_container_name: str + :param coordinator_service_stamp_id: CoordinatorServiceStampId to be used + by BCM in restore call + :type coordinator_service_stamp_id: str + :param coordinator_service_stamp_uri: CoordinatorServiceStampUri to be + used by BCM in restore call + :type coordinator_service_stamp_uri: str + :param protection_service_stamp_id: ProtectionServiceStampId to be used by + BCM in restore call + :type protection_service_stamp_id: str + :param protection_service_stamp_uri: ProtectionServiceStampUri to be used + by BCM in restore call + :type protection_service_stamp_uri: str + :param token_extended_information: Extended Information about the token + like FileSpec etc. + :type token_extended_information: str + :param rp_tier_information: Recovery point Tier Information + :type rp_tier_information: dict[str, str] + :param rp_original_sa_option: Recovery point information: Original SA + option + :type rp_original_sa_option: bool + :param rp_is_managed_virtual_machine: Recovery point information: Managed + virtual machine + :type rp_is_managed_virtual_machine: bool + :param rp_vm_size_description: Recovery point information: VM size + description + :type rp_vm_size_description: str + :param b_ms_active_region: Active region name of BMS Stamp + :type b_ms_active_region: str + :param protectable_object_unique_name: + :type protectable_object_unique_name: str + :param protectable_object_friendly_name: + :type protectable_object_friendly_name: str + :param protectable_object_workload_type: + :type protectable_object_workload_type: str + :param protectable_object_protection_state: + :type protectable_object_protection_state: str + :param protectable_object_container_host_os_name: + :type protectable_object_container_host_os_name: str + :param protectable_object_parent_logical_container_name: + :type protectable_object_parent_logical_container_name: str + :param container_id: Container Id + :type container_id: str + :param policy_name: Policy Name + :type policy_name: str + :param policy_id: Policy Id + :type policy_id: str + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'access_token_string': {'key': 'accessTokenString', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'protection_container_id': {'key': 'protectionContainerId', 'type': 'long'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'datasource_type': {'key': 'datasourceType', 'type': 'str'}, + 'datasource_name': {'key': 'datasourceName', 'type': 'str'}, + 'datasource_id': {'key': 'datasourceId', 'type': 'str'}, + 'datasource_container_name': {'key': 'datasourceContainerName', 'type': 'str'}, + 'coordinator_service_stamp_id': {'key': 'coordinatorServiceStampId', 'type': 'str'}, + 'coordinator_service_stamp_uri': {'key': 'coordinatorServiceStampUri', 'type': 'str'}, + 'protection_service_stamp_id': {'key': 'protectionServiceStampId', 'type': 'str'}, + 'protection_service_stamp_uri': {'key': 'protectionServiceStampUri', 'type': 'str'}, + 'token_extended_information': {'key': 'tokenExtendedInformation', 'type': 'str'}, + 'rp_tier_information': {'key': 'rpTierInformation', 'type': '{str}'}, + 'rp_original_sa_option': {'key': 'rpOriginalSAOption', 'type': 'bool'}, + 'rp_is_managed_virtual_machine': {'key': 'rpIsManagedVirtualMachine', 'type': 'bool'}, + 'rp_vm_size_description': {'key': 'rpVMSizeDescription', 'type': 'str'}, + 'b_ms_active_region': {'key': 'bMSActiveRegion', 'type': 'str'}, + 'protectable_object_unique_name': {'key': 'protectableObjectUniqueName', 'type': 'str'}, + 'protectable_object_friendly_name': {'key': 'protectableObjectFriendlyName', 'type': 'str'}, + 'protectable_object_workload_type': {'key': 'protectableObjectWorkloadType', 'type': 'str'}, + 'protectable_object_protection_state': {'key': 'protectableObjectProtectionState', 'type': 'str'}, + 'protectable_object_container_host_os_name': {'key': 'protectableObjectContainerHostOsName', 'type': 'str'}, + 'protectable_object_parent_logical_container_name': {'key': 'protectableObjectParentLogicalContainerName', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + } + + def __init__(self, *, object_type: str=None, access_token_string: str=None, subscription_id: str=None, resource_group_name: str=None, resource_name: str=None, resource_id: str=None, protection_container_id: int=None, recovery_point_id: str=None, recovery_point_time: str=None, container_name: str=None, container_type: str=None, backup_management_type: str=None, datasource_type: str=None, datasource_name: str=None, datasource_id: str=None, datasource_container_name: str=None, coordinator_service_stamp_id: str=None, coordinator_service_stamp_uri: str=None, protection_service_stamp_id: str=None, protection_service_stamp_uri: str=None, token_extended_information: str=None, rp_tier_information=None, rp_original_sa_option: bool=None, rp_is_managed_virtual_machine: bool=None, rp_vm_size_description: str=None, b_ms_active_region: str=None, protectable_object_unique_name: str=None, protectable_object_friendly_name: str=None, protectable_object_workload_type: str=None, protectable_object_protection_state: str=None, protectable_object_container_host_os_name: str=None, protectable_object_parent_logical_container_name: str=None, container_id: str=None, policy_name: str=None, policy_id: str=None, **kwargs) -> None: + super(WorkloadCrrAccessToken, self).__init__(object_type=object_type, access_token_string=access_token_string, subscription_id=subscription_id, resource_group_name=resource_group_name, resource_name=resource_name, resource_id=resource_id, protection_container_id=protection_container_id, recovery_point_id=recovery_point_id, recovery_point_time=recovery_point_time, container_name=container_name, container_type=container_type, backup_management_type=backup_management_type, datasource_type=datasource_type, datasource_name=datasource_name, datasource_id=datasource_id, datasource_container_name=datasource_container_name, coordinator_service_stamp_id=coordinator_service_stamp_id, coordinator_service_stamp_uri=coordinator_service_stamp_uri, protection_service_stamp_id=protection_service_stamp_id, protection_service_stamp_uri=protection_service_stamp_uri, token_extended_information=token_extended_information, rp_tier_information=rp_tier_information, rp_original_sa_option=rp_original_sa_option, rp_is_managed_virtual_machine=rp_is_managed_virtual_machine, rp_vm_size_description=rp_vm_size_description, b_ms_active_region=b_ms_active_region, **kwargs) + self.protectable_object_unique_name = protectable_object_unique_name + self.protectable_object_friendly_name = protectable_object_friendly_name + self.protectable_object_workload_type = protectable_object_workload_type + self.protectable_object_protection_state = protectable_object_protection_state + self.protectable_object_container_host_os_name = protectable_object_container_host_os_name + self.protectable_object_parent_logical_container_name = protectable_object_parent_logical_container_name + self.container_id = container_id + self.policy_name = policy_name + self.policy_id = policy_id + + class WorkloadInquiryDetails(Model): """Details of an inquired protectable item. 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 7d41f9f8ebb5..a14a12c9fe0e 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 @@ -64,32 +64,6 @@ class ProtectedItemResourcePaged(Paged): def __init__(self, *args, **kwargs): super(ProtectedItemResourcePaged, 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 BackupEngineBaseResourcePaged(Paged): """ A paging container for iterating over a list of :class:`BackupEngineBaseResource ` object @@ -155,6 +129,32 @@ 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 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 66f224b5479e..92effa5e81de 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 @@ -12,15 +12,6 @@ from enum import Enum -class OperationStatusValues(str, Enum): - - invalid = "Invalid" - in_progress = "InProgress" - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - - class ProvisioningState(str, Enum): succeeded = "Succeeded" @@ -47,11 +38,8 @@ class ProtectionState(str, Enum): protection_paused = "ProtectionPaused" -class HealthStatus(str, Enum): +class ResourceHealthStatus(str, Enum): - passed = "Passed" - action_required = "ActionRequired" - action_suggested = "ActionSuggested" healthy = "Healthy" transient_degraded = "TransientDegraded" persistent_degraded = "PersistentDegraded" @@ -60,6 +48,14 @@ class HealthStatus(str, Enum): invalid = "Invalid" +class HealthStatus(str, Enum): + + passed = "Passed" + action_required = "ActionRequired" + action_suggested = "ActionSuggested" + invalid = "Invalid" + + class RecoveryType(str, Enum): invalid = "Invalid" @@ -111,6 +107,7 @@ class PolicyType(str, Enum): differential = "Differential" log = "Log" copy_only_full = "CopyOnlyFull" + incremental = "Incremental" class JobSupportedAction(str, Enum): @@ -153,6 +150,7 @@ class RestorePointType(str, Enum): full = "Full" log = "Log" differential = "Differential" + incremental = "Incremental" class OverwriteOptions(str, Enum): @@ -176,34 +174,6 @@ class SQLDataDirectoryType(str, Enum): log = "Log" -class StorageType(str, Enum): - - invalid = "Invalid" - geo_redundant = "GeoRedundant" - locally_redundant = "LocallyRedundant" - - -class StorageTypeState(str, Enum): - - invalid = "Invalid" - locked = "Locked" - unlocked = "Unlocked" - - -class EnhancedSecurityState(str, Enum): - - invalid = "Invalid" - enabled = "Enabled" - disabled = "Disabled" - - -class SoftDeleteFeatureState(str, Enum): - - invalid = "Invalid" - enabled = "Enabled" - disabled = "Disabled" - - class RestorePointQueryType(str, Enum): invalid = "Invalid" @@ -212,6 +182,7 @@ class RestorePointQueryType(str, Enum): differential = "Differential" full_and_differential = "FullAndDifferential" all = "All" + incremental = "Incremental" class RetentionDurationType(str, Enum): @@ -274,6 +245,7 @@ class JobOperationType(str, Enum): delete_backup_data = "DeleteBackupData" cross_region_restore = "CrossRegionRestore" undelete = "Undelete" + update_customer_managed_key = "UpdateCustomerManagedKey" class DayOfWeek(str, Enum): @@ -340,6 +312,13 @@ class MabServerType(str, Enum): generic_container = "GenericContainer" +class DataMoveLevel(str, Enum): + + invalid = "Invalid" + vault = "Vault" + container = "Container" + + class HttpStatusCode(str, Enum): continue_enum = "Continue" @@ -432,72 +411,6 @@ class ScheduleRunType(str, Enum): weekly = "Weekly" -class SupportStatus(str, Enum): - - invalid = "Invalid" - supported = "Supported" - default_off = "DefaultOFF" - default_on = "DefaultON" - not_supported = "NotSupported" - - -class WorkloadItemType(str, Enum): - - invalid = "Invalid" - sql_instance = "SQLInstance" - sql_data_base = "SQLDataBase" - sap_hana_system = "SAPHanaSystem" - sap_hana_database = "SAPHanaDatabase" - sap_ase_system = "SAPAseSystem" - 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" - not_protected = "NotProtected" - protecting = "Protecting" - protected = "Protected" - protection_failed = "ProtectionFailed" - - -class FabricName(str, Enum): - - invalid = "Invalid" - azure = "Azure" - - -class Type(str, Enum): - - invalid = "Invalid" - backup_protected_item_count_summary = "BackupProtectedItemCountSummary" - backup_protection_container_count_summary = "BackupProtectionContainerCountSummary" - - -class ValidationStatus(str, Enum): - - invalid = "Invalid" - succeeded = "Succeeded" - failed = "Failed" - - -class IntentItemType(str, Enum): - - invalid = "Invalid" - sql_instance = "SQLInstance" - sql_availability_group_container = "SQLAvailabilityGroupContainer" - - class AzureFileShareType(str, Enum): invalid = "Invalid" @@ -519,6 +432,7 @@ class BackupType(str, Enum): differential = "Differential" log = "Log" copy_only_full = "CopyOnlyFull" + incremental = "Incremental" class OperationType(str, Enum): @@ -547,6 +461,26 @@ class ContainerType(str, Enum): generic_container = "GenericContainer" +class WorkloadItemType(str, Enum): + + invalid = "Invalid" + sql_instance = "SQLInstance" + sql_data_base = "SQLDataBase" + sap_hana_system = "SAPHanaSystem" + sap_hana_database = "SAPHanaDatabase" + sap_ase_system = "SAPAseSystem" + sap_ase_database = "SAPAseDatabase" + + +class ProtectionStatus(str, Enum): + + invalid = "Invalid" + not_protected = "NotProtected" + protecting = "Protecting" + protected = "Protected" + protection_failed = "ProtectionFailed" + + class BackupItemType(str, Enum): invalid = "Invalid" @@ -564,3 +498,74 @@ class BackupItemType(str, Enum): azure_file_share = "AzureFileShare" sap_hana_database = "SAPHanaDatabase" sap_ase_database = "SAPAseDatabase" + + +class OperationStatusValues(str, Enum): + + invalid = "Invalid" + in_progress = "InProgress" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + + +class StorageType(str, Enum): + + invalid = "Invalid" + geo_redundant = "GeoRedundant" + locally_redundant = "LocallyRedundant" + zone_redundant = "ZoneRedundant" + read_access_geo_zone_redundant = "ReadAccessGeoZoneRedundant" + + +class StorageTypeState(str, Enum): + + invalid = "Invalid" + locked = "Locked" + unlocked = "Unlocked" + + +class SupportStatus(str, Enum): + + invalid = "Invalid" + supported = "Supported" + default_off = "DefaultOFF" + default_on = "DefaultON" + not_supported = "NotSupported" + + +class UsagesUnit(str, Enum): + + count = "Count" + bytes = "Bytes" + seconds = "Seconds" + percent = "Percent" + count_per_second = "CountPerSecond" + bytes_per_second = "BytesPerSecond" + + +class FabricName(str, Enum): + + invalid = "Invalid" + azure = "Azure" + + +class Type(str, Enum): + + invalid = "Invalid" + backup_protected_item_count_summary = "BackupProtectedItemCountSummary" + backup_protection_container_count_summary = "BackupProtectionContainerCountSummary" + + +class ValidationStatus(str, Enum): + + invalid = "Invalid" + succeeded = "Succeeded" + failed = "Failed" + + +class IntentItemType(str, Enum): + + invalid = "Invalid" + sql_instance = "SQLInstance" + sql_availability_group_container = "SQLAvailabilityGroupContainer" 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 e4e0c89cde04..af1ed5869266 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 @@ -10,7 +10,8 @@ # -------------------------------------------------------------------------- from ._private_endpoint_connection_operations import PrivateEndpointConnectionOperations -from ._backup_resource_vault_configs_operations import BackupResourceVaultConfigsOperations +from ._private_endpoint_operations import PrivateEndpointOperations +from ._bms_prepare_data_move_operation_result_operations import BMSPrepareDataMoveOperationResultOperations from ._protected_items_operations import ProtectedItemsOperations from ._protected_item_operation_results_operations import ProtectedItemOperationResultsOperations from ._recovery_points_operations import RecoveryPointsOperations @@ -26,11 +27,6 @@ from ._jobs_operations import JobsOperations from ._backup_protected_items_operations import BackupProtectedItemsOperations from ._operation_operations import OperationOperations -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 ._backup_engines_operations import BackupEnginesOperations from ._protection_container_refresh_operation_results_operations import ProtectionContainerRefreshOperationResultsOperations from ._protectable_containers_operations import ProtectableContainersOperations @@ -46,13 +42,27 @@ from ._backup_protectable_items_operations import BackupProtectableItemsOperations from ._backup_protection_containers_operations import BackupProtectionContainersOperations from ._security_pi_ns_operations import SecurityPINsOperations +from ._aad_properties_operations import AadPropertiesOperations +from ._cross_region_restore_operations import CrossRegionRestoreOperations +from ._backup_crr_job_details_operations import BackupCrrJobDetailsOperations +from ._backup_crr_jobs_operations import BackupCrrJobsOperations +from ._crr_operation_results_operations import CrrOperationResultsOperations +from ._crr_operation_status_operations import CrrOperationStatusOperations 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__ = [ 'PrivateEndpointConnectionOperations', - 'BackupResourceVaultConfigsOperations', + 'PrivateEndpointOperations', + 'BMSPrepareDataMoveOperationResultOperations', 'ProtectedItemsOperations', 'ProtectedItemOperationResultsOperations', 'RecoveryPointsOperations', @@ -68,11 +78,6 @@ 'JobsOperations', 'BackupProtectedItemsOperations', 'OperationOperations', - 'ProtectionIntentOperations', - 'BackupStatusOperations', - 'FeatureSupportOperations', - 'BackupProtectionIntentOperations', - 'BackupUsageSummariesOperations', 'BackupEnginesOperations', 'ProtectionContainerRefreshOperationResultsOperations', 'ProtectableContainersOperations', @@ -88,7 +93,20 @@ 'BackupProtectableItemsOperations', 'BackupProtectionContainersOperations', 'SecurityPINsOperations', + 'AadPropertiesOperations', + 'CrossRegionRestoreOperations', + 'BackupCrrJobDetailsOperations', + 'BackupCrrJobsOperations', + 'CrrOperationResultsOperations', + 'CrrOperationStatusOperations', '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 new file mode 100644 index 000000000000..767803fee0cf --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_aad_properties_operations.py @@ -0,0 +1,97 @@ +# 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 .. import models + + +class AadPropertiesOperations(object): + """AadPropertiesOperations 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: "2018-12-20". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-12-20" + + self.config = config + + def get( + self, azure_region, 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 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: AADPropertiesResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.AADPropertiesResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`NewErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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 and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.NewErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AADPropertiesResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties/default'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_job_details_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_job_details_operations.py new file mode 100644 index 000000000000..09f5dabb1d36 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_job_details_operations.py @@ -0,0 +1,106 @@ +# 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 .. import models + + +class BackupCrrJobDetailsOperations(object): + """BackupCrrJobDetailsOperations 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: "2018-12-20". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-12-20" + + self.config = config + + def get( + self, azure_region, resource_id=None, job_name=None, custom_headers=None, raw=False, **operation_config): + """Get CRR job details from target region. + + :param azure_region: Azure region to hit Api + :type azure_region: str + :param resource_id: Entire ARM resource id of the resource + :type resource_id: str + :param job_name: Job Name of the job to be fetched + :type job_name: 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: JobResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.JobResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`NewErrorResponseException` + """ + parameters = models.CrrJobRequest(resource_id=resource_id, job_name=job_name) + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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') + + # 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, 'CrrJobRequest') + + # 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 [200]: + raise models.NewErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('JobResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob'} diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_jobs_operations.py new file mode 100644 index 000000000000..1b620c7fa323 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_jobs_operations.py @@ -0,0 +1,125 @@ +# 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 .. import models + + +class BackupCrrJobsOperations(object): + """BackupCrrJobsOperations 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: "2018-12-20". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-12-20" + + self.config = config + + def list( + self, azure_region, filter=None, skip_token=None, resource_id=None, job_name=None, custom_headers=None, raw=False, **operation_config): + """Gets the list of CRR jobs from the target region. + + :param azure_region: Azure region to hit Api + :type azure_region: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :param resource_id: Entire ARM resource id of the resource + :type resource_id: str + :param job_name: Job Name of the job to be fetched + :type job_name: 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 JobResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.JobResourcePaged[~azure.mgmt.recoveryservicesbackup.models.JobResource] + :raises: + :class:`NewErrorResponseException` + """ + parameters = models.CrrJobRequest(resource_id=resource_id, job_name=job_name) + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, '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, 'CrrJobRequest') + + # 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]: + raise models.NewErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.JobResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs'} 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 bfab9f133142..fbac8508723b 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-01" self.config = config 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 72432bb5840b..37c5d5178820 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: "2019-06-15". + :ivar api_version: Client Api Version. Constant value: "2020-07-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 = "2019-06-15" + self.api_version = "2020-07-01" self.config = config 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 2c88ed5b3395..7d19bf3b17e7 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-01" self.config = config 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 abd5951b2a41..e2341907c124 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-01" self.config = config 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 07fe639855e3..3cbf55c9df22 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: "2019-06-15". + :ivar api_version: Client Api Version. Constant value: "2020-07-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 = "2019-06-15" + self.api_version = "2020-07-01" self.config = config 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 86a05315a8d7..04c52f7dff3a 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-01" self.config = config diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_crr_operations.py new file mode 100644 index 000000000000..cbe818826167 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_crr_operations.py @@ -0,0 +1,120 @@ +# 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 .. import models + + +class BackupProtectedItemsCrrOperations(object): + """BackupProtectedItemsCrrOperations 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: "2018-12-20". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-12-20" + + self.config = config + + def list( + self, vault_name, resource_group_name, filter=None, skip_token=None, custom_headers=None, raw=False, **operation_config): + """Provides a pageable list of all items that are backed up within a + vault. + + :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 filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: 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 ProtectedItemResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResourcePaged[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource] + :raises: + :class:`NewErrorResponseException` + """ + 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') + } + 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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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 and send request + request = self._client.get(url, query_parameters, header_parameters) + 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]: + raise models.NewErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + 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/'} 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 e688ebec81f7..3f9762ef5c93 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: "2019-06-15". + :ivar api_version: Client Api Version. Constant value: "2020-07-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 = "2019-06-15" + self.api_version = "2020-07-01" self.config = config 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 6609a5ae2b17..ce131426cfd6 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-01" self.config = config diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_operations.py index 41280942e871..f4c50cf11b30 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -25,7 +24,7 @@ class BackupResourceStorageConfigsOperations(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-12-01". + :ivar api_version: Client Api Version. Constant value: "2018-12-20". """ models = models @@ -35,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-12-01" + self.api_version = "2018-12-20" self.config = config @@ -57,7 +56,8 @@ def get( :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`NewErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -87,9 +87,7 @@ def get( 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 + raise models.NewErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -100,7 +98,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} def update( self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -123,7 +121,8 @@ def update( :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`NewErrorResponseException` """ # Construct URL url = self.update.metadata['url'] @@ -157,9 +156,7 @@ def update( 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 + raise models.NewErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -170,7 +167,7 @@ def update( return client_raw_response return deserialized - update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} def patch( self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -191,7 +188,8 @@ def patch( overrides`. :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`NewErrorResponseException` """ # Construct URL url = self.patch.metadata['url'] @@ -224,11 +222,9 @@ def patch( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.NewErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - patch.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} 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 deleted file mode 100644 index eb1297ef9311..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_vault_configs_operations.py +++ /dev/null @@ -1,245 +0,0 @@ -# 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 BackupResourceVaultConfigsOperations(object): - """BackupResourceVaultConfigsOperations 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: "2019-06-15". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-06-15" - - self.config = config - - def get( - self, vault_name, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Fetches resource vault config. - - :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 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: BackupResourceVaultConfigResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.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') - } - 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') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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 and send request - request = self._client.get(url, query_parameters, header_parameters) - 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 - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupResourceVaultConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} - - def update( - self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): - """Updates vault security config. - - :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 parameters: resource config request - :type parameters: - ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource - :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: BackupResourceVaultConfigResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.update.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') - } - 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') - - # 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, 'BackupResourceVaultConfigResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - 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 - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupResourceVaultConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} - - def put( - self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): - """Updates vault security config. - - :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 parameters: resource config request - :type parameters: - ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource - :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: BackupResourceVaultConfigResource or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.put.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') - } - 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') - - # 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, 'BackupResourceVaultConfigResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupResourceVaultConfigResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - put.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} 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 0c9ab8c32212..36a0a777772f 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-01" self.config = config 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 203c93c98c81..852208cb25a6 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-01" self.config = config 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 new file mode 100644 index 000000000000..f357d846cea0 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py @@ -0,0 +1,140 @@ +# 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 msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class BMSPrepareDataMoveOperationResultOperations(object): + """BMSPrepareDataMoveOperationResultOperations 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: "2020-07-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-07-01" + + self.config = config + + + def _get_initial( + self, vault_name, resource_group_name, operation_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.get.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'), + 'operationId': self._serialize.url("operation_id", operation_id, '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') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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 and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.NewErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VaultStorageConfigOperationResultResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + 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/_cross_region_restore_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_cross_region_restore_operations.py new file mode 100644 index 000000000000..f856423cad01 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_cross_region_restore_operations.py @@ -0,0 +1,131 @@ +# 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 msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class CrossRegionRestoreOperations(object): + """CrossRegionRestoreOperations 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: "2018-12-20". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-12-20" + + self.config = config + + + def _trigger_initial( + self, azure_region, cross_region_restore_access_details=None, restore_request=None, custom_headers=None, raw=False, **operation_config): + parameters = models.CrossRegionRestoreRequest(cross_region_restore_access_details=cross_region_restore_access_details, restore_request=restore_request) + + # Construct URL + url = self.trigger.metadata['url'] + path_format_arguments = { + 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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') + + # 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, 'CrossRegionRestoreRequest') + + # 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 [200, 202]: + raise models.NewErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def trigger( + self, azure_region, cross_region_restore_access_details=None, restore_request=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores the specified backed up data in a different region as compared + to where the data is backed up. + + :param azure_region: Azure region to hit Api + :type azure_region: str + :param cross_region_restore_access_details: Access details for cross + region restore + :type cross_region_restore_access_details: + ~azure.mgmt.recoveryservicesbackup.models.CrrAccessToken + :param restore_request: Request object for triggering restore + :type restore_request: + ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + :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._trigger_initial( + azure_region=azure_region, + cross_region_restore_access_details=cross_region_restore_access_details, + restore_request=restore_request, + 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, lro_options={'final-state-via': 'azure-async-operation'}, **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}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore'} 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 new file mode 100644 index 000000000000..9a480533574d --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_results_operations.py @@ -0,0 +1,119 @@ +# 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 msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class CrrOperationResultsOperations(object): + """CrrOperationResultsOperations 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: "2018-12-20". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-12-20" + + self.config = config + + + def _get_initial( + self, azure_region, operation_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, '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') + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.NewErrorResponseException(self._deserialize, response) + + 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/_crr_operation_status_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_status_operations.py new file mode 100644 index 000000000000..ab647e4be4c5 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_status_operations.py @@ -0,0 +1,99 @@ +# 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 .. import models + + +class CrrOperationStatusOperations(object): + """CrrOperationStatusOperations 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: "2018-12-20". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-12-20" + + self.config = config + + 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: OperationStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`NewErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, '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') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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 and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.NewErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{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 5f2bac280755..fce2b0f4c99a 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: "2019-06-15". + :ivar api_version: Client Api Version. Constant value: "2020-07-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 = "2019-06-15" + self.api_version = "2020-07-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 f646e52fd4ce..673f7efd54f2 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-01" self.config = config 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 16392336a585..48076723287e 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: "2019-06-15". + :ivar api_version: Client Api Version. Constant value: "2020-07-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 = "2019-06-15" + self.api_version = "2020-07-01" self.config = config 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 bdce67d6f3ae..d7e812a42f66 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: "2019-06-15". + :ivar api_version: Client Api Version. Constant value: "2020-07-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 = "2019-06-15" + self.api_version = "2020-07-01" self.config = config 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 0c93a399a0ad..01e1ff19a8cd 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: "2019-06-15". + :ivar api_version: Client Api Version. Constant value: "2020-07-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 = "2019-06-15" + self.api_version = "2020-07-01" self.config = config 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 fe9962d27834..2cd0baf90a31 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: "2019-06-15". + :ivar api_version: Client Api Version. Constant value: "2020-07-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 = "2019-06-15" + self.api_version = "2020-07-01" self.config = config 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 7de722287e12..dd206a3c8162 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: "2019-06-15". + :ivar api_version: Client Api Version. Constant value: "2020-07-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 = "2019-06-15" + self.api_version = "2020-07-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 6f7c4dba3bee..0024d2a7b2f9 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-02-02". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-02-02" + self.api_version = "2020-07-01" self.config = config @@ -64,7 +64,7 @@ def get( ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionResource or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorResponseException` + :class:`NewErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -95,7 +95,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + raise models.NewErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: 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 new file mode 100644 index 000000000000..d51fdc1a116a --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py @@ -0,0 +1,107 @@ +# 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 .. import models + + +class PrivateEndpointOperations(object): + """PrivateEndpointOperations 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: "2020-07-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-07-01" + + self.config = config + + def get_operation_status( + self, vault_name, resource_group_name, private_endpoint_connection_name, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets the operation status for a private endpoint connection. + + :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 private_endpoint_connection_name: The name of the private + endpoint connection. + :type private_endpoint_connection_name: str + :param operation_id: 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: OperationStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`NewErrorResponseException` + """ + # Construct URL + url = self.get_operation_status.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'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, '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') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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 and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.NewErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + 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 77f5beb56e29..c41ba3313893 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-01" self.config = config 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 c1cfa0136df8..0e80993b377d 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: "2019-06-15". + :ivar api_version: Client Api Version. Constant value: "2020-07-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 = "2019-06-15" + self.api_version = "2020-07-01" self.config = config 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 c915568a3a95..b3250bb8b68f 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-01" self.config = config 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 2b158ab99fe4..43a84ccddae9 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: "2019-06-15". + :ivar api_version: Client Api Version. Constant value: "2020-07-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 = "2019-06-15" + self.api_version = "2020-07-01" self.config = config 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 70d4d9055552..7e10c3eee581 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-01" self.config = config 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 08f72164af9a..c11d8d6e3600 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-01" self.config = config 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 f664ef129e0e..8290f0ecdf27 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-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 45161325ef63..8d9c976ab67f 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 @@ -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,6 +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-07-01". """ models = models @@ -34,6 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer + self.api_version = "2020-07-01" self.config = config @@ -62,8 +66,6 @@ def get( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2019-06-15" - # Construct URL url = self.get.metadata['url'] path_format_arguments = { @@ -76,7 +78,7 @@ def get( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -135,8 +137,6 @@ def create_or_update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - api_version = "2019-06-15" - # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -149,7 +149,7 @@ def create_or_update( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -185,30 +185,9 @@ def create_or_update( return deserialized create_or_update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} - def delete( - self, vault_name, resource_group_name, policy_name, custom_headers=None, raw=False, **operation_config): - """Deletes specified backup policy from your Recovery Services Vault. This - is an asynchronous operation. Status of the - operation can be fetched using GetPolicyOperationResult 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 policy_name: Backup policy to be deleted. - :type policy_name: 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:`CloudError` - """ - api_version = "2016-12-01" + def _delete_initial( + self, vault_name, resource_group_name, policy_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -221,7 +200,7 @@ def delete( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -244,4 +223,50 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + + def delete( + self, vault_name, resource_group_name, policy_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes specified backup policy from your Recovery Services Vault. This + is an asynchronous operation. Status of the + operation can be fetched using GetProtectionPolicyOperationResult 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 policy_name: Backup policy to be deleted. + :type policy_name: 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:`CloudError` + """ + raw_result = self._delete_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + policy_name=policy_name, + 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) 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 a1ea10b68c6f..04ed76c1d140 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: "2019-06-15". + :ivar api_version: Client Api Version. Constant value: "2020-07-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 = "2019-06-15" + self.api_version = "2020-07-01" self.config = config 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 9cb8d1369408..d3041e0d174b 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-01" self.config = config diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_crr_operations.py new file mode 100644 index 000000000000..826aa62ab887 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_crr_operations.py @@ -0,0 +1,126 @@ +# 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 .. import models + + +class RecoveryPointsCrrOperations(object): + """RecoveryPointsCrrOperations 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: "2018-12-20". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-12-20" + + self.config = config + + def list( + self, vault_name, resource_group_name, fabric_name, container_name, protected_item_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists the backup copies for the backed up item. + + :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 item. + :type fabric_name: str + :param container_name: Container name associated with the backed up + item. + :type container_name: str + :param protected_item_name: Backed up item whose backup copies are to + be fetched. + :type protected_item_name: 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 + :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:`NewErrorResponseException` + """ + 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') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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 and send request + request = self._client.get(url, query_parameters, header_parameters) + 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]: + raise models.NewErrorResponseException(self._deserialize, response) + + 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}/recoveryPoints/'} 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 beb93003042c..6355ac0d00bf 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 @@ -25,7 +25,6 @@ class RecoveryPointsOperations(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: "2019-06-15". """ models = models @@ -35,7 +34,6 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-15" self.config = config @@ -68,6 +66,8 @@ def list( ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResourcePaged[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource] :raises: :class:`CloudError` """ + api_version = "2020-07-01" + def prepare_request(next_link=None): if not next_link: # Construct URL @@ -84,7 +84,7 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if filter is not None: query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') @@ -160,6 +160,8 @@ def get( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + api_version = "2020-07-01" + # Construct URL url = self.get.metadata['url'] path_format_arguments = { @@ -175,7 +177,7 @@ def get( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -206,3 +208,87 @@ def get( return deserialized 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): + """Returns the Access token for communication between BMS and Protection + service. + + :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 container. + :type fabric_name: str + :param container_name: Name of the container. + :type container_name: str + :param protected_item_name: Name of the Protected Item. + :type protected_item_name: str + :param recovery_point_id: Recovery Point Id + :type recovery_point_id: str + :param parameters: Get Access Token request + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.AADPropertiesResource + :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: CrrAccessTokenResource or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.CrrAccessTokenResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`NewErrorResponseException` + """ + api_version = "2018-12-20" + + # Construct URL + url = self.get_access_token.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['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, 'AADPropertiesResource') + + # 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 [200, 400]: + raise models.NewErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CrrAccessTokenResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_access_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/accessToken'} 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 a23ffdfefd33..701eb1e511fb 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 @@ -20,18 +20,15 @@ class RecoveryServicesBackupClientOperationsMixin(object): def get_operation_status( - self, vault_name, resource_group_name, private_endpoint_connection_name, operation_id, custom_headers=None, raw=False, **operation_config): - """Gets the operation status for a private endpoint connection. + self, vault_name, resource_group_name, operation_id, custom_headers=None, raw=False, **operation_config): + """Fetches operation status for data move operation on vault. :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 private_endpoint_connection_name: The name of the private - endpoint connection. - :type private_endpoint_connection_name: str - :param operation_id: Operation id + :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 @@ -42,9 +39,9 @@ def get_operation_status( :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorResponseException` + :class:`NewErrorResponseException` """ - api_version = "2020-02-02" + api_version = "2020-07-01" # Construct URL url = self.get_operation_status.metadata['url'] @@ -52,7 +49,6 @@ def get_operation_status( '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'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), 'operationId': self._serialize.url("operation_id", operation_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -76,7 +72,7 @@ def get_operation_status( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) + raise models.NewErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -87,4 +83,182 @@ 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}/backupstorageconfig/vaultstorageconfig/operationStatus/{operationId}'} + + + def _bms_prepare_data_move_initial( + self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): + api_version = "2020-07-01" + + # Construct URL + url = self.bms_prepare_data_move.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') + } + 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, 'PrepareDataMoveRequest') + + # 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 [200, 202]: + raise models.NewErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def bms_prepare_data_move( + self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Prepares source vault for Data Move operation. + + :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 parameters: Prepare data move request + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.PrepareDataMoveRequest + :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._bms_prepare_data_move_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + 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) + bms_prepare_data_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/prepareDataMove'} + + + def _bms_trigger_data_move_initial( + self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, **operation_config): + api_version = "2020-07-01" + + # Construct URL + url = self.bms_trigger_data_move.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') + } + 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, 'TriggerDataMoveRequest') + + # 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 [200, 202]: + raise models.NewErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def bms_trigger_data_move( + self, vault_name, resource_group_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Triggers Data Move Operation on target vault. + + :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 parameters: Trigger data move request + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.TriggerDataMoveRequest + :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._bms_trigger_data_move_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + 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) + bms_trigger_data_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/triggerDataMove'} 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 17f8ac349daf..2fc9d5a6bf60 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 @@ -25,7 +25,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: "2019-06-15". + :ivar api_version: Client Api Version. Constant value: "2020-07-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 = "2019-06-15" + self.api_version = "2020-07-01" self.config = config 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 08bd187beceb..47e0a6f89465 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: "2016-12-01". + :ivar api_version: Client Api Version. Constant value: "2020-07-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-12-01" + self.api_version = "2020-07-01" self.config = config