diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json index c79fa0f25239..a651ead7be6b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "33998161763a845ec4160ab09bb5de7d70befb37", + "commit": "99255839bfe18a747f7a5eb3109ec3896c88c7e8", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/recoveryservicesbackup/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/recoveryservicesbackup/resource-manager/readme.md" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_configuration.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_configuration.py index 520604f0d762..7052861b9071 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_configuration.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_configuration.py @@ -48,6 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id + self.api_version = "2021-08-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-recoveryservicesbackup/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_metadata.json b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_metadata.json index 6861dba04dd3..7add930991cd 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_metadata.json +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "", - "total_api_version_list": ["2018-12-20", "2021-08-01"], + "chosen_version": "2021-08-01", + "total_api_version_list": ["2021-08-01"], "client": { "name": "RecoveryServicesBackupClient", "filename": "_recovery_services_backup_client", @@ -142,17 +142,7 @@ "security_pins": "SecurityPINsOperations", "recovery_points_recommended_for_move": "RecoveryPointsRecommendedForMoveOperations", "resource_guard_proxies": "ResourceGuardProxiesOperations", - "resource_guard_proxy": "ResourceGuardProxyOperations", - "backup_usage_summaries_crr": "BackupUsageSummariesCRROperations", - "aad_properties": "AadPropertiesOperations", - "cross_region_restore": "CrossRegionRestoreOperations", - "backup_crr_job_details": "BackupCrrJobDetailsOperations", - "backup_crr_jobs": "BackupCrrJobsOperations", - "crr_operation_results": "CrrOperationResultsOperations", - "crr_operation_status": "CrrOperationStatusOperations", - "backup_resource_storage_configs": "BackupResourceStorageConfigsOperations", - "recovery_points_crr": "RecoveryPointsCrrOperations", - "backup_protected_items_crr": "BackupProtectedItemsCrrOperations" + "resource_guard_proxy": "ResourceGuardProxyOperations" }, "operation_mixins": { "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.polling\": [\"LROPoller\", \"NoPolling\", \"PollingMethod\"], \"azure.mgmt.core.polling.arm_polling\": [\"ARMPolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", 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 117a2c2f0d77..5f13f8c9a6b6 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 @@ -65,16 +65,6 @@ from .operations import RecoveryPointsRecommendedForMoveOperations from .operations import ResourceGuardProxiesOperations from .operations import ResourceGuardProxyOperations -from .operations import BackupUsageSummariesCRROperations -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 . import models @@ -171,26 +161,6 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin): :vartype resource_guard_proxies: azure.mgmt.recoveryservicesbackup.operations.ResourceGuardProxiesOperations :ivar resource_guard_proxy: ResourceGuardProxyOperations operations :vartype resource_guard_proxy: azure.mgmt.recoveryservicesbackup.operations.ResourceGuardProxyOperations - :ivar backup_usage_summaries_crr: BackupUsageSummariesCRROperations operations - :vartype backup_usage_summaries_crr: azure.mgmt.recoveryservicesbackup.operations.BackupUsageSummariesCRROperations - :ivar aad_properties: AadPropertiesOperations operations - :vartype aad_properties: azure.mgmt.recoveryservicesbackup.operations.AadPropertiesOperations - :ivar cross_region_restore: CrossRegionRestoreOperations operations - :vartype cross_region_restore: azure.mgmt.recoveryservicesbackup.operations.CrossRegionRestoreOperations - :ivar backup_crr_job_details: BackupCrrJobDetailsOperations operations - :vartype backup_crr_job_details: azure.mgmt.recoveryservicesbackup.operations.BackupCrrJobDetailsOperations - :ivar backup_crr_jobs: BackupCrrJobsOperations operations - :vartype backup_crr_jobs: azure.mgmt.recoveryservicesbackup.operations.BackupCrrJobsOperations - :ivar crr_operation_results: CrrOperationResultsOperations operations - :vartype crr_operation_results: azure.mgmt.recoveryservicesbackup.operations.CrrOperationResultsOperations - :ivar crr_operation_status: CrrOperationStatusOperations operations - :vartype crr_operation_status: azure.mgmt.recoveryservicesbackup.operations.CrrOperationStatusOperations - :ivar backup_resource_storage_configs: BackupResourceStorageConfigsOperations operations - :vartype backup_resource_storage_configs: azure.mgmt.recoveryservicesbackup.operations.BackupResourceStorageConfigsOperations - :ivar recovery_points_crr: RecoveryPointsCrrOperations operations - :vartype recovery_points_crr: azure.mgmt.recoveryservicesbackup.operations.RecoveryPointsCrrOperations - :ivar backup_protected_items_crr: BackupProtectedItemsCrrOperations operations - :vartype backup_protected_items_crr: azure.mgmt.recoveryservicesbackup.operations.BackupProtectedItemsCrrOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The subscription Id. @@ -307,26 +277,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.resource_guard_proxy = ResourceGuardProxyOperations( self._client, self._config, self._serialize, self._deserialize) - self.backup_usage_summaries_crr = BackupUsageSummariesCRROperations( - 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) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_version.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_version.py index cac9f5d10f8b..e5754a47ce68 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_version.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_configuration.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_configuration.py index 5a12c5529e40..2ece259e97a5 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_configuration.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_configuration.py @@ -45,6 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id + self.api_version = "2021-08-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-recoveryservicesbackup/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_recovery_services_backup_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_recovery_services_backup_client.py index 005ca4363a81..4f2f2bb2bed9 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_recovery_services_backup_client.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_recovery_services_backup_client.py @@ -63,16 +63,6 @@ from .operations import RecoveryPointsRecommendedForMoveOperations from .operations import ResourceGuardProxiesOperations from .operations import ResourceGuardProxyOperations -from .operations import BackupUsageSummariesCRROperations -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 .. import models @@ -169,26 +159,6 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin): :vartype resource_guard_proxies: azure.mgmt.recoveryservicesbackup.aio.operations.ResourceGuardProxiesOperations :ivar resource_guard_proxy: ResourceGuardProxyOperations operations :vartype resource_guard_proxy: azure.mgmt.recoveryservicesbackup.aio.operations.ResourceGuardProxyOperations - :ivar backup_usage_summaries_crr: BackupUsageSummariesCRROperations operations - :vartype backup_usage_summaries_crr: azure.mgmt.recoveryservicesbackup.aio.operations.BackupUsageSummariesCRROperations - :ivar aad_properties: AadPropertiesOperations operations - :vartype aad_properties: azure.mgmt.recoveryservicesbackup.aio.operations.AadPropertiesOperations - :ivar cross_region_restore: CrossRegionRestoreOperations operations - :vartype cross_region_restore: azure.mgmt.recoveryservicesbackup.aio.operations.CrossRegionRestoreOperations - :ivar backup_crr_job_details: BackupCrrJobDetailsOperations operations - :vartype backup_crr_job_details: azure.mgmt.recoveryservicesbackup.aio.operations.BackupCrrJobDetailsOperations - :ivar backup_crr_jobs: BackupCrrJobsOperations operations - :vartype backup_crr_jobs: azure.mgmt.recoveryservicesbackup.aio.operations.BackupCrrJobsOperations - :ivar crr_operation_results: CrrOperationResultsOperations operations - :vartype crr_operation_results: azure.mgmt.recoveryservicesbackup.aio.operations.CrrOperationResultsOperations - :ivar crr_operation_status: CrrOperationStatusOperations operations - :vartype crr_operation_status: azure.mgmt.recoveryservicesbackup.aio.operations.CrrOperationStatusOperations - :ivar backup_resource_storage_configs: BackupResourceStorageConfigsOperations operations - :vartype backup_resource_storage_configs: azure.mgmt.recoveryservicesbackup.aio.operations.BackupResourceStorageConfigsOperations - :ivar recovery_points_crr: RecoveryPointsCrrOperations operations - :vartype recovery_points_crr: azure.mgmt.recoveryservicesbackup.aio.operations.RecoveryPointsCrrOperations - :ivar backup_protected_items_crr: BackupProtectedItemsCrrOperations operations - :vartype backup_protected_items_crr: azure.mgmt.recoveryservicesbackup.aio.operations.BackupProtectedItemsCrrOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The subscription Id. @@ -304,26 +274,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.resource_guard_proxy = ResourceGuardProxyOperations( self._client, self._config, self._serialize, self._deserialize) - self.backup_usage_summaries_crr = BackupUsageSummariesCRROperations( - 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) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/__init__.py index 18922f7c05ca..e1e37f1be594 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/__init__.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/__init__.py @@ -52,16 +52,6 @@ from ._recovery_points_recommended_for_move_operations import RecoveryPointsRecommendedForMoveOperations from ._resource_guard_proxies_operations import ResourceGuardProxiesOperations from ._resource_guard_proxy_operations import ResourceGuardProxyOperations -from ._backup_usage_summaries_crr_operations import BackupUsageSummariesCRROperations -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 __all__ = [ 'BackupResourceStorageConfigsNonCRROperations', @@ -110,14 +100,4 @@ 'RecoveryPointsRecommendedForMoveOperations', 'ResourceGuardProxiesOperations', 'ResourceGuardProxyOperations', - 'BackupUsageSummariesCRROperations', - 'AadPropertiesOperations', - 'CrossRegionRestoreOperations', - 'BackupCrrJobDetailsOperations', - 'BackupCrrJobsOperations', - 'CrrOperationResultsOperations', - 'CrrOperationStatusOperations', - 'BackupResourceStorageConfigsOperations', - 'RecoveryPointsCrrOperations', - 'BackupProtectedItemsCrrOperations', ] diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_aad_properties_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_aad_properties_operations.py deleted file mode 100644 index f45f457700ec..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_aad_properties_operations.py +++ /dev/null @@ -1,103 +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. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class AadPropertiesOperations: - """AadPropertiesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - azure_region: str, - filter: Optional[str] = None, - **kwargs: Any - ) -> "_models.AADPropertiesResource": - """Fetches the AAD properties from target region BCM stamp. - - Fetches the AAD properties from target region BCM stamp. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AADPropertiesResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.AADPropertiesResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AADPropertiesResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - 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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AADPropertiesResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_job_details_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_job_details_operations.py deleted file mode 100644 index 0992760723dc..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_job_details_operations.py +++ /dev/null @@ -1,106 +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. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupCrrJobDetailsOperations: - """BackupCrrJobDetailsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - azure_region: str, - parameters: "_models.CrrJobRequest", - **kwargs: Any - ) -> "_models.JobResource": - """Get CRR job details from target region. - - Get CRR job details from target region. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: CRR Job request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.CrrJobRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :return: JobResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.JobResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrrJobRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('JobResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_jobs_operations.py deleted file mode 100644 index 83a0be7b14f8..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_jobs_operations.py +++ /dev/null @@ -1,136 +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. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupCrrJobsOperations: - """BackupCrrJobsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - azure_region: str, - parameters: "_models.CrrJobRequest", - filter: Optional[str] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.JobResourceList"]: - """Gets the list of CRR jobs from the target region. - - Gets the list of CRR jobs from the target region. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: Backup CRR Job request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.CrrJobRequest - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.JobResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = "application/json" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - 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') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrrJobRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrrJobRequest') - body_content_kwargs['content'] = body_content - request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('JobResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_crr_operations.py deleted file mode 100644 index 44ae0174fe20..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_crr_operations.py +++ /dev/null @@ -1,128 +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. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupProtectedItemsCrrOperations: - """BackupProtectedItemsCrrOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - filter: Optional[str] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.ProtectedItemResourceList"]: - """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 - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectedItemResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectedItemResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - 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') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectedItemResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_operations.py deleted file mode 100644 index 23f9e273638a..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_operations.py +++ /dev/null @@ -1,234 +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. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupResourceStorageConfigsOperations: - """BackupResourceStorageConfigsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - **kwargs: Any - ) -> "_models.BackupResourceConfigResource": - """Fetches resource storage 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 - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupResourceConfigResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore - - async def update( - self, - vault_name: str, - resource_group_name: str, - parameters: "_models.BackupResourceConfigResource", - **kwargs: Any - ) -> "_models.BackupResourceConfigResource": - """Updates vault storage model type. - - :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: Vault storage config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupResourceConfigResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.update.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupResourceConfigResource') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore - - async def patch( - self, - vault_name: str, - resource_group_name: str, - parameters: "_models.BackupResourceConfigResource", - **kwargs: Any - ) -> None: - """Updates vault storage model type. - - :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: Vault storage config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.patch.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupResourceConfigResource') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_crr_operations.py deleted file mode 100644 index c1db556c86ab..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_crr_operations.py +++ /dev/null @@ -1,128 +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. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupUsageSummariesCRROperations: - """BackupUsageSummariesCRROperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - filter: Optional[str] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.BackupManagementUsageList"]: - """Fetches the backup management usage summaries of the 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 - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either BackupManagementUsageList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsageList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupManagementUsageList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - 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') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('BackupManagementUsageList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_cross_region_restore_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_cross_region_restore_operations.py deleted file mode 100644 index e4eb302bfc3b..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_cross_region_restore_operations.py +++ /dev/null @@ -1,158 +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. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class CrossRegionRestoreOperations: - """CrossRegionRestoreOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def _trigger_initial( - self, - azure_region: str, - parameters: "_models.CrossRegionRestoreRequest", - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._trigger_initial.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrossRegionRestoreRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _trigger_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore'} # type: ignore - - async def begin_trigger( - self, - azure_region: str, - parameters: "_models.CrossRegionRestoreRequest", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Restores the specified backed up data in a different region as compared to where the data is backed up. - - 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 parameters: resource cross region restore request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.CrossRegionRestoreRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._trigger_initial( - azure_region=azure_region, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - 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'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_results_operations.py deleted file mode 100644 index 973f001fc1cd..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_results_operations.py +++ /dev/null @@ -1,97 +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. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class CrrOperationResultsOperations: - """CrrOperationResultsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - azure_region: str, - operation_id: str, - **kwargs: Any - ) -> None: - """get. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param operation_id: - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_status_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_status_operations.py deleted file mode 100644 index c6c7274b8303..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_status_operations.py +++ /dev/null @@ -1,100 +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. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class CrrOperationStatusOperations: - """CrrOperationStatusOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - azure_region: str, - operation_id: str, - **kwargs: Any - ) -> "_models.OperationStatus": - """get. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param operation_id: - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationStatus, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('OperationStatus', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_crr_operations.py deleted file mode 100644 index 7c3fa9b1dd00..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_crr_operations.py +++ /dev/null @@ -1,135 +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. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class RecoveryPointsCrrOperations: - """RecoveryPointsCrrOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - filter: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.RecoveryPointResourceList"]: - """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 - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RecoveryPointResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - 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') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('RecoveryPointResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_operations.py index 95bb1a0d204a..090fd02cb29f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_operations.py @@ -209,91 +209,3 @@ async def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}'} # type: ignore - - async def get_access_token( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - recovery_point_id: str, - parameters: "_models.AADPropertiesResource", - **kwargs: Any - ) -> Optional["_models.CrrAccessTokenResource"]: - """Returns the Access token for communication between BMS and Protection service. - - 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 - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CrrAccessTokenResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.CrrAccessTokenResource or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CrrAccessTokenResource"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.get_access_token.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'AADPropertiesResource') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 400]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CrrAccessTokenResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - 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'} # type: ignore 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 f41e1a2c24a3..0aaa7d15b700 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 @@ -7,8 +7,6 @@ # -------------------------------------------------------------------------- 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 @@ -17,10 +15,8 @@ from ._models_py3 import AzureFileShareProtectionPolicy from ._models_py3 import AzureFileShareProvisionILRRequest from ._models_py3 import AzureFileShareRecoveryPoint - from ._models_py3 import AzureFileShareRecoveryPointAutoGenerated from ._models_py3 import AzureFileShareRestoreRequest from ._models_py3 import AzureFileshareProtectedItem - from ._models_py3 import AzureFileshareProtectedItemAutoGenerated from ._models_py3 import AzureFileshareProtectedItemExtendedInfo from ._models_py3 import AzureIaaSClassicComputeVMContainer from ._models_py3 import AzureIaaSClassicComputeVMProtectableItem @@ -82,32 +78,24 @@ from ._models_py3 import AzureWorkloadJobExtendedInfo from ._models_py3 import AzureWorkloadJobTaskDetails from ._models_py3 import AzureWorkloadPointInTimeRecoveryPoint - from ._models_py3 import AzureWorkloadPointInTimeRecoveryPointAutoGenerated from ._models_py3 import AzureWorkloadPointInTimeRestoreRequest from ._models_py3 import AzureWorkloadRecoveryPoint - from ._models_py3 import AzureWorkloadRecoveryPointAutoGenerated from ._models_py3 import AzureWorkloadRestoreRequest from ._models_py3 import AzureWorkloadSAPHanaPointInTimeRecoveryPoint - from ._models_py3 import AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated from ._models_py3 import AzureWorkloadSAPHanaPointInTimeRestoreRequest from ._models_py3 import AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest from ._models_py3 import AzureWorkloadSAPHanaRecoveryPoint - from ._models_py3 import AzureWorkloadSAPHanaRecoveryPointAutoGenerated from ._models_py3 import AzureWorkloadSAPHanaRestoreRequest from ._models_py3 import AzureWorkloadSAPHanaRestoreWithRehydrateRequest from ._models_py3 import AzureWorkloadSQLAutoProtectionIntent from ._models_py3 import AzureWorkloadSQLPointInTimeRecoveryPoint - from ._models_py3 import AzureWorkloadSQLPointInTimeRecoveryPointAutoGenerated from ._models_py3 import AzureWorkloadSQLPointInTimeRestoreRequest from ._models_py3 import AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest from ._models_py3 import AzureWorkloadSQLRecoveryPoint - from ._models_py3 import AzureWorkloadSQLRecoveryPointAutoGenerated from ._models_py3 import AzureWorkloadSQLRecoveryPointExtendedInfo - from ._models_py3 import AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated from ._models_py3 import AzureWorkloadSQLRestoreRequest from ._models_py3 import AzureWorkloadSQLRestoreWithRehydrateRequest from ._models_py3 import BEKDetails - from ._models_py3 import BMSAADPropertiesQueryObject from ._models_py3 import BMSBackupEngineQueryObject from ._models_py3 import BMSBackupEnginesQueryObject from ._models_py3 import BMSBackupSummariesQueryObject @@ -144,12 +132,6 @@ from ._models_py3 import ClientScriptForConnect from ._models_py3 import CloudErrorBody 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 DPMContainerExtendedInfo from ._models_py3 import DPMProtectedItem from ._models_py3 import DPMProtectedItemExtendedInfo @@ -184,11 +166,8 @@ from ._models_py3 import IaasVMBackupRequest from ._models_py3 import IaasVMILRRegistrationRequest from ._models_py3 import IaasVMRecoveryPoint - from ._models_py3 import IaasVMRecoveryPointAutoGenerated from ._models_py3 import IaasVMRestoreRequest - from ._models_py3 import IaasVMRestoreRequestAutoGenerated from ._models_py3 import IaasVMRestoreWithRehydrationRequest - from ._models_py3 import IdentityBasedRestoreDetails from ._models_py3 import IdentityInfo from ._models_py3 import InquiryInfo from ._models_py3 import InquiryValidation @@ -219,9 +198,7 @@ from ._models_py3 import MoveRPAcrossTiersRequest from ._models_py3 import NameInfo from ._models_py3 import NewErrorResponse - from ._models_py3 import NewErrorResponseAutoGenerated from ._models_py3 import NewErrorResponseError - from ._models_py3 import NewErrorResponseErrorAutoGenerated from ._models_py3 import OperationResultInfo from ._models_py3 import OperationResultInfoBase from ._models_py3 import OperationResultInfoBaseResource @@ -231,7 +208,6 @@ 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 @@ -305,7 +281,6 @@ 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 @@ -315,8 +290,6 @@ from ._models_py3 import WorkloadProtectableItemResourceList from ._models_py3 import YearlyRetentionSchedule except (SyntaxError, ImportError): - from ._models import AADProperties # type: ignore - from ._models import AADPropertiesResource # type: ignore from ._models import AzureBackupGoalFeatureSupportRequest # type: ignore from ._models import AzureBackupServerContainer # type: ignore from ._models import AzureBackupServerEngine # type: ignore @@ -325,10 +298,8 @@ from ._models import AzureFileShareProtectionPolicy # type: ignore from ._models import AzureFileShareProvisionILRRequest # type: ignore from ._models import AzureFileShareRecoveryPoint # type: ignore - from ._models import AzureFileShareRecoveryPointAutoGenerated # type: ignore from ._models import AzureFileShareRestoreRequest # type: ignore from ._models import AzureFileshareProtectedItem # type: ignore - from ._models import AzureFileshareProtectedItemAutoGenerated # type: ignore from ._models import AzureFileshareProtectedItemExtendedInfo # type: ignore from ._models import AzureIaaSClassicComputeVMContainer # type: ignore from ._models import AzureIaaSClassicComputeVMProtectableItem # type: ignore @@ -390,32 +361,24 @@ from ._models import AzureWorkloadJobExtendedInfo # type: ignore from ._models import AzureWorkloadJobTaskDetails # type: ignore from ._models import AzureWorkloadPointInTimeRecoveryPoint # type: ignore - from ._models import AzureWorkloadPointInTimeRecoveryPointAutoGenerated # type: ignore from ._models import AzureWorkloadPointInTimeRestoreRequest # type: ignore from ._models import AzureWorkloadRecoveryPoint # type: ignore - from ._models import AzureWorkloadRecoveryPointAutoGenerated # type: ignore from ._models import AzureWorkloadRestoreRequest # type: ignore from ._models import AzureWorkloadSAPHanaPointInTimeRecoveryPoint # type: ignore - from ._models import AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated # type: ignore from ._models import AzureWorkloadSAPHanaPointInTimeRestoreRequest # type: ignore from ._models import AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest # type: ignore from ._models import AzureWorkloadSAPHanaRecoveryPoint # type: ignore - from ._models import AzureWorkloadSAPHanaRecoveryPointAutoGenerated # type: ignore from ._models import AzureWorkloadSAPHanaRestoreRequest # type: ignore from ._models import AzureWorkloadSAPHanaRestoreWithRehydrateRequest # type: ignore from ._models import AzureWorkloadSQLAutoProtectionIntent # type: ignore from ._models import AzureWorkloadSQLPointInTimeRecoveryPoint # type: ignore - from ._models import AzureWorkloadSQLPointInTimeRecoveryPointAutoGenerated # type: ignore from ._models import AzureWorkloadSQLPointInTimeRestoreRequest # type: ignore from ._models import AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest # type: ignore from ._models import AzureWorkloadSQLRecoveryPoint # type: ignore - from ._models import AzureWorkloadSQLRecoveryPointAutoGenerated # type: ignore from ._models import AzureWorkloadSQLRecoveryPointExtendedInfo # type: ignore - from ._models import AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated # type: ignore from ._models import AzureWorkloadSQLRestoreRequest # type: ignore from ._models import AzureWorkloadSQLRestoreWithRehydrateRequest # type: ignore from ._models import BEKDetails # type: ignore - from ._models import BMSAADPropertiesQueryObject # type: ignore from ._models import BMSBackupEngineQueryObject # type: ignore from ._models import BMSBackupEnginesQueryObject # type: ignore from ._models import BMSBackupSummariesQueryObject # type: ignore @@ -452,12 +415,6 @@ from ._models import ClientScriptForConnect # type: ignore from ._models import CloudErrorBody # type: ignore from ._models import ContainerIdentityInfo # type: ignore - from ._models import CrossRegionRestoreRequest # type: ignore - from ._models import CrossRegionRestoreRequestResource # type: ignore - from ._models import CrrAccessToken # type: ignore - from ._models import CrrAccessTokenResource # type: ignore - from ._models import CrrJobRequest # type: ignore - from ._models import CrrJobRequestResource # type: ignore from ._models import DPMContainerExtendedInfo # type: ignore from ._models import DPMProtectedItem # type: ignore from ._models import DPMProtectedItemExtendedInfo # type: ignore @@ -492,11 +449,8 @@ from ._models import IaasVMBackupRequest # type: ignore from ._models import IaasVMILRRegistrationRequest # type: ignore from ._models import IaasVMRecoveryPoint # type: ignore - from ._models import IaasVMRecoveryPointAutoGenerated # type: ignore from ._models import IaasVMRestoreRequest # type: ignore - from ._models import IaasVMRestoreRequestAutoGenerated # type: ignore from ._models import IaasVMRestoreWithRehydrationRequest # type: ignore - from ._models import IdentityBasedRestoreDetails # type: ignore from ._models import IdentityInfo # type: ignore from ._models import InquiryInfo # type: ignore from ._models import InquiryValidation # type: ignore @@ -527,9 +481,7 @@ from ._models import MoveRPAcrossTiersRequest # type: ignore from ._models import NameInfo # type: ignore from ._models import NewErrorResponse # type: ignore - from ._models import NewErrorResponseAutoGenerated # type: ignore from ._models import NewErrorResponseError # type: ignore - from ._models import NewErrorResponseErrorAutoGenerated # type: ignore from ._models import OperationResultInfo # type: ignore from ._models import OperationResultInfoBase # type: ignore from ._models import OperationResultInfoBaseResource # type: ignore @@ -539,7 +491,6 @@ from ._models import OperationStatusJobExtendedInfo # type: ignore from ._models import OperationStatusJobsExtendedInfo # type: ignore from ._models import OperationStatusProvisionILRExtendedInfo # type: ignore - from ._models import OperationStatusRecoveryPointExtendedInfo # type: ignore from ._models import OperationWorkerResponse # type: ignore from ._models import PointInTimeRange # type: ignore from ._models import PreBackupValidation # type: ignore @@ -613,7 +564,6 @@ from ._models import VaultStorageConfigOperationResultResponse # type: ignore from ._models import WeeklyRetentionFormat # type: ignore from ._models import WeeklyRetentionSchedule # type: ignore - from ._models import WorkloadCrrAccessToken # type: ignore from ._models import WorkloadInquiryDetails # type: ignore from ._models import WorkloadItem # type: ignore from ._models import WorkloadItemResource # type: ignore @@ -687,8 +637,6 @@ ) __all__ = [ - 'AADProperties', - 'AADPropertiesResource', 'AzureBackupGoalFeatureSupportRequest', 'AzureBackupServerContainer', 'AzureBackupServerEngine', @@ -697,10 +645,8 @@ 'AzureFileShareProtectionPolicy', 'AzureFileShareProvisionILRRequest', 'AzureFileShareRecoveryPoint', - 'AzureFileShareRecoveryPointAutoGenerated', 'AzureFileShareRestoreRequest', 'AzureFileshareProtectedItem', - 'AzureFileshareProtectedItemAutoGenerated', 'AzureFileshareProtectedItemExtendedInfo', 'AzureIaaSClassicComputeVMContainer', 'AzureIaaSClassicComputeVMProtectableItem', @@ -762,32 +708,24 @@ 'AzureWorkloadJobExtendedInfo', 'AzureWorkloadJobTaskDetails', 'AzureWorkloadPointInTimeRecoveryPoint', - 'AzureWorkloadPointInTimeRecoveryPointAutoGenerated', 'AzureWorkloadPointInTimeRestoreRequest', 'AzureWorkloadRecoveryPoint', - 'AzureWorkloadRecoveryPointAutoGenerated', 'AzureWorkloadRestoreRequest', 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint', - 'AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated', 'AzureWorkloadSAPHanaPointInTimeRestoreRequest', 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', 'AzureWorkloadSAPHanaRecoveryPoint', - 'AzureWorkloadSAPHanaRecoveryPointAutoGenerated', 'AzureWorkloadSAPHanaRestoreRequest', 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest', 'AzureWorkloadSQLAutoProtectionIntent', 'AzureWorkloadSQLPointInTimeRecoveryPoint', - 'AzureWorkloadSQLPointInTimeRecoveryPointAutoGenerated', 'AzureWorkloadSQLPointInTimeRestoreRequest', 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', 'AzureWorkloadSQLRecoveryPoint', - 'AzureWorkloadSQLRecoveryPointAutoGenerated', 'AzureWorkloadSQLRecoveryPointExtendedInfo', - 'AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated', 'AzureWorkloadSQLRestoreRequest', 'AzureWorkloadSQLRestoreWithRehydrateRequest', 'BEKDetails', - 'BMSAADPropertiesQueryObject', 'BMSBackupEngineQueryObject', 'BMSBackupEnginesQueryObject', 'BMSBackupSummariesQueryObject', @@ -824,12 +762,6 @@ 'ClientScriptForConnect', 'CloudErrorBody', 'ContainerIdentityInfo', - 'CrossRegionRestoreRequest', - 'CrossRegionRestoreRequestResource', - 'CrrAccessToken', - 'CrrAccessTokenResource', - 'CrrJobRequest', - 'CrrJobRequestResource', 'DPMContainerExtendedInfo', 'DPMProtectedItem', 'DPMProtectedItemExtendedInfo', @@ -864,11 +796,8 @@ 'IaasVMBackupRequest', 'IaasVMILRRegistrationRequest', 'IaasVMRecoveryPoint', - 'IaasVMRecoveryPointAutoGenerated', 'IaasVMRestoreRequest', - 'IaasVMRestoreRequestAutoGenerated', 'IaasVMRestoreWithRehydrationRequest', - 'IdentityBasedRestoreDetails', 'IdentityInfo', 'InquiryInfo', 'InquiryValidation', @@ -899,9 +828,7 @@ 'MoveRPAcrossTiersRequest', 'NameInfo', 'NewErrorResponse', - 'NewErrorResponseAutoGenerated', 'NewErrorResponseError', - 'NewErrorResponseErrorAutoGenerated', 'OperationResultInfo', 'OperationResultInfoBase', 'OperationResultInfoBaseResource', @@ -911,7 +838,6 @@ 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo', - 'OperationStatusRecoveryPointExtendedInfo', 'OperationWorkerResponse', 'PointInTimeRange', 'PreBackupValidation', @@ -985,7 +911,6 @@ 'VaultStorageConfigOperationResultResponse', 'WeeklyRetentionFormat', 'WeeklyRetentionSchedule', - 'WorkloadCrrAccessToken', 'WorkloadInquiryDetails', 'WorkloadItem', 'WorkloadItemResource', 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 d6c2ee83e4e7..50aa41e8e6e2 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 @@ -10,135 +10,6 @@ import msrest.serialization -class AADProperties(msrest.serialization.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(msrest.serialization.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: A set of 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: A set of 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(msrest.serialization.Model): """Base class for feature request. @@ -746,7 +617,7 @@ class ProtectedItem(msrest.serialization.Model): """Base class for backup items. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileshareProtectedItemAutoGenerated, AzureIaaSVMProtectedItem, AzureVmWorkloadProtectedItem, DPMProtectedItem, GenericProtectedItem, MabFileFolderProtectedItem, AzureSqlProtectedItem. + sub-classes are: AzureFileshareProtectedItem, AzureIaaSVMProtectedItem, AzureVmWorkloadProtectedItem, DPMProtectedItem, GenericProtectedItem, MabFileFolderProtectedItem, AzureSqlProtectedItem. All required parameters must be populated in order to send to Azure. @@ -817,7 +688,7 @@ class ProtectedItem(msrest.serialization.Model): } _subtype_map = { - 'protected_item_type': {'AzureFileShareProtectedItem': 'AzureFileshareProtectedItemAutoGenerated', 'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'AzureVmWorkloadProtectedItem': 'AzureVmWorkloadProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'GenericProtectedItem': 'GenericProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem'} + 'protected_item_type': {'AzureFileShareProtectedItem': 'AzureFileshareProtectedItem', 'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'AzureVmWorkloadProtectedItem': 'AzureVmWorkloadProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'GenericProtectedItem': 'GenericProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem'} } def __init__( @@ -952,121 +823,6 @@ def __init__( self.extended_info = kwargs.get('extended_info', None) -class AzureFileshareProtectedItemAutoGenerated(ProtectedItem): - """Azure File Share workload-specific backup item. - - All required parameters must be populated in order to send to Azure. - - :param protected_item_type: Required. backup item type.Constant filled by server. - :type protected_item_type: str - :param backup_management_type: Type of backup management for the backed up item. Possible - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param workload_type: Type of workload this item represents. Possible values include: - "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", - "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", - "SAPHanaDatabase", "SAPAseDatabase". - :type workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType - :param container_name: Unique name of container. - :type container_name: str - :param source_resource_id: ARM ID of the resource to be backed up. - :type source_resource_id: str - :param policy_id: ID of the backup policy with which this item is backed up. - :type policy_id: str - :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this - backup item. - :type last_recovery_point: ~datetime.datetime - :param backup_set_name: Name of the backup set the backup item belongs to. - :type backup_set_name: str - :param create_mode: Create mode to indicate recovery of existing soft deleted data source or - creation of new data source. Possible values include: "Invalid", "Default", "Recover". - :type create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode - :param deferred_delete_time_in_utc: Time for deferred deletion in UTC. - :type deferred_delete_time_in_utc: ~datetime.datetime - :param is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for - deferred delete. - :type is_scheduled_for_deferred_delete: bool - :param deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete - is permanently deleted. - :type deferred_delete_time_remaining: str - :param is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS - is to be purged soon. - :type is_deferred_delete_schedule_upcoming: bool - :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. - :type is_rehydrate: bool - :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check - will be performed. - :type resource_guard_operation_requests: list[str] - :param friendly_name: Friendly name of the fileshare represented by this backup item. - :type friendly_name: str - :param protection_status: Backup status of this backup item. - :type protection_status: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", - "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState - :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 - :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.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 - """ - - _validation = { - 'protected_item_type': {'required': True}, - } - - _attribute_map = { - 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'policy_id': {'key': 'policyId', 'type': 'str'}, - 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, - 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'deferred_delete_time_in_utc': {'key': 'deferredDeleteTimeInUTC', 'type': 'iso-8601'}, - 'is_scheduled_for_deferred_delete': {'key': 'isScheduledForDeferredDelete', 'type': 'bool'}, - 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, - 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, - 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - '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'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureFileshareProtectedItemAutoGenerated, self).__init__(**kwargs) - self.protected_item_type = 'AzureFileShareProtectedItem' # type: str - 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.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) - - class AzureFileshareProtectedItemExtendedInfo(msrest.serialization.Model): """Additional information about Azure File Share backup item. @@ -1276,7 +1032,7 @@ class RecoveryPoint(msrest.serialization.Model): """Base class for backup copies. Workload-specific backup copies are derived from this class. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileShareRecoveryPointAutoGenerated, AzureWorkloadRecoveryPointAutoGenerated, GenericRecoveryPoint, IaasVMRecoveryPointAutoGenerated. + sub-classes are: AzureFileShareRecoveryPoint, AzureWorkloadRecoveryPoint, GenericRecoveryPoint, IaasVMRecoveryPoint. All required parameters must be populated in order to send to Azure. @@ -1294,7 +1050,7 @@ class RecoveryPoint(msrest.serialization.Model): } _subtype_map = { - 'object_type': {'AzureFileShareRecoveryPoint': 'AzureFileShareRecoveryPointAutoGenerated', 'AzureWorkloadRecoveryPoint': 'AzureWorkloadRecoveryPointAutoGenerated', 'GenericRecoveryPoint': 'GenericRecoveryPoint', 'IaasVMRecoveryPoint': 'IaasVMRecoveryPointAutoGenerated'} + 'object_type': {'AzureFileShareRecoveryPoint': 'AzureFileShareRecoveryPoint', 'AzureWorkloadRecoveryPoint': 'AzureWorkloadRecoveryPoint', 'GenericRecoveryPoint': 'GenericRecoveryPoint', 'IaasVMRecoveryPoint': 'IaasVMRecoveryPoint'} } def __init__( @@ -1348,60 +1104,11 @@ def __init__( self.recovery_point_size_in_gb = kwargs.get('recovery_point_size_in_gb', None) -class AzureFileShareRecoveryPointAutoGenerated(RecoveryPoint): - """Azure File Share workload specific backup copy. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_type: Type of the backup copy. Specifies whether it is a crash consistent - backup or app consistent. - :vartype recovery_point_type: str - :ivar recovery_point_time: Time at which this backup copy was created. - :vartype recovery_point_time: ~datetime.datetime - :ivar file_share_snapshot_uri: Contains Url to the snapshot of fileshare, if applicable. - :vartype file_share_snapshot_uri: str - :ivar recovery_point_size_in_gb: Contains recovery point size. - :vartype recovery_point_size_in_gb: int - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_type': {'readonly': True}, - 'recovery_point_time': {'readonly': True}, - 'file_share_snapshot_uri': {'readonly': True}, - 'recovery_point_size_in_gb': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, - 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, - 'file_share_snapshot_uri': {'key': 'fileShareSnapshotUri', 'type': 'str'}, - 'recovery_point_size_in_gb': {'key': 'recoveryPointSizeInGB', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureFileShareRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureFileShareRecoveryPoint' # type: str - self.recovery_point_type = None - self.recovery_point_time = None - self.file_share_snapshot_uri = None - self.recovery_point_size_in_gb = None - - class RestoreRequest(msrest.serialization.Model): """Base class for restore request. Workload-specific restore requests are derived from this class. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, IaasVMRestoreRequestAutoGenerated. + sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, IaasVMRestoreRequest. All required parameters must be populated in order to send to Azure. @@ -1419,7 +1126,7 @@ class RestoreRequest(msrest.serialization.Model): } _subtype_map = { - 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequestAutoGenerated'} + 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequest'} } def __init__( @@ -5518,123 +5225,11 @@ def __init__( self.time_ranges = kwargs.get('time_ranges', None) -class AzureWorkloadRecoveryPointAutoGenerated(RecoveryPoint): - """Workload specific recovery point, specifically encapsulates full/diff recovery point. +class AzureWorkloadRestoreRequest(RestoreRequest): + """AzureWorkload-specific restore. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadPointInTimeRecoveryPointAutoGenerated, AzureWorkloadSAPHanaRecoveryPointAutoGenerated, AzureWorkloadSQLRecoveryPointAutoGenerated. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadPointInTimeRecoveryPoint': 'AzureWorkloadPointInTimeRecoveryPointAutoGenerated', 'AzureWorkloadSAPHanaRecoveryPoint': 'AzureWorkloadSAPHanaRecoveryPointAutoGenerated', 'AzureWorkloadSQLRecoveryPoint': 'AzureWorkloadSQLRecoveryPointAutoGenerated'} - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadRecoveryPoint' # type: str - self.recovery_point_time_in_utc = None - self.type = None - self.recovery_point_tier_details = kwargs.get('recovery_point_tier_details', None) - self.recovery_point_move_readiness_info = kwargs.get('recovery_point_move_readiness_info', None) - - -class AzureWorkloadPointInTimeRecoveryPointAutoGenerated(AzureWorkloadRecoveryPointAutoGenerated): - """Recovery point specific to PointInTime. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - :param time_ranges: List of log ranges. - :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadSAPHanaPointInTimeRecoveryPoint': 'AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated'} - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadPointInTimeRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadPointInTimeRecoveryPoint' # type: str - self.time_ranges = kwargs.get('time_ranges', None) - - -class AzureWorkloadRestoreRequest(RestoreRequest): - """AzureWorkload-specific restore. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadPointInTimeRestoreRequest, AzureWorkloadSAPHanaRestoreRequest, AzureWorkloadSQLRestoreRequest. + sub-classes are: AzureWorkloadPointInTimeRestoreRequest, AzureWorkloadSAPHanaRestoreRequest, AzureWorkloadSQLRestoreRequest. All required parameters must be populated in order to send to Azure. @@ -5789,54 +5384,6 @@ def __init__( self.object_type = 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint' # type: str -class AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated(AzureWorkloadPointInTimeRecoveryPointAutoGenerated): - """Recovery point specific to PointInTime in SAPHana. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - :param time_ranges: List of log ranges. - :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint' # type: str - - class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): """AzureWorkload SAP Hana-specific restore. @@ -6051,51 +5598,6 @@ def __init__( self.object_type = 'AzureWorkloadSAPHanaRecoveryPoint' # type: str -class AzureWorkloadSAPHanaRecoveryPointAutoGenerated(AzureWorkloadRecoveryPointAutoGenerated): - """SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSAPHanaRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSAPHanaRecoveryPoint' # type: str - - class AzureWorkloadSAPHanaRestoreWithRehydrateRequest(AzureWorkloadSAPHanaRestoreRequest): """AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. @@ -6310,122 +5812,6 @@ def __init__( self.time_ranges = kwargs.get('time_ranges', None) -class AzureWorkloadSQLRecoveryPointAutoGenerated(AzureWorkloadRecoveryPointAutoGenerated): - """SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint along with extended info. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSQLPointInTimeRecoveryPointAutoGenerated. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - :param extended_info: Extended Info that provides data directory details. Will be populated in - two cases: - When a specific recovery point is accessed using GetRecoveryPoint - Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter. - :type extended_info: - ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadSQLPointInTimeRecoveryPoint': 'AzureWorkloadSQLPointInTimeRecoveryPointAutoGenerated'} - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSQLRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSQLRecoveryPoint' # type: str - self.extended_info = kwargs.get('extended_info', None) - - -class AzureWorkloadSQLPointInTimeRecoveryPointAutoGenerated(AzureWorkloadSQLRecoveryPointAutoGenerated): - """Recovery point specific to PointInTime. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - :param extended_info: Extended Info that provides data directory details. Will be populated in - two cases: - When a specific recovery point is accessed using GetRecoveryPoint - Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter. - :type extended_info: - ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated - :param time_ranges: List of log ranges. - :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated'}, - 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSQLPointInTimeRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSQLPointInTimeRecoveryPoint' # type: str - self.time_ranges = kwargs.get('time_ranges', None) - - class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): """AzureWorkload SQL -specific restore. Specifically for full/diff restore. @@ -6657,38 +6043,8 @@ def __init__( **kwargs ): super(AzureWorkloadSQLRecoveryPointExtendedInfo, self).__init__(**kwargs) - self.data_directory_time_in_utc = kwargs.get('data_directory_time_in_utc', None) - self.data_directory_paths = kwargs.get('data_directory_paths', None) - - -class AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated(msrest.serialization.Model): - """Extended info class details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar data_directory_time_in_utc: UTC time at which data directory info was captured. - :vartype data_directory_time_in_utc: ~datetime.datetime - :ivar data_directory_paths: List of data directory paths during restore operation. - :vartype data_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] - """ - - _validation = { - 'data_directory_time_in_utc': {'readonly': True}, - 'data_directory_paths': {'readonly': True}, - } - - _attribute_map = { - 'data_directory_time_in_utc': {'key': 'dataDirectoryTimeInUTC', 'type': 'iso-8601'}, - 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated, self).__init__(**kwargs) - self.data_directory_time_in_utc = None - self.data_directory_paths = None + self.data_directory_time_in_utc = kwargs.get('data_directory_time_in_utc', None) + self.data_directory_paths = kwargs.get('data_directory_paths', None) class AzureWorkloadSQLRestoreWithRehydrateRequest(AzureWorkloadSQLRestoreRequest): @@ -6757,6 +6113,54 @@ def __init__( self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) +class Resource(msrest.serialization.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: A set of 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. @@ -7463,28 +6867,6 @@ def __init__( self.secret_data = kwargs.get('secret_data', None) -class BMSAADPropertiesQueryObject(msrest.serialization.Model): - """Filters to list backup items. - - :param backup_management_type: Backup management type for the backed up item. Possible values - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - """ - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BMSAADPropertiesQueryObject, self).__init__(**kwargs) - self.backup_management_type = kwargs.get('backup_management_type', None) - - class BMSBackupEngineQueryObject(msrest.serialization.Model): """Query parameters to fetch list of backup engines. @@ -8015,355 +7397,34 @@ def __init__( class ContainerIdentityInfo(msrest.serialization.Model): - """Container identity information. - - :param unique_name: Unique name of the container. - :type unique_name: str - :param aad_tenant_id: Protection container identity - AAD Tenant. - :type aad_tenant_id: str - :param service_principal_client_id: Protection container identity - AAD Service Principal. - :type service_principal_client_id: str - :param audience: Protection container identity - Audience. - :type audience: str - """ - - _attribute_map = { - 'unique_name': {'key': 'uniqueName', 'type': 'str'}, - 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, - 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, - 'audience': {'key': 'audience', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ContainerIdentityInfo, self).__init__(**kwargs) - self.unique_name = kwargs.get('unique_name', None) - self.aad_tenant_id = kwargs.get('aad_tenant_id', None) - self.service_principal_client_id = kwargs.get('service_principal_client_id', None) - self.audience = kwargs.get('audience', None) - - -class CrossRegionRestoreRequest(msrest.serialization.Model): - """CrossRegionRestoreRequest. - - :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: A set of 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(msrest.serialization.Model): - """CrrAccessToken. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: WorkloadCrrAccessToken. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. Type of the specific object - used for deserializing.Constant - filled by server. - :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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _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'}, - } - - _subtype_map = { - 'object_type': {'WorkloadCrrAccessToken': 'WorkloadCrrAccessToken'} - } - - def __init__( - self, - **kwargs - ): - super(CrrAccessToken, self).__init__(**kwargs) - self.object_type = None # type: Optional[str] - 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: A set of 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(msrest.serialization.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. + """Container identity information. - :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: A set of 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 + :param unique_name: Unique name of the container. + :type unique_name: str + :param aad_tenant_id: Protection container identity - AAD Tenant. + :type aad_tenant_id: str + :param service_principal_client_id: Protection container identity - AAD Service Principal. + :type service_principal_client_id: str + :param audience: Protection container identity - Audience. + :type audience: 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'}, - 'properties': {'key': 'properties', 'type': 'CrrJobRequest'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, } def __init__( self, **kwargs ): - super(CrrJobRequestResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + super(ContainerIdentityInfo, self).__init__(**kwargs) + self.unique_name = kwargs.get('unique_name', None) + self.aad_tenant_id = kwargs.get('aad_tenant_id', None) + self.service_principal_client_id = kwargs.get('service_principal_client_id', None) + self.audience = kwargs.get('audience', None) class DailyRetentionFormat(msrest.serialization.Model): @@ -9511,256 +8572,40 @@ class IaasVMRecoveryPoint(RecoveryPoint): :param recovery_point_type: Type of the backup copy. :type recovery_point_type: str :param recovery_point_time: Time at which this backup copy was created. - :type recovery_point_time: ~datetime.datetime - :param recovery_point_additional_info: Additional information associated with this backup copy. - :type recovery_point_additional_info: str - :param source_vm_storage_type: Storage type of the VM whose backup copy is created. - :type source_vm_storage_type: str - :param is_source_vm_encrypted: Identifies whether the VM was encrypted when the backup copy is - created. - :type is_source_vm_encrypted: bool - :param key_and_secret: Required details for recovering an encrypted VM. Applicable only when - IsSourceVMEncrypted is true. - :type key_and_secret: ~azure.mgmt.recoveryservicesbackup.models.KeyAndSecretDetails - :param is_instant_ilr_session_active: Is the session to recover items from this backup copy - still active. - :type is_instant_ilr_session_active: bool - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param is_managed_virtual_machine: Whether VM is with Managed Disks. - :type is_managed_virtual_machine: bool - :param virtual_machine_size: Virtual Machine Size. - :type virtual_machine_size: str - :param original_storage_account_option: Original Storage Account Option. - :type original_storage_account_option: bool - :param os_type: OS type. - :type os_type: str - :param recovery_point_disk_configuration: Disk configuration. - :type recovery_point_disk_configuration: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointDiskConfiguration - :param zones: Identifies the zone of the VM at the time of backup. Applicable only for - zone-pinned Vms. - :type zones: list[str] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, - 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, - 'recovery_point_additional_info': {'key': 'recoveryPointAdditionalInfo', 'type': 'str'}, - 'source_vm_storage_type': {'key': 'sourceVMStorageType', 'type': 'str'}, - 'is_source_vm_encrypted': {'key': 'isSourceVMEncrypted', 'type': 'bool'}, - 'key_and_secret': {'key': 'keyAndSecret', 'type': 'KeyAndSecretDetails'}, - 'is_instant_ilr_session_active': {'key': 'isInstantIlrSessionActive', 'type': 'bool'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'is_managed_virtual_machine': {'key': 'isManagedVirtualMachine', 'type': 'bool'}, - 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, - 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'recovery_point_disk_configuration': {'key': 'recoveryPointDiskConfiguration', 'type': 'RecoveryPointDiskConfiguration'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - } - - def __init__( - self, - **kwargs - ): - super(IaasVMRecoveryPoint, self).__init__(**kwargs) - self.object_type = 'IaasVMRecoveryPoint' # type: str - self.recovery_point_type = kwargs.get('recovery_point_type', None) - self.recovery_point_time = kwargs.get('recovery_point_time', None) - self.recovery_point_additional_info = kwargs.get('recovery_point_additional_info', None) - self.source_vm_storage_type = kwargs.get('source_vm_storage_type', None) - self.is_source_vm_encrypted = kwargs.get('is_source_vm_encrypted', None) - self.key_and_secret = kwargs.get('key_and_secret', None) - self.is_instant_ilr_session_active = kwargs.get('is_instant_ilr_session_active', None) - self.recovery_point_tier_details = kwargs.get('recovery_point_tier_details', None) - self.is_managed_virtual_machine = kwargs.get('is_managed_virtual_machine', None) - self.virtual_machine_size = kwargs.get('virtual_machine_size', None) - self.original_storage_account_option = kwargs.get('original_storage_account_option', None) - self.os_type = kwargs.get('os_type', None) - self.recovery_point_disk_configuration = kwargs.get('recovery_point_disk_configuration', None) - self.zones = kwargs.get('zones', None) - self.recovery_point_move_readiness_info = kwargs.get('recovery_point_move_readiness_info', None) - - -class IaasVMRecoveryPointAutoGenerated(RecoveryPoint): - """IaaS VM workload specific backup copy. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_type: Type of the backup copy. - :vartype recovery_point_type: str - :ivar recovery_point_time: Time at which this backup copy was created. - :vartype recovery_point_time: ~datetime.datetime - :ivar recovery_point_additional_info: Additional information associated with this backup copy. - :vartype recovery_point_additional_info: str - :ivar source_vm_storage_type: Storage type of the VM whose backup copy is created. - :vartype source_vm_storage_type: str - :ivar is_source_vm_encrypted: Identifies whether the VM was encrypted when the backup copy is - created. - :vartype is_source_vm_encrypted: bool - :param key_and_secret: Required details for recovering an encrypted VM. Applicable only when - IsSourceVMEncrypted is true. - :type key_and_secret: ~azure.mgmt.recoveryservicesbackup.models.KeyAndSecretDetails - :param is_instant_ilr_session_active: Is the session to recover items from this backup copy - still active. - :type is_instant_ilr_session_active: bool - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param is_managed_virtual_machine: Whether VM is with Managed Disks. - :type is_managed_virtual_machine: bool - :param virtual_machine_size: Virtual Machine Size. - :type virtual_machine_size: str - :param original_storage_account_option: Original Storage Account Option. - :type original_storage_account_option: bool - :param os_type: OS type. - :type os_type: str - :param recovery_point_disk_configuration: Disk configuration. - :type recovery_point_disk_configuration: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointDiskConfiguration - :param zones: Identifies the zone of the VM at the time of backup. Applicable only for - zone-pinned Vms. - :type zones: list[str] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_type': {'readonly': True}, - 'recovery_point_time': {'readonly': True}, - 'recovery_point_additional_info': {'readonly': True}, - 'source_vm_storage_type': {'readonly': True}, - 'is_source_vm_encrypted': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, - 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, - 'recovery_point_additional_info': {'key': 'recoveryPointAdditionalInfo', 'type': 'str'}, - 'source_vm_storage_type': {'key': 'sourceVMStorageType', 'type': 'str'}, - 'is_source_vm_encrypted': {'key': 'isSourceVMEncrypted', 'type': 'bool'}, - 'key_and_secret': {'key': 'keyAndSecret', 'type': 'KeyAndSecretDetails'}, - 'is_instant_ilr_session_active': {'key': 'isInstantIlrSessionActive', 'type': 'bool'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'is_managed_virtual_machine': {'key': 'isManagedVirtualMachine', 'type': 'bool'}, - 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, - 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'recovery_point_disk_configuration': {'key': 'recoveryPointDiskConfiguration', 'type': 'RecoveryPointDiskConfiguration'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - } - - def __init__( - self, - **kwargs - ): - super(IaasVMRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'IaasVMRecoveryPoint' # type: str - self.recovery_point_type = None - self.recovery_point_time = None - self.recovery_point_additional_info = None - self.source_vm_storage_type = None - self.is_source_vm_encrypted = None - self.key_and_secret = kwargs.get('key_and_secret', None) - self.is_instant_ilr_session_active = kwargs.get('is_instant_ilr_session_active', None) - self.recovery_point_tier_details = kwargs.get('recovery_point_tier_details', None) - self.is_managed_virtual_machine = kwargs.get('is_managed_virtual_machine', None) - self.virtual_machine_size = kwargs.get('virtual_machine_size', None) - self.original_storage_account_option = kwargs.get('original_storage_account_option', None) - self.os_type = kwargs.get('os_type', None) - self.recovery_point_disk_configuration = kwargs.get('recovery_point_disk_configuration', None) - self.zones = kwargs.get('zones', None) - self.recovery_point_move_readiness_info = kwargs.get('recovery_point_move_readiness_info', None) - - -class IaasVMRestoreRequest(RestoreRequest): - """IaaS VM workload-specific restore. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: IaasVMRestoreWithRehydrationRequest. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :param recovery_point_id: ID of the backup copy to be recovered. - :type recovery_point_id: str - :param recovery_type: Type of this recovery. Possible values include: "Invalid", - "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM which is being recovered. - :type source_resource_id: str - :param target_virtual_machine_id: This is the complete ARM Id of the VM that will be created. - For e.g. - /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param target_resource_group_id: This is the ARM Id of the resource group that you want to - create for this Virtual machine and other artifacts. - For e.g. /subscriptions/{subId}/resourcegroups/{rg}. - :type target_resource_group_id: str - :param storage_account_id: Fully qualified ARM ID of the storage account to which the VM has to - be restored. - :type storage_account_id: str - :param virtual_network_id: This is the virtual network Id of the vnet that will be attached to - the virtual machine. - User will be validated for join action permissions in the linked access. - :type virtual_network_id: str - :param subnet_id: Subnet ID, is the subnet ID associated with the to be restored VM. For - Classic VMs it would be - {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource - ID used to represent - the subnet. - :type subnet_id: str - :param target_domain_name_id: Fully qualified ARM ID of the domain name to be associated to the - VM being restored. This applies only to Classic - Virtual Machines. - :type target_domain_name_id: str - :param region: Region in which the virtual machine is restored. - :type region: str - :param affinity_group: Affinity group associated to VM to be restored. Used only for Classic - Compute Virtual Machines. - :type affinity_group: str - :param create_new_cloud_service: Should a new cloud service be created while restoring the VM. - If this is false, VM will be restored to the same - cloud service as it was at the time of backup. - :type create_new_cloud_service: bool + :type recovery_point_time: ~datetime.datetime + :param recovery_point_additional_info: Additional information associated with this backup copy. + :type recovery_point_additional_info: str + :param source_vm_storage_type: Storage type of the VM whose backup copy is created. + :type source_vm_storage_type: str + :param is_source_vm_encrypted: Identifies whether the VM was encrypted when the backup copy is + created. + :type is_source_vm_encrypted: bool + :param key_and_secret: Required details for recovering an encrypted VM. Applicable only when + IsSourceVMEncrypted is true. + :type key_and_secret: ~azure.mgmt.recoveryservicesbackup.models.KeyAndSecretDetails + :param is_instant_ilr_session_active: Is the session to recover items from this backup copy + still active. + :type is_instant_ilr_session_active: bool + :param recovery_point_tier_details: Recovery point tier information. + :type recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] + :param is_managed_virtual_machine: Whether VM is with Managed Disks. + :type is_managed_virtual_machine: bool + :param virtual_machine_size: Virtual Machine Size. + :type virtual_machine_size: str :param original_storage_account_option: Original Storage Account Option. :type original_storage_account_option: bool - :param encryption_details: Details needed if the VM was encrypted at the time of backup. - :type encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails - :param restore_disk_lun_list: List of Disk LUNs for partial restore. - :type restore_disk_lun_list: list[int] - :param restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored - with Managed disks. - :type restore_with_managed_disks: bool - :param disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be encrypted - at rest during restore with customer managed key. - :type disk_encryption_set_id: str - :param zones: Target zone where the VM and its disks should be restored. + :param os_type: OS type. + :type os_type: str + :param recovery_point_disk_configuration: Disk configuration. + :type recovery_point_disk_configuration: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointDiskConfiguration + :param zones: Identifies the zone of the VM at the time of backup. Applicable only for + zone-pinned Vms. :type zones: list[str] - :param identity_info: Managed Identity information required to access customer storage account. - :type identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo + :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :type recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] """ _validation = { @@ -9769,61 +8614,52 @@ class IaasVMRestoreRequest(RestoreRequest): _attribute_map = { 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, - 'region': {'key': 'region', 'type': 'str'}, - 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, - 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, + 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + 'recovery_point_additional_info': {'key': 'recoveryPointAdditionalInfo', 'type': 'str'}, + 'source_vm_storage_type': {'key': 'sourceVMStorageType', 'type': 'str'}, + 'is_source_vm_encrypted': {'key': 'isSourceVMEncrypted', 'type': 'bool'}, + 'key_and_secret': {'key': 'keyAndSecret', 'type': 'KeyAndSecretDetails'}, + 'is_instant_ilr_session_active': {'key': 'isInstantIlrSessionActive', 'type': 'bool'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'is_managed_virtual_machine': {'key': 'isManagedVirtualMachine', 'type': 'bool'}, + 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, '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'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'recovery_point_disk_configuration': {'key': 'recoveryPointDiskConfiguration', 'type': 'RecoveryPointDiskConfiguration'}, 'zones': {'key': 'zones', 'type': '[str]'}, - 'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'}, - } - - _subtype_map = { - 'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'} + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, } def __init__( self, **kwargs ): - super(IaasVMRestoreRequest, self).__init__(**kwargs) - self.object_type = 'IaasVMRestoreRequest' # type: str - self.recovery_point_id = kwargs.get('recovery_point_id', None) - self.recovery_type = kwargs.get('recovery_type', None) - self.source_resource_id = kwargs.get('source_resource_id', None) - self.target_virtual_machine_id = kwargs.get('target_virtual_machine_id', None) - self.target_resource_group_id = kwargs.get('target_resource_group_id', None) - self.storage_account_id = kwargs.get('storage_account_id', None) - self.virtual_network_id = kwargs.get('virtual_network_id', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.target_domain_name_id = kwargs.get('target_domain_name_id', None) - self.region = kwargs.get('region', None) - self.affinity_group = kwargs.get('affinity_group', None) - self.create_new_cloud_service = kwargs.get('create_new_cloud_service', None) + super(IaasVMRecoveryPoint, self).__init__(**kwargs) + self.object_type = 'IaasVMRecoveryPoint' # type: str + self.recovery_point_type = kwargs.get('recovery_point_type', None) + self.recovery_point_time = kwargs.get('recovery_point_time', None) + self.recovery_point_additional_info = kwargs.get('recovery_point_additional_info', None) + self.source_vm_storage_type = kwargs.get('source_vm_storage_type', None) + self.is_source_vm_encrypted = kwargs.get('is_source_vm_encrypted', None) + self.key_and_secret = kwargs.get('key_and_secret', None) + self.is_instant_ilr_session_active = kwargs.get('is_instant_ilr_session_active', None) + self.recovery_point_tier_details = kwargs.get('recovery_point_tier_details', None) + self.is_managed_virtual_machine = kwargs.get('is_managed_virtual_machine', None) + self.virtual_machine_size = kwargs.get('virtual_machine_size', None) 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.os_type = kwargs.get('os_type', None) + self.recovery_point_disk_configuration = kwargs.get('recovery_point_disk_configuration', None) self.zones = kwargs.get('zones', None) - self.identity_info = kwargs.get('identity_info', None) + self.recovery_point_move_readiness_info = kwargs.get('recovery_point_move_readiness_info', None) -class IaasVMRestoreRequestAutoGenerated(RestoreRequest): +class IaasVMRestoreRequest(RestoreRequest): """IaaS VM workload-specific restore. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: IaasVMRestoreWithRehydrationRequest. + All required parameters must be populated in order to send to Azure. :param object_type: Required. This property will be used as the discriminator for deciding the @@ -9886,10 +8722,6 @@ class IaasVMRestoreRequestAutoGenerated(RestoreRequest): :type zones: list[str] :param identity_info: Managed Identity information required to access customer storage account. :type identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo - :param identity_based_restore_details: IaaS VM workload specific restore details for restores - using managed identity. - :type identity_based_restore_details: - ~azure.mgmt.recoveryservicesbackup.models.IdentityBasedRestoreDetails """ _validation = { @@ -9917,14 +8749,17 @@ class IaasVMRestoreRequestAutoGenerated(RestoreRequest): 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, 'zones': {'key': 'zones', 'type': '[str]'}, 'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'}, - 'identity_based_restore_details': {'key': 'identityBasedRestoreDetails', 'type': 'IdentityBasedRestoreDetails'}, + } + + _subtype_map = { + 'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'} } def __init__( self, **kwargs ): - super(IaasVMRestoreRequestAutoGenerated, self).__init__(**kwargs) + super(IaasVMRestoreRequest, self).__init__(**kwargs) self.object_type = 'IaasVMRestoreRequest' # type: str self.recovery_point_id = kwargs.get('recovery_point_id', None) self.recovery_type = kwargs.get('recovery_type', None) @@ -9945,7 +8780,6 @@ def __init__( self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) self.zones = kwargs.get('zones', None) self.identity_info = kwargs.get('identity_info', None) - self.identity_based_restore_details = kwargs.get('identity_based_restore_details', None) class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest): @@ -10055,29 +8889,6 @@ def __init__( self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) -class IdentityBasedRestoreDetails(msrest.serialization.Model): - """IaaS VM workload specific restore details for restores using managed identity. - - :param object_type: Gets the class type. - :type object_type: str - :param target_storage_account_id: Fully qualified ARM ID of the target storage account. - :type target_storage_account_id: str - """ - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'target_storage_account_id': {'key': 'targetStorageAccountId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IdentityBasedRestoreDetails, self).__init__(**kwargs) - self.object_type = kwargs.get('object_type', None) - self.target_storage_account_id = kwargs.get('target_storage_account_id', None) - - class IdentityInfo(msrest.serialization.Model): """Encapsulates Managed Identity related information. @@ -11252,25 +10063,6 @@ def __init__( self.error = kwargs.get('error', None) -class NewErrorResponseAutoGenerated(msrest.serialization.Model): - """The resource management error response. - - :param error: The error object. - :type error: ~azure.mgmt.recoveryservicesbackup.models.NewErrorResponseErrorAutoGenerated - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'NewErrorResponseErrorAutoGenerated'}, - } - - def __init__( - self, - **kwargs - ): - super(NewErrorResponseAutoGenerated, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - class NewErrorResponseError(msrest.serialization.Model): """The error object. @@ -11316,51 +10108,6 @@ def __init__( self.additional_info = None -class NewErrorResponseErrorAutoGenerated(msrest.serialization.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.NewErrorResponseAutoGenerated] - :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': '[NewErrorResponseAutoGenerated]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(NewErrorResponseErrorAutoGenerated, 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. @@ -11530,7 +10277,7 @@ class OperationStatusExtendedInfo(msrest.serialization.Model): """Base class for additional information of operation status. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: OperationStatusJobExtendedInfo, OperationStatusJobsExtendedInfo, OperationStatusProvisionILRExtendedInfo, OperationStatusRecoveryPointExtendedInfo. + sub-classes are: OperationStatusJobExtendedInfo, OperationStatusJobsExtendedInfo, OperationStatusProvisionILRExtendedInfo. All required parameters must be populated in order to send to Azure. @@ -11548,7 +10295,7 @@ class OperationStatusExtendedInfo(msrest.serialization.Model): } _subtype_map = { - 'object_type': {'OperationStatusJobExtendedInfo': 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo': 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo': 'OperationStatusProvisionILRExtendedInfo', 'OperationStatusRecoveryPointExtendedInfo': 'OperationStatusRecoveryPointExtendedInfo'} + 'object_type': {'OperationStatusJobExtendedInfo': 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo': 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo': 'OperationStatusProvisionILRExtendedInfo'} } def __init__( @@ -11653,41 +10400,6 @@ def __init__( self.recovery_target = kwargs.get('recovery_target', None) -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. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.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.object_type = 'OperationStatusRecoveryPointExtendedInfo' # type: str - self.updated_recovery_point = kwargs.get('updated_recovery_point', None) - self.deleted_backup_item_version = kwargs.get('deleted_backup_item_version', None) - - class PointInTimeRange(msrest.serialization.Model): """Provides details for log ranges. @@ -13612,146 +12324,6 @@ def __init__( self.retention_duration = kwargs.get('retention_duration', None) -class WorkloadCrrAccessToken(CrrAccessToken): - """WorkloadCrrAccessToken. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. Type of the specific object - used for deserializing.Constant - filled by server. - :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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _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.object_type = 'WorkloadCrrAccessToken' # type: str - 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(msrest.serialization.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 73c58d14c797..11cbf2626377 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 @@ -15,150 +15,6 @@ from ._recovery_services_backup_client_enums import * -class AADProperties(msrest.serialization.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: Optional[str] = None, - tenant_id: Optional[str] = None, - authority: Optional[str] = None, - audience: Optional[str] = None, - service_principal_object_id: Optional[str] = None, - **kwargs - ): - 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(msrest.serialization.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: A set of 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: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - **kwargs - ): - 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: A set of 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: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["AADProperties"] = None, - **kwargs - ): - super(AADPropertiesResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - class FeatureSupportRequest(msrest.serialization.Model): """Base class for feature request. @@ -838,7 +694,7 @@ class ProtectedItem(msrest.serialization.Model): """Base class for backup items. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileshareProtectedItemAutoGenerated, AzureIaaSVMProtectedItem, AzureVmWorkloadProtectedItem, DPMProtectedItem, GenericProtectedItem, MabFileFolderProtectedItem, AzureSqlProtectedItem. + sub-classes are: AzureFileshareProtectedItem, AzureIaaSVMProtectedItem, AzureVmWorkloadProtectedItem, DPMProtectedItem, GenericProtectedItem, MabFileFolderProtectedItem, AzureSqlProtectedItem. All required parameters must be populated in order to send to Azure. @@ -909,7 +765,7 @@ class ProtectedItem(msrest.serialization.Model): } _subtype_map = { - 'protected_item_type': {'AzureFileShareProtectedItem': 'AzureFileshareProtectedItemAutoGenerated', 'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'AzureVmWorkloadProtectedItem': 'AzureVmWorkloadProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'GenericProtectedItem': 'GenericProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem'} + 'protected_item_type': {'AzureFileShareProtectedItem': 'AzureFileshareProtectedItem', 'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'AzureVmWorkloadProtectedItem': 'AzureVmWorkloadProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'GenericProtectedItem': 'GenericProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem'} } def __init__( @@ -1081,144 +937,6 @@ def __init__( self.extended_info = extended_info -class AzureFileshareProtectedItemAutoGenerated(ProtectedItem): - """Azure File Share workload-specific backup item. - - All required parameters must be populated in order to send to Azure. - - :param protected_item_type: Required. backup item type.Constant filled by server. - :type protected_item_type: str - :param backup_management_type: Type of backup management for the backed up item. Possible - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param workload_type: Type of workload this item represents. Possible values include: - "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", - "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", - "SAPHanaDatabase", "SAPAseDatabase". - :type workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType - :param container_name: Unique name of container. - :type container_name: str - :param source_resource_id: ARM ID of the resource to be backed up. - :type source_resource_id: str - :param policy_id: ID of the backup policy with which this item is backed up. - :type policy_id: str - :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this - backup item. - :type last_recovery_point: ~datetime.datetime - :param backup_set_name: Name of the backup set the backup item belongs to. - :type backup_set_name: str - :param create_mode: Create mode to indicate recovery of existing soft deleted data source or - creation of new data source. Possible values include: "Invalid", "Default", "Recover". - :type create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode - :param deferred_delete_time_in_utc: Time for deferred deletion in UTC. - :type deferred_delete_time_in_utc: ~datetime.datetime - :param is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for - deferred delete. - :type is_scheduled_for_deferred_delete: bool - :param deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete - is permanently deleted. - :type deferred_delete_time_remaining: str - :param is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS - is to be purged soon. - :type is_deferred_delete_schedule_upcoming: bool - :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. - :type is_rehydrate: bool - :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check - will be performed. - :type resource_guard_operation_requests: list[str] - :param friendly_name: Friendly name of the fileshare represented by this backup item. - :type friendly_name: str - :param protection_status: Backup status of this backup item. - :type protection_status: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", - "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState - :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 - :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.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 - """ - - _validation = { - 'protected_item_type': {'required': True}, - } - - _attribute_map = { - 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'policy_id': {'key': 'policyId', 'type': 'str'}, - 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, - 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'deferred_delete_time_in_utc': {'key': 'deferredDeleteTimeInUTC', 'type': 'iso-8601'}, - 'is_scheduled_for_deferred_delete': {'key': 'isScheduledForDeferredDelete', 'type': 'bool'}, - 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, - 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, - 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - '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'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - workload_type: Optional[Union[str, "DataSourceType"]] = None, - container_name: Optional[str] = None, - source_resource_id: Optional[str] = None, - policy_id: Optional[str] = None, - last_recovery_point: Optional[datetime.datetime] = None, - backup_set_name: Optional[str] = None, - create_mode: Optional[Union[str, "CreateMode"]] = None, - deferred_delete_time_in_utc: Optional[datetime.datetime] = None, - is_scheduled_for_deferred_delete: Optional[bool] = None, - deferred_delete_time_remaining: Optional[str] = None, - is_deferred_delete_schedule_upcoming: Optional[bool] = None, - is_rehydrate: Optional[bool] = None, - resource_guard_operation_requests: Optional[List[str]] = None, - friendly_name: Optional[str] = None, - protection_status: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionState"]] = None, - health_status: Optional[Union[str, "HealthStatus"]] = None, - last_backup_status: Optional[str] = None, - last_backup_time: Optional[datetime.datetime] = None, - kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, - extended_info: Optional["AzureFileshareProtectedItemExtendedInfo"] = None, - **kwargs - ): - super(AzureFileshareProtectedItemAutoGenerated, 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, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) - self.protected_item_type = 'AzureFileShareProtectedItem' # type: str - self.friendly_name = friendly_name - self.protection_status = protection_status - self.protection_state = protection_state - self.health_status = health_status - self.last_backup_status = last_backup_status - self.last_backup_time = last_backup_time - self.kpis_healths = kpis_healths - self.extended_info = extended_info - - class AzureFileshareProtectedItemExtendedInfo(msrest.serialization.Model): """Additional information about Azure File Share backup item. @@ -1445,7 +1163,7 @@ class RecoveryPoint(msrest.serialization.Model): """Base class for backup copies. Workload-specific backup copies are derived from this class. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileShareRecoveryPointAutoGenerated, AzureWorkloadRecoveryPointAutoGenerated, GenericRecoveryPoint, IaasVMRecoveryPointAutoGenerated. + sub-classes are: AzureFileShareRecoveryPoint, AzureWorkloadRecoveryPoint, GenericRecoveryPoint, IaasVMRecoveryPoint. All required parameters must be populated in order to send to Azure. @@ -1463,7 +1181,7 @@ class RecoveryPoint(msrest.serialization.Model): } _subtype_map = { - 'object_type': {'AzureFileShareRecoveryPoint': 'AzureFileShareRecoveryPointAutoGenerated', 'AzureWorkloadRecoveryPoint': 'AzureWorkloadRecoveryPointAutoGenerated', 'GenericRecoveryPoint': 'GenericRecoveryPoint', 'IaasVMRecoveryPoint': 'IaasVMRecoveryPointAutoGenerated'} + 'object_type': {'AzureFileShareRecoveryPoint': 'AzureFileShareRecoveryPoint', 'AzureWorkloadRecoveryPoint': 'AzureWorkloadRecoveryPoint', 'GenericRecoveryPoint': 'GenericRecoveryPoint', 'IaasVMRecoveryPoint': 'IaasVMRecoveryPoint'} } def __init__( @@ -1522,60 +1240,11 @@ def __init__( self.recovery_point_size_in_gb = recovery_point_size_in_gb -class AzureFileShareRecoveryPointAutoGenerated(RecoveryPoint): - """Azure File Share workload specific backup copy. +class RestoreRequest(msrest.serialization.Model): + """Base class for restore request. Workload-specific restore requests are derived from this class. - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_type: Type of the backup copy. Specifies whether it is a crash consistent - backup or app consistent. - :vartype recovery_point_type: str - :ivar recovery_point_time: Time at which this backup copy was created. - :vartype recovery_point_time: ~datetime.datetime - :ivar file_share_snapshot_uri: Contains Url to the snapshot of fileshare, if applicable. - :vartype file_share_snapshot_uri: str - :ivar recovery_point_size_in_gb: Contains recovery point size. - :vartype recovery_point_size_in_gb: int - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_type': {'readonly': True}, - 'recovery_point_time': {'readonly': True}, - 'file_share_snapshot_uri': {'readonly': True}, - 'recovery_point_size_in_gb': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, - 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, - 'file_share_snapshot_uri': {'key': 'fileShareSnapshotUri', 'type': 'str'}, - 'recovery_point_size_in_gb': {'key': 'recoveryPointSizeInGB', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureFileShareRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureFileShareRecoveryPoint' # type: str - self.recovery_point_type = None - self.recovery_point_time = None - self.file_share_snapshot_uri = None - self.recovery_point_size_in_gb = None - - -class RestoreRequest(msrest.serialization.Model): - """Base class for restore request. Workload-specific restore requests are derived from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, IaasVMRestoreRequestAutoGenerated. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, IaasVMRestoreRequest. All required parameters must be populated in order to send to Azure. @@ -1593,7 +1262,7 @@ class RestoreRequest(msrest.serialization.Model): } _subtype_map = { - 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequestAutoGenerated'} + 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequest'} } def __init__( @@ -6346,125 +6015,6 @@ def __init__( self.time_ranges = time_ranges -class AzureWorkloadRecoveryPointAutoGenerated(RecoveryPoint): - """Workload specific recovery point, specifically encapsulates full/diff recovery point. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadPointInTimeRecoveryPointAutoGenerated, AzureWorkloadSAPHanaRecoveryPointAutoGenerated, AzureWorkloadSQLRecoveryPointAutoGenerated. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadPointInTimeRecoveryPoint': 'AzureWorkloadPointInTimeRecoveryPointAutoGenerated', 'AzureWorkloadSAPHanaRecoveryPoint': 'AzureWorkloadSAPHanaRecoveryPointAutoGenerated', 'AzureWorkloadSQLRecoveryPoint': 'AzureWorkloadSQLRecoveryPointAutoGenerated'} - } - - def __init__( - self, - *, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, - recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, - **kwargs - ): - super(AzureWorkloadRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadRecoveryPoint' # type: str - self.recovery_point_time_in_utc = None - self.type = None - self.recovery_point_tier_details = recovery_point_tier_details - self.recovery_point_move_readiness_info = recovery_point_move_readiness_info - - -class AzureWorkloadPointInTimeRecoveryPointAutoGenerated(AzureWorkloadRecoveryPointAutoGenerated): - """Recovery point specific to PointInTime. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - :param time_ranges: List of log ranges. - :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadSAPHanaPointInTimeRecoveryPoint': 'AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated'} - } - - def __init__( - self, - *, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, - recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, - time_ranges: Optional[List["PointInTimeRange"]] = None, - **kwargs - ): - super(AzureWorkloadPointInTimeRecoveryPointAutoGenerated, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, **kwargs) - self.object_type = 'AzureWorkloadPointInTimeRecoveryPoint' # type: str - self.time_ranges = time_ranges - - class AzureWorkloadRestoreRequest(RestoreRequest): """AzureWorkload-specific restore. @@ -6645,58 +6195,6 @@ def __init__( self.object_type = 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint' # type: str -class AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated(AzureWorkloadPointInTimeRecoveryPointAutoGenerated): - """Recovery point specific to PointInTime in SAPHana. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - :param time_ranges: List of log ranges. - :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, - } - - def __init__( - self, - *, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, - recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, - time_ranges: Optional[List["PointInTimeRange"]] = None, - **kwargs - ): - super(AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, time_ranges=time_ranges, **kwargs) - self.object_type = 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint' # type: str - - class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): """AzureWorkload SAP Hana-specific restore. @@ -6940,54 +6438,6 @@ def __init__( self.object_type = 'AzureWorkloadSAPHanaRecoveryPoint' # type: str -class AzureWorkloadSAPHanaRecoveryPointAutoGenerated(AzureWorkloadRecoveryPointAutoGenerated): - """SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - } - - def __init__( - self, - *, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, - recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, - **kwargs - ): - super(AzureWorkloadSAPHanaRecoveryPointAutoGenerated, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, **kwargs) - self.object_type = 'AzureWorkloadSAPHanaRecoveryPoint' # type: str - - class AzureWorkloadSAPHanaRestoreWithRehydrateRequest(AzureWorkloadSAPHanaRestoreRequest): """AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. @@ -7230,131 +6680,6 @@ def __init__( self.time_ranges = time_ranges -class AzureWorkloadSQLRecoveryPointAutoGenerated(AzureWorkloadRecoveryPointAutoGenerated): - """SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint along with extended info. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSQLPointInTimeRecoveryPointAutoGenerated. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - :param extended_info: Extended Info that provides data directory details. Will be populated in - two cases: - When a specific recovery point is accessed using GetRecoveryPoint - Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter. - :type extended_info: - ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadSQLPointInTimeRecoveryPoint': 'AzureWorkloadSQLPointInTimeRecoveryPointAutoGenerated'} - } - - def __init__( - self, - *, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, - recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, - extended_info: Optional["AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated"] = None, - **kwargs - ): - super(AzureWorkloadSQLRecoveryPointAutoGenerated, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, **kwargs) - self.object_type = 'AzureWorkloadSQLRecoveryPoint' # type: str - self.extended_info = extended_info - - -class AzureWorkloadSQLPointInTimeRecoveryPointAutoGenerated(AzureWorkloadSQLRecoveryPointAutoGenerated): - """Recovery point specific to PointInTime. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - :param extended_info: Extended Info that provides data directory details. Will be populated in - two cases: - When a specific recovery point is accessed using GetRecoveryPoint - Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter. - :type extended_info: - ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated - :param time_ranges: List of log ranges. - :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated'}, - 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, - } - - def __init__( - self, - *, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, - recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, - extended_info: Optional["AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated"] = None, - time_ranges: Optional[List["PointInTimeRange"]] = None, - **kwargs - ): - super(AzureWorkloadSQLPointInTimeRecoveryPointAutoGenerated, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, extended_info=extended_info, **kwargs) - self.object_type = 'AzureWorkloadSQLPointInTimeRecoveryPoint' # type: str - self.time_ranges = time_ranges - - class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): """AzureWorkload SQL -specific restore. Specifically for full/diff restore. @@ -7626,36 +6951,6 @@ def __init__( self.data_directory_paths = data_directory_paths -class AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated(msrest.serialization.Model): - """Extended info class details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar data_directory_time_in_utc: UTC time at which data directory info was captured. - :vartype data_directory_time_in_utc: ~datetime.datetime - :ivar data_directory_paths: List of data directory paths during restore operation. - :vartype data_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] - """ - - _validation = { - 'data_directory_time_in_utc': {'readonly': True}, - 'data_directory_paths': {'readonly': True}, - } - - _attribute_map = { - 'data_directory_time_in_utc': {'key': 'dataDirectoryTimeInUTC', 'type': 'iso-8601'}, - 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated, self).__init__(**kwargs) - self.data_directory_time_in_utc = None - self.data_directory_paths = None - - class AzureWorkloadSQLRestoreWithRehydrateRequest(AzureWorkloadSQLRestoreRequest): """AzureWorkload SQL-specific restore with integrated rehydration of recovery point. @@ -7728,9 +7023,61 @@ def __init__( recovery_point_rehydration_info: Optional["RecoveryPointRehydrationInfo"] = None, **kwargs ): - super(AzureWorkloadSQLRestoreWithRehydrateRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, should_use_alternate_target_location=should_use_alternate_target_location, is_non_recoverable=is_non_recoverable, alternate_directory_paths=alternate_directory_paths, **kwargs) - self.object_type = 'AzureWorkloadSQLRestoreWithRehydrateRequest' # type: str - self.recovery_point_rehydration_info = recovery_point_rehydration_info + super(AzureWorkloadSQLRestoreWithRehydrateRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, should_use_alternate_target_location=should_use_alternate_target_location, is_non_recoverable=is_non_recoverable, alternate_directory_paths=alternate_directory_paths, **kwargs) + self.object_type = 'AzureWorkloadSQLRestoreWithRehydrateRequest' # type: str + self.recovery_point_rehydration_info = recovery_point_rehydration_info + + +class Resource(msrest.serialization.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: A set of 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: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + **kwargs + ): + 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): @@ -8536,30 +7883,6 @@ def __init__( self.secret_data = secret_data -class BMSAADPropertiesQueryObject(msrest.serialization.Model): - """Filters to list backup items. - - :param backup_management_type: Backup management type for the backed up item. Possible values - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - """ - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - **kwargs - ): - super(BMSAADPropertiesQueryObject, self).__init__(**kwargs) - self.backup_management_type = backup_management_type - - class BMSBackupEngineQueryObject(msrest.serialization.Model): """Query parameters to fetch list of backup engines. @@ -9158,403 +8481,35 @@ class ContainerIdentityInfo(msrest.serialization.Model): :param unique_name: Unique name of the container. :type unique_name: str - :param aad_tenant_id: Protection container identity - AAD Tenant. - :type aad_tenant_id: str - :param service_principal_client_id: Protection container identity - AAD Service Principal. - :type service_principal_client_id: str - :param audience: Protection container identity - Audience. - :type audience: str - """ - - _attribute_map = { - 'unique_name': {'key': 'uniqueName', 'type': 'str'}, - 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, - 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, - 'audience': {'key': 'audience', 'type': 'str'}, - } - - def __init__( - self, - *, - unique_name: Optional[str] = None, - aad_tenant_id: Optional[str] = None, - service_principal_client_id: Optional[str] = None, - audience: Optional[str] = None, - **kwargs - ): - super(ContainerIdentityInfo, self).__init__(**kwargs) - self.unique_name = unique_name - self.aad_tenant_id = aad_tenant_id - self.service_principal_client_id = service_principal_client_id - self.audience = audience - - -class CrossRegionRestoreRequest(msrest.serialization.Model): - """CrossRegionRestoreRequest. - - :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: Optional["CrrAccessToken"] = None, - restore_request: Optional["RestoreRequest"] = None, - **kwargs - ): - 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: A set of 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: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["CrossRegionRestoreRequest"] = None, - **kwargs - ): - super(CrossRegionRestoreRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -class CrrAccessToken(msrest.serialization.Model): - """CrrAccessToken. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: WorkloadCrrAccessToken. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. Type of the specific object - used for deserializing.Constant - filled by server. - :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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _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'}, - } - - _subtype_map = { - 'object_type': {'WorkloadCrrAccessToken': 'WorkloadCrrAccessToken'} - } - - def __init__( - self, - *, - access_token_string: Optional[str] = None, - subscription_id: Optional[str] = None, - resource_group_name: Optional[str] = None, - resource_name: Optional[str] = None, - resource_id: Optional[str] = None, - protection_container_id: Optional[int] = None, - recovery_point_id: Optional[str] = None, - recovery_point_time: Optional[str] = None, - container_name: Optional[str] = None, - container_type: Optional[str] = None, - backup_management_type: Optional[str] = None, - datasource_type: Optional[str] = None, - datasource_name: Optional[str] = None, - datasource_id: Optional[str] = None, - datasource_container_name: Optional[str] = None, - coordinator_service_stamp_id: Optional[str] = None, - coordinator_service_stamp_uri: Optional[str] = None, - protection_service_stamp_id: Optional[str] = None, - protection_service_stamp_uri: Optional[str] = None, - token_extended_information: Optional[str] = None, - rp_tier_information: Optional[Dict[str, str]] = None, - rp_original_sa_option: Optional[bool] = None, - rp_is_managed_virtual_machine: Optional[bool] = None, - rp_vm_size_description: Optional[str] = None, - b_ms_active_region: Optional[str] = None, - **kwargs - ): - super(CrrAccessToken, self).__init__(**kwargs) - self.object_type = None # type: Optional[str] - 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: A set of 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: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["CrrAccessToken"] = None, - **kwargs - ): - super(CrrAccessTokenResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -class CrrJobRequest(msrest.serialization.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: Optional[str] = None, - job_name: Optional[str] = None, - **kwargs - ): - 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: A set of 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 + :param aad_tenant_id: Protection container identity - AAD Tenant. + :type aad_tenant_id: str + :param service_principal_client_id: Protection container identity - AAD Service Principal. + :type service_principal_client_id: str + :param audience: Protection container identity - Audience. + :type audience: 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'}, - 'properties': {'key': 'properties', 'type': 'CrrJobRequest'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, } def __init__( self, *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["CrrJobRequest"] = None, + unique_name: Optional[str] = None, + aad_tenant_id: Optional[str] = None, + service_principal_client_id: Optional[str] = None, + audience: Optional[str] = None, **kwargs ): - super(CrrJobRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties + super(ContainerIdentityInfo, self).__init__(**kwargs) + self.unique_name = unique_name + self.aad_tenant_id = aad_tenant_id + self.service_principal_client_id = service_principal_client_id + self.audience = audience class DailyRetentionFormat(msrest.serialization.Model): @@ -10905,324 +9860,68 @@ class IaasVMRecoveryPoint(RecoveryPoint): _attribute_map = { 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, - 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, - 'recovery_point_additional_info': {'key': 'recoveryPointAdditionalInfo', 'type': 'str'}, - 'source_vm_storage_type': {'key': 'sourceVMStorageType', 'type': 'str'}, - 'is_source_vm_encrypted': {'key': 'isSourceVMEncrypted', 'type': 'bool'}, - 'key_and_secret': {'key': 'keyAndSecret', 'type': 'KeyAndSecretDetails'}, - 'is_instant_ilr_session_active': {'key': 'isInstantIlrSessionActive', 'type': 'bool'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'is_managed_virtual_machine': {'key': 'isManagedVirtualMachine', 'type': 'bool'}, - 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, - 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'recovery_point_disk_configuration': {'key': 'recoveryPointDiskConfiguration', 'type': 'RecoveryPointDiskConfiguration'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - } - - def __init__( - self, - *, - recovery_point_type: Optional[str] = None, - recovery_point_time: Optional[datetime.datetime] = None, - recovery_point_additional_info: Optional[str] = None, - source_vm_storage_type: Optional[str] = None, - is_source_vm_encrypted: Optional[bool] = None, - key_and_secret: Optional["KeyAndSecretDetails"] = None, - is_instant_ilr_session_active: Optional[bool] = None, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, - is_managed_virtual_machine: Optional[bool] = None, - virtual_machine_size: Optional[str] = None, - original_storage_account_option: Optional[bool] = None, - os_type: Optional[str] = None, - recovery_point_disk_configuration: Optional["RecoveryPointDiskConfiguration"] = None, - zones: Optional[List[str]] = None, - recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, - **kwargs - ): - super(IaasVMRecoveryPoint, self).__init__(**kwargs) - self.object_type = 'IaasVMRecoveryPoint' # type: str - self.recovery_point_type = recovery_point_type - self.recovery_point_time = recovery_point_time - self.recovery_point_additional_info = recovery_point_additional_info - self.source_vm_storage_type = source_vm_storage_type - self.is_source_vm_encrypted = is_source_vm_encrypted - self.key_and_secret = key_and_secret - self.is_instant_ilr_session_active = is_instant_ilr_session_active - self.recovery_point_tier_details = recovery_point_tier_details - self.is_managed_virtual_machine = is_managed_virtual_machine - self.virtual_machine_size = virtual_machine_size - self.original_storage_account_option = original_storage_account_option - self.os_type = os_type - self.recovery_point_disk_configuration = recovery_point_disk_configuration - self.zones = zones - self.recovery_point_move_readiness_info = recovery_point_move_readiness_info - - -class IaasVMRecoveryPointAutoGenerated(RecoveryPoint): - """IaaS VM workload specific backup copy. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_type: Type of the backup copy. - :vartype recovery_point_type: str - :ivar recovery_point_time: Time at which this backup copy was created. - :vartype recovery_point_time: ~datetime.datetime - :ivar recovery_point_additional_info: Additional information associated with this backup copy. - :vartype recovery_point_additional_info: str - :ivar source_vm_storage_type: Storage type of the VM whose backup copy is created. - :vartype source_vm_storage_type: str - :ivar is_source_vm_encrypted: Identifies whether the VM was encrypted when the backup copy is - created. - :vartype is_source_vm_encrypted: bool - :param key_and_secret: Required details for recovering an encrypted VM. Applicable only when - IsSourceVMEncrypted is true. - :type key_and_secret: ~azure.mgmt.recoveryservicesbackup.models.KeyAndSecretDetails - :param is_instant_ilr_session_active: Is the session to recover items from this backup copy - still active. - :type is_instant_ilr_session_active: bool - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param is_managed_virtual_machine: Whether VM is with Managed Disks. - :type is_managed_virtual_machine: bool - :param virtual_machine_size: Virtual Machine Size. - :type virtual_machine_size: str - :param original_storage_account_option: Original Storage Account Option. - :type original_storage_account_option: bool - :param os_type: OS type. - :type os_type: str - :param recovery_point_disk_configuration: Disk configuration. - :type recovery_point_disk_configuration: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointDiskConfiguration - :param zones: Identifies the zone of the VM at the time of backup. Applicable only for - zone-pinned Vms. - :type zones: list[str] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_type': {'readonly': True}, - 'recovery_point_time': {'readonly': True}, - 'recovery_point_additional_info': {'readonly': True}, - 'source_vm_storage_type': {'readonly': True}, - 'is_source_vm_encrypted': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, - 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, - 'recovery_point_additional_info': {'key': 'recoveryPointAdditionalInfo', 'type': 'str'}, - 'source_vm_storage_type': {'key': 'sourceVMStorageType', 'type': 'str'}, - 'is_source_vm_encrypted': {'key': 'isSourceVMEncrypted', 'type': 'bool'}, - 'key_and_secret': {'key': 'keyAndSecret', 'type': 'KeyAndSecretDetails'}, - 'is_instant_ilr_session_active': {'key': 'isInstantIlrSessionActive', 'type': 'bool'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'is_managed_virtual_machine': {'key': 'isManagedVirtualMachine', 'type': 'bool'}, - 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, - 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'recovery_point_disk_configuration': {'key': 'recoveryPointDiskConfiguration', 'type': 'RecoveryPointDiskConfiguration'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - } - - def __init__( - self, - *, - key_and_secret: Optional["KeyAndSecretDetails"] = None, - is_instant_ilr_session_active: Optional[bool] = None, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, - is_managed_virtual_machine: Optional[bool] = None, - virtual_machine_size: Optional[str] = None, - original_storage_account_option: Optional[bool] = None, - os_type: Optional[str] = None, - recovery_point_disk_configuration: Optional["RecoveryPointDiskConfiguration"] = None, - zones: Optional[List[str]] = None, - recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, - **kwargs - ): - super(IaasVMRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'IaasVMRecoveryPoint' # type: str - self.recovery_point_type = None - self.recovery_point_time = None - self.recovery_point_additional_info = None - self.source_vm_storage_type = None - self.is_source_vm_encrypted = None - self.key_and_secret = key_and_secret - self.is_instant_ilr_session_active = is_instant_ilr_session_active - self.recovery_point_tier_details = recovery_point_tier_details - self.is_managed_virtual_machine = is_managed_virtual_machine - self.virtual_machine_size = virtual_machine_size - self.original_storage_account_option = original_storage_account_option - self.os_type = os_type - self.recovery_point_disk_configuration = recovery_point_disk_configuration - self.zones = zones - self.recovery_point_move_readiness_info = recovery_point_move_readiness_info - - -class IaasVMRestoreRequest(RestoreRequest): - """IaaS VM workload-specific restore. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: IaasVMRestoreWithRehydrationRequest. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :param recovery_point_id: ID of the backup copy to be recovered. - :type recovery_point_id: str - :param recovery_type: Type of this recovery. Possible values include: "Invalid", - "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM which is being recovered. - :type source_resource_id: str - :param target_virtual_machine_id: This is the complete ARM Id of the VM that will be created. - For e.g. - /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param target_resource_group_id: This is the ARM Id of the resource group that you want to - create for this Virtual machine and other artifacts. - For e.g. /subscriptions/{subId}/resourcegroups/{rg}. - :type target_resource_group_id: str - :param storage_account_id: Fully qualified ARM ID of the storage account to which the VM has to - be restored. - :type storage_account_id: str - :param virtual_network_id: This is the virtual network Id of the vnet that will be attached to - the virtual machine. - User will be validated for join action permissions in the linked access. - :type virtual_network_id: str - :param subnet_id: Subnet ID, is the subnet ID associated with the to be restored VM. For - Classic VMs it would be - {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource - ID used to represent - the subnet. - :type subnet_id: str - :param target_domain_name_id: Fully qualified ARM ID of the domain name to be associated to the - VM being restored. This applies only to Classic - Virtual Machines. - :type target_domain_name_id: str - :param region: Region in which the virtual machine is restored. - :type region: str - :param affinity_group: Affinity group associated to VM to be restored. Used only for Classic - Compute Virtual Machines. - :type affinity_group: str - :param create_new_cloud_service: Should a new cloud service be created while restoring the VM. - If this is false, VM will be restored to the same - cloud service as it was at the time of backup. - :type create_new_cloud_service: bool - :param original_storage_account_option: Original Storage Account Option. - :type original_storage_account_option: bool - :param encryption_details: Details needed if the VM was encrypted at the time of backup. - :type encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails - :param restore_disk_lun_list: List of Disk LUNs for partial restore. - :type restore_disk_lun_list: list[int] - :param restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored - with Managed disks. - :type restore_with_managed_disks: bool - :param disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be encrypted - at rest during restore with customer managed key. - :type disk_encryption_set_id: str - :param zones: Target zone where the VM and its disks should be restored. - :type zones: list[str] - :param identity_info: Managed Identity information required to access customer storage account. - :type identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, - 'region': {'key': 'region', 'type': 'str'}, - 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, - 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, + 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + 'recovery_point_additional_info': {'key': 'recoveryPointAdditionalInfo', 'type': 'str'}, + 'source_vm_storage_type': {'key': 'sourceVMStorageType', 'type': 'str'}, + 'is_source_vm_encrypted': {'key': 'isSourceVMEncrypted', 'type': 'bool'}, + 'key_and_secret': {'key': 'keyAndSecret', 'type': 'KeyAndSecretDetails'}, + 'is_instant_ilr_session_active': {'key': 'isInstantIlrSessionActive', 'type': 'bool'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'is_managed_virtual_machine': {'key': 'isManagedVirtualMachine', 'type': 'bool'}, + 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, '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'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'recovery_point_disk_configuration': {'key': 'recoveryPointDiskConfiguration', 'type': 'RecoveryPointDiskConfiguration'}, 'zones': {'key': 'zones', 'type': '[str]'}, - 'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'}, - } - - _subtype_map = { - 'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'} + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, } def __init__( self, *, - recovery_point_id: Optional[str] = None, - recovery_type: Optional[Union[str, "RecoveryType"]] = None, - source_resource_id: Optional[str] = None, - target_virtual_machine_id: Optional[str] = None, - target_resource_group_id: Optional[str] = None, - storage_account_id: Optional[str] = None, - virtual_network_id: Optional[str] = None, - subnet_id: Optional[str] = None, - target_domain_name_id: Optional[str] = None, - region: Optional[str] = None, - affinity_group: Optional[str] = None, - create_new_cloud_service: Optional[bool] = None, + recovery_point_type: Optional[str] = None, + recovery_point_time: Optional[datetime.datetime] = None, + recovery_point_additional_info: Optional[str] = None, + source_vm_storage_type: Optional[str] = None, + is_source_vm_encrypted: Optional[bool] = None, + key_and_secret: Optional["KeyAndSecretDetails"] = None, + is_instant_ilr_session_active: Optional[bool] = None, + recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, + is_managed_virtual_machine: Optional[bool] = None, + virtual_machine_size: Optional[str] = None, original_storage_account_option: Optional[bool] = None, - encryption_details: Optional["EncryptionDetails"] = None, - restore_disk_lun_list: Optional[List[int]] = None, - restore_with_managed_disks: Optional[bool] = None, - disk_encryption_set_id: Optional[str] = None, + os_type: Optional[str] = None, + recovery_point_disk_configuration: Optional["RecoveryPointDiskConfiguration"] = None, zones: Optional[List[str]] = None, - identity_info: Optional["IdentityInfo"] = None, + recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, **kwargs ): - super(IaasVMRestoreRequest, self).__init__(**kwargs) - self.object_type = 'IaasVMRestoreRequest' # type: str - self.recovery_point_id = recovery_point_id - self.recovery_type = recovery_type - self.source_resource_id = source_resource_id - self.target_virtual_machine_id = target_virtual_machine_id - self.target_resource_group_id = target_resource_group_id - self.storage_account_id = storage_account_id - self.virtual_network_id = virtual_network_id - self.subnet_id = subnet_id - self.target_domain_name_id = target_domain_name_id - self.region = region - self.affinity_group = affinity_group - self.create_new_cloud_service = create_new_cloud_service + super(IaasVMRecoveryPoint, self).__init__(**kwargs) + self.object_type = 'IaasVMRecoveryPoint' # type: str + self.recovery_point_type = recovery_point_type + self.recovery_point_time = recovery_point_time + self.recovery_point_additional_info = recovery_point_additional_info + self.source_vm_storage_type = source_vm_storage_type + self.is_source_vm_encrypted = is_source_vm_encrypted + self.key_and_secret = key_and_secret + self.is_instant_ilr_session_active = is_instant_ilr_session_active + self.recovery_point_tier_details = recovery_point_tier_details + self.is_managed_virtual_machine = is_managed_virtual_machine + self.virtual_machine_size = virtual_machine_size 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.os_type = os_type + self.recovery_point_disk_configuration = recovery_point_disk_configuration self.zones = zones - self.identity_info = identity_info + self.recovery_point_move_readiness_info = recovery_point_move_readiness_info -class IaasVMRestoreRequestAutoGenerated(RestoreRequest): +class IaasVMRestoreRequest(RestoreRequest): """IaaS VM workload-specific restore. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: IaasVMRestoreWithRehydrationRequest. + All required parameters must be populated in order to send to Azure. :param object_type: Required. This property will be used as the discriminator for deciding the @@ -11285,10 +9984,6 @@ class IaasVMRestoreRequestAutoGenerated(RestoreRequest): :type zones: list[str] :param identity_info: Managed Identity information required to access customer storage account. :type identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo - :param identity_based_restore_details: IaaS VM workload specific restore details for restores - using managed identity. - :type identity_based_restore_details: - ~azure.mgmt.recoveryservicesbackup.models.IdentityBasedRestoreDetails """ _validation = { @@ -11316,7 +10011,10 @@ class IaasVMRestoreRequestAutoGenerated(RestoreRequest): 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, 'zones': {'key': 'zones', 'type': '[str]'}, 'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'}, - 'identity_based_restore_details': {'key': 'identityBasedRestoreDetails', 'type': 'IdentityBasedRestoreDetails'}, + } + + _subtype_map = { + 'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'} } def __init__( @@ -11341,10 +10039,9 @@ def __init__( disk_encryption_set_id: Optional[str] = None, zones: Optional[List[str]] = None, identity_info: Optional["IdentityInfo"] = None, - identity_based_restore_details: Optional["IdentityBasedRestoreDetails"] = None, **kwargs ): - super(IaasVMRestoreRequestAutoGenerated, self).__init__(**kwargs) + super(IaasVMRestoreRequest, self).__init__(**kwargs) self.object_type = 'IaasVMRestoreRequest' # type: str self.recovery_point_id = recovery_point_id self.recovery_type = recovery_type @@ -11365,7 +10062,6 @@ def __init__( self.disk_encryption_set_id = disk_encryption_set_id self.zones = zones self.identity_info = identity_info - self.identity_based_restore_details = identity_based_restore_details class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest): @@ -11496,32 +10192,6 @@ def __init__( self.recovery_point_rehydration_info = recovery_point_rehydration_info -class IdentityBasedRestoreDetails(msrest.serialization.Model): - """IaaS VM workload specific restore details for restores using managed identity. - - :param object_type: Gets the class type. - :type object_type: str - :param target_storage_account_id: Fully qualified ARM ID of the target storage account. - :type target_storage_account_id: str - """ - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'target_storage_account_id': {'key': 'targetStorageAccountId', 'type': 'str'}, - } - - def __init__( - self, - *, - object_type: Optional[str] = None, - target_storage_account_id: Optional[str] = None, - **kwargs - ): - super(IdentityBasedRestoreDetails, self).__init__(**kwargs) - self.object_type = object_type - self.target_storage_account_id = target_storage_account_id - - class IdentityInfo(msrest.serialization.Model): """Encapsulates Managed Identity related information. @@ -12846,27 +11516,6 @@ def __init__( self.error = error -class NewErrorResponseAutoGenerated(msrest.serialization.Model): - """The resource management error response. - - :param error: The error object. - :type error: ~azure.mgmt.recoveryservicesbackup.models.NewErrorResponseErrorAutoGenerated - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'NewErrorResponseErrorAutoGenerated'}, - } - - def __init__( - self, - *, - error: Optional["NewErrorResponseErrorAutoGenerated"] = None, - **kwargs - ): - super(NewErrorResponseAutoGenerated, self).__init__(**kwargs) - self.error = error - - class NewErrorResponseError(msrest.serialization.Model): """The error object. @@ -12912,51 +11561,6 @@ def __init__( self.additional_info = None -class NewErrorResponseErrorAutoGenerated(msrest.serialization.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.NewErrorResponseAutoGenerated] - :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': '[NewErrorResponseAutoGenerated]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(NewErrorResponseErrorAutoGenerated, 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. @@ -13146,7 +11750,7 @@ class OperationStatusExtendedInfo(msrest.serialization.Model): """Base class for additional information of operation status. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: OperationStatusJobExtendedInfo, OperationStatusJobsExtendedInfo, OperationStatusProvisionILRExtendedInfo, OperationStatusRecoveryPointExtendedInfo. + sub-classes are: OperationStatusJobExtendedInfo, OperationStatusJobsExtendedInfo, OperationStatusProvisionILRExtendedInfo. All required parameters must be populated in order to send to Azure. @@ -13164,7 +11768,7 @@ class OperationStatusExtendedInfo(msrest.serialization.Model): } _subtype_map = { - 'object_type': {'OperationStatusJobExtendedInfo': 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo': 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo': 'OperationStatusProvisionILRExtendedInfo', 'OperationStatusRecoveryPointExtendedInfo': 'OperationStatusRecoveryPointExtendedInfo'} + 'object_type': {'OperationStatusJobExtendedInfo': 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo': 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo': 'OperationStatusProvisionILRExtendedInfo'} } def __init__( @@ -13276,44 +11880,6 @@ def __init__( self.recovery_target = recovery_target -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. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.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: Optional["RecoveryPoint"] = None, - deleted_backup_item_version: Optional[str] = None, - **kwargs - ): - super(OperationStatusRecoveryPointExtendedInfo, self).__init__(**kwargs) - self.object_type = 'OperationStatusRecoveryPointExtendedInfo' # type: str - self.updated_recovery_point = updated_recovery_point - self.deleted_backup_item_version = deleted_backup_item_version - - class PointInTimeRange(msrest.serialization.Model): """Provides details for log ranges. @@ -15474,181 +14040,6 @@ def __init__( self.retention_duration = retention_duration -class WorkloadCrrAccessToken(CrrAccessToken): - """WorkloadCrrAccessToken. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. Type of the specific object - used for deserializing.Constant - filled by server. - :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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _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, - *, - access_token_string: Optional[str] = None, - subscription_id: Optional[str] = None, - resource_group_name: Optional[str] = None, - resource_name: Optional[str] = None, - resource_id: Optional[str] = None, - protection_container_id: Optional[int] = None, - recovery_point_id: Optional[str] = None, - recovery_point_time: Optional[str] = None, - container_name: Optional[str] = None, - container_type: Optional[str] = None, - backup_management_type: Optional[str] = None, - datasource_type: Optional[str] = None, - datasource_name: Optional[str] = None, - datasource_id: Optional[str] = None, - datasource_container_name: Optional[str] = None, - coordinator_service_stamp_id: Optional[str] = None, - coordinator_service_stamp_uri: Optional[str] = None, - protection_service_stamp_id: Optional[str] = None, - protection_service_stamp_uri: Optional[str] = None, - token_extended_information: Optional[str] = None, - rp_tier_information: Optional[Dict[str, str]] = None, - rp_original_sa_option: Optional[bool] = None, - rp_is_managed_virtual_machine: Optional[bool] = None, - rp_vm_size_description: Optional[str] = None, - b_ms_active_region: Optional[str] = None, - protectable_object_unique_name: Optional[str] = None, - protectable_object_friendly_name: Optional[str] = None, - protectable_object_workload_type: Optional[str] = None, - protectable_object_protection_state: Optional[str] = None, - protectable_object_container_host_os_name: Optional[str] = None, - protectable_object_parent_logical_container_name: Optional[str] = None, - container_id: Optional[str] = None, - policy_name: Optional[str] = None, - policy_id: Optional[str] = None, - **kwargs - ): - super(WorkloadCrrAccessToken, self).__init__(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.object_type = 'WorkloadCrrAccessToken' # type: str - 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(msrest.serialization.Model): """Details of an inquired protectable item. 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 4cf20850f0a4..878d8a64346c 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 @@ -197,7 +197,7 @@ class HealthState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): INVALID = "Invalid" class HealthStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """backups running status for this backup item. + """Health status of protected item. """ PASSED = "Passed" @@ -671,7 +671,7 @@ class WorkloadItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SAP_ASE_DATABASE = "SAPAseDatabase" class WorkloadType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Workload type of backup item. + """Type of workload for the backup management """ INVALID = "Invalid" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py index 18922f7c05ca..e1e37f1be594 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 @@ -52,16 +52,6 @@ from ._recovery_points_recommended_for_move_operations import RecoveryPointsRecommendedForMoveOperations from ._resource_guard_proxies_operations import ResourceGuardProxiesOperations from ._resource_guard_proxy_operations import ResourceGuardProxyOperations -from ._backup_usage_summaries_crr_operations import BackupUsageSummariesCRROperations -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 __all__ = [ 'BackupResourceStorageConfigsNonCRROperations', @@ -110,14 +100,4 @@ 'RecoveryPointsRecommendedForMoveOperations', 'ResourceGuardProxiesOperations', 'ResourceGuardProxyOperations', - 'BackupUsageSummariesCRROperations', - 'AadPropertiesOperations', - 'CrossRegionRestoreOperations', - 'BackupCrrJobDetailsOperations', - 'BackupCrrJobsOperations', - 'CrrOperationResultsOperations', - 'CrrOperationStatusOperations', - 'BackupResourceStorageConfigsOperations', - 'RecoveryPointsCrrOperations', - 'BackupProtectedItemsCrrOperations', ] 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 deleted file mode 100644 index e99a8c16e9c0..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_aad_properties_operations.py +++ /dev/null @@ -1,108 +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. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class AadPropertiesOperations(object): - """AadPropertiesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - azure_region, # type: str - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.AADPropertiesResource" - """Fetches the AAD properties from target region BCM stamp. - - Fetches the AAD properties from target region BCM stamp. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AADPropertiesResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.AADPropertiesResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AADPropertiesResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - 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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AADPropertiesResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties'} # type: ignore 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 deleted file mode 100644 index 8716bcc1cad1..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_job_details_operations.py +++ /dev/null @@ -1,111 +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. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupCrrJobDetailsOperations(object): - """BackupCrrJobDetailsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - azure_region, # type: str - parameters, # type: "_models.CrrJobRequest" - **kwargs # type: Any - ): - # type: (...) -> "_models.JobResource" - """Get CRR job details from target region. - - Get CRR job details from target region. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: CRR Job request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.CrrJobRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :return: JobResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.JobResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrrJobRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('JobResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob'} # type: ignore 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 deleted file mode 100644 index dd79a28a027c..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_jobs_operations.py +++ /dev/null @@ -1,141 +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. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupCrrJobsOperations(object): - """BackupCrrJobsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - azure_region, # type: str - parameters, # type: "_models.CrrJobRequest" - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.JobResourceList"] - """Gets the list of CRR jobs from the target region. - - Gets the list of CRR jobs from the target region. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: Backup CRR Job request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.CrrJobRequest - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.JobResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = "application/json" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - 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') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrrJobRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrrJobRequest') - body_content_kwargs['content'] = body_content - request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('JobResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs'} # type: ignore 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 deleted file mode 100644 index 1fdbb0bfbffb..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_crr_operations.py +++ /dev/null @@ -1,133 +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. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupProtectedItemsCrrOperations(object): - """BackupProtectedItemsCrrOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ProtectedItemResourceList"] - """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 - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectedItemResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectedItemResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - 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') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectedItemResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/'} # type: ignore 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 deleted file mode 100644 index 535731e8f366..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_operations.py +++ /dev/null @@ -1,241 +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. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupResourceStorageConfigsOperations(object): - """BackupResourceStorageConfigsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - vault_name, # type: str - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.BackupResourceConfigResource" - """Fetches resource storage 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 - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupResourceConfigResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore - - def update( - self, - vault_name, # type: str - resource_group_name, # type: str - parameters, # type: "_models.BackupResourceConfigResource" - **kwargs # type: Any - ): - # type: (...) -> "_models.BackupResourceConfigResource" - """Updates vault storage model type. - - :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: Vault storage config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupResourceConfigResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.update.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupResourceConfigResource') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore - - def patch( - self, - vault_name, # type: str - resource_group_name, # type: str - parameters, # type: "_models.BackupResourceConfigResource" - **kwargs # type: Any - ): - # type: (...) -> None - """Updates vault storage model type. - - :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: Vault storage config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.patch.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupResourceConfigResource') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_crr_operations.py deleted file mode 100644 index 4a3a68574fd2..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_crr_operations.py +++ /dev/null @@ -1,133 +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. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupUsageSummariesCRROperations(object): - """BackupUsageSummariesCRROperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.BackupManagementUsageList"] - """Fetches the backup management usage summaries of the 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 - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either BackupManagementUsageList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsageList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupManagementUsageList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - 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') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('BackupManagementUsageList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries'} # type: ignore 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 deleted file mode 100644 index 3a32161293a5..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_cross_region_restore_operations.py +++ /dev/null @@ -1,164 +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. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class CrossRegionRestoreOperations(object): - """CrossRegionRestoreOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def _trigger_initial( - self, - azure_region, # type: str - parameters, # type: "_models.CrossRegionRestoreRequest" - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._trigger_initial.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrossRegionRestoreRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _trigger_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore'} # type: ignore - - def begin_trigger( - self, - azure_region, # type: str - parameters, # type: "_models.CrossRegionRestoreRequest" - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Restores the specified backed up data in a different region as compared to where the data is backed up. - - 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 parameters: resource cross region restore request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.CrossRegionRestoreRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._trigger_initial( - azure_region=azure_region, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - 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'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore'} # type: ignore 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 deleted file mode 100644 index b65e4435fb91..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_results_operations.py +++ /dev/null @@ -1,102 +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. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class CrrOperationResultsOperations(object): - """CrrOperationResultsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - azure_region, # type: str - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """get. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param operation_id: - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}'} # type: ignore 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 deleted file mode 100644 index 7307c4bc17a6..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_status_operations.py +++ /dev/null @@ -1,105 +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. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class CrrOperationStatusOperations(object): - """CrrOperationStatusOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - azure_region, # type: str - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.OperationStatus" - """get. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param operation_id: - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationStatus, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('OperationStatus', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}'} # type: ignore 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 deleted file mode 100644 index f4100034a834..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_crr_operations.py +++ /dev/null @@ -1,140 +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. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class RecoveryPointsCrrOperations(object): - """RecoveryPointsCrrOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - container_name, # type: str - protected_item_name, # type: str - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.RecoveryPointResourceList"] - """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 - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RecoveryPointResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - 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') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('RecoveryPointResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/'} # type: ignore 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 cd3d10fc73a1..52e80a98732f 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 @@ -215,92 +215,3 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}'} # type: ignore - - def get_access_token( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - container_name, # type: str - protected_item_name, # type: str - recovery_point_id, # type: str - parameters, # type: "_models.AADPropertiesResource" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.CrrAccessTokenResource"] - """Returns the Access token for communication between BMS and Protection service. - - 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 - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CrrAccessTokenResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.CrrAccessTokenResource or None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CrrAccessTokenResource"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.get_access_token.metadata['url'] # type: ignore - 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 = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'AADPropertiesResource') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 400]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CrrAccessTokenResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - 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'} # type: ignore