diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/__init__.py deleted file mode 100644 index 0260537a02bb..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/__init__.py index 802d9218dc4b..a44ce6ced155 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/__init__.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/__init__.py @@ -12,8 +12,7 @@ __version__ = VERSION __all__ = ['RecoveryServicesBackupClient'] -try: - from ._patch import patch_sdk # type: ignore - patch_sdk() -except ImportError: - pass +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() 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..da54a739127f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_configuration.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_configuration.py @@ -10,7 +10,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy from ._version import VERSION @@ -31,6 +31,8 @@ class RecoveryServicesBackupClientConfiguration(Configuration): :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The subscription Id. :type subscription_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -40,14 +42,17 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None + super(RecoveryServicesBackupClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - super(RecoveryServicesBackupClientConfiguration, self).__init__(**kwargs) self.credential = credential self.subscription_id = subscription_id + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-recoveryservicesbackup/{}'.format(VERSION)) self._configure(**kwargs) @@ -67,4 +72,4 @@ def _configure( self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) self.authentication_policy = kwargs.get('authentication_policy') if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **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 deleted file mode 100644 index 6861dba04dd3..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_metadata.json +++ /dev/null @@ -1,247 +0,0 @@ -{ - "chosen_version": "", - "total_api_version_list": ["2018-12-20", "2021-08-01"], - "client": { - "name": "RecoveryServicesBackupClient", - "filename": "_recovery_services_backup_client", - "description": "Open API 2.0 Specs for Azure RecoveryServices Backup service.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, - "azure_arm": true, - "has_lro_operations": true, - "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"RecoveryServicesBackupClientConfiguration\"], \"._operations_mixin\": [\"RecoveryServicesBackupClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"RecoveryServicesBackupClientConfiguration\"], \"._operations_mixin\": [\"RecoveryServicesBackupClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The subscription Id.", - "docstring_type": "str", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential: \"AsyncTokenCredential\",", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id: str,", - "description": "The subscription Id.", - "docstring_type": "str", - "required": true - } - }, - "constant": { - }, - "call": "credential, subscription_id", - "service_client_specific": { - "sync": { - "api_version": { - "signature": "api_version=None, # type: Optional[str]", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url=None, # type: Optional[str]", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile=KnownProfiles.default, # type: KnownProfiles", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - }, - "async": { - "api_version": { - "signature": "api_version: Optional[str] = None,", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url: Optional[str] = None,", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile: KnownProfiles = KnownProfiles.default,", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - } - } - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" - }, - "operation_groups": { - "backup_resource_storage_configs_non_crr": "BackupResourceStorageConfigsNonCRROperations", - "protection_intent": "ProtectionIntentOperations", - "backup_status": "BackupStatusOperations", - "feature_support": "FeatureSupportOperations", - "backup_protection_intent": "BackupProtectionIntentOperations", - "backup_usage_summaries": "BackupUsageSummariesOperations", - "operations": "Operations", - "backup_resource_vault_configs": "BackupResourceVaultConfigsOperations", - "backup_resource_encryption_configs": "BackupResourceEncryptionConfigsOperations", - "private_endpoint_connection": "PrivateEndpointConnectionOperations", - "private_endpoint": "PrivateEndpointOperations", - "bms_prepare_data_move_operation_result": "BMSPrepareDataMoveOperationResultOperations", - "protected_items": "ProtectedItemsOperations", - "protected_item_operation_results": "ProtectedItemOperationResultsOperations", - "recovery_points": "RecoveryPointsOperations", - "restores": "RestoresOperations", - "backup_policies": "BackupPoliciesOperations", - "protection_policies": "ProtectionPoliciesOperations", - "protection_policy_operation_results": "ProtectionPolicyOperationResultsOperations", - "backup_jobs": "BackupJobsOperations", - "job_details": "JobDetailsOperations", - "job_cancellations": "JobCancellationsOperations", - "job_operation_results": "JobOperationResultsOperations", - "export_jobs_operation_results": "ExportJobsOperationResultsOperations", - "jobs": "JobsOperations", - "backup_protected_items": "BackupProtectedItemsOperations", - "operation": "OperationOperations", - "backup_engines": "BackupEnginesOperations", - "protection_container_refresh_operation_results": "ProtectionContainerRefreshOperationResultsOperations", - "protectable_containers": "ProtectableContainersOperations", - "protection_containers": "ProtectionContainersOperations", - "backup_workload_items": "BackupWorkloadItemsOperations", - "protection_container_operation_results": "ProtectionContainerOperationResultsOperations", - "backups": "BackupsOperations", - "protected_item_operation_statuses": "ProtectedItemOperationStatusesOperations", - "item_level_recovery_connections": "ItemLevelRecoveryConnectionsOperations", - "backup_operation_results": "BackupOperationResultsOperations", - "backup_operation_statuses": "BackupOperationStatusesOperations", - "protection_policy_operation_statuses": "ProtectionPolicyOperationStatusesOperations", - "backup_protectable_items": "BackupProtectableItemsOperations", - "backup_protection_containers": "BackupProtectionContainersOperations", - "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" - }, - "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\"]}}}", - "async_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\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.polling\": [\"AsyncLROPoller\", \"AsyncNoPolling\", \"AsyncPollingMethod\"], \"azure.mgmt.core.polling.async_arm_polling\": [\"AsyncARMPolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", - "operations": { - "get_operation_status" : { - "sync": { - "signature": "def get_operation_status(\n self,\n vault_name, # type: str\n resource_group_name, # type: str\n operation_id, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Fetches operation status for data move operation on vault.\n\n:param vault_name: The name of the recovery services vault.\n:type vault_name: str\n:param resource_group_name: The name of the resource group where the recovery services vault is\n present.\n:type resource_group_name: str\n:param operation_id:\n:type operation_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OperationStatus, or the result of cls(response)\n:rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def get_operation_status(\n self,\n vault_name: str,\n resource_group_name: str,\n operation_id: str,\n **kwargs: Any\n) -\u003e \"_models.OperationStatus\":\n", - "doc": "\"\"\"Fetches operation status for data move operation on vault.\n\n:param vault_name: The name of the recovery services vault.\n:type vault_name: str\n:param resource_group_name: The name of the resource group where the recovery services vault is\n present.\n:type resource_group_name: str\n:param operation_id:\n:type operation_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OperationStatus, or the result of cls(response)\n:rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "vault_name, resource_group_name, operation_id" - }, - "_bms_prepare_data_move_initial" : { - "sync": { - "signature": "def _bms_prepare_data_move_initial(\n self,\n vault_name, # type: str\n resource_group_name, # type: str\n parameters, # type: \"_models.PrepareDataMoveRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param vault_name: The name of the recovery services vault.\n:type vault_name: str\n:param resource_group_name: The name of the resource group where the recovery services vault is\n present.\n:type resource_group_name: str\n:param parameters: Prepare data move request.\n:type parameters: ~azure.mgmt.recoveryservicesbackup.models.PrepareDataMoveRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def _bms_prepare_data_move_initial(\n self,\n vault_name: str,\n resource_group_name: str,\n parameters: \"_models.PrepareDataMoveRequest\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param vault_name: The name of the recovery services vault.\n:type vault_name: str\n:param resource_group_name: The name of the resource group where the recovery services vault is\n present.\n:type resource_group_name: str\n:param parameters: Prepare data move request.\n:type parameters: ~azure.mgmt.recoveryservicesbackup.models.PrepareDataMoveRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "vault_name, resource_group_name, parameters" - }, - "begin_bms_prepare_data_move" : { - "sync": { - "signature": "def begin_bms_prepare_data_move(\n self,\n vault_name, # type: str\n resource_group_name, # type: str\n parameters, # type: \"_models.PrepareDataMoveRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Prepares source vault for Data Move operation.\n\n:param vault_name: The name of the recovery services vault.\n:type vault_name: str\n:param resource_group_name: The name of the resource group where the recovery services vault is\n present.\n:type resource_group_name: str\n:param parameters: Prepare data move request.\n:type parameters: ~azure.mgmt.recoveryservicesbackup.models.PrepareDataMoveRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def begin_bms_prepare_data_move(\n self,\n vault_name: str,\n resource_group_name: str,\n parameters: \"_models.PrepareDataMoveRequest\",\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", - "doc": "\"\"\"Prepares source vault for Data Move operation.\n\n:param vault_name: The name of the recovery services vault.\n:type vault_name: str\n:param resource_group_name: The name of the resource group where the recovery services vault is\n present.\n:type resource_group_name: str\n:param parameters: Prepare data move request.\n:type parameters: ~azure.mgmt.recoveryservicesbackup.models.PrepareDataMoveRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" - }, - "call": "vault_name, resource_group_name, parameters" - }, - "_bms_trigger_data_move_initial" : { - "sync": { - "signature": "def _bms_trigger_data_move_initial(\n self,\n vault_name, # type: str\n resource_group_name, # type: str\n parameters, # type: \"_models.TriggerDataMoveRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param vault_name: The name of the recovery services vault.\n:type vault_name: str\n:param resource_group_name: The name of the resource group where the recovery services vault is\n present.\n:type resource_group_name: str\n:param parameters: Trigger data move request.\n:type parameters: ~azure.mgmt.recoveryservicesbackup.models.TriggerDataMoveRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def _bms_trigger_data_move_initial(\n self,\n vault_name: str,\n resource_group_name: str,\n parameters: \"_models.TriggerDataMoveRequest\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param vault_name: The name of the recovery services vault.\n:type vault_name: str\n:param resource_group_name: The name of the resource group where the recovery services vault is\n present.\n:type resource_group_name: str\n:param parameters: Trigger data move request.\n:type parameters: ~azure.mgmt.recoveryservicesbackup.models.TriggerDataMoveRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "vault_name, resource_group_name, parameters" - }, - "begin_bms_trigger_data_move" : { - "sync": { - "signature": "def begin_bms_trigger_data_move(\n self,\n vault_name, # type: str\n resource_group_name, # type: str\n parameters, # type: \"_models.TriggerDataMoveRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Triggers Data Move Operation on target vault.\n\n:param vault_name: The name of the recovery services vault.\n:type vault_name: str\n:param resource_group_name: The name of the resource group where the recovery services vault is\n present.\n:type resource_group_name: str\n:param parameters: Trigger data move request.\n:type parameters: ~azure.mgmt.recoveryservicesbackup.models.TriggerDataMoveRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def begin_bms_trigger_data_move(\n self,\n vault_name: str,\n resource_group_name: str,\n parameters: \"_models.TriggerDataMoveRequest\",\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", - "doc": "\"\"\"Triggers Data Move Operation on target vault.\n\n:param vault_name: The name of the recovery services vault.\n:type vault_name: str\n:param resource_group_name: The name of the resource group where the recovery services vault is\n present.\n:type resource_group_name: str\n:param parameters: Trigger data move request.\n:type parameters: ~azure.mgmt.recoveryservicesbackup.models.TriggerDataMoveRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" - }, - "call": "vault_name, resource_group_name, parameters" - }, - "_move_recovery_point_initial" : { - "sync": { - "signature": "def _move_recovery_point_initial(\n self,\n vault_name, # type: str\n resource_group_name, # type: str\n fabric_name, # type: str\n container_name, # type: str\n protected_item_name, # type: str\n recovery_point_id, # type: str\n parameters, # type: \"_models.MoveRPAcrossTiersRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param vault_name: The name of the recovery services vault.\n:type vault_name: str\n:param resource_group_name: The name of the resource group where the recovery services vault is\n present.\n:type resource_group_name: str\n:param fabric_name:\n:type fabric_name: str\n:param container_name:\n:type container_name: str\n:param protected_item_name:\n:type protected_item_name: str\n:param recovery_point_id:\n:type recovery_point_id: str\n:param parameters: Move Resource Across Tiers Request.\n:type parameters: ~azure.mgmt.recoveryservicesbackup.models.MoveRPAcrossTiersRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def _move_recovery_point_initial(\n self,\n vault_name: str,\n resource_group_name: str,\n fabric_name: str,\n container_name: str,\n protected_item_name: str,\n recovery_point_id: str,\n parameters: \"_models.MoveRPAcrossTiersRequest\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param vault_name: The name of the recovery services vault.\n:type vault_name: str\n:param resource_group_name: The name of the resource group where the recovery services vault is\n present.\n:type resource_group_name: str\n:param fabric_name:\n:type fabric_name: str\n:param container_name:\n:type container_name: str\n:param protected_item_name:\n:type protected_item_name: str\n:param recovery_point_id:\n:type recovery_point_id: str\n:param parameters: Move Resource Across Tiers Request.\n:type parameters: ~azure.mgmt.recoveryservicesbackup.models.MoveRPAcrossTiersRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, parameters" - }, - "begin_move_recovery_point" : { - "sync": { - "signature": "def begin_move_recovery_point(\n self,\n vault_name, # type: str\n resource_group_name, # type: str\n fabric_name, # type: str\n container_name, # type: str\n protected_item_name, # type: str\n recovery_point_id, # type: str\n parameters, # type: \"_models.MoveRPAcrossTiersRequest\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Move recovery point from one datastore to another store.\n\nMove recovery point from one datastore to another store.\n\n:param vault_name: The name of the recovery services vault.\n:type vault_name: str\n:param resource_group_name: The name of the resource group where the recovery services vault is\n present.\n:type resource_group_name: str\n:param fabric_name:\n:type fabric_name: str\n:param container_name:\n:type container_name: str\n:param protected_item_name:\n:type protected_item_name: str\n:param recovery_point_id:\n:type recovery_point_id: str\n:param parameters: Move Resource Across Tiers Request.\n:type parameters: ~azure.mgmt.recoveryservicesbackup.models.MoveRPAcrossTiersRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def begin_move_recovery_point(\n self,\n vault_name: str,\n resource_group_name: str,\n fabric_name: str,\n container_name: str,\n protected_item_name: str,\n recovery_point_id: str,\n parameters: \"_models.MoveRPAcrossTiersRequest\",\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", - "doc": "\"\"\"Move recovery point from one datastore to another store.\n\nMove recovery point from one datastore to another store.\n\n:param vault_name: The name of the recovery services vault.\n:type vault_name: str\n:param resource_group_name: The name of the resource group where the recovery services vault is\n present.\n:type resource_group_name: str\n:param fabric_name:\n:type fabric_name: str\n:param container_name:\n:type container_name: str\n:param protected_item_name:\n:type protected_item_name: str\n:param recovery_point_id:\n:type recovery_point_id: str\n:param parameters: Move Resource Across Tiers Request.\n:type parameters: ~azure.mgmt.recoveryservicesbackup.models.MoveRPAcrossTiersRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" - }, - "call": "vault_name, resource_group_name, fabric_name, container_name, protected_item_name, recovery_point_id, parameters" - } - } - } -} \ No newline at end of file diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_patch.py new file mode 100644 index 000000000000..74e48ecd07cf --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass \ No newline at end of file diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_recovery_services_backup_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_recovery_services_backup_client.py index 117a2c2f0d77..f34bd5e9da1e 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 @@ -6,109 +6,66 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from copy import deepcopy from typing import TYPE_CHECKING from azure.mgmt.core import ARMPipelineClient from msrest import Deserializer, Serializer +from . import models +from ._configuration import RecoveryServicesBackupClientConfiguration +from .operations import BMSPrepareDataMoveOperationResultOperations, BackupEnginesOperations, BackupJobsOperations, BackupOperationResultsOperations, BackupOperationStatusesOperations, BackupPoliciesOperations, BackupProtectableItemsOperations, BackupProtectedItemsOperations, BackupProtectionContainersOperations, BackupProtectionIntentOperations, BackupResourceEncryptionConfigsOperations, BackupResourceStorageConfigsNonCRROperations, BackupResourceVaultConfigsOperations, BackupStatusOperations, BackupUsageSummariesOperations, BackupWorkloadItemsOperations, BackupsOperations, ExportJobsOperationResultsOperations, FeatureSupportOperations, ItemLevelRecoveryConnectionsOperations, JobCancellationsOperations, JobDetailsOperations, JobOperationResultsOperations, JobsOperations, OperationOperations, Operations, PrivateEndpointConnectionOperations, PrivateEndpointOperations, ProtectableContainersOperations, ProtectedItemOperationResultsOperations, ProtectedItemOperationStatusesOperations, ProtectedItemsOperations, ProtectionContainerOperationResultsOperations, ProtectionContainerRefreshOperationResultsOperations, ProtectionContainersOperations, ProtectionIntentOperations, ProtectionPoliciesOperations, ProtectionPolicyOperationResultsOperations, ProtectionPolicyOperationStatusesOperations, RecoveryPointsOperations, RecoveryPointsRecommendedForMoveOperations, RecoveryServicesBackupClientOperationsMixin, ResourceGuardProxiesOperations, ResourceGuardProxyOperations, RestoresOperations, SecurityPINsOperations, ValidateOperationOperations, ValidateOperationResultsOperations, ValidateOperationStatusesOperations + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any, Optional from azure.core.credentials import TokenCredential - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import RecoveryServicesBackupClientConfiguration -from .operations import BackupResourceStorageConfigsNonCRROperations -from .operations import ProtectionIntentOperations -from .operations import BackupStatusOperations -from .operations import FeatureSupportOperations -from .operations import BackupProtectionIntentOperations -from .operations import BackupUsageSummariesOperations -from .operations import Operations -from .operations import BackupResourceVaultConfigsOperations -from .operations import BackupResourceEncryptionConfigsOperations -from .operations import PrivateEndpointConnectionOperations -from .operations import PrivateEndpointOperations -from .operations import RecoveryServicesBackupClientOperationsMixin -from .operations import BMSPrepareDataMoveOperationResultOperations -from .operations import ProtectedItemsOperations -from .operations import ProtectedItemOperationResultsOperations -from .operations import RecoveryPointsOperations -from .operations import RestoresOperations -from .operations import BackupPoliciesOperations -from .operations import ProtectionPoliciesOperations -from .operations import ProtectionPolicyOperationResultsOperations -from .operations import BackupJobsOperations -from .operations import JobDetailsOperations -from .operations import JobCancellationsOperations -from .operations import JobOperationResultsOperations -from .operations import ExportJobsOperationResultsOperations -from .operations import JobsOperations -from .operations import BackupProtectedItemsOperations -from .operations import OperationOperations -from .operations import BackupEnginesOperations -from .operations import ProtectionContainerRefreshOperationResultsOperations -from .operations import ProtectableContainersOperations -from .operations import ProtectionContainersOperations -from .operations import BackupWorkloadItemsOperations -from .operations import ProtectionContainerOperationResultsOperations -from .operations import BackupsOperations -from .operations import ProtectedItemOperationStatusesOperations -from .operations import ItemLevelRecoveryConnectionsOperations -from .operations import BackupOperationResultsOperations -from .operations import BackupOperationStatusesOperations -from .operations import ProtectionPolicyOperationStatusesOperations -from .operations import BackupProtectableItemsOperations -from .operations import BackupProtectionContainersOperations -from .operations import SecurityPINsOperations -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 - + from azure.core.rest import HttpRequest, HttpResponse class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin): """Open API 2.0 Specs for Azure RecoveryServices Backup service. - :ivar backup_resource_storage_configs_non_crr: BackupResourceStorageConfigsNonCRROperations operations - :vartype backup_resource_storage_configs_non_crr: azure.mgmt.recoveryservicesbackup.operations.BackupResourceStorageConfigsNonCRROperations + :ivar backup_resource_storage_configs_non_crr: BackupResourceStorageConfigsNonCRROperations + operations + :vartype backup_resource_storage_configs_non_crr: + azure.mgmt.recoveryservicesbackup.operations.BackupResourceStorageConfigsNonCRROperations :ivar protection_intent: ProtectionIntentOperations operations - :vartype protection_intent: azure.mgmt.recoveryservicesbackup.operations.ProtectionIntentOperations + :vartype protection_intent: + azure.mgmt.recoveryservicesbackup.operations.ProtectionIntentOperations :ivar backup_status: BackupStatusOperations operations :vartype backup_status: azure.mgmt.recoveryservicesbackup.operations.BackupStatusOperations :ivar feature_support: FeatureSupportOperations operations :vartype feature_support: azure.mgmt.recoveryservicesbackup.operations.FeatureSupportOperations :ivar backup_protection_intent: BackupProtectionIntentOperations operations - :vartype backup_protection_intent: azure.mgmt.recoveryservicesbackup.operations.BackupProtectionIntentOperations + :vartype backup_protection_intent: + azure.mgmt.recoveryservicesbackup.operations.BackupProtectionIntentOperations :ivar backup_usage_summaries: BackupUsageSummariesOperations operations - :vartype backup_usage_summaries: azure.mgmt.recoveryservicesbackup.operations.BackupUsageSummariesOperations + :vartype backup_usage_summaries: + azure.mgmt.recoveryservicesbackup.operations.BackupUsageSummariesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.recoveryservicesbackup.operations.Operations :ivar backup_resource_vault_configs: BackupResourceVaultConfigsOperations operations - :vartype backup_resource_vault_configs: azure.mgmt.recoveryservicesbackup.operations.BackupResourceVaultConfigsOperations + :vartype backup_resource_vault_configs: + azure.mgmt.recoveryservicesbackup.operations.BackupResourceVaultConfigsOperations :ivar backup_resource_encryption_configs: BackupResourceEncryptionConfigsOperations operations - :vartype backup_resource_encryption_configs: azure.mgmt.recoveryservicesbackup.operations.BackupResourceEncryptionConfigsOperations + :vartype backup_resource_encryption_configs: + azure.mgmt.recoveryservicesbackup.operations.BackupResourceEncryptionConfigsOperations :ivar private_endpoint_connection: PrivateEndpointConnectionOperations operations - :vartype private_endpoint_connection: azure.mgmt.recoveryservicesbackup.operations.PrivateEndpointConnectionOperations + :vartype private_endpoint_connection: + azure.mgmt.recoveryservicesbackup.operations.PrivateEndpointConnectionOperations :ivar private_endpoint: PrivateEndpointOperations operations - :vartype private_endpoint: azure.mgmt.recoveryservicesbackup.operations.PrivateEndpointOperations - :ivar bms_prepare_data_move_operation_result: BMSPrepareDataMoveOperationResultOperations operations - :vartype bms_prepare_data_move_operation_result: azure.mgmt.recoveryservicesbackup.operations.BMSPrepareDataMoveOperationResultOperations + :vartype private_endpoint: + azure.mgmt.recoveryservicesbackup.operations.PrivateEndpointOperations + :ivar bms_prepare_data_move_operation_result: BMSPrepareDataMoveOperationResultOperations + operations + :vartype bms_prepare_data_move_operation_result: + azure.mgmt.recoveryservicesbackup.operations.BMSPrepareDataMoveOperationResultOperations :ivar protected_items: ProtectedItemsOperations operations :vartype protected_items: azure.mgmt.recoveryservicesbackup.operations.ProtectedItemsOperations :ivar protected_item_operation_results: ProtectedItemOperationResultsOperations operations - :vartype protected_item_operation_results: azure.mgmt.recoveryservicesbackup.operations.ProtectedItemOperationResultsOperations + :vartype protected_item_operation_results: + azure.mgmt.recoveryservicesbackup.operations.ProtectedItemOperationResultsOperations :ivar recovery_points: RecoveryPointsOperations operations :vartype recovery_points: azure.mgmt.recoveryservicesbackup.operations.RecoveryPointsOperations :ivar restores: RestoresOperations operations @@ -116,235 +73,200 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin): :ivar backup_policies: BackupPoliciesOperations operations :vartype backup_policies: azure.mgmt.recoveryservicesbackup.operations.BackupPoliciesOperations :ivar protection_policies: ProtectionPoliciesOperations operations - :vartype protection_policies: azure.mgmt.recoveryservicesbackup.operations.ProtectionPoliciesOperations - :ivar protection_policy_operation_results: ProtectionPolicyOperationResultsOperations operations - :vartype protection_policy_operation_results: azure.mgmt.recoveryservicesbackup.operations.ProtectionPolicyOperationResultsOperations + :vartype protection_policies: + azure.mgmt.recoveryservicesbackup.operations.ProtectionPoliciesOperations + :ivar protection_policy_operation_results: ProtectionPolicyOperationResultsOperations + operations + :vartype protection_policy_operation_results: + azure.mgmt.recoveryservicesbackup.operations.ProtectionPolicyOperationResultsOperations :ivar backup_jobs: BackupJobsOperations operations :vartype backup_jobs: azure.mgmt.recoveryservicesbackup.operations.BackupJobsOperations :ivar job_details: JobDetailsOperations operations :vartype job_details: azure.mgmt.recoveryservicesbackup.operations.JobDetailsOperations :ivar job_cancellations: JobCancellationsOperations operations - :vartype job_cancellations: azure.mgmt.recoveryservicesbackup.operations.JobCancellationsOperations + :vartype job_cancellations: + azure.mgmt.recoveryservicesbackup.operations.JobCancellationsOperations :ivar job_operation_results: JobOperationResultsOperations operations - :vartype job_operation_results: azure.mgmt.recoveryservicesbackup.operations.JobOperationResultsOperations + :vartype job_operation_results: + azure.mgmt.recoveryservicesbackup.operations.JobOperationResultsOperations :ivar export_jobs_operation_results: ExportJobsOperationResultsOperations operations - :vartype export_jobs_operation_results: azure.mgmt.recoveryservicesbackup.operations.ExportJobsOperationResultsOperations + :vartype export_jobs_operation_results: + azure.mgmt.recoveryservicesbackup.operations.ExportJobsOperationResultsOperations :ivar jobs: JobsOperations operations :vartype jobs: azure.mgmt.recoveryservicesbackup.operations.JobsOperations :ivar backup_protected_items: BackupProtectedItemsOperations operations - :vartype backup_protected_items: azure.mgmt.recoveryservicesbackup.operations.BackupProtectedItemsOperations + :vartype backup_protected_items: + azure.mgmt.recoveryservicesbackup.operations.BackupProtectedItemsOperations :ivar operation: OperationOperations operations :vartype operation: azure.mgmt.recoveryservicesbackup.operations.OperationOperations + :ivar validate_operation: ValidateOperationOperations operations + :vartype validate_operation: + azure.mgmt.recoveryservicesbackup.operations.ValidateOperationOperations + :ivar validate_operation_results: ValidateOperationResultsOperations operations + :vartype validate_operation_results: + azure.mgmt.recoveryservicesbackup.operations.ValidateOperationResultsOperations + :ivar validate_operation_statuses: ValidateOperationStatusesOperations operations + :vartype validate_operation_statuses: + azure.mgmt.recoveryservicesbackup.operations.ValidateOperationStatusesOperations :ivar backup_engines: BackupEnginesOperations operations :vartype backup_engines: azure.mgmt.recoveryservicesbackup.operations.BackupEnginesOperations - :ivar protection_container_refresh_operation_results: ProtectionContainerRefreshOperationResultsOperations operations - :vartype protection_container_refresh_operation_results: azure.mgmt.recoveryservicesbackup.operations.ProtectionContainerRefreshOperationResultsOperations + :ivar protection_container_refresh_operation_results: + ProtectionContainerRefreshOperationResultsOperations operations + :vartype protection_container_refresh_operation_results: + azure.mgmt.recoveryservicesbackup.operations.ProtectionContainerRefreshOperationResultsOperations :ivar protectable_containers: ProtectableContainersOperations operations - :vartype protectable_containers: azure.mgmt.recoveryservicesbackup.operations.ProtectableContainersOperations + :vartype protectable_containers: + azure.mgmt.recoveryservicesbackup.operations.ProtectableContainersOperations :ivar protection_containers: ProtectionContainersOperations operations - :vartype protection_containers: azure.mgmt.recoveryservicesbackup.operations.ProtectionContainersOperations + :vartype protection_containers: + azure.mgmt.recoveryservicesbackup.operations.ProtectionContainersOperations :ivar backup_workload_items: BackupWorkloadItemsOperations operations - :vartype backup_workload_items: azure.mgmt.recoveryservicesbackup.operations.BackupWorkloadItemsOperations - :ivar protection_container_operation_results: ProtectionContainerOperationResultsOperations operations - :vartype protection_container_operation_results: azure.mgmt.recoveryservicesbackup.operations.ProtectionContainerOperationResultsOperations + :vartype backup_workload_items: + azure.mgmt.recoveryservicesbackup.operations.BackupWorkloadItemsOperations + :ivar protection_container_operation_results: ProtectionContainerOperationResultsOperations + operations + :vartype protection_container_operation_results: + azure.mgmt.recoveryservicesbackup.operations.ProtectionContainerOperationResultsOperations :ivar backups: BackupsOperations operations :vartype backups: azure.mgmt.recoveryservicesbackup.operations.BackupsOperations :ivar protected_item_operation_statuses: ProtectedItemOperationStatusesOperations operations - :vartype protected_item_operation_statuses: azure.mgmt.recoveryservicesbackup.operations.ProtectedItemOperationStatusesOperations + :vartype protected_item_operation_statuses: + azure.mgmt.recoveryservicesbackup.operations.ProtectedItemOperationStatusesOperations :ivar item_level_recovery_connections: ItemLevelRecoveryConnectionsOperations operations - :vartype item_level_recovery_connections: azure.mgmt.recoveryservicesbackup.operations.ItemLevelRecoveryConnectionsOperations + :vartype item_level_recovery_connections: + azure.mgmt.recoveryservicesbackup.operations.ItemLevelRecoveryConnectionsOperations :ivar backup_operation_results: BackupOperationResultsOperations operations - :vartype backup_operation_results: azure.mgmt.recoveryservicesbackup.operations.BackupOperationResultsOperations + :vartype backup_operation_results: + azure.mgmt.recoveryservicesbackup.operations.BackupOperationResultsOperations :ivar backup_operation_statuses: BackupOperationStatusesOperations operations - :vartype backup_operation_statuses: azure.mgmt.recoveryservicesbackup.operations.BackupOperationStatusesOperations - :ivar protection_policy_operation_statuses: ProtectionPolicyOperationStatusesOperations operations - :vartype protection_policy_operation_statuses: azure.mgmt.recoveryservicesbackup.operations.ProtectionPolicyOperationStatusesOperations + :vartype backup_operation_statuses: + azure.mgmt.recoveryservicesbackup.operations.BackupOperationStatusesOperations + :ivar protection_policy_operation_statuses: ProtectionPolicyOperationStatusesOperations + operations + :vartype protection_policy_operation_statuses: + azure.mgmt.recoveryservicesbackup.operations.ProtectionPolicyOperationStatusesOperations :ivar backup_protectable_items: BackupProtectableItemsOperations operations - :vartype backup_protectable_items: azure.mgmt.recoveryservicesbackup.operations.BackupProtectableItemsOperations + :vartype backup_protectable_items: + azure.mgmt.recoveryservicesbackup.operations.BackupProtectableItemsOperations :ivar backup_protection_containers: BackupProtectionContainersOperations operations - :vartype backup_protection_containers: azure.mgmt.recoveryservicesbackup.operations.BackupProtectionContainersOperations + :vartype backup_protection_containers: + azure.mgmt.recoveryservicesbackup.operations.BackupProtectionContainersOperations :ivar security_pins: SecurityPINsOperations operations :vartype security_pins: azure.mgmt.recoveryservicesbackup.operations.SecurityPINsOperations - :ivar recovery_points_recommended_for_move: RecoveryPointsRecommendedForMoveOperations operations - :vartype recovery_points_recommended_for_move: azure.mgmt.recoveryservicesbackup.operations.RecoveryPointsRecommendedForMoveOperations + :ivar recovery_points_recommended_for_move: RecoveryPointsRecommendedForMoveOperations + operations + :vartype recovery_points_recommended_for_move: + azure.mgmt.recoveryservicesbackup.operations.RecoveryPointsRecommendedForMoveOperations :ivar resource_guard_proxies: ResourceGuardProxiesOperations operations - :vartype resource_guard_proxies: azure.mgmt.recoveryservicesbackup.operations.ResourceGuardProxiesOperations + :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 + :vartype resource_guard_proxy: + azure.mgmt.recoveryservicesbackup.operations.ResourceGuardProxyOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The subscription Id. :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :param base_url: Service URL. Default value is 'https://management.azure.com'. + :type base_url: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( self, credential, # type: "TokenCredential" subscription_id, # type: str - base_url=None, # type: Optional[str] + base_url="https://management.azure.com", # type: str **kwargs # type: Any ): # type: (...) -> None - if not base_url: - base_url = 'https://management.azure.com' - self._config = RecoveryServicesBackupClientConfiguration(credential, subscription_id, **kwargs) + self._config = RecoveryServicesBackupClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.backup_resource_storage_configs_non_crr = BackupResourceStorageConfigsNonCRROperations(self._client, self._config, self._serialize, self._deserialize) + self.protection_intent = ProtectionIntentOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_status = BackupStatusOperations(self._client, self._config, self._serialize, self._deserialize) + self.feature_support = FeatureSupportOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_protection_intent = BackupProtectionIntentOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_usage_summaries = BackupUsageSummariesOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.backup_resource_vault_configs = BackupResourceVaultConfigsOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_resource_encryption_configs = BackupResourceEncryptionConfigsOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connection = PrivateEndpointConnectionOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint = PrivateEndpointOperations(self._client, self._config, self._serialize, self._deserialize) + self.bms_prepare_data_move_operation_result = BMSPrepareDataMoveOperationResultOperations(self._client, self._config, self._serialize, self._deserialize) + self.protected_items = ProtectedItemsOperations(self._client, self._config, self._serialize, self._deserialize) + self.protected_item_operation_results = ProtectedItemOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.recovery_points = RecoveryPointsOperations(self._client, self._config, self._serialize, self._deserialize) + self.restores = RestoresOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_policies = BackupPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + self.protection_policies = ProtectionPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + self.protection_policy_operation_results = ProtectionPolicyOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_jobs = BackupJobsOperations(self._client, self._config, self._serialize, self._deserialize) + self.job_details = JobDetailsOperations(self._client, self._config, self._serialize, self._deserialize) + self.job_cancellations = JobCancellationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.job_operation_results = JobOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.export_jobs_operation_results = ExportJobsOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_protected_items = BackupProtectedItemsOperations(self._client, self._config, self._serialize, self._deserialize) + self.operation = OperationOperations(self._client, self._config, self._serialize, self._deserialize) + self.validate_operation = ValidateOperationOperations(self._client, self._config, self._serialize, self._deserialize) + self.validate_operation_results = ValidateOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.validate_operation_statuses = ValidateOperationStatusesOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_engines = BackupEnginesOperations(self._client, self._config, self._serialize, self._deserialize) + self.protection_container_refresh_operation_results = ProtectionContainerRefreshOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.protectable_containers = ProtectableContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.protection_containers = ProtectionContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_workload_items = BackupWorkloadItemsOperations(self._client, self._config, self._serialize, self._deserialize) + self.protection_container_operation_results = ProtectionContainerOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.backups = BackupsOperations(self._client, self._config, self._serialize, self._deserialize) + self.protected_item_operation_statuses = ProtectedItemOperationStatusesOperations(self._client, self._config, self._serialize, self._deserialize) + self.item_level_recovery_connections = ItemLevelRecoveryConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_operation_results = BackupOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_operation_statuses = BackupOperationStatusesOperations(self._client, self._config, self._serialize, self._deserialize) + self.protection_policy_operation_statuses = ProtectionPolicyOperationStatusesOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_protectable_items = BackupProtectableItemsOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_protection_containers = BackupProtectionContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.security_pins = SecurityPINsOperations(self._client, self._config, self._serialize, self._deserialize) + self.recovery_points_recommended_for_move = RecoveryPointsRecommendedForMoveOperations(self._client, self._config, self._serialize, self._deserialize) + self.resource_guard_proxies = ResourceGuardProxiesOperations(self._client, self._config, self._serialize, self._deserialize) + self.resource_guard_proxy = ResourceGuardProxyOperations(self._client, self._config, self._serialize, self._deserialize) - self.backup_resource_storage_configs_non_crr = BackupResourceStorageConfigsNonCRROperations( - self._client, self._config, self._serialize, self._deserialize) - self.protection_intent = ProtectionIntentOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_status = BackupStatusOperations( - self._client, self._config, self._serialize, self._deserialize) - self.feature_support = FeatureSupportOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_protection_intent = BackupProtectionIntentOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_usage_summaries = BackupUsageSummariesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_resource_vault_configs = BackupResourceVaultConfigsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_resource_encryption_configs = BackupResourceEncryptionConfigsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.private_endpoint_connection = PrivateEndpointConnectionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.private_endpoint = PrivateEndpointOperations( - self._client, self._config, self._serialize, self._deserialize) - self.bms_prepare_data_move_operation_result = BMSPrepareDataMoveOperationResultOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protected_items = ProtectedItemsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protected_item_operation_results = ProtectedItemOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.recovery_points = RecoveryPointsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.restores = RestoresOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_policies = BackupPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protection_policies = ProtectionPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protection_policy_operation_results = ProtectionPolicyOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_jobs = BackupJobsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.job_details = JobDetailsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.job_cancellations = JobCancellationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.job_operation_results = JobOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.export_jobs_operation_results = ExportJobsOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.jobs = JobsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_protected_items = BackupProtectedItemsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operation = OperationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_engines = BackupEnginesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protection_container_refresh_operation_results = ProtectionContainerRefreshOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protectable_containers = ProtectableContainersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protection_containers = ProtectionContainersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_workload_items = BackupWorkloadItemsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protection_container_operation_results = ProtectionContainerOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backups = BackupsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protected_item_operation_statuses = ProtectedItemOperationStatusesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.item_level_recovery_connections = ItemLevelRecoveryConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_operation_results = BackupOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_operation_statuses = BackupOperationStatusesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protection_policy_operation_statuses = ProtectionPolicyOperationStatusesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_protectable_items = BackupProtectableItemsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_protection_containers = BackupProtectionContainersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.security_pins = SecurityPINsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.recovery_points_recommended_for_move = RecoveryPointsRecommendedForMoveOperations( - self._client, self._config, self._serialize, self._deserialize) - self.resource_guard_proxies = ResourceGuardProxiesOperations( - 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 + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse + :rtype: ~azure.core.rest.HttpResponse """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) def close(self): # type: () -> None diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_vendor.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_vendor.py new file mode 100644 index 000000000000..138f663c53a4 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_vendor.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# 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 azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) 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/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/__init__.py index d1e0d338ce58..468a2bb9e3e4 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/__init__.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/__init__.py @@ -8,3 +8,8 @@ from ._recovery_services_backup_client import RecoveryServicesBackupClient __all__ = ['RecoveryServicesBackupClient'] + +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() 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..06c7e0076ac5 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 @@ -10,7 +10,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy from .._version import VERSION @@ -29,6 +29,8 @@ class RecoveryServicesBackupClientConfiguration(Configuration): :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The subscription Id. :type subscription_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -37,14 +39,17 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: + super(RecoveryServicesBackupClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - super(RecoveryServicesBackupClientConfiguration, self).__init__(**kwargs) self.credential = credential self.subscription_id = subscription_id + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-recoveryservicesbackup/{}'.format(VERSION)) self._configure(**kwargs) @@ -63,4 +68,4 @@ def _configure( self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) self.authentication_policy = kwargs.get('authentication_policy') if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_patch.py new file mode 100644 index 000000000000..74e48ecd07cf --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass \ No newline at end of file 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..fdb8c9925a8e 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 @@ -6,341 +6,268 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Optional, TYPE_CHECKING +from copy import deepcopy +from typing import Any, Awaitable, Optional, TYPE_CHECKING -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer +from .. import models +from ._configuration import RecoveryServicesBackupClientConfiguration +from .operations import BMSPrepareDataMoveOperationResultOperations, BackupEnginesOperations, BackupJobsOperations, BackupOperationResultsOperations, BackupOperationStatusesOperations, BackupPoliciesOperations, BackupProtectableItemsOperations, BackupProtectedItemsOperations, BackupProtectionContainersOperations, BackupProtectionIntentOperations, BackupResourceEncryptionConfigsOperations, BackupResourceStorageConfigsNonCRROperations, BackupResourceVaultConfigsOperations, BackupStatusOperations, BackupUsageSummariesOperations, BackupWorkloadItemsOperations, BackupsOperations, ExportJobsOperationResultsOperations, FeatureSupportOperations, ItemLevelRecoveryConnectionsOperations, JobCancellationsOperations, JobDetailsOperations, JobOperationResultsOperations, JobsOperations, OperationOperations, Operations, PrivateEndpointConnectionOperations, PrivateEndpointOperations, ProtectableContainersOperations, ProtectedItemOperationResultsOperations, ProtectedItemOperationStatusesOperations, ProtectedItemsOperations, ProtectionContainerOperationResultsOperations, ProtectionContainerRefreshOperationResultsOperations, ProtectionContainersOperations, ProtectionIntentOperations, ProtectionPoliciesOperations, ProtectionPolicyOperationResultsOperations, ProtectionPolicyOperationStatusesOperations, RecoveryPointsOperations, RecoveryPointsRecommendedForMoveOperations, RecoveryServicesBackupClientOperationsMixin, ResourceGuardProxiesOperations, ResourceGuardProxyOperations, RestoresOperations, SecurityPINsOperations, ValidateOperationOperations, ValidateOperationResultsOperations, ValidateOperationStatusesOperations + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -from ._configuration import RecoveryServicesBackupClientConfiguration -from .operations import BackupResourceStorageConfigsNonCRROperations -from .operations import ProtectionIntentOperations -from .operations import BackupStatusOperations -from .operations import FeatureSupportOperations -from .operations import BackupProtectionIntentOperations -from .operations import BackupUsageSummariesOperations -from .operations import Operations -from .operations import BackupResourceVaultConfigsOperations -from .operations import BackupResourceEncryptionConfigsOperations -from .operations import PrivateEndpointConnectionOperations -from .operations import PrivateEndpointOperations -from .operations import RecoveryServicesBackupClientOperationsMixin -from .operations import BMSPrepareDataMoveOperationResultOperations -from .operations import ProtectedItemsOperations -from .operations import ProtectedItemOperationResultsOperations -from .operations import RecoveryPointsOperations -from .operations import RestoresOperations -from .operations import BackupPoliciesOperations -from .operations import ProtectionPoliciesOperations -from .operations import ProtectionPolicyOperationResultsOperations -from .operations import BackupJobsOperations -from .operations import JobDetailsOperations -from .operations import JobCancellationsOperations -from .operations import JobOperationResultsOperations -from .operations import ExportJobsOperationResultsOperations -from .operations import JobsOperations -from .operations import BackupProtectedItemsOperations -from .operations import OperationOperations -from .operations import BackupEnginesOperations -from .operations import ProtectionContainerRefreshOperationResultsOperations -from .operations import ProtectableContainersOperations -from .operations import ProtectionContainersOperations -from .operations import BackupWorkloadItemsOperations -from .operations import ProtectionContainerOperationResultsOperations -from .operations import BackupsOperations -from .operations import ProtectedItemOperationStatusesOperations -from .operations import ItemLevelRecoveryConnectionsOperations -from .operations import BackupOperationResultsOperations -from .operations import BackupOperationStatusesOperations -from .operations import ProtectionPolicyOperationStatusesOperations -from .operations import BackupProtectableItemsOperations -from .operations import BackupProtectionContainersOperations -from .operations import SecurityPINsOperations -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 - - class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin): """Open API 2.0 Specs for Azure RecoveryServices Backup service. - :ivar backup_resource_storage_configs_non_crr: BackupResourceStorageConfigsNonCRROperations operations - :vartype backup_resource_storage_configs_non_crr: azure.mgmt.recoveryservicesbackup.aio.operations.BackupResourceStorageConfigsNonCRROperations + :ivar backup_resource_storage_configs_non_crr: BackupResourceStorageConfigsNonCRROperations + operations + :vartype backup_resource_storage_configs_non_crr: + azure.mgmt.recoveryservicesbackup.aio.operations.BackupResourceStorageConfigsNonCRROperations :ivar protection_intent: ProtectionIntentOperations operations - :vartype protection_intent: azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionIntentOperations + :vartype protection_intent: + azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionIntentOperations :ivar backup_status: BackupStatusOperations operations :vartype backup_status: azure.mgmt.recoveryservicesbackup.aio.operations.BackupStatusOperations :ivar feature_support: FeatureSupportOperations operations - :vartype feature_support: azure.mgmt.recoveryservicesbackup.aio.operations.FeatureSupportOperations + :vartype feature_support: + azure.mgmt.recoveryservicesbackup.aio.operations.FeatureSupportOperations :ivar backup_protection_intent: BackupProtectionIntentOperations operations - :vartype backup_protection_intent: azure.mgmt.recoveryservicesbackup.aio.operations.BackupProtectionIntentOperations + :vartype backup_protection_intent: + azure.mgmt.recoveryservicesbackup.aio.operations.BackupProtectionIntentOperations :ivar backup_usage_summaries: BackupUsageSummariesOperations operations - :vartype backup_usage_summaries: azure.mgmt.recoveryservicesbackup.aio.operations.BackupUsageSummariesOperations + :vartype backup_usage_summaries: + azure.mgmt.recoveryservicesbackup.aio.operations.BackupUsageSummariesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.recoveryservicesbackup.aio.operations.Operations :ivar backup_resource_vault_configs: BackupResourceVaultConfigsOperations operations - :vartype backup_resource_vault_configs: azure.mgmt.recoveryservicesbackup.aio.operations.BackupResourceVaultConfigsOperations + :vartype backup_resource_vault_configs: + azure.mgmt.recoveryservicesbackup.aio.operations.BackupResourceVaultConfigsOperations :ivar backup_resource_encryption_configs: BackupResourceEncryptionConfigsOperations operations - :vartype backup_resource_encryption_configs: azure.mgmt.recoveryservicesbackup.aio.operations.BackupResourceEncryptionConfigsOperations + :vartype backup_resource_encryption_configs: + azure.mgmt.recoveryservicesbackup.aio.operations.BackupResourceEncryptionConfigsOperations :ivar private_endpoint_connection: PrivateEndpointConnectionOperations operations - :vartype private_endpoint_connection: azure.mgmt.recoveryservicesbackup.aio.operations.PrivateEndpointConnectionOperations + :vartype private_endpoint_connection: + azure.mgmt.recoveryservicesbackup.aio.operations.PrivateEndpointConnectionOperations :ivar private_endpoint: PrivateEndpointOperations operations - :vartype private_endpoint: azure.mgmt.recoveryservicesbackup.aio.operations.PrivateEndpointOperations - :ivar bms_prepare_data_move_operation_result: BMSPrepareDataMoveOperationResultOperations operations - :vartype bms_prepare_data_move_operation_result: azure.mgmt.recoveryservicesbackup.aio.operations.BMSPrepareDataMoveOperationResultOperations + :vartype private_endpoint: + azure.mgmt.recoveryservicesbackup.aio.operations.PrivateEndpointOperations + :ivar bms_prepare_data_move_operation_result: BMSPrepareDataMoveOperationResultOperations + operations + :vartype bms_prepare_data_move_operation_result: + azure.mgmt.recoveryservicesbackup.aio.operations.BMSPrepareDataMoveOperationResultOperations :ivar protected_items: ProtectedItemsOperations operations - :vartype protected_items: azure.mgmt.recoveryservicesbackup.aio.operations.ProtectedItemsOperations + :vartype protected_items: + azure.mgmt.recoveryservicesbackup.aio.operations.ProtectedItemsOperations :ivar protected_item_operation_results: ProtectedItemOperationResultsOperations operations - :vartype protected_item_operation_results: azure.mgmt.recoveryservicesbackup.aio.operations.ProtectedItemOperationResultsOperations + :vartype protected_item_operation_results: + azure.mgmt.recoveryservicesbackup.aio.operations.ProtectedItemOperationResultsOperations :ivar recovery_points: RecoveryPointsOperations operations - :vartype recovery_points: azure.mgmt.recoveryservicesbackup.aio.operations.RecoveryPointsOperations + :vartype recovery_points: + azure.mgmt.recoveryservicesbackup.aio.operations.RecoveryPointsOperations :ivar restores: RestoresOperations operations :vartype restores: azure.mgmt.recoveryservicesbackup.aio.operations.RestoresOperations :ivar backup_policies: BackupPoliciesOperations operations - :vartype backup_policies: azure.mgmt.recoveryservicesbackup.aio.operations.BackupPoliciesOperations + :vartype backup_policies: + azure.mgmt.recoveryservicesbackup.aio.operations.BackupPoliciesOperations :ivar protection_policies: ProtectionPoliciesOperations operations - :vartype protection_policies: azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionPoliciesOperations - :ivar protection_policy_operation_results: ProtectionPolicyOperationResultsOperations operations - :vartype protection_policy_operation_results: azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionPolicyOperationResultsOperations + :vartype protection_policies: + azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionPoliciesOperations + :ivar protection_policy_operation_results: ProtectionPolicyOperationResultsOperations + operations + :vartype protection_policy_operation_results: + azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionPolicyOperationResultsOperations :ivar backup_jobs: BackupJobsOperations operations :vartype backup_jobs: azure.mgmt.recoveryservicesbackup.aio.operations.BackupJobsOperations :ivar job_details: JobDetailsOperations operations :vartype job_details: azure.mgmt.recoveryservicesbackup.aio.operations.JobDetailsOperations :ivar job_cancellations: JobCancellationsOperations operations - :vartype job_cancellations: azure.mgmt.recoveryservicesbackup.aio.operations.JobCancellationsOperations + :vartype job_cancellations: + azure.mgmt.recoveryservicesbackup.aio.operations.JobCancellationsOperations :ivar job_operation_results: JobOperationResultsOperations operations - :vartype job_operation_results: azure.mgmt.recoveryservicesbackup.aio.operations.JobOperationResultsOperations + :vartype job_operation_results: + azure.mgmt.recoveryservicesbackup.aio.operations.JobOperationResultsOperations :ivar export_jobs_operation_results: ExportJobsOperationResultsOperations operations - :vartype export_jobs_operation_results: azure.mgmt.recoveryservicesbackup.aio.operations.ExportJobsOperationResultsOperations + :vartype export_jobs_operation_results: + azure.mgmt.recoveryservicesbackup.aio.operations.ExportJobsOperationResultsOperations :ivar jobs: JobsOperations operations :vartype jobs: azure.mgmt.recoveryservicesbackup.aio.operations.JobsOperations :ivar backup_protected_items: BackupProtectedItemsOperations operations - :vartype backup_protected_items: azure.mgmt.recoveryservicesbackup.aio.operations.BackupProtectedItemsOperations + :vartype backup_protected_items: + azure.mgmt.recoveryservicesbackup.aio.operations.BackupProtectedItemsOperations :ivar operation: OperationOperations operations :vartype operation: azure.mgmt.recoveryservicesbackup.aio.operations.OperationOperations + :ivar validate_operation: ValidateOperationOperations operations + :vartype validate_operation: + azure.mgmt.recoveryservicesbackup.aio.operations.ValidateOperationOperations + :ivar validate_operation_results: ValidateOperationResultsOperations operations + :vartype validate_operation_results: + azure.mgmt.recoveryservicesbackup.aio.operations.ValidateOperationResultsOperations + :ivar validate_operation_statuses: ValidateOperationStatusesOperations operations + :vartype validate_operation_statuses: + azure.mgmt.recoveryservicesbackup.aio.operations.ValidateOperationStatusesOperations :ivar backup_engines: BackupEnginesOperations operations - :vartype backup_engines: azure.mgmt.recoveryservicesbackup.aio.operations.BackupEnginesOperations - :ivar protection_container_refresh_operation_results: ProtectionContainerRefreshOperationResultsOperations operations - :vartype protection_container_refresh_operation_results: azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionContainerRefreshOperationResultsOperations + :vartype backup_engines: + azure.mgmt.recoveryservicesbackup.aio.operations.BackupEnginesOperations + :ivar protection_container_refresh_operation_results: + ProtectionContainerRefreshOperationResultsOperations operations + :vartype protection_container_refresh_operation_results: + azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionContainerRefreshOperationResultsOperations :ivar protectable_containers: ProtectableContainersOperations operations - :vartype protectable_containers: azure.mgmt.recoveryservicesbackup.aio.operations.ProtectableContainersOperations + :vartype protectable_containers: + azure.mgmt.recoveryservicesbackup.aio.operations.ProtectableContainersOperations :ivar protection_containers: ProtectionContainersOperations operations - :vartype protection_containers: azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionContainersOperations + :vartype protection_containers: + azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionContainersOperations :ivar backup_workload_items: BackupWorkloadItemsOperations operations - :vartype backup_workload_items: azure.mgmt.recoveryservicesbackup.aio.operations.BackupWorkloadItemsOperations - :ivar protection_container_operation_results: ProtectionContainerOperationResultsOperations operations - :vartype protection_container_operation_results: azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionContainerOperationResultsOperations + :vartype backup_workload_items: + azure.mgmt.recoveryservicesbackup.aio.operations.BackupWorkloadItemsOperations + :ivar protection_container_operation_results: ProtectionContainerOperationResultsOperations + operations + :vartype protection_container_operation_results: + azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionContainerOperationResultsOperations :ivar backups: BackupsOperations operations :vartype backups: azure.mgmt.recoveryservicesbackup.aio.operations.BackupsOperations :ivar protected_item_operation_statuses: ProtectedItemOperationStatusesOperations operations - :vartype protected_item_operation_statuses: azure.mgmt.recoveryservicesbackup.aio.operations.ProtectedItemOperationStatusesOperations + :vartype protected_item_operation_statuses: + azure.mgmt.recoveryservicesbackup.aio.operations.ProtectedItemOperationStatusesOperations :ivar item_level_recovery_connections: ItemLevelRecoveryConnectionsOperations operations - :vartype item_level_recovery_connections: azure.mgmt.recoveryservicesbackup.aio.operations.ItemLevelRecoveryConnectionsOperations + :vartype item_level_recovery_connections: + azure.mgmt.recoveryservicesbackup.aio.operations.ItemLevelRecoveryConnectionsOperations :ivar backup_operation_results: BackupOperationResultsOperations operations - :vartype backup_operation_results: azure.mgmt.recoveryservicesbackup.aio.operations.BackupOperationResultsOperations + :vartype backup_operation_results: + azure.mgmt.recoveryservicesbackup.aio.operations.BackupOperationResultsOperations :ivar backup_operation_statuses: BackupOperationStatusesOperations operations - :vartype backup_operation_statuses: azure.mgmt.recoveryservicesbackup.aio.operations.BackupOperationStatusesOperations - :ivar protection_policy_operation_statuses: ProtectionPolicyOperationStatusesOperations operations - :vartype protection_policy_operation_statuses: azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionPolicyOperationStatusesOperations + :vartype backup_operation_statuses: + azure.mgmt.recoveryservicesbackup.aio.operations.BackupOperationStatusesOperations + :ivar protection_policy_operation_statuses: ProtectionPolicyOperationStatusesOperations + operations + :vartype protection_policy_operation_statuses: + azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionPolicyOperationStatusesOperations :ivar backup_protectable_items: BackupProtectableItemsOperations operations - :vartype backup_protectable_items: azure.mgmt.recoveryservicesbackup.aio.operations.BackupProtectableItemsOperations + :vartype backup_protectable_items: + azure.mgmt.recoveryservicesbackup.aio.operations.BackupProtectableItemsOperations :ivar backup_protection_containers: BackupProtectionContainersOperations operations - :vartype backup_protection_containers: azure.mgmt.recoveryservicesbackup.aio.operations.BackupProtectionContainersOperations + :vartype backup_protection_containers: + azure.mgmt.recoveryservicesbackup.aio.operations.BackupProtectionContainersOperations :ivar security_pins: SecurityPINsOperations operations :vartype security_pins: azure.mgmt.recoveryservicesbackup.aio.operations.SecurityPINsOperations - :ivar recovery_points_recommended_for_move: RecoveryPointsRecommendedForMoveOperations operations - :vartype recovery_points_recommended_for_move: azure.mgmt.recoveryservicesbackup.aio.operations.RecoveryPointsRecommendedForMoveOperations + :ivar recovery_points_recommended_for_move: RecoveryPointsRecommendedForMoveOperations + operations + :vartype recovery_points_recommended_for_move: + azure.mgmt.recoveryservicesbackup.aio.operations.RecoveryPointsRecommendedForMoveOperations :ivar resource_guard_proxies: ResourceGuardProxiesOperations operations - :vartype resource_guard_proxies: azure.mgmt.recoveryservicesbackup.aio.operations.ResourceGuardProxiesOperations + :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 + :vartype resource_guard_proxy: + azure.mgmt.recoveryservicesbackup.aio.operations.ResourceGuardProxyOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The subscription Id. :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :param base_url: Service URL. Default value is 'https://management.azure.com'. + :type base_url: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( self, credential: "AsyncTokenCredential", subscription_id: str, - base_url: Optional[str] = None, + base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - if not base_url: - base_url = 'https://management.azure.com' - self._config = RecoveryServicesBackupClientConfiguration(credential, subscription_id, **kwargs) + self._config = RecoveryServicesBackupClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.backup_resource_storage_configs_non_crr = BackupResourceStorageConfigsNonCRROperations(self._client, self._config, self._serialize, self._deserialize) + self.protection_intent = ProtectionIntentOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_status = BackupStatusOperations(self._client, self._config, self._serialize, self._deserialize) + self.feature_support = FeatureSupportOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_protection_intent = BackupProtectionIntentOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_usage_summaries = BackupUsageSummariesOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.backup_resource_vault_configs = BackupResourceVaultConfigsOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_resource_encryption_configs = BackupResourceEncryptionConfigsOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connection = PrivateEndpointConnectionOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint = PrivateEndpointOperations(self._client, self._config, self._serialize, self._deserialize) + self.bms_prepare_data_move_operation_result = BMSPrepareDataMoveOperationResultOperations(self._client, self._config, self._serialize, self._deserialize) + self.protected_items = ProtectedItemsOperations(self._client, self._config, self._serialize, self._deserialize) + self.protected_item_operation_results = ProtectedItemOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.recovery_points = RecoveryPointsOperations(self._client, self._config, self._serialize, self._deserialize) + self.restores = RestoresOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_policies = BackupPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + self.protection_policies = ProtectionPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + self.protection_policy_operation_results = ProtectionPolicyOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_jobs = BackupJobsOperations(self._client, self._config, self._serialize, self._deserialize) + self.job_details = JobDetailsOperations(self._client, self._config, self._serialize, self._deserialize) + self.job_cancellations = JobCancellationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.job_operation_results = JobOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.export_jobs_operation_results = ExportJobsOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_protected_items = BackupProtectedItemsOperations(self._client, self._config, self._serialize, self._deserialize) + self.operation = OperationOperations(self._client, self._config, self._serialize, self._deserialize) + self.validate_operation = ValidateOperationOperations(self._client, self._config, self._serialize, self._deserialize) + self.validate_operation_results = ValidateOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.validate_operation_statuses = ValidateOperationStatusesOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_engines = BackupEnginesOperations(self._client, self._config, self._serialize, self._deserialize) + self.protection_container_refresh_operation_results = ProtectionContainerRefreshOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.protectable_containers = ProtectableContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.protection_containers = ProtectionContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_workload_items = BackupWorkloadItemsOperations(self._client, self._config, self._serialize, self._deserialize) + self.protection_container_operation_results = ProtectionContainerOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.backups = BackupsOperations(self._client, self._config, self._serialize, self._deserialize) + self.protected_item_operation_statuses = ProtectedItemOperationStatusesOperations(self._client, self._config, self._serialize, self._deserialize) + self.item_level_recovery_connections = ItemLevelRecoveryConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_operation_results = BackupOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_operation_statuses = BackupOperationStatusesOperations(self._client, self._config, self._serialize, self._deserialize) + self.protection_policy_operation_statuses = ProtectionPolicyOperationStatusesOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_protectable_items = BackupProtectableItemsOperations(self._client, self._config, self._serialize, self._deserialize) + self.backup_protection_containers = BackupProtectionContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.security_pins = SecurityPINsOperations(self._client, self._config, self._serialize, self._deserialize) + self.recovery_points_recommended_for_move = RecoveryPointsRecommendedForMoveOperations(self._client, self._config, self._serialize, self._deserialize) + self.resource_guard_proxies = ResourceGuardProxiesOperations(self._client, self._config, self._serialize, self._deserialize) + self.resource_guard_proxy = ResourceGuardProxyOperations(self._client, self._config, self._serialize, self._deserialize) - self.backup_resource_storage_configs_non_crr = BackupResourceStorageConfigsNonCRROperations( - self._client, self._config, self._serialize, self._deserialize) - self.protection_intent = ProtectionIntentOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_status = BackupStatusOperations( - self._client, self._config, self._serialize, self._deserialize) - self.feature_support = FeatureSupportOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_protection_intent = BackupProtectionIntentOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_usage_summaries = BackupUsageSummariesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_resource_vault_configs = BackupResourceVaultConfigsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_resource_encryption_configs = BackupResourceEncryptionConfigsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.private_endpoint_connection = PrivateEndpointConnectionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.private_endpoint = PrivateEndpointOperations( - self._client, self._config, self._serialize, self._deserialize) - self.bms_prepare_data_move_operation_result = BMSPrepareDataMoveOperationResultOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protected_items = ProtectedItemsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protected_item_operation_results = ProtectedItemOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.recovery_points = RecoveryPointsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.restores = RestoresOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_policies = BackupPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protection_policies = ProtectionPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protection_policy_operation_results = ProtectionPolicyOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_jobs = BackupJobsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.job_details = JobDetailsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.job_cancellations = JobCancellationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.job_operation_results = JobOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.export_jobs_operation_results = ExportJobsOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.jobs = JobsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_protected_items = BackupProtectedItemsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operation = OperationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_engines = BackupEnginesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protection_container_refresh_operation_results = ProtectionContainerRefreshOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protectable_containers = ProtectableContainersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protection_containers = ProtectionContainersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_workload_items = BackupWorkloadItemsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protection_container_operation_results = ProtectionContainerOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backups = BackupsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protected_item_operation_statuses = ProtectedItemOperationStatusesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.item_level_recovery_connections = ItemLevelRecoveryConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_operation_results = BackupOperationResultsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_operation_statuses = BackupOperationStatusesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.protection_policy_operation_statuses = ProtectionPolicyOperationStatusesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_protectable_items = BackupProtectableItemsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.backup_protection_containers = BackupProtectionContainersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.security_pins = SecurityPINsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.recovery_points_recommended_for_move = RecoveryPointsRecommendedForMoveOperations( - self._client, self._config, self._serialize, self._deserialize) - self.resource_guard_proxies = ResourceGuardProxiesOperations( - 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: + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + :rtype: ~azure.core.rest.AsyncHttpResponse """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) async def close(self) -> None: await self._client.close() 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..262a069be4dc 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 @@ -34,6 +34,9 @@ from ._jobs_operations import JobsOperations from ._backup_protected_items_operations import BackupProtectedItemsOperations from ._operation_operations import OperationOperations +from ._validate_operation_operations import ValidateOperationOperations +from ._validate_operation_results_operations import ValidateOperationResultsOperations +from ._validate_operation_statuses_operations import ValidateOperationStatusesOperations from ._backup_engines_operations import BackupEnginesOperations from ._protection_container_refresh_operation_results_operations import ProtectionContainerRefreshOperationResultsOperations from ._protectable_containers_operations import ProtectableContainersOperations @@ -52,16 +55,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', @@ -92,6 +85,9 @@ 'JobsOperations', 'BackupProtectedItemsOperations', 'OperationOperations', + 'ValidateOperationOperations', + 'ValidateOperationResultsOperations', + 'ValidateOperationStatusesOperations', 'BackupEnginesOperations', 'ProtectionContainerRefreshOperationResultsOperations', 'ProtectableContainersOperations', @@ -110,14 +106,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/_backup_engines_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_engines_operations.py index 1ce4e0ebec45..cb57d057bb27 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_engines_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_engines_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_engines_operations import build_get_request, build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -61,50 +67,56 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either BackupEngineBaseResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResourceList] + :return: An iterator like instance of either BackupEngineBaseResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupEngineBaseResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('BackupEngineBaseResourceList', pipeline_response) + deserialized = self._deserialize("BackupEngineBaseResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -122,11 +134,13 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged( get_next, extract_data ) list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines'} # type: ignore + @distributed_trace_async async def get( self, vault_name: str, @@ -149,6 +163,9 @@ async def get( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupEngineBaseResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResource @@ -159,32 +176,23 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'backupEngineName': self._serialize.url("backup_engine_name", backup_engine_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') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + backup_engine_name=backup_engine_name, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -198,4 +206,6 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_jobs_operations.py index 430595b7536c..496b0ff235d6 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_jobs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_jobs_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_jobs_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -60,50 +66,55 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + 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 = "2021-08-01" - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('JobResourceList', pipeline_response) + deserialized = self._deserialize("JobResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -121,6 +132,7 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_results_operations.py index 95133fff9367..dfdd23c73a4c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_results_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_operation_results_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -62,6 +67,9 @@ async def get( :type resource_group_name: str :param operation_id: OperationID which represents the operation. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -72,28 +80,21 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -105,3 +106,4 @@ async def get( return cls(pipeline_response, None, {}) get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_statuses_operations.py index 8cd176c631cf..9e961d43b146 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_statuses_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_operation_statuses_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -60,6 +65,9 @@ async def get( :type resource_group_name: str :param operation_id: OperationID which represents the operation. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -70,28 +78,21 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -105,4 +106,6 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_policies_operations.py index 3967929896a4..afd289e71c52 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_policies_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_policies_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_policies_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -59,48 +65,54 @@ def list( :type resource_group_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectionPolicyResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResourceList] + :return: An iterator like instance of either ProtectionPolicyResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionPolicyResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectionPolicyResourceList', pipeline_response) + deserialized = self._deserialize("ProtectionPolicyResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -118,6 +130,7 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protectable_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protectable_items_operations.py index 21bae8c191ff..0a71a51005c2 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protectable_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protectable_items_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_protectable_items_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -62,50 +68,56 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadProtectableItemResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResourceList] + :return: An iterator like instance of either WorkloadProtectableItemResourceList or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadProtectableItemResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadProtectableItemResourceList', pipeline_response) + deserialized = self._deserialize("WorkloadProtectableItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -123,6 +135,7 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_operations.py index c7bad3d93cee..28283d156d79 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_protected_items_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -60,50 +66,56 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :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 """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + 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 = "2021-08-01" - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectedItemResourceList', pipeline_response) + deserialized = self._deserialize("ProtectedItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -121,6 +133,7 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_containers_operations.py index 29ee2e76da4f..c76da6660134 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_containers_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_protection_containers_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -57,48 +63,54 @@ def list( :type resource_group_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectionContainerResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResourceList] + :return: An iterator like instance of either ProtectionContainerResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionContainerResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectionContainerResourceList', pipeline_response) + deserialized = self._deserialize("ProtectionContainerResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -116,6 +128,7 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_intent_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_intent_operations.py index 05f6e525d95b..a61c42763f0a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_intent_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_intent_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_protection_intent_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -60,50 +66,56 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectionIntentResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResourceList] + :return: An iterator like instance of either ProtectionIntentResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionIntentResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectionIntentResourceList', pipeline_response) + deserialized = self._deserialize("ProtectionIntentResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -121,6 +133,7 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_encryption_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_encryption_configs_operations.py index 68c83bd32ee8..da5f027c5ed2 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_encryption_configs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_encryption_configs_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_resource_encryption_configs_operations import build_get_request, build_update_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -53,9 +58,13 @@ async def get( :param resource_group_name: The name of the resource group where the recovery services vault is present. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupResourceEncryptionConfigExtendedResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtendedResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtendedResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceEncryptionConfigExtendedResource"] @@ -63,33 +72,26 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupResourceEncryptionConfigExtendedResource', pipeline_response) @@ -98,8 +100,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig'} # type: ignore + + @distributed_trace_async async def update( self, vault_name: str, @@ -115,7 +120,11 @@ async def update( present. :type resource_group_name: str :param parameters: Vault encryption input config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -126,41 +135,34 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupResourceEncryptionConfigResource') - # 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') + request = build_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupResourceEncryptionConfigResource') - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_non_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_non_crr_operations.py index 788b63884e92..bf3efb70105c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_non_crr_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_non_crr_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_resource_storage_configs_non_crr_operations import build_get_request, build_patch_request, build_update_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -53,6 +58,9 @@ async def get( :param resource_group_name: The name of the resource group where the recovery services vault is present. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -63,33 +71,26 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) @@ -98,8 +99,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore + + @distributed_trace_async async def update( self, vault_name: str, @@ -116,6 +120,9 @@ async def update( :type resource_group_name: str :param parameters: Vault storage config request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -126,38 +133,30 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupResourceConfigResource') - # 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') + request = build_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) @@ -166,8 +165,11 @@ async def update( return cls(pipeline_response, deserialized, {}) return deserialized + update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore + + @distributed_trace_async async def patch( self, vault_name: str, @@ -184,6 +186,9 @@ async def patch( :type resource_group_name: str :param parameters: Vault storage config request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -194,41 +199,34 @@ async def patch( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'BackupResourceConfigResource') + + request = build_patch_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.patch.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_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_resource_vault_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_vault_configs_operations.py index b2e18c702187..9bdec0dd6d1d 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_vault_configs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_vault_configs_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_resource_vault_configs_operations import build_get_request, build_put_request, build_update_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -53,6 +58,9 @@ async def get( :param resource_group_name: The name of the resource group where the recovery services vault is present. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupResourceVaultConfigResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource @@ -63,33 +71,26 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) @@ -98,8 +99,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} # type: ignore + + @distributed_trace_async async def update( self, vault_name: str, @@ -116,6 +120,9 @@ async def update( :type resource_group_name: str :param parameters: resource config request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupResourceVaultConfigResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource @@ -126,38 +133,30 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupResourceVaultConfigResource') - # 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') + request = build_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupResourceVaultConfigResource') - 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 [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) @@ -166,8 +165,11 @@ async def update( return cls(pipeline_response, deserialized, {}) return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} # type: ignore + + @distributed_trace_async async def put( self, vault_name: str, @@ -184,6 +186,9 @@ async def put( :type resource_group_name: str :param parameters: resource config request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupResourceVaultConfigResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource @@ -194,38 +199,30 @@ async def put( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.put.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'BackupResourceVaultConfigResource') + + request = build_put_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.put.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupResourceVaultConfigResource') - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) @@ -234,4 +231,6 @@ async def put( return cls(pipeline_response, deserialized, {}) return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_status_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_status_operations.py index dc0c7c2f02d1..788c40b38806 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_status_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_status_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_status_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, azure_region: str, @@ -54,6 +59,9 @@ async def get( :type azure_region: str :param parameters: Container Backup Status Request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupStatusRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupStatusResponse, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupStatusResponse @@ -64,31 +72,23 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupStatusRequest') - # 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') + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupStatusRequest') - 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 @@ -102,4 +102,6 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_operations.py index bc52e2816490..ee0bb18aecee 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_usage_summaries_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -60,50 +66,56 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :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 """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + 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 = "2021-08-01" - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('BackupManagementUsageList', pipeline_response) + deserialized = self._deserialize("BackupManagementUsageList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -121,6 +133,7 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_workload_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_workload_items_operations.py index 11e174ca0e70..ab6b65299a42 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_workload_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_workload_items_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_workload_items_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -68,52 +74,60 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadItemResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResourceList] + :return: An iterator like instance of either WorkloadItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadItemResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - } - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadItemResourceList', pipeline_response) + deserialized = self._deserialize("WorkloadItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -131,6 +145,7 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backups_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backups_operations.py index 11146ac1dccb..89146eccf8d5 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backups_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backups_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backups_operations import build_trigger_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def trigger( self, vault_name: str, @@ -67,6 +72,9 @@ async def trigger( :type protected_item_name: str :param parameters: resource backup request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupRequestResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -77,35 +85,27 @@ async def trigger( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.trigger.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupRequestResource') + + request = build_trigger_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.trigger.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # 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, 'BackupRequestResource') - 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 @@ -117,3 +117,4 @@ async def trigger( return cls(pipeline_response, None, {}) trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_bms_prepare_data_move_operation_result_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_bms_prepare_data_move_operation_result_operations.py index d14c3bbf0275..ee2ae9352a90 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_bms_prepare_data_move_operation_result_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_bms_prepare_data_move_operation_result_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._bms_prepare_data_move_operation_result_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -56,9 +61,13 @@ async def get( :type resource_group_name: str :param operation_id: :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VaultStorageConfigOperationResultResponse, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.VaultStorageConfigOperationResultResponse or None + :rtype: ~azure.mgmt.recoveryservicesbackup.models.VaultStorageConfigOperationResultResponse or + None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VaultStorageConfigOperationResultResponse"]] @@ -66,34 +75,27 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -104,4 +106,6 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_export_jobs_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_export_jobs_operation_results_operations.py index c7997ded8267..3aabf3087af1 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_export_jobs_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_export_jobs_operation_results_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._export_jobs_operation_results_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -59,6 +64,9 @@ async def get( :type resource_group_name: str :param operation_id: OperationID which represents the export job. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationResultInfoBaseResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationResultInfoBaseResource @@ -69,28 +77,21 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -108,4 +109,6 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_feature_support_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_feature_support_operations.py index 11b4fa1f718b..e5ce39e0e2f6 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_feature_support_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_feature_support_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._feature_support_operations import build_validate_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def validate( self, azure_region: str, @@ -54,6 +59,9 @@ async def validate( :type azure_region: str :param parameters: Feature support request object. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.FeatureSupportRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureVMResourceFeatureSupportResponse, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.AzureVMResourceFeatureSupportResponse @@ -64,31 +72,23 @@ async def validate( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.validate.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'FeatureSupportRequest') - # 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') + request = build_validate_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.validate.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'FeatureSupportRequest') - 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 @@ -102,4 +102,6 @@ async def validate( return cls(pipeline_response, deserialized, {}) return deserialized + validate.metadata = {'url': '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_item_level_recovery_connections_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_item_level_recovery_connections_operations.py index 792f2c1d5a72..30f4f9387181 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_item_level_recovery_connections_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_item_level_recovery_connections_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._item_level_recovery_connections_operations import build_provision_request, build_revoke_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def provision( self, vault_name: str, @@ -74,6 +79,9 @@ async def provision( :type recovery_point_id: str :param parameters: resource ILR request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ILRRequestResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -84,36 +92,28 @@ async def provision( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.provision.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ILRRequestResource') + + request = build_provision_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.provision.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # 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, 'ILRRequestResource') - 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 @@ -126,6 +126,8 @@ async def provision( provision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery'} # type: ignore + + @distributed_trace_async async def revoke( self, vault_name: str, @@ -155,6 +157,9 @@ async def revoke( will be revoked for this backed up data. :type recovery_point_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -165,31 +170,24 @@ async def revoke( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.revoke.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['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_revoke_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + api_version=api_version, + template_url=self.revoke.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -201,3 +199,4 @@ async def revoke( return cls(pipeline_response, None, {}) revoke.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_cancellations_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_cancellations_operations.py index faf0003b1264..be61e0afe02c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_cancellations_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_cancellations_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._job_cancellations_operations import build_trigger_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def trigger( self, vault_name: str, @@ -57,6 +62,9 @@ async def trigger( :type resource_group_name: str :param job_name: Name of the job to cancel. :type job_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -67,28 +75,21 @@ async def trigger( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.trigger.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'), - 'jobName': self._serialize.url("job_name", job_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_trigger_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + job_name=job_name, + api_version=api_version, + template_url=self.trigger.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -100,3 +101,4 @@ async def trigger( return cls(pipeline_response, None, {}) trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_details_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_details_operations.py index 2c414b6ef84f..4b02c234e642 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_details_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_details_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._job_details_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -56,6 +61,9 @@ async def get( :type resource_group_name: str :param job_name: Name of the job whose details are to be fetched. :type job_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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 @@ -66,28 +74,21 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'jobName': self._serialize.url("job_name", job_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + job_name=job_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -101,4 +102,6 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_operation_results_operations.py index a1f8619f45fe..d5d5f73e0dde 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_operation_results_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._job_operation_results_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -59,6 +64,9 @@ async def get( :type job_name: str :param operation_id: OperationID which represents the operation whose result has to be fetched. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -69,29 +77,22 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'jobName': self._serialize.url("job_name", job_name, '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + job_name=job_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # 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 @@ -103,3 +104,4 @@ async def get( return cls(pipeline_response, None, {}) get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_jobs_operations.py index 147c1894dd63..48df03ed4936 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_jobs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_jobs_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._jobs_operations import build_export_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def export( self, vault_name: str, @@ -56,6 +61,9 @@ async def export( :type resource_group_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -66,29 +74,21 @@ async def export( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.export.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_export_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + template_url=self.export.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -100,3 +100,4 @@ async def export( return cls(pipeline_response, None, {}) export.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operation_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operation_operations.py index 6e3cee0cc621..cc6a7b49c4a0 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operation_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operation_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._operation_operations import build_validate_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def validate( self, vault_name: str, @@ -56,6 +61,9 @@ async def validate( :type resource_group_name: str :param parameters: resource validate operation request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidateOperationsResponse, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationsResponse @@ -66,32 +74,24 @@ async def validate( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.validate.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ValidateOperationRequest') - # 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') + request = build_validate_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.validate.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ValidateOperationRequest') - 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 @@ -105,4 +105,6 @@ async def validate( return cls(pipeline_response, deserialized, {}) return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperation'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operations.py index 05afdd6d1eb2..85aacb572004 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,46 +46,53 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, **kwargs: Any ) -> AsyncIterable["_models.ClientDiscoveryResponse"]: """Returns the list of available operations. + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ClientDiscoveryResponse or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryResponse] + :return: An iterator like instance of either ClientDiscoveryResponse or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClientDiscoveryResponse"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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 - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + + request = build_list_request( + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ClientDiscoveryResponse', pipeline_response) + deserialized = self._deserialize("ClientDiscoveryResponse", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -98,6 +110,7 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_connection_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_connection_operations.py index c2b3f37d920a..271c70a75633 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_connection_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_connection_operations.py @@ -5,18 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._private_endpoint_connection_operations import build_delete_request_initial, build_get_request, build_put_request_initial T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -58,6 +63,9 @@ async def get( :type resource_group_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnectionResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionResource @@ -68,34 +76,27 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) @@ -104,8 +105,10 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + async def _put_initial( self, vault_name: str, @@ -119,33 +122,25 @@ async def _put_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._put_initial.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'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'PrivateEndpointConnectionResource') + + request = build_put_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._put_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PrivateEndpointConnectionResource') - 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 @@ -163,8 +158,11 @@ async def _put_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + @distributed_trace_async async def begin_put( self, vault_name: str, @@ -184,17 +182,26 @@ async def begin_put( :type private_endpoint_connection_name: str :param parameters: Request body for operation. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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 PrivateEndpointConnectionResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionResource] - :raises ~azure.core.exceptions.HttpResponseError: + :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 PrivateEndpointConnectionResource or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionResource] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -207,28 +214,22 @@ async def begin_put( resource_group_name=resource_group_name, private_endpoint_connection_name=private_endpoint_connection_name, parameters=parameters, + api_version=api_version, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + response = pipeline_response.http_response deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -240,6 +241,7 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore async def _delete_initial( @@ -254,28 +256,21 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.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'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_delete_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -288,6 +283,8 @@ async def _delete_initial( _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + @distributed_trace_async async def begin_delete( self, vault_name: str, @@ -304,17 +301,23 @@ async def begin_delete( :type resource_group_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -326,25 +329,18 @@ async def begin_delete( vault_name=vault_name, resource_group_name=resource_group_name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, 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 = { - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -356,4 +352,5 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_operations.py index 854defc51872..fc029c60984a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._private_endpoint_operations import build_get_operation_status_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get_operation_status( self, vault_name: str, @@ -61,6 +66,9 @@ async def get_operation_status( :type private_endpoint_connection_name: str :param operation_id: Operation id. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -71,35 +79,28 @@ async def get_operation_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.get_operation_status.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'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_operation_status_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + private_endpoint_connection_name=private_endpoint_connection_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get_operation_status.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('OperationStatus', pipeline_response) @@ -108,4 +109,6 @@ async def get_operation_status( return cls(pipeline_response, deserialized, {}) return deserialized + get_operation_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protectable_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protectable_containers_operations.py index 8586ab983b2c..e3324641a65f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protectable_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protectable_containers_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._protectable_containers_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -60,49 +66,56 @@ def list( :type fabric_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectableContainerResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResourceList] + :return: An iterator like instance of either ProtectableContainerResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectableContainerResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - } - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + api_version=api_version, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + api_version=api_version, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectableContainerResourceList', pipeline_response) + deserialized = self._deserialize("ProtectableContainerResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -120,6 +133,7 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_results_operations.py index 8bc5e8d6d19c..81e2afe23d1d 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_results_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._protected_item_operation_results_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -66,6 +71,9 @@ async def get( :param operation_id: OperationID which represents the operation whose result needs to be fetched. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectedItemResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource or None @@ -76,31 +84,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -116,4 +117,6 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_statuses_operations.py index 8bb130c80e31..151252827894 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_statuses_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._protected_item_operation_statuses_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -69,6 +74,9 @@ async def get( :type protected_item_name: str :param operation_id: OperationID represents the operation whose status needs to be fetched. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -79,31 +87,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -117,4 +118,6 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_items_operations.py index b07aeeee5605..b2a38039273a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_items_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._protected_items_operations import build_create_or_update_request, build_delete_request, build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -67,6 +72,9 @@ async def get( :type protected_item_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectedItemResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource @@ -77,32 +85,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + filter=filter, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -116,8 +116,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} # type: ignore + + @distributed_trace_async async def create_or_update( self, vault_name: str, @@ -146,6 +149,9 @@ async def create_or_update( :type protected_item_name: str :param parameters: resource backed up item. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectedItemResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource or None @@ -156,35 +162,27 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ProtectedItemResource') + + request = build_create_or_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # 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, 'ProtectedItemResource') - 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 @@ -200,8 +198,11 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} # type: ignore + + @distributed_trace_async async def delete( self, vault_name: str, @@ -226,6 +227,9 @@ async def delete( :type container_name: str :param protected_item_name: Backed up item to be deleted. :type protected_item_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -236,30 +240,23 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.delete.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') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_delete_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -271,3 +268,4 @@ async def delete( return cls(pipeline_response, None, {}) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_operation_results_operations.py index bd672d6b34c7..ec1c2a4c0d8f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_operation_results_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._protection_container_operation_results_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -63,6 +68,9 @@ async def get( :param operation_id: Operation ID which represents the operation whose result needs to be fetched. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionContainerResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource or None @@ -73,30 +81,23 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), - 'containerName': self._serialize.url("container_name", container_name, '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -112,4 +113,6 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_refresh_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_refresh_operation_results_operations.py index bfd7be202c44..7210fb3c812f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_refresh_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_refresh_operation_results_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._protection_container_refresh_operation_results_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -60,6 +65,9 @@ async def get( :param operation_id: Operation ID associated with the operation whose result needs to be fetched. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -70,29 +78,22 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'fabricName': self._serialize.url("fabric_name", fabric_name, '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # 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 @@ -104,3 +105,4 @@ async def get( return cls(pipeline_response, None, {}) get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_containers_operations.py index 86a68423c19f..719a43b1c69e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_containers_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._protection_containers_operations import build_get_request, build_inquire_request, build_refresh_request, build_register_request, build_unregister_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -59,6 +64,9 @@ async def get( :type fabric_name: str :param container_name: Name of the container whose details need to be fetched. :type container_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionContainerResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource @@ -69,29 +77,22 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), - 'containerName': self._serialize.url("container_name", container_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') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -105,8 +106,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} # type: ignore + + @distributed_trace_async async def register( self, vault_name: str, @@ -132,6 +136,9 @@ async def register( :type container_name: str :param parameters: Request body for operation. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionContainerResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource or None @@ -142,34 +149,26 @@ async def register( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.register.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'), - } - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ProtectionContainerResource') + + request = build_register_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.register.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ProtectionContainerResource') - 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 @@ -185,8 +184,11 @@ async def register( return cls(pipeline_response, deserialized, {}) return deserialized + register.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} # type: ignore + + @distributed_trace_async async def unregister( self, vault_name: str, @@ -210,6 +212,9 @@ async def unregister( :param container_name: Name of the container which needs to be unregistered from the Recovery Services Vault. :type container_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -220,29 +225,22 @@ async def unregister( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.unregister.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'), - } - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_unregister_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + api_version=api_version, + template_url=self.unregister.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -255,6 +253,8 @@ async def unregister( unregister.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} # type: ignore + + @distributed_trace_async async def inquire( self, vault_name: str, @@ -280,6 +280,9 @@ async def inquire( :type container_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -290,31 +293,23 @@ async def inquire( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.inquire.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'), - } - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_inquire_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + api_version=api_version, + filter=filter, + template_url=self.inquire.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -327,6 +322,8 @@ async def inquire( inquire.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire'} # type: ignore + + @distributed_trace_async async def refresh( self, vault_name: str, @@ -349,6 +346,9 @@ async def refresh( :type fabric_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -359,30 +359,22 @@ async def refresh( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.refresh.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'), - } - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_refresh_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + api_version=api_version, + filter=filter, + template_url=self.refresh.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -394,3 +386,4 @@ async def refresh( return cls(pipeline_response, None, {}) refresh.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_intent_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_intent_operations.py index 4bc44e635772..c5c2c49c6944 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_intent_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_intent_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._protection_intent_operations import build_create_or_update_request, build_delete_request, build_get_request, build_validate_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def validate( self, azure_region: str, @@ -64,6 +69,9 @@ async def validate( :type azure_region: str :param parameters: Enable backup validation request on Virtual Machine. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.PreValidateEnableBackupRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PreValidateEnableBackupResponse, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.PreValidateEnableBackupResponse @@ -74,31 +82,23 @@ async def validate( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.validate.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'PreValidateEnableBackupRequest') + + request = build_validate_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.validate.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PreValidateEnableBackupRequest') - 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 @@ -112,8 +112,11 @@ async def validate( return cls(pipeline_response, deserialized, {}) return deserialized + validate.metadata = {'url': '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection'} # type: ignore + + @distributed_trace_async async def get( self, vault_name: str, @@ -135,6 +138,9 @@ async def get( :type fabric_name: str :param intent_object_name: Backed up item name whose details are to be fetched. :type intent_object_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionIntentResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource @@ -145,29 +151,22 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), - 'intentObjectName': self._serialize.url("intent_object_name", intent_object_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + intent_object_name=intent_object_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # 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 @@ -181,8 +180,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}'} # type: ignore + + @distributed_trace_async async def create_or_update( self, vault_name: str, @@ -205,6 +207,9 @@ async def create_or_update( :type intent_object_name: str :param parameters: resource backed up item. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionIntentResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource @@ -215,34 +220,26 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_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'), - 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), - 'intentObjectName': self._serialize.url("intent_object_name", intent_object_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ProtectionIntentResource') + + request = build_create_or_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + intent_object_name=intent_object_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # 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, 'ProtectionIntentResource') - 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 @@ -256,8 +253,11 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}'} # type: ignore + + @distributed_trace_async async def delete( self, vault_name: str, @@ -277,6 +277,9 @@ async def delete( :type fabric_name: str :param intent_object_name: Intent to be deleted. :type intent_object_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -287,27 +290,22 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - - # Construct URL - url = self.delete.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'), - 'intentObjectName': self._serialize.url("intent_object_name", intent_object_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_delete_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + intent_object_name=intent_object_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -319,3 +317,4 @@ async def delete( return cls(pipeline_response, None, {}) delete.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policies_operations.py index 780f9cf3c709..2c715377ae8a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policies_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policies_operations.py @@ -5,18 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._protection_policies_operations import build_create_or_update_request, build_delete_request_initial, build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -60,6 +65,9 @@ async def get( :type resource_group_name: str :param policy_name: Backup policy information to be fetched. :type policy_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionPolicyResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource @@ -70,28 +78,21 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'policyName': self._serialize.url("policy_name", policy_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + policy_name=policy_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -105,8 +106,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} # type: ignore + + @distributed_trace_async async def create_or_update( self, vault_name: str, @@ -128,6 +132,9 @@ async def create_or_update( :type policy_name: str :param parameters: resource backup policy. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionPolicyResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource or None @@ -138,33 +145,25 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_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'), - 'policyName': self._serialize.url("policy_name", policy_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ProtectionPolicyResource') - # 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') + request = build_create_or_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + policy_name=policy_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ProtectionPolicyResource') - 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 @@ -180,8 +179,10 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} # type: ignore + async def _delete_initial( self, vault_name: str, @@ -194,28 +195,21 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.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'), - 'policyName': self._serialize.url("policy_name", policy_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_delete_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + policy_name=policy_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -228,6 +222,8 @@ async def _delete_initial( _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} # type: ignore + + @distributed_trace_async async def begin_delete( self, vault_name: str, @@ -246,17 +242,23 @@ async def begin_delete( :type resource_group_name: str :param policy_name: Backup policy to be deleted. :type policy_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -268,25 +270,18 @@ async def begin_delete( vault_name=vault_name, resource_group_name=resource_group_name, policy_name=policy_name, + api_version=api_version, 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 = { - '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'), - 'policyName': self._serialize.url("policy_name", policy_name, 'str'), - } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -298,4 +293,5 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_results_operations.py index a55b144a34b7..f3ee1c421573 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_results_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._protection_policy_operation_results_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -60,6 +65,9 @@ async def get( :param operation_id: Operation ID which represents the operation whose result needs to be fetched. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionPolicyResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource @@ -70,29 +78,22 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'policyName': self._serialize.url("policy_name", policy_name, '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + policy_name=policy_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -106,4 +107,6 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_statuses_operations.py index 2516e3ee1c39..961bbb8c5d51 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_statuses_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._protection_policy_operation_statuses_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -64,6 +69,9 @@ async def get( :param operation_id: Operation ID which represents an operation whose status needs to be fetched. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -74,29 +82,22 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'policyName': self._serialize.url("policy_name", policy_name, '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + policy_name=policy_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -110,4 +111,6 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}'} # 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..78a689df5866 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 @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._recovery_points_operations import build_get_request, build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -66,51 +72,60 @@ def list( :type protected_item_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :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 """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + 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 = "2021-08-01" - 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 = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('RecoveryPointResourceList', pipeline_response) + deserialized = self._deserialize("RecoveryPointResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -128,11 +143,13 @@ async def get_next(next_link=None): 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 + @distributed_trace_async async def get( self, vault_name: str, @@ -160,6 +177,9 @@ async def get( :type protected_item_name: str :param recovery_point_id: RecoveryPointID represents the backed up data to be fetched. :type recovery_point_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecoveryPointResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource @@ -170,31 +190,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -208,92 +221,6 @@ async def get( return cls(pipeline_response, deserialized, {}) 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, {}) + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}'} # type: ignore - 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/aio/operations/_recovery_points_recommended_for_move_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_recommended_for_move_operations.py index 333dfbbb404e..73d2e028b9a1 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_recommended_for_move_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_recommended_for_move_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._recovery_points_recommended_for_move_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -65,58 +71,67 @@ def list( :param protected_item_name: :type protected_item_name: str :param parameters: List Recovery points Recommended for Move Request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :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 """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + 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 = "2021-08-01" - 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 = { - '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') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ListRecoveryPointsRecommendedForMoveRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(parameters, 'ListRecoveryPointsRecommendedForMoveRequest') + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ListRecoveryPointsRecommendedForMoveRequest') - body_content_kwargs['content'] = body_content - request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(parameters, 'ListRecoveryPointsRecommendedForMoveRequest') + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('RecoveryPointResourceList', pipeline_response) + deserialized = self._deserialize("RecoveryPointResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -134,6 +149,7 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_services_backup_client_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_services_backup_client_operations.py index 826126f917c1..edbf7852cab0 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_services_backup_client_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_services_backup_client_operations.py @@ -5,23 +5,28 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._recovery_services_backup_client_operations import build_bms_prepare_data_move_request_initial, build_bms_trigger_data_move_request_initial, build_get_operation_status_request, build_move_recovery_point_request_initial T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] class RecoveryServicesBackupClientOperationsMixin: + @distributed_trace_async async def get_operation_status( self, vault_name: str, @@ -38,6 +43,9 @@ async def get_operation_status( :type resource_group_name: str :param operation_id: :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -48,34 +56,27 @@ async def get_operation_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.get_operation_status.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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_operation_status_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get_operation_status.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('OperationStatus', pipeline_response) @@ -84,8 +85,10 @@ async def get_operation_status( return cls(pipeline_response, deserialized, {}) return deserialized + get_operation_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationStatus/{operationId}'} # type: ignore + async def _bms_prepare_data_move_initial( self, vault_name: str, @@ -98,45 +101,38 @@ async def _bms_prepare_data_move_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._bms_prepare_data_move_initial.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PrepareDataMoveRequest') - # 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') + request = build_bms_prepare_data_move_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._bms_prepare_data_move_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PrepareDataMoveRequest') - 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.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) _bms_prepare_data_move_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/prepareDataMove'} # type: ignore + + @distributed_trace_async async def begin_bms_prepare_data_move( self, vault_name: str, @@ -153,17 +149,24 @@ async def begin_bms_prepare_data_move( :type resource_group_name: str :param parameters: Prepare data move request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.PrepareDataMoveRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -175,24 +178,19 @@ async def begin_bms_prepare_data_move( vault_name=vault_name, resource_group_name=resource_group_name, parameters=parameters, + api_version=api_version, + content_type=content_type, 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 = { - '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'), - } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -204,6 +202,7 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_bms_prepare_data_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/prepareDataMove'} # type: ignore async def _bms_trigger_data_move_initial( @@ -218,45 +217,38 @@ async def _bms_trigger_data_move_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._bms_trigger_data_move_initial.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'TriggerDataMoveRequest') + + request = build_bms_trigger_data_move_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._bms_trigger_data_move_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TriggerDataMoveRequest') - 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.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) _bms_trigger_data_move_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/triggerDataMove'} # type: ignore + + @distributed_trace_async async def begin_bms_trigger_data_move( self, vault_name: str, @@ -273,17 +265,24 @@ async def begin_bms_trigger_data_move( :type resource_group_name: str :param parameters: Trigger data move request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.TriggerDataMoveRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -295,24 +294,19 @@ async def begin_bms_trigger_data_move( vault_name=vault_name, resource_group_name=resource_group_name, parameters=parameters, + api_version=api_version, + content_type=content_type, 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 = { - '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'), - } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -324,6 +318,7 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_bms_trigger_data_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/triggerDataMove'} # type: ignore async def _move_recovery_point_initial( @@ -342,36 +337,28 @@ async def _move_recovery_point_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._move_recovery_point_initial.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'MoveRPAcrossTiersRequest') + + request = build_move_recovery_point_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._move_recovery_point_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'MoveRPAcrossTiersRequest') - 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 @@ -384,6 +371,8 @@ async def _move_recovery_point_initial( _move_recovery_point_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/move'} # type: ignore + + @distributed_trace_async async def begin_move_recovery_point( self, vault_name: str, @@ -414,17 +403,24 @@ async def begin_move_recovery_point( :type recovery_point_id: str :param parameters: Move Resource Across Tiers Request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.MoveRPAcrossTiersRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -440,28 +436,19 @@ async def begin_move_recovery_point( protected_item_name=protected_item_name, recovery_point_id=recovery_point_id, parameters=parameters, + api_version=api_version, + content_type=content_type, 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 = { - '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'), - } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -473,4 +460,5 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_move_recovery_point.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/move'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxies_operations.py index 10327e979ac2..b8c1b3c67c97 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxies_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxies_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._resource_guard_proxies_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name: str, @@ -54,46 +60,52 @@ def get( :param resource_group_name: The name of the resource group where the recovery services vault is present. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ResourceGuardProxyBaseResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResourceList] + :return: An iterator like instance of either ResourceGuardProxyBaseResourceList or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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.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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ResourceGuardProxyBaseResourceList', pipeline_response) + deserialized = self._deserialize("ResourceGuardProxyBaseResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -111,6 +123,7 @@ async def get_next(next_link=None): return pipeline_response + return AsyncItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxy_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxy_operations.py index a4729c9db30e..4286c174f297 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxy_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxy_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._resource_guard_proxy_operations import build_delete_request, build_get_request, build_put_request, build_unlock_delete_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -56,6 +61,9 @@ async def get( :type resource_group_name: str :param resource_guard_proxy_name: :type resource_guard_proxy_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceGuardProxyBaseResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource @@ -66,28 +74,21 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + resource_guard_proxy_name=resource_guard_proxy_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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 @@ -101,8 +102,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore + + @distributed_trace_async async def put( self, vault_name: str, @@ -120,6 +124,9 @@ async def put( :type resource_group_name: str :param resource_guard_proxy_name: :type resource_guard_proxy_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceGuardProxyBaseResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource @@ -130,28 +137,21 @@ async def put( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.put.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'), - 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_put_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + resource_guard_proxy_name=resource_guard_proxy_name, + api_version=api_version, + template_url=self.put.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.put(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -165,8 +165,11 @@ async def put( return cls(pipeline_response, deserialized, {}) return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore + + @distributed_trace_async async def delete( self, vault_name: str, @@ -183,6 +186,9 @@ async def delete( :type resource_group_name: str :param resource_guard_proxy_name: :type resource_guard_proxy_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -193,28 +199,21 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.delete.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'), - 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_delete_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + resource_guard_proxy_name=resource_guard_proxy_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -227,6 +226,8 @@ async def delete( delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore + + @distributed_trace_async async def unlock_delete( self, vault_name: str, @@ -246,6 +247,9 @@ async def unlock_delete( :type resource_guard_proxy_name: str :param parameters: Request body for operation. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.UnlockDeleteRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: UnlockDeleteResponse, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.UnlockDeleteResponse @@ -256,33 +260,25 @@ async def unlock_delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.unlock_delete.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'), - 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'UnlockDeleteRequest') + + request = build_unlock_delete_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + resource_guard_proxy_name=resource_guard_proxy_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.unlock_delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'UnlockDeleteRequest') - 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 @@ -296,4 +292,6 @@ async def unlock_delete( return cls(pipeline_response, deserialized, {}) return deserialized + unlock_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_restores_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_restores_operations.py index 33a0889d3743..8c2f0d8edda6 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_restores_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_restores_operations.py @@ -5,18 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._restores_operations import build_trigger_request_initial T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -58,36 +62,28 @@ async def _trigger_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._trigger_initial.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'RestoreRequestResource') + + request = build_trigger_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._trigger_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'RestoreRequestResource') - 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 @@ -100,6 +96,8 @@ async def _trigger_initial( _trigger_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'} # type: ignore + + @distributed_trace_async async def begin_trigger( self, vault_name: str, @@ -130,17 +128,24 @@ async def begin_trigger( :type recovery_point_id: str :param parameters: resource restore request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -156,28 +161,19 @@ async def begin_trigger( protected_item_name=protected_item_name, recovery_point_id=recovery_point_id, parameters=parameters, + api_version=api_version, + content_type=content_type, 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 = { - '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'), - } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -189,4 +185,5 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_security_pins_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_security_pins_operations.py index 65bb65fe414f..defc60bdfb1b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_security_pins_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_security_pins_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._security_pins_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -56,6 +61,9 @@ async def get( :type resource_group_name: str :param parameters: security pin request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.SecurityPinBase + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TokenInformation, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.TokenInformation @@ -66,35 +74,27 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - 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['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - body_content_kwargs = {} # type: Dict[str, Any] if parameters is not None: - body_content = self._serialize.body(parameters, 'SecurityPinBase') + _json = self._serialize.body(parameters, 'SecurityPinBase') else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + _json = None + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -108,4 +108,6 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_validate_operation_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_validate_operation_operations.py new file mode 100644 index 000000000000..e94b2c2cceee --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_validate_operation_operations.py @@ -0,0 +1,164 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +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 +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._validate_operation_operations import build_trigger_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ValidateOperationOperations: + """ValidateOperationOperations 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, + vault_name: str, + resource_group_name: str, + parameters: "_models.ValidateOperationRequest", + **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 = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ValidateOperationRequest') + + request = build_trigger_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._trigger_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _trigger_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTriggerValidateOperation'} # type: ignore + + + @distributed_trace_async + async def begin_trigger( + self, + vault_name: str, + resource_group_name: str, + parameters: "_models.ValidateOperationRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Validate operation for specified backed up item in the form of an asynchronous operation. + Returns tracking headers which can be tracked using GetValidateOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: resource validate operation request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :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 + """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.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( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **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}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTriggerValidateOperation'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_validate_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_validate_operation_results_operations.py new file mode 100644 index 000000000000..2a51a6fb867a --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_validate_operation_results_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +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 +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._validate_operation_results_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ValidateOperationResultsOperations: + """ValidateOperationResultsOperations 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 + + @distributed_trace_async + async def get( + self, + vault_name: str, + resource_group_name: str, + operation_id: str, + **kwargs: Any + ) -> Optional["_models.ValidateOperationsResponse"]: + """Fetches the result of a triggered validate operation. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param operation_id: OperationID which represents the operation whose result needs to be + fetched. + :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidateOperationsResponse, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationsResponse or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ValidateOperationsResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + 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) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ValidateOperationsResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_validate_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_validate_operation_statuses_operations.py new file mode 100644 index 000000000000..80d6eee03c28 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_validate_operation_statuses_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +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 +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._validate_operation_statuses_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ValidateOperationStatusesOperations: + """ValidateOperationStatusesOperations 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 + + @distributed_trace_async + async def get( + self, + vault_name: str, + resource_group_name: str, + operation_id: str, + **kwargs: Any + ) -> "_models.OperationStatus": + """Fetches the status of a triggered validate operation. The status can be in progress, completed + or failed. You can refer to the OperationStatus enum for all the possible states of the + operation. + If operation has completed, this method returns the list of errors obtained while validating + the operation. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param operation_id: OperationID represents the operation whose status needs to be fetched. + :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + 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) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationsStatuses/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/__init__.py new file mode 100644 index 000000000000..ad0885efc426 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/__init__.py @@ -0,0 +1,18 @@ +# 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 ._cross_region_region_restore_client import CrossRegionRestoreClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['CrossRegionRestoreClient'] + +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_configuration.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_configuration.py new file mode 100644 index 000000000000..df7826931ed3 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_configuration.py @@ -0,0 +1,75 @@ +# 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 + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class CrossRegionRestoreClientConfiguration(Configuration): + """Configuration for CrossRegionRestoreClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription Id. + :type subscription_id: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + super(CrossRegionRestoreClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = api_version + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-recoveryservicesbackup/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_cross_region_region_restore_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_cross_region_region_restore_client.py new file mode 100644 index 000000000000..b34bc6720940 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_cross_region_region_restore_client.py @@ -0,0 +1,141 @@ +# 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 copy import deepcopy +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +from . import models +from ._configuration import CrossRegionRestoreClientConfiguration +from .operations import AadPropertiesOperations, BackupCrrJobDetailsOperations, BackupCrrJobsOperations, BackupProtectedItemsCrrOperations, BackupResourceStorageConfigsOperations, BackupUsageSummariesCRROperations, CrossRegionRestoreOperations, CrrOperationResultsOperations, CrrOperationStatusOperations, RecoveryPointsCrrOperations, RecoveryPointsOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.rest import HttpRequest, HttpResponse + +class CrossRegionRestoreClient(object): + """Open API 2.0 Specs for Azure RecoveryServices Backup service. + + :ivar backup_usage_summaries_crr: BackupUsageSummariesCRROperations operations + :vartype backup_usage_summaries_crr: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.operations.BackupUsageSummariesCRROperations + :ivar aad_properties: AadPropertiesOperations operations + :vartype aad_properties: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.operations.AadPropertiesOperations + :ivar cross_region_restore: CrossRegionRestoreOperations operations + :vartype cross_region_restore: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.operations.CrossRegionRestoreOperations + :ivar backup_crr_job_details: BackupCrrJobDetailsOperations operations + :vartype backup_crr_job_details: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.operations.BackupCrrJobDetailsOperations + :ivar backup_crr_jobs: BackupCrrJobsOperations operations + :vartype backup_crr_jobs: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.operations.BackupCrrJobsOperations + :ivar crr_operation_results: CrrOperationResultsOperations operations + :vartype crr_operation_results: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.operations.CrrOperationResultsOperations + :ivar crr_operation_status: CrrOperationStatusOperations operations + :vartype crr_operation_status: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.operations.CrrOperationStatusOperations + :ivar recovery_points: RecoveryPointsOperations operations + :vartype recovery_points: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.operations.RecoveryPointsOperations + :ivar backup_resource_storage_configs: BackupResourceStorageConfigsOperations operations + :vartype backup_resource_storage_configs: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.operations.BackupResourceStorageConfigsOperations + :ivar recovery_points_crr: RecoveryPointsCrrOperations operations + :vartype recovery_points_crr: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.operations.RecoveryPointsCrrOperations + :ivar backup_protected_items_crr: BackupProtectedItemsCrrOperations operations + :vartype backup_protected_items_crr: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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. + :type subscription_id: str + :param base_url: Service URL. Default value is 'https://management.azure.com'. + :type base_url: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url="https://management.azure.com", # type: str + **kwargs # type: Any + ): + # type: (...) -> None + self._config = CrossRegionRestoreClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + 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.recovery_points = RecoveryPointsOperations(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, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> CrossRegionRestoreClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_patch.py new file mode 100644 index 000000000000..74e48ecd07cf --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass \ No newline at end of file diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_vendor.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_vendor.py new file mode 100644 index 000000000000..138f663c53a4 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_vendor.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# 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 azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_version.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_version.py new file mode 100644 index 000000000000..e5754a47ce68 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/__init__.py new file mode 100644 index 000000000000..20c0aaa02ff7 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/__init__.py @@ -0,0 +1,15 @@ +# 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 ._cross_region_region_restore_client import CrossRegionRestoreClient +__all__ = ['CrossRegionRestoreClient'] + +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/_configuration.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/_configuration.py new file mode 100644 index 000000000000..a90d9f8ecc16 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/_configuration.py @@ -0,0 +1,71 @@ +# 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, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class CrossRegionRestoreClientConfiguration(Configuration): + """Configuration for CrossRegionRestoreClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription Id. + :type subscription_id: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + super(CrossRegionRestoreClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = api_version + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-recoveryservicesbackup/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/_cross_region_region_restore_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/_cross_region_region_restore_client.py new file mode 100644 index 000000000000..7d20e46cbaa7 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/_cross_region_region_restore_client.py @@ -0,0 +1,134 @@ +# 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 copy import deepcopy +from typing import Any, Awaitable, Optional, TYPE_CHECKING + +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +from .. import models +from ._configuration import CrossRegionRestoreClientConfiguration +from .operations import AadPropertiesOperations, BackupCrrJobDetailsOperations, BackupCrrJobsOperations, BackupProtectedItemsCrrOperations, BackupResourceStorageConfigsOperations, BackupUsageSummariesCRROperations, CrossRegionRestoreOperations, CrrOperationResultsOperations, CrrOperationStatusOperations, RecoveryPointsCrrOperations, RecoveryPointsOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +class CrossRegionRestoreClient: + """Open API 2.0 Specs for Azure RecoveryServices Backup service. + + :ivar backup_usage_summaries_crr: BackupUsageSummariesCRROperations operations + :vartype backup_usage_summaries_crr: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.aio.operations.BackupUsageSummariesCRROperations + :ivar aad_properties: AadPropertiesOperations operations + :vartype aad_properties: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.aio.operations.AadPropertiesOperations + :ivar cross_region_restore: CrossRegionRestoreOperations operations + :vartype cross_region_restore: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.aio.operations.CrossRegionRestoreOperations + :ivar backup_crr_job_details: BackupCrrJobDetailsOperations operations + :vartype backup_crr_job_details: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.aio.operations.BackupCrrJobDetailsOperations + :ivar backup_crr_jobs: BackupCrrJobsOperations operations + :vartype backup_crr_jobs: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.aio.operations.BackupCrrJobsOperations + :ivar crr_operation_results: CrrOperationResultsOperations operations + :vartype crr_operation_results: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.aio.operations.CrrOperationResultsOperations + :ivar crr_operation_status: CrrOperationStatusOperations operations + :vartype crr_operation_status: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.aio.operations.CrrOperationStatusOperations + :ivar recovery_points: RecoveryPointsOperations operations + :vartype recovery_points: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.aio.operations.RecoveryPointsOperations + :ivar backup_resource_storage_configs: BackupResourceStorageConfigsOperations operations + :vartype backup_resource_storage_configs: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.aio.operations.BackupResourceStorageConfigsOperations + :ivar recovery_points_crr: RecoveryPointsCrrOperations operations + :vartype recovery_points_crr: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.aio.operations.RecoveryPointsCrrOperations + :ivar backup_protected_items_crr: BackupProtectedItemsCrrOperations operations + :vartype backup_protected_items_crr: + azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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. + :type subscription_id: str + :param base_url: Service URL. Default value is 'https://management.azure.com'. + :type base_url: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = CrossRegionRestoreClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + 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.recovery_points = RecoveryPointsOperations(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, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "CrossRegionRestoreClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/_patch.py new file mode 100644 index 000000000000..74e48ecd07cf --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass \ No newline at end of file diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/__init__.py new file mode 100644 index 000000000000..7ac30ce43fb3 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/__init__.py @@ -0,0 +1,33 @@ +# 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 ._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 ._recovery_points_operations import RecoveryPointsOperations +from ._backup_resource_storage_configs_operations import BackupResourceStorageConfigsOperations +from ._recovery_points_crr_operations import RecoveryPointsCrrOperations +from ._backup_protected_items_crr_operations import BackupProtectedItemsCrrOperations + +__all__ = [ + 'BackupUsageSummariesCRROperations', + 'AadPropertiesOperations', + 'CrossRegionRestoreOperations', + 'BackupCrrJobDetailsOperations', + 'BackupCrrJobsOperations', + 'CrrOperationResultsOperations', + 'CrrOperationStatusOperations', + 'RecoveryPointsOperations', + '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/crossregionregionrestore/aio/operations/_aad_properties_operations.py similarity index 73% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_aad_properties_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/_aad_properties_operations.py index f45f457700ec..28c32ff5d551 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_aad_properties_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/_aad_properties_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._aad_properties_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,7 +29,7 @@ class AadPropertiesOperations: 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, azure_region: str, @@ -54,9 +59,13 @@ async def get( :type azure_region: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 + :rtype: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AADPropertiesResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AADPropertiesResource"] @@ -64,34 +73,26 @@ async def get( 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') + api_version = kwargs.pop('api_version', "2018-12-20") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AADPropertiesResource', pipeline_response) @@ -100,4 +101,6 @@ async def get( 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/crossregionregionrestore/aio/operations/_backup_crr_job_details_operations.py similarity index 67% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_job_details_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/_backup_crr_job_details_operations.py index 0992760723dc..afefc28a4841 100644 --- 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/crossregionregionrestore/aio/operations/_backup_crr_job_details_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_crr_job_details_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,7 +29,7 @@ class BackupCrrJobDetailsOperations: 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, azure_region: str, @@ -53,10 +58,14 @@ async def get( :param azure_region: Azure region to hit Api. :type azure_region: str :param parameters: CRR Job request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.CrrJobRequest + :type parameters: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrrJobRequest + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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 + :rtype: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] @@ -64,37 +73,29 @@ async def get( 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') + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'CrrJobRequest') - # 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') + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobResource', pipeline_response) @@ -103,4 +104,6 @@ async def get( 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/crossregionregionrestore/aio/operations/_backup_crr_jobs_operations.py similarity index 62% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_jobs_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/_backup_crr_jobs_operations.py index 83a0be7b14f8..8b4b61e47d3a 100644 --- 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/crossregionregionrestore/aio/operations/_backup_crr_jobs_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_crr_jobs_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,7 +31,7 @@ class BackupCrrJobsOperations: 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, azure_region: str, @@ -56,62 +62,66 @@ def list( :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 + :type parameters: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrrJobRequest :param filter: OData filter options. :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + 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) + _json = self._serialize.body(parameters, 'CrrJobRequest') + + request = build_list_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + 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) + _json = self._serialize.body(parameters, 'CrrJobRequest') + + request = build_list_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('JobResourceList', pipeline_response) + deserialized = self._deserialize("JobResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -124,12 +134,13 @@ async def get_next(next_link=None): 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response + return AsyncItemPaged( get_next, extract_data ) 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/crossregionregionrestore/aio/operations/_backup_protected_items_crr_operations.py similarity index 65% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_crr_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/_backup_protected_items_crr_operations.py index 44ae0174fe20..8815388ab1bb 100644 --- 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/crossregionregionrestore/aio/operations/_backup_protected_items_crr_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_protected_items_crr_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,7 +31,7 @@ class BackupProtectedItemsCrrOperations: 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -60,50 +66,56 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :return: An iterator like instance of either ProtectedItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectedItemResourceList', pipeline_response) + deserialized = self._deserialize("ProtectedItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -116,12 +128,13 @@ async def get_next(next_link=None): 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response + return AsyncItemPaged( get_next, extract_data ) 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/crossregionregionrestore/aio/operations/_backup_resource_storage_configs_operations.py similarity index 62% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/_backup_resource_storage_configs_operations.py index 23f9e273638a..55274a553418 100644 --- 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/crossregionregionrestore/aio/operations/_backup_resource_storage_configs_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_resource_storage_configs_operations import build_get_request, build_patch_request, build_update_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,7 +29,7 @@ class BackupResourceStorageConfigsOperations: 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, vault_name: str, @@ -53,9 +58,13 @@ async def get( :param resource_group_name: The name of the resource group where the recovery services vault is present. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 + :rtype: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupResourceConfigResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"] @@ -63,33 +72,26 @@ async def get( 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') + api_version = kwargs.pop('api_version', "2018-12-20") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) @@ -98,8 +100,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore + + @distributed_trace_async async def update( self, vault_name: str, @@ -115,10 +120,15 @@ async def update( present. :type resource_group_name: str :param parameters: Vault storage config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + :type parameters: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupResourceConfigResource + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 + :rtype: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupResourceConfigResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"] @@ -126,38 +136,30 @@ async def update( 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') + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupResourceConfigResource') - # 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') + request = build_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) @@ -166,8 +168,11 @@ async def update( return cls(pipeline_response, deserialized, {}) return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore + + @distributed_trace_async async def patch( self, vault_name: str, @@ -183,7 +188,11 @@ async def patch( present. :type resource_group_name: str :param parameters: Vault storage config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + :type parameters: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupResourceConfigResource + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -194,41 +203,34 @@ async def patch( 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') + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'BackupResourceConfigResource') + + request = build_patch_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.patch.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_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/crossregionregionrestore/aio/operations/_backup_usage_summaries_crr_operations.py similarity index 65% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_crr_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/_backup_usage_summaries_crr_operations.py index c1db556c86ab..5e937fd23ff1 100644 --- 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/crossregionregionrestore/aio/operations/_backup_usage_summaries_crr_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._backup_usage_summaries_crr_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,7 +31,7 @@ class BackupUsageSummariesCRROperations: 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -60,50 +66,56 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :return: An iterator like instance of either BackupManagementUsageList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementUsageList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('BackupManagementUsageList', pipeline_response) + deserialized = self._deserialize("BackupManagementUsageList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -116,12 +128,13 @@ async def get_next(next_link=None): 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response + return AsyncItemPaged( get_next, extract_data ) 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/crossregionregionrestore/aio/operations/_cross_region_restore_operations.py similarity index 69% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_cross_region_restore_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/_cross_region_restore_operations.py index e4eb302bfc3b..fab3b6caf98e 100644 --- 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/crossregionregionrestore/aio/operations/_cross_region_restore_operations.py @@ -5,18 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._cross_region_restore_operations import build_trigger_request_initial T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -27,7 +31,7 @@ class CrossRegionRestoreOperations: 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -53,51 +57,45 @@ async def _trigger_initial( 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') + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'CrossRegionRestoreRequest') + + request = build_trigger_request_initial( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._trigger_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) _trigger_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore'} # type: ignore + + @distributed_trace_async 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. Restores the specified backed up data in a different region as compared to where the data is backed up. @@ -105,18 +103,26 @@ async def begin_trigger( :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 + :type parameters: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrossRegionRestoreRequest + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -127,23 +133,19 @@ async def begin_trigger( raw_result = await self._trigger_initial( azure_region=azure_region, parameters=parameters, + api_version=api_version, + content_type=content_type, 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) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -155,4 +157,5 @@ def get_long_running_output(pipeline_response): ) 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/crossregionregionrestore/aio/operations/_crr_operation_results_operations.py similarity index 73% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_results_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/_crr_operation_results_operations.py index 973f001fc1cd..3ddcefc58fee 100644 --- 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/crossregionregionrestore/aio/operations/_crr_operation_results_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._crr_operation_results_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,7 +29,7 @@ class CrrOperationResultsOperations: 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, azure_region: str, @@ -52,6 +57,9 @@ async def get( :type azure_region: str :param operation_id: :type operation_id: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -62,36 +70,30 @@ async def get( 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') + api_version = kwargs.pop('api_version', "2018-12-20") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_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/crossregionregionrestore/aio/operations/_crr_operation_status_operations.py similarity index 73% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_status_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/_crr_operation_status_operations.py index c6c7274b8303..bac55b7845d6 100644 --- 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/crossregionregionrestore/aio/operations/_crr_operation_status_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._crr_operation_status_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,7 +29,7 @@ class CrrOperationStatusOperations: 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, azure_region: str, @@ -52,9 +57,12 @@ async def get( :type azure_region: str :param operation_id: :type operation_id: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 + :rtype: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OperationStatus :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationStatus"] @@ -62,33 +70,26 @@ async def get( 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') + api_version = kwargs.pop('api_version', "2018-12-20") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('OperationStatus', pipeline_response) @@ -97,4 +98,6 @@ async def get( 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/crossregionregionrestore/aio/operations/_recovery_points_crr_operations.py similarity index 65% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_crr_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/_recovery_points_crr_operations.py index 7c3fa9b1dd00..e73f8adbc0a4 100644 --- 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/crossregionregionrestore/aio/operations/_recovery_points_crr_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._recovery_points_crr_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,7 +31,7 @@ class RecoveryPointsCrrOperations: 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name: str, @@ -66,51 +72,60 @@ def list( :type protected_item_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :return: An iterator like instance of either RecoveryPointResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('RecoveryPointResourceList', pipeline_response) + deserialized = self._deserialize("RecoveryPointResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -123,12 +138,13 @@ async def get_next(next_link=None): 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response + return AsyncItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/_recovery_points_operations.py new file mode 100644 index 000000000000..651e8284687d --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/aio/operations/_recovery_points_operations.py @@ -0,0 +1,134 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +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 +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._recovery_points_operations import build_get_access_token_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RecoveryPointsOperations: + """RecoveryPointsOperations 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.crossregionregionrestore.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 + + @distributed_trace_async + 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.crossregionregionrestore.models.AADPropertiesResource + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :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.crossregionregionrestore.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 = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'AADPropertiesResource') + + request = build_get_access_token_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.get_access_token.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + 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.NewErrorResponse, pipeline_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/crossregionregionrestore/models/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/models/__init__.py new file mode 100644 index 000000000000..92f4a0770f65 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/models/__init__.py @@ -0,0 +1,439 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AADProperties + from ._models_py3 import AADPropertiesResource + from ._models_py3 import AzureFileShareRecoveryPoint + from ._models_py3 import AzureFileShareRestoreRequest + from ._models_py3 import AzureFileshareProtectedItem + from ._models_py3 import AzureFileshareProtectedItemExtendedInfo + from ._models_py3 import AzureIaaSClassicComputeVMProtectedItem + from ._models_py3 import AzureIaaSComputeVMProtectedItem + from ._models_py3 import AzureIaaSVMErrorInfo + from ._models_py3 import AzureIaaSVMHealthDetails + from ._models_py3 import AzureIaaSVMJob + from ._models_py3 import AzureIaaSVMJobExtendedInfo + from ._models_py3 import AzureIaaSVMJobTaskDetails + from ._models_py3 import AzureIaaSVMProtectedItem + from ._models_py3 import AzureIaaSVMProtectedItemExtendedInfo + from ._models_py3 import AzureSqlProtectedItem + from ._models_py3 import AzureSqlProtectedItemExtendedInfo + from ._models_py3 import AzureStorageErrorInfo + from ._models_py3 import AzureStorageJob + from ._models_py3 import AzureStorageJobExtendedInfo + from ._models_py3 import AzureStorageJobTaskDetails + from ._models_py3 import AzureVmWorkloadProtectedItem + from ._models_py3 import AzureVmWorkloadProtectedItemExtendedInfo + from ._models_py3 import AzureVmWorkloadSAPAseDatabaseProtectedItem + from ._models_py3 import AzureVmWorkloadSAPHanaDatabaseProtectedItem + from ._models_py3 import AzureVmWorkloadSQLDatabaseProtectedItem + from ._models_py3 import AzureWorkloadErrorInfo + from ._models_py3 import AzureWorkloadJob + from ._models_py3 import AzureWorkloadJobExtendedInfo + from ._models_py3 import AzureWorkloadJobTaskDetails + from ._models_py3 import AzureWorkloadPointInTimeRecoveryPoint + from ._models_py3 import AzureWorkloadPointInTimeRestoreRequest + from ._models_py3 import AzureWorkloadRecoveryPoint + from ._models_py3 import AzureWorkloadRestoreRequest + from ._models_py3 import AzureWorkloadSAPHanaPointInTimeRecoveryPoint + from ._models_py3 import AzureWorkloadSAPHanaPointInTimeRestoreRequest + from ._models_py3 import AzureWorkloadSAPHanaRecoveryPoint + from ._models_py3 import AzureWorkloadSAPHanaRestoreRequest + from ._models_py3 import AzureWorkloadSQLPointInTimeRecoveryPoint + from ._models_py3 import AzureWorkloadSQLPointInTimeRestoreRequest + from ._models_py3 import AzureWorkloadSQLRecoveryPoint + from ._models_py3 import AzureWorkloadSQLRecoveryPointExtendedInfo + from ._models_py3 import AzureWorkloadSQLRestoreRequest + from ._models_py3 import BEKDetails + from ._models_py3 import BMSAADPropertiesQueryObject + from ._models_py3 import BMSBackupSummariesQueryObject + from ._models_py3 import BMSRPQueryObject + from ._models_py3 import BackupManagementUsage + from ._models_py3 import BackupManagementUsageList + from ._models_py3 import BackupResourceConfig + from ._models_py3 import BackupResourceConfigResource + from ._models_py3 import ClientScriptForConnect + 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 DPMProtectedItem + from ._models_py3 import DPMProtectedItemExtendedInfo + from ._models_py3 import DiskExclusionProperties + from ._models_py3 import DiskInformation + from ._models_py3 import DpmErrorInfo + from ._models_py3 import DpmJob + from ._models_py3 import DpmJobExtendedInfo + from ._models_py3 import DpmJobTaskDetails + from ._models_py3 import EncryptionDetails + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ErrorDetail + from ._models_py3 import ExtendedProperties + from ._models_py3 import GenericProtectedItem + from ._models_py3 import GenericRecoveryPoint + from ._models_py3 import IaasVMRecoveryPoint + from ._models_py3 import IaasVMRestoreRequest + from ._models_py3 import IdentityBasedRestoreDetails + from ._models_py3 import IdentityInfo + from ._models_py3 import InstantItemRecoveryTarget + from ._models_py3 import Job + from ._models_py3 import JobQueryObject + from ._models_py3 import JobResource + from ._models_py3 import JobResourceList + from ._models_py3 import KEKDetails + from ._models_py3 import KPIResourceHealthDetails + from ._models_py3 import KeyAndSecretDetails + from ._models_py3 import MabErrorInfo + from ._models_py3 import MabFileFolderProtectedItem + from ._models_py3 import MabFileFolderProtectedItemExtendedInfo + from ._models_py3 import MabJob + from ._models_py3 import MabJobExtendedInfo + from ._models_py3 import MabJobTaskDetails + from ._models_py3 import NameInfo + from ._models_py3 import NewErrorResponse + from ._models_py3 import NewErrorResponseError + from ._models_py3 import OperationStatus + from ._models_py3 import OperationStatusError + from ._models_py3 import OperationStatusExtendedInfo + from ._models_py3 import OperationStatusJobExtendedInfo + from ._models_py3 import OperationStatusJobsExtendedInfo + from ._models_py3 import OperationStatusProvisionILRExtendedInfo + from ._models_py3 import OperationStatusRecoveryPointExtendedInfo + from ._models_py3 import PointInTimeRange + from ._models_py3 import ProtectedItem + from ._models_py3 import ProtectedItemQueryObject + from ._models_py3 import ProtectedItemResource + from ._models_py3 import ProtectedItemResourceList + from ._models_py3 import RecoveryPoint + from ._models_py3 import RecoveryPointDiskConfiguration + from ._models_py3 import RecoveryPointMoveReadinessInfo + from ._models_py3 import RecoveryPointResource + from ._models_py3 import RecoveryPointResourceList + from ._models_py3 import RecoveryPointTierInformation + from ._models_py3 import Resource + from ._models_py3 import ResourceHealthDetails + from ._models_py3 import ResourceList + from ._models_py3 import RestoreFileSpecs + from ._models_py3 import RestoreRequest + from ._models_py3 import SQLDataDirectory + from ._models_py3 import SQLDataDirectoryMapping + from ._models_py3 import TargetAFSRestoreInfo + from ._models_py3 import TargetRestoreInfo + from ._models_py3 import WorkloadCrrAccessToken +except (SyntaxError, ImportError): + from ._models import AADProperties # type: ignore + from ._models import AADPropertiesResource # type: ignore + from ._models import AzureFileShareRecoveryPoint # type: ignore + from ._models import AzureFileShareRestoreRequest # type: ignore + from ._models import AzureFileshareProtectedItem # type: ignore + from ._models import AzureFileshareProtectedItemExtendedInfo # type: ignore + from ._models import AzureIaaSClassicComputeVMProtectedItem # type: ignore + from ._models import AzureIaaSComputeVMProtectedItem # type: ignore + from ._models import AzureIaaSVMErrorInfo # type: ignore + from ._models import AzureIaaSVMHealthDetails # type: ignore + from ._models import AzureIaaSVMJob # type: ignore + from ._models import AzureIaaSVMJobExtendedInfo # type: ignore + from ._models import AzureIaaSVMJobTaskDetails # type: ignore + from ._models import AzureIaaSVMProtectedItem # type: ignore + from ._models import AzureIaaSVMProtectedItemExtendedInfo # type: ignore + from ._models import AzureSqlProtectedItem # type: ignore + from ._models import AzureSqlProtectedItemExtendedInfo # type: ignore + from ._models import AzureStorageErrorInfo # type: ignore + from ._models import AzureStorageJob # type: ignore + from ._models import AzureStorageJobExtendedInfo # type: ignore + from ._models import AzureStorageJobTaskDetails # type: ignore + from ._models import AzureVmWorkloadProtectedItem # type: ignore + from ._models import AzureVmWorkloadProtectedItemExtendedInfo # type: ignore + from ._models import AzureVmWorkloadSAPAseDatabaseProtectedItem # type: ignore + from ._models import AzureVmWorkloadSAPHanaDatabaseProtectedItem # type: ignore + from ._models import AzureVmWorkloadSQLDatabaseProtectedItem # type: ignore + from ._models import AzureWorkloadErrorInfo # type: ignore + from ._models import AzureWorkloadJob # type: ignore + from ._models import AzureWorkloadJobExtendedInfo # type: ignore + from ._models import AzureWorkloadJobTaskDetails # type: ignore + from ._models import AzureWorkloadPointInTimeRecoveryPoint # type: ignore + from ._models import AzureWorkloadPointInTimeRestoreRequest # type: ignore + from ._models import AzureWorkloadRecoveryPoint # type: ignore + from ._models import AzureWorkloadRestoreRequest # type: ignore + from ._models import AzureWorkloadSAPHanaPointInTimeRecoveryPoint # type: ignore + from ._models import AzureWorkloadSAPHanaPointInTimeRestoreRequest # type: ignore + from ._models import AzureWorkloadSAPHanaRecoveryPoint # type: ignore + from ._models import AzureWorkloadSAPHanaRestoreRequest # type: ignore + from ._models import AzureWorkloadSQLPointInTimeRecoveryPoint # type: ignore + from ._models import AzureWorkloadSQLPointInTimeRestoreRequest # type: ignore + from ._models import AzureWorkloadSQLRecoveryPoint # type: ignore + from ._models import AzureWorkloadSQLRecoveryPointExtendedInfo # type: ignore + from ._models import AzureWorkloadSQLRestoreRequest # type: ignore + from ._models import BEKDetails # type: ignore + from ._models import BMSAADPropertiesQueryObject # type: ignore + from ._models import BMSBackupSummariesQueryObject # type: ignore + from ._models import BMSRPQueryObject # type: ignore + from ._models import BackupManagementUsage # type: ignore + from ._models import BackupManagementUsageList # type: ignore + from ._models import BackupResourceConfig # type: ignore + from ._models import BackupResourceConfigResource # type: ignore + from ._models import ClientScriptForConnect # 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 DPMProtectedItem # type: ignore + from ._models import DPMProtectedItemExtendedInfo # type: ignore + from ._models import DiskExclusionProperties # type: ignore + from ._models import DiskInformation # type: ignore + from ._models import DpmErrorInfo # type: ignore + from ._models import DpmJob # type: ignore + from ._models import DpmJobExtendedInfo # type: ignore + from ._models import DpmJobTaskDetails # type: ignore + from ._models import EncryptionDetails # type: ignore + from ._models import ErrorAdditionalInfo # type: ignore + from ._models import ErrorDetail # type: ignore + from ._models import ExtendedProperties # type: ignore + from ._models import GenericProtectedItem # type: ignore + from ._models import GenericRecoveryPoint # type: ignore + from ._models import IaasVMRecoveryPoint # type: ignore + from ._models import IaasVMRestoreRequest # type: ignore + from ._models import IdentityBasedRestoreDetails # type: ignore + from ._models import IdentityInfo # type: ignore + from ._models import InstantItemRecoveryTarget # type: ignore + from ._models import Job # type: ignore + from ._models import JobQueryObject # type: ignore + from ._models import JobResource # type: ignore + from ._models import JobResourceList # type: ignore + from ._models import KEKDetails # type: ignore + from ._models import KPIResourceHealthDetails # type: ignore + from ._models import KeyAndSecretDetails # type: ignore + from ._models import MabErrorInfo # type: ignore + from ._models import MabFileFolderProtectedItem # type: ignore + from ._models import MabFileFolderProtectedItemExtendedInfo # type: ignore + from ._models import MabJob # type: ignore + from ._models import MabJobExtendedInfo # type: ignore + from ._models import MabJobTaskDetails # type: ignore + from ._models import NameInfo # type: ignore + from ._models import NewErrorResponse # type: ignore + from ._models import NewErrorResponseError # type: ignore + from ._models import OperationStatus # type: ignore + from ._models import OperationStatusError # type: ignore + from ._models import OperationStatusExtendedInfo # type: ignore + 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 PointInTimeRange # type: ignore + from ._models import ProtectedItem # type: ignore + from ._models import ProtectedItemQueryObject # type: ignore + from ._models import ProtectedItemResource # type: ignore + from ._models import ProtectedItemResourceList # type: ignore + from ._models import RecoveryPoint # type: ignore + from ._models import RecoveryPointDiskConfiguration # type: ignore + from ._models import RecoveryPointMoveReadinessInfo # type: ignore + from ._models import RecoveryPointResource # type: ignore + from ._models import RecoveryPointResourceList # type: ignore + from ._models import RecoveryPointTierInformation # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceHealthDetails # type: ignore + from ._models import ResourceList # type: ignore + from ._models import RestoreFileSpecs # type: ignore + from ._models import RestoreRequest # type: ignore + from ._models import SQLDataDirectory # type: ignore + from ._models import SQLDataDirectoryMapping # type: ignore + from ._models import TargetAFSRestoreInfo # type: ignore + from ._models import TargetRestoreInfo # type: ignore + from ._models import WorkloadCrrAccessToken # type: ignore + +from ._cross_region_region_restore_client_enums import ( + BackupManagementType, + CopyOptions, + CreateMode, + DataSourceType, + HealthState, + HealthStatus, + JobOperationType, + JobStatus, + JobSupportedAction, + LastBackupStatus, + MabServerType, + OperationStatusValues, + OverwriteOptions, + ProtectedItemHealthStatus, + ProtectedItemState, + ProtectionState, + RecoveryMode, + RecoveryPointTierStatus, + RecoveryPointTierType, + RecoveryType, + ResourceHealthStatus, + RestorePointQueryType, + RestorePointType, + RestoreRequestType, + SQLDataDirectoryType, + StorageType, + StorageTypeState, + Type, + UsagesUnit, + WorkloadType, +) + +__all__ = [ + 'AADProperties', + 'AADPropertiesResource', + 'AzureFileShareRecoveryPoint', + 'AzureFileShareRestoreRequest', + 'AzureFileshareProtectedItem', + 'AzureFileshareProtectedItemExtendedInfo', + 'AzureIaaSClassicComputeVMProtectedItem', + 'AzureIaaSComputeVMProtectedItem', + 'AzureIaaSVMErrorInfo', + 'AzureIaaSVMHealthDetails', + 'AzureIaaSVMJob', + 'AzureIaaSVMJobExtendedInfo', + 'AzureIaaSVMJobTaskDetails', + 'AzureIaaSVMProtectedItem', + 'AzureIaaSVMProtectedItemExtendedInfo', + 'AzureSqlProtectedItem', + 'AzureSqlProtectedItemExtendedInfo', + 'AzureStorageErrorInfo', + 'AzureStorageJob', + 'AzureStorageJobExtendedInfo', + 'AzureStorageJobTaskDetails', + 'AzureVmWorkloadProtectedItem', + 'AzureVmWorkloadProtectedItemExtendedInfo', + 'AzureVmWorkloadSAPAseDatabaseProtectedItem', + 'AzureVmWorkloadSAPHanaDatabaseProtectedItem', + 'AzureVmWorkloadSQLDatabaseProtectedItem', + 'AzureWorkloadErrorInfo', + 'AzureWorkloadJob', + 'AzureWorkloadJobExtendedInfo', + 'AzureWorkloadJobTaskDetails', + 'AzureWorkloadPointInTimeRecoveryPoint', + 'AzureWorkloadPointInTimeRestoreRequest', + 'AzureWorkloadRecoveryPoint', + 'AzureWorkloadRestoreRequest', + 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint', + 'AzureWorkloadSAPHanaPointInTimeRestoreRequest', + 'AzureWorkloadSAPHanaRecoveryPoint', + 'AzureWorkloadSAPHanaRestoreRequest', + 'AzureWorkloadSQLPointInTimeRecoveryPoint', + 'AzureWorkloadSQLPointInTimeRestoreRequest', + 'AzureWorkloadSQLRecoveryPoint', + 'AzureWorkloadSQLRecoveryPointExtendedInfo', + 'AzureWorkloadSQLRestoreRequest', + 'BEKDetails', + 'BMSAADPropertiesQueryObject', + 'BMSBackupSummariesQueryObject', + 'BMSRPQueryObject', + 'BackupManagementUsage', + 'BackupManagementUsageList', + 'BackupResourceConfig', + 'BackupResourceConfigResource', + 'ClientScriptForConnect', + 'CrossRegionRestoreRequest', + 'CrossRegionRestoreRequestResource', + 'CrrAccessToken', + 'CrrAccessTokenResource', + 'CrrJobRequest', + 'CrrJobRequestResource', + 'DPMProtectedItem', + 'DPMProtectedItemExtendedInfo', + 'DiskExclusionProperties', + 'DiskInformation', + 'DpmErrorInfo', + 'DpmJob', + 'DpmJobExtendedInfo', + 'DpmJobTaskDetails', + 'EncryptionDetails', + 'ErrorAdditionalInfo', + 'ErrorDetail', + 'ExtendedProperties', + 'GenericProtectedItem', + 'GenericRecoveryPoint', + 'IaasVMRecoveryPoint', + 'IaasVMRestoreRequest', + 'IdentityBasedRestoreDetails', + 'IdentityInfo', + 'InstantItemRecoveryTarget', + 'Job', + 'JobQueryObject', + 'JobResource', + 'JobResourceList', + 'KEKDetails', + 'KPIResourceHealthDetails', + 'KeyAndSecretDetails', + 'MabErrorInfo', + 'MabFileFolderProtectedItem', + 'MabFileFolderProtectedItemExtendedInfo', + 'MabJob', + 'MabJobExtendedInfo', + 'MabJobTaskDetails', + 'NameInfo', + 'NewErrorResponse', + 'NewErrorResponseError', + 'OperationStatus', + 'OperationStatusError', + 'OperationStatusExtendedInfo', + 'OperationStatusJobExtendedInfo', + 'OperationStatusJobsExtendedInfo', + 'OperationStatusProvisionILRExtendedInfo', + 'OperationStatusRecoveryPointExtendedInfo', + 'PointInTimeRange', + 'ProtectedItem', + 'ProtectedItemQueryObject', + 'ProtectedItemResource', + 'ProtectedItemResourceList', + 'RecoveryPoint', + 'RecoveryPointDiskConfiguration', + 'RecoveryPointMoveReadinessInfo', + 'RecoveryPointResource', + 'RecoveryPointResourceList', + 'RecoveryPointTierInformation', + 'Resource', + 'ResourceHealthDetails', + 'ResourceList', + 'RestoreFileSpecs', + 'RestoreRequest', + 'SQLDataDirectory', + 'SQLDataDirectoryMapping', + 'TargetAFSRestoreInfo', + 'TargetRestoreInfo', + 'WorkloadCrrAccessToken', + 'BackupManagementType', + 'CopyOptions', + 'CreateMode', + 'DataSourceType', + 'HealthState', + 'HealthStatus', + 'JobOperationType', + 'JobStatus', + 'JobSupportedAction', + 'LastBackupStatus', + 'MabServerType', + 'OperationStatusValues', + 'OverwriteOptions', + 'ProtectedItemHealthStatus', + 'ProtectedItemState', + 'ProtectionState', + 'RecoveryMode', + 'RecoveryPointTierStatus', + 'RecoveryPointTierType', + 'RecoveryType', + 'ResourceHealthStatus', + 'RestorePointQueryType', + 'RestorePointType', + 'RestoreRequestType', + 'SQLDataDirectoryType', + 'StorageType', + 'StorageTypeState', + 'Type', + 'UsagesUnit', + 'WorkloadType', +] diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/models/_cross_region_region_restore_client_enums.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/models/_cross_region_region_restore_client_enums.py new file mode 100644 index 000000000000..a8be240f6e5e --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/models/_cross_region_region_restore_client_enums.py @@ -0,0 +1,340 @@ +# 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 enum import Enum +from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta + + +class BackupManagementType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Backup management type to execute the current job. + """ + + INVALID = "Invalid" + AZURE_IAAS_VM = "AzureIaasVM" + MAB = "MAB" + DPM = "DPM" + AZURE_BACKUP_SERVER = "AzureBackupServer" + AZURE_SQL = "AzureSql" + AZURE_STORAGE = "AzureStorage" + AZURE_WORKLOAD = "AzureWorkload" + DEFAULT_BACKUP = "DefaultBackup" + +class CopyOptions(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Options to resolve copy conflicts. + """ + + INVALID = "Invalid" + CREATE_COPY = "CreateCopy" + SKIP = "Skip" + OVERWRITE = "Overwrite" + FAIL_ON_CONFLICT = "FailOnConflict" + +class CreateMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Create mode to indicate recovery of existing soft deleted data source or creation of new data + source. + """ + + INVALID = "Invalid" + DEFAULT = "Default" + RECOVER = "Recover" + +class DataSourceType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of workload this item represents. + """ + + INVALID = "Invalid" + VM = "VM" + FILE_FOLDER = "FileFolder" + AZURE_SQL_DB = "AzureSqlDb" + SQLDB = "SQLDB" + EXCHANGE = "Exchange" + SHAREPOINT = "Sharepoint" + V_MWARE_VM = "VMwareVM" + SYSTEM_STATE = "SystemState" + CLIENT = "Client" + GENERIC_DATA_SOURCE = "GenericDataSource" + SQL_DATA_BASE = "SQLDataBase" + AZURE_FILE_SHARE = "AzureFileShare" + SAP_HANA_DATABASE = "SAPHanaDatabase" + SAP_ASE_DATABASE = "SAPAseDatabase" + +class HealthState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Health State for the backed up item. + """ + + PASSED = "Passed" + ACTION_REQUIRED = "ActionRequired" + ACTION_SUGGESTED = "ActionSuggested" + INVALID = "Invalid" + +class HealthStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """backups running status for this backup item. + """ + + PASSED = "Passed" + ACTION_REQUIRED = "ActionRequired" + ACTION_SUGGESTED = "ActionSuggested" + INVALID = "Invalid" + +class JobOperationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of operation. + """ + + INVALID = "Invalid" + REGISTER = "Register" + UN_REGISTER = "UnRegister" + CONFIGURE_BACKUP = "ConfigureBackup" + BACKUP = "Backup" + RESTORE = "Restore" + DISABLE_BACKUP = "DisableBackup" + DELETE_BACKUP_DATA = "DeleteBackupData" + CROSS_REGION_RESTORE = "CrossRegionRestore" + UNDELETE = "Undelete" + UPDATE_CUSTOMER_MANAGED_KEY = "UpdateCustomerManagedKey" + +class JobStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Status of the job. + """ + + INVALID = "Invalid" + IN_PROGRESS = "InProgress" + COMPLETED = "Completed" + FAILED = "Failed" + COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" + CANCELLED = "Cancelled" + CANCELLING = "Cancelling" + +class JobSupportedAction(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + INVALID = "Invalid" + CANCELLABLE = "Cancellable" + RETRIABLE = "Retriable" + +class LastBackupStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Last backup operation status. Possible values: Healthy, Unhealthy. + """ + + INVALID = "Invalid" + HEALTHY = "Healthy" + UNHEALTHY = "Unhealthy" + IR_PENDING = "IRPending" + +class MabServerType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Server type of MAB container. + """ + + INVALID = "Invalid" + UNKNOWN = "Unknown" + IAAS_VM_CONTAINER = "IaasVMContainer" + IAAS_VM_SERVICE_CONTAINER = "IaasVMServiceContainer" + DPM_CONTAINER = "DPMContainer" + AZURE_BACKUP_SERVER_CONTAINER = "AzureBackupServerContainer" + MAB_CONTAINER = "MABContainer" + CLUSTER = "Cluster" + AZURE_SQL_CONTAINER = "AzureSqlContainer" + WINDOWS = "Windows" + V_CENTER = "VCenter" + VM_APP_CONTAINER = "VMAppContainer" + SQLAG_WORK_LOAD_CONTAINER = "SQLAGWorkLoadContainer" + STORAGE_CONTAINER = "StorageContainer" + GENERIC_CONTAINER = "GenericContainer" + +class OperationStatusValues(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Operation status. + """ + + INVALID = "Invalid" + IN_PROGRESS = "InProgress" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CANCELED = "Canceled" + +class OverwriteOptions(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Can Overwrite if Target DataBase already exists + """ + + INVALID = "Invalid" + FAIL_ON_CONFLICT = "FailOnConflict" + OVERWRITE = "Overwrite" + +class ProtectedItemHealthStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Health status of the backup item, evaluated based on last heartbeat received + """ + + INVALID = "Invalid" + HEALTHY = "Healthy" + UNHEALTHY = "Unhealthy" + NOT_REACHABLE = "NotReachable" + IR_PENDING = "IRPending" + +class ProtectedItemState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Backup state of the backed up item. + """ + + INVALID = "Invalid" + IR_PENDING = "IRPending" + PROTECTED = "Protected" + PROTECTION_ERROR = "ProtectionError" + PROTECTION_STOPPED = "ProtectionStopped" + PROTECTION_PAUSED = "ProtectionPaused" + +class ProtectionState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Backup state of this backup item. + """ + + INVALID = "Invalid" + IR_PENDING = "IRPending" + PROTECTED = "Protected" + PROTECTION_ERROR = "ProtectionError" + PROTECTION_STOPPED = "ProtectionStopped" + PROTECTION_PAUSED = "ProtectionPaused" + +class RecoveryMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Defines whether the current recovery mode is file restore or database restore + """ + + INVALID = "Invalid" + FILE_RECOVERY = "FileRecovery" + WORKLOAD_RECOVERY = "WorkloadRecovery" + +class RecoveryPointTierStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Recovery point tier status. + """ + + INVALID = "Invalid" + VALID = "Valid" + DISABLED = "Disabled" + DELETED = "Deleted" + REHYDRATED = "Rehydrated" + +class RecoveryPointTierType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Recovery point tier type. + """ + + INVALID = "Invalid" + INSTANT_RP = "InstantRP" + HARDENED_RP = "HardenedRP" + ARCHIVED_RP = "ArchivedRP" + +class RecoveryType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of this recovery. + """ + + INVALID = "Invalid" + ORIGINAL_LOCATION = "OriginalLocation" + ALTERNATE_LOCATION = "AlternateLocation" + RESTORE_DISKS = "RestoreDisks" + OFFLINE = "Offline" + +class ResourceHealthStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Resource Health Status + """ + + HEALTHY = "Healthy" + TRANSIENT_DEGRADED = "TransientDegraded" + PERSISTENT_DEGRADED = "PersistentDegraded" + TRANSIENT_UNHEALTHY = "TransientUnhealthy" + PERSISTENT_UNHEALTHY = "PersistentUnhealthy" + INVALID = "Invalid" + +class RestorePointQueryType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """RestorePoint type + """ + + INVALID = "Invalid" + FULL = "Full" + LOG = "Log" + DIFFERENTIAL = "Differential" + FULL_AND_DIFFERENTIAL = "FullAndDifferential" + ALL = "All" + INCREMENTAL = "Incremental" + +class RestorePointType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of restore point + """ + + INVALID = "Invalid" + FULL = "Full" + LOG = "Log" + DIFFERENTIAL = "Differential" + INCREMENTAL = "Incremental" + +class RestoreRequestType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Restore Type (FullShareRestore or ItemLevelRestore) + """ + + INVALID = "Invalid" + FULL_SHARE_RESTORE = "FullShareRestore" + ITEM_LEVEL_RESTORE = "ItemLevelRestore" + +class SQLDataDirectoryType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of data directory mapping + """ + + INVALID = "Invalid" + DATA = "Data" + LOG = "Log" + +class StorageType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Storage type + """ + + INVALID = "Invalid" + GEO_REDUNDANT = "GeoRedundant" + LOCALLY_REDUNDANT = "LocallyRedundant" + ZONE_REDUNDANT = "ZoneRedundant" + READ_ACCESS_GEO_ZONE_REDUNDANT = "ReadAccessGeoZoneRedundant" + +class StorageTypeState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is + always Locked. + """ + + INVALID = "Invalid" + LOCKED = "Locked" + UNLOCKED = "Unlocked" + +class Type(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Backup management type for this container. + """ + + INVALID = "Invalid" + BACKUP_PROTECTED_ITEM_COUNT_SUMMARY = "BackupProtectedItemCountSummary" + BACKUP_PROTECTION_CONTAINER_COUNT_SUMMARY = "BackupProtectionContainerCountSummary" + +class UsagesUnit(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Unit of the usage. + """ + + COUNT = "Count" + BYTES = "Bytes" + SECONDS = "Seconds" + PERCENT = "Percent" + COUNT_PER_SECOND = "CountPerSecond" + BYTES_PER_SECOND = "BytesPerSecond" + +class WorkloadType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Workload type of backup item. + """ + + INVALID = "Invalid" + VM = "VM" + FILE_FOLDER = "FileFolder" + AZURE_SQL_DB = "AzureSqlDb" + SQLDB = "SQLDB" + EXCHANGE = "Exchange" + SHAREPOINT = "Sharepoint" + V_MWARE_VM = "VMwareVM" + SYSTEM_STATE = "SystemState" + CLIENT = "Client" + GENERIC_DATA_SOURCE = "GenericDataSource" + SQL_DATA_BASE = "SQLDataBase" + AZURE_FILE_SHARE = "AzureFileShare" + SAP_HANA_DATABASE = "SAPHanaDatabase" + SAP_ASE_DATABASE = "SAPAseDatabase" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/models/_models.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/models/_models.py new file mode 100644 index 000000000000..32bd47a8cdac --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/models/_models.py @@ -0,0 +1,8500 @@ +# 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 azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class AADProperties(msrest.serialization.Model): + """AADProperties. + + :ivar service_principal_client_id: + :vartype service_principal_client_id: str + :ivar tenant_id: + :vartype tenant_id: str + :ivar authority: + :vartype authority: str + :ivar audience: + :vartype audience: str + :ivar service_principal_object_id: + :vartype 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 + ): + """ + :keyword service_principal_client_id: + :paramtype service_principal_client_id: str + :keyword tenant_id: + :paramtype tenant_id: str + :keyword authority: + :paramtype authority: str + :keyword audience: + :paramtype audience: str + :keyword service_principal_object_id: + :paramtype service_principal_object_id: str + """ + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype 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 + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + """ + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: AADPropertiesResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: AADPropertiesResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AADProperties + """ + super(AADPropertiesResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +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: AzureFileshareProtectedItem, AzureIaaSVMProtectedItem, AzureVmWorkloadProtectedItem, DPMProtectedItem, GenericProtectedItem, MabFileFolderProtectedItem, AzureSqlProtectedItem. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + """ + + _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]'}, + } + + _subtype_map = { + 'protected_item_type': {'AzureFileShareProtectedItem': 'AzureFileshareProtectedItem', 'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'AzureVmWorkloadProtectedItem': 'AzureVmWorkloadProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'GenericProtectedItem': 'GenericProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + """ + super(ProtectedItem, self).__init__(**kwargs) + self.protected_item_type = None # type: Optional[str] + self.backup_management_type = kwargs.get('backup_management_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.container_name = kwargs.get('container_name', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.policy_id = kwargs.get('policy_id', None) + self.last_recovery_point = kwargs.get('last_recovery_point', None) + self.backup_set_name = kwargs.get('backup_set_name', None) + self.create_mode = kwargs.get('create_mode', None) + self.deferred_delete_time_in_utc = kwargs.get('deferred_delete_time_in_utc', None) + self.is_scheduled_for_deferred_delete = kwargs.get('is_scheduled_for_deferred_delete', None) + self.deferred_delete_time_remaining = kwargs.get('deferred_delete_time_remaining', None) + self.is_deferred_delete_schedule_upcoming = kwargs.get('is_deferred_delete_schedule_upcoming', None) + self.is_rehydrate = kwargs.get('is_rehydrate', None) + self.resource_guard_operation_requests = kwargs.get('resource_guard_operation_requests', None) + + +class AzureFileshareProtectedItem(ProtectedItem): + """Azure File Share workload-specific backup item. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the fileshare represented by this backup item. + :vartype friendly_name: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar health_status: backups running status for this backup item. Possible values include: + "Passed", "ActionRequired", "ActionSuggested", "Invalid". + :vartype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :ivar extended_info: Additional information with this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the fileshare represented by this backup item. + :paramtype friendly_name: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword health_status: backups running status for this backup item. Possible values include: + "Passed", "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :keyword extended_info: Additional information with this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureFileshareProtectedItemExtendedInfo + """ + super(AzureFileshareProtectedItem, 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. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar oldest_recovery_point: The oldest backup copy available for this item in the service. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of available backup copies associated with this backup item. + :vartype recovery_point_count: int + :ivar policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :vartype policy_state: str + :ivar resource_state: Indicates the state of this resource. Possible values are from enum + ResourceState {Invalid, Active, SoftDeleted, Deleted}. + :vartype resource_state: str + :ivar resource_state_sync_time: The resource state sync time for this backup item. + :vartype resource_state_sync_time: ~datetime.datetime + """ + + _validation = { + 'resource_state': {'readonly': True}, + 'resource_state_sync_time': {'readonly': True}, + } + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + 'resource_state_sync_time': {'key': 'resourceStateSyncTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this item in the service. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of available backup copies associated with this backup + item. + :paramtype recovery_point_count: int + :keyword policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :paramtype policy_state: str + """ + super(AzureFileshareProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.policy_state = kwargs.get('policy_state', None) + self.resource_state = None + self.resource_state_sync_time = None + + +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: AzureFileShareRecoveryPoint, AzureWorkloadRecoveryPoint, GenericRecoveryPoint, IaasVMRecoveryPoint. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureFileShareRecoveryPoint': 'AzureFileShareRecoveryPoint', 'AzureWorkloadRecoveryPoint': 'AzureWorkloadRecoveryPoint', 'GenericRecoveryPoint': 'GenericRecoveryPoint', 'IaasVMRecoveryPoint': 'IaasVMRecoveryPoint'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(RecoveryPoint, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureFileShareRecoveryPoint(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. + + :ivar 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. + :vartype 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(AzureFileShareRecoveryPoint, 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, IaasVMRestoreRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequest'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(RestoreRequest, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureFileShareRestoreRequest(RestoreRequest): + """AzureFileShare Restore Request. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Source storage account ARM Id. + :vartype source_resource_id: str + :ivar copy_options: Options to resolve copy conflicts. Possible values include: "Invalid", + "CreateCopy", "Skip", "Overwrite", "FailOnConflict". + :vartype copy_options: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CopyOptions + :ivar restore_request_type: Restore Type (FullShareRestore or ItemLevelRestore). Possible + values include: "Invalid", "FullShareRestore", "ItemLevelRestore". + :vartype restore_request_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestoreRequestType + :ivar restore_file_specs: List of Source Files/Folders(which need to recover) and + TargetFolderPath details. + :vartype restore_file_specs: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestoreFileSpecs] + :ivar target_details: Target File Share Details. + :vartype target_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetAFSRestoreInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'copy_options': {'key': 'copyOptions', 'type': 'str'}, + 'restore_request_type': {'key': 'restoreRequestType', 'type': 'str'}, + 'restore_file_specs': {'key': 'restoreFileSpecs', 'type': '[RestoreFileSpecs]'}, + 'target_details': {'key': 'targetDetails', 'type': 'TargetAFSRestoreInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Source storage account ARM Id. + :paramtype source_resource_id: str + :keyword copy_options: Options to resolve copy conflicts. Possible values include: "Invalid", + "CreateCopy", "Skip", "Overwrite", "FailOnConflict". + :paramtype copy_options: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CopyOptions + :keyword restore_request_type: Restore Type (FullShareRestore or ItemLevelRestore). Possible + values include: "Invalid", "FullShareRestore", "ItemLevelRestore". + :paramtype restore_request_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestoreRequestType + :keyword restore_file_specs: List of Source Files/Folders(which need to recover) and + TargetFolderPath details. + :paramtype restore_file_specs: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestoreFileSpecs] + :keyword target_details: Target File Share Details. + :paramtype target_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetAFSRestoreInfo + """ + super(AzureFileShareRestoreRequest, self).__init__(**kwargs) + self.object_type = 'AzureFileShareRestoreRequest' # type: str + self.recovery_type = kwargs.get('recovery_type', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.copy_options = kwargs.get('copy_options', None) + self.restore_request_type = kwargs.get('restore_request_type', None) + self.restore_file_specs = kwargs.get('restore_file_specs', None) + self.target_details = kwargs.get('target_details', None) + + +class AzureIaaSVMProtectedItem(ProtectedItem): + """IaaS VM workload-specific backup item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMProtectedItem, AzureIaaSComputeVMProtectedItem. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :vartype virtual_machine_id: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :vartype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :ivar last_backup_status: Last backup operation status. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protected_item_data_id: Data ID of the protected item. + :vartype protected_item_data_id: str + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ExtendedProperties + """ + + _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'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + 'extended_properties': {'key': 'extendedProperties', 'type': 'ExtendedProperties'}, + } + + _subtype_map = { + 'protected_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectedItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectedItem'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the VM represented by this backup item. + :paramtype friendly_name: str + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :paramtype virtual_machine_id: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :keyword last_backup_status: Last backup operation status. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protected_item_data_id: Data ID of the protected item. + :paramtype protected_item_data_id: str + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ExtendedProperties + """ + super(AzureIaaSVMProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'AzureIaaSVMProtectedItem' # type: str + self.friendly_name = kwargs.get('friendly_name', None) + self.virtual_machine_id = kwargs.get('virtual_machine_id', None) + self.protection_status = kwargs.get('protection_status', None) + self.protection_state = kwargs.get('protection_state', None) + self.health_status = kwargs.get('health_status', None) + self.health_details = kwargs.get('health_details', None) + self.kpis_healths = kwargs.get('kpis_healths', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + self.last_backup_time = kwargs.get('last_backup_time', None) + self.protected_item_data_id = kwargs.get('protected_item_data_id', None) + self.extended_info = kwargs.get('extended_info', None) + self.extended_properties = kwargs.get('extended_properties', None) + + +class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): + """IaaS VM workload-specific backup item representing the Classic Compute VM. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :vartype virtual_machine_id: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :vartype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :ivar last_backup_status: Last backup operation status. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protected_item_data_id: Data ID of the protected item. + :vartype protected_item_data_id: str + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ExtendedProperties + """ + + _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'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + 'extended_properties': {'key': 'extendedProperties', 'type': 'ExtendedProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the VM represented by this backup item. + :paramtype friendly_name: str + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :paramtype virtual_machine_id: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :keyword last_backup_status: Last backup operation status. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protected_item_data_id: Data ID of the protected item. + :paramtype protected_item_data_id: str + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ExtendedProperties + """ + super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str + + +class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): + """IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :vartype virtual_machine_id: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :vartype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :ivar last_backup_status: Last backup operation status. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protected_item_data_id: Data ID of the protected item. + :vartype protected_item_data_id: str + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ExtendedProperties + """ + + _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'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + 'extended_properties': {'key': 'extendedProperties', 'type': 'ExtendedProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the VM represented by this backup item. + :paramtype friendly_name: str + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :paramtype virtual_machine_id: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :keyword last_backup_status: Last backup operation status. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protected_item_data_id: Data ID of the protected item. + :paramtype protected_item_data_id: str + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ExtendedProperties + """ + super(AzureIaaSComputeVMProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'Microsoft.Compute/virtualMachines' # type: str + + +class AzureIaaSVMErrorInfo(msrest.serialization.Model): + """Azure IaaS VM workload-specific error information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error_code: Error code. + :vartype error_code: int + :ivar error_title: Title: Typically, the entity that the error pertains to. + :vartype error_title: str + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] + """ + + _validation = { + 'error_code': {'readonly': True}, + 'error_title': {'readonly': True}, + 'error_string': {'readonly': True}, + 'recommendations': {'readonly': True}, + } + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_title': {'key': 'errorTitle', 'type': 'str'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AzureIaaSVMErrorInfo, self).__init__(**kwargs) + self.error_code = None + self.error_title = None + self.error_string = None + self.recommendations = None + + +class ResourceHealthDetails(msrest.serialization.Model): + """Health Details for backup items. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Health Code. + :vartype code: int + :ivar title: Health Title. + :vartype title: str + :ivar message: Health Message. + :vartype message: str + :ivar recommendations: Health Recommended Actions. + :vartype recommendations: list[str] + """ + + _validation = { + 'code': {'readonly': True}, + 'title': {'readonly': True}, + 'message': {'readonly': True}, + 'recommendations': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ResourceHealthDetails, self).__init__(**kwargs) + self.code = None + self.title = None + self.message = None + self.recommendations = None + + +class AzureIaaSVMHealthDetails(ResourceHealthDetails): + """Azure IaaS VM workload-specific Health Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Health Code. + :vartype code: int + :ivar title: Health Title. + :vartype title: str + :ivar message: Health Message. + :vartype message: str + :ivar recommendations: Health Recommended Actions. + :vartype recommendations: list[str] + """ + + _validation = { + 'code': {'readonly': True}, + 'title': {'readonly': True}, + 'message': {'readonly': True}, + 'recommendations': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AzureIaaSVMHealthDetails, self).__init__(**kwargs) + + +class Job(msrest.serialization.Model): + """Defines workload agnostic properties for a job. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSVMJob, AzureStorageJob, AzureWorkloadJob, DpmJob, MabJob. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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. + :vartype job_type: str + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + } + + _subtype_map = { + 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + """ + super(Job, self).__init__(**kwargs) + self.entity_friendly_name = kwargs.get('entity_friendly_name', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.operation = kwargs.get('operation', None) + self.status = kwargs.get('status', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.activity_id = kwargs.get('activity_id', None) + self.job_type = None # type: Optional[str] + + +class AzureIaaSVMJob(Job): + """Azure IaaS VM workload-specific job object. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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. + :vartype job_type: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMErrorInfo] + :ivar virtual_machine_version: Specifies whether the backup item is a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar extended_info: Additional information for this job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[str]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureIaaSVMErrorInfo]'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMJobExtendedInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMErrorInfo] + :keyword virtual_machine_version: Specifies whether the backup item is a Classic or an Azure + Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword extended_info: Additional information for this job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMJobExtendedInfo + """ + super(AzureIaaSVMJob, self).__init__(**kwargs) + self.job_type = 'AzureIaaSVMJob' # type: str + self.duration = kwargs.get('duration', None) + self.actions_info = kwargs.get('actions_info', None) + self.error_details = kwargs.get('error_details', None) + self.virtual_machine_version = kwargs.get('virtual_machine_version', None) + self.extended_info = kwargs.get('extended_info', None) + + +class AzureIaaSVMJobExtendedInfo(msrest.serialization.Model): + """Azure IaaS VM workload-specific additional information for job. + + :ivar tasks_list: List of tasks associated with this job. + :vartype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMJobTaskDetails] + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] + :ivar internal_property_bag: Job internal properties. + :vartype internal_property_bag: dict[str, str] + :ivar progress_percentage: Indicates progress of the job. Null if it has not started or + completed. + :vartype progress_percentage: float + :ivar estimated_remaining_duration: Time remaining for execution of this job. + :vartype estimated_remaining_duration: str + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureIaaSVMJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'internal_property_bag': {'key': 'internalPropertyBag', 'type': '{str}'}, + 'progress_percentage': {'key': 'progressPercentage', 'type': 'float'}, + 'estimated_remaining_duration': {'key': 'estimatedRemainingDuration', 'type': 'str'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tasks_list: List of tasks associated with this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMJobTaskDetails] + :keyword property_bag: Job properties. + :paramtype property_bag: dict[str, str] + :keyword internal_property_bag: Job internal properties. + :paramtype internal_property_bag: dict[str, str] + :keyword progress_percentage: Indicates progress of the job. Null if it has not started or + completed. + :paramtype progress_percentage: float + :keyword estimated_remaining_duration: Time remaining for execution of this job. + :paramtype estimated_remaining_duration: str + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ + super(AzureIaaSVMJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.internal_property_bag = kwargs.get('internal_property_bag', None) + self.progress_percentage = kwargs.get('progress_percentage', None) + self.estimated_remaining_duration = kwargs.get('estimated_remaining_duration', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) + + +class AzureIaaSVMJobTaskDetails(msrest.serialization.Model): + """Azure IaaS VM workload-specific job task details. + + :ivar task_id: The task display name. + :vartype task_id: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar instance_id: The instanceId. + :vartype instance_id: str + :ivar duration: Time elapsed for task. + :vartype duration: ~datetime.timedelta + :ivar status: The status. + :vartype status: str + :ivar progress_percentage: Progress of the task. + :vartype progress_percentage: float + :ivar task_execution_details: Details about execution of the task. + eg: number of bytes transferred etc. + :vartype task_execution_details: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'status': {'key': 'status', 'type': 'str'}, + 'progress_percentage': {'key': 'progressPercentage', 'type': 'float'}, + 'task_execution_details': {'key': 'taskExecutionDetails', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword instance_id: The instanceId. + :paramtype instance_id: str + :keyword duration: Time elapsed for task. + :paramtype duration: ~datetime.timedelta + :keyword status: The status. + :paramtype status: str + :keyword progress_percentage: Progress of the task. + :paramtype progress_percentage: float + :keyword task_execution_details: Details about execution of the task. + eg: number of bytes transferred etc. + :paramtype task_execution_details: str + """ + super(AzureIaaSVMJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.instance_id = kwargs.get('instance_id', None) + self.duration = kwargs.get('duration', None) + self.status = kwargs.get('status', None) + self.progress_percentage = kwargs.get('progress_percentage', None) + self.task_execution_details = kwargs.get('task_execution_details', None) + + +class AzureIaaSVMProtectedItemExtendedInfo(msrest.serialization.Model): + """Additional information on Azure IaaS VM specific backup item. + + :ivar oldest_recovery_point: The oldest backup copy available for this backup item. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of backup copies available for this backup item. + :vartype recovery_point_count: int + :ivar policy_inconsistent: Specifies if backup policy associated with the backup item is + inconsistent. + :vartype policy_inconsistent: bool + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_inconsistent': {'key': 'policyInconsistent', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this backup item. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of backup copies available for this backup item. + :paramtype recovery_point_count: int + :keyword policy_inconsistent: Specifies if backup policy associated with the backup item is + inconsistent. + :paramtype policy_inconsistent: bool + """ + super(AzureIaaSVMProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.policy_inconsistent = kwargs.get('policy_inconsistent', None) + + +class AzureSqlProtectedItem(ProtectedItem): + """Azure SQL workload-specific backup item. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar protected_item_data_id: Internal ID of a backup item. Used by Azure SQL Backup engine to + contact Recovery Services. + :vartype protected_item_data_id: str + :ivar protection_state: Backup state of the backed up item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemState + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureSqlProtectedItemExtendedInfo + """ + + _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]'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureSqlProtectedItemExtendedInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword protected_item_data_id: Internal ID of a backup item. Used by Azure SQL Backup engine + to contact Recovery Services. + :paramtype protected_item_data_id: str + :keyword protection_state: Backup state of the backed up item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemState + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureSqlProtectedItemExtendedInfo + """ + super(AzureSqlProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'Microsoft.Sql/servers/databases' # type: str + self.protected_item_data_id = kwargs.get('protected_item_data_id', None) + self.protection_state = kwargs.get('protection_state', None) + self.extended_info = kwargs.get('extended_info', None) + + +class AzureSqlProtectedItemExtendedInfo(msrest.serialization.Model): + """Additional information on Azure Sql specific protected item. + + :ivar oldest_recovery_point: The oldest backup copy available for this item in the service. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of available backup copies associated with this backup item. + :vartype recovery_point_count: int + :ivar policy_state: State of the backup policy associated with this backup item. + :vartype policy_state: str + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this item in the service. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of available backup copies associated with this backup + item. + :paramtype recovery_point_count: int + :keyword policy_state: State of the backup policy associated with this backup item. + :paramtype policy_state: str + """ + super(AzureSqlProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.policy_state = kwargs.get('policy_state', None) + + +class AzureStorageErrorInfo(msrest.serialization.Model): + """Azure storage specific error information. + + :ivar error_code: Error code. + :vartype error_code: int + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error_code: Error code. + :paramtype error_code: int + :keyword error_string: Localized error string. + :paramtype error_string: str + :keyword recommendations: List of localized recommendations for above error code. + :paramtype recommendations: list[str] + """ + super(AzureStorageErrorInfo, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.error_string = kwargs.get('error_string', None) + self.recommendations = kwargs.get('recommendations', None) + + +class AzureStorageJob(Job): + """Azure storage specific job. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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. + :vartype job_type: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureStorageErrorInfo] + :ivar storage_account_name: Specifies friendly name of the storage account. + :vartype storage_account_name: str + :ivar storage_account_version: Specifies whether the Storage account is a Classic or an Azure + Resource Manager Storage account. + :vartype storage_account_version: str + :ivar extended_info: Additional information about the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureStorageJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[str]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureStorageErrorInfo]'}, + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'storage_account_version': {'key': 'storageAccountVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureStorageJobExtendedInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureStorageErrorInfo] + :keyword storage_account_name: Specifies friendly name of the storage account. + :paramtype storage_account_name: str + :keyword storage_account_version: Specifies whether the Storage account is a Classic or an + Azure Resource Manager Storage account. + :paramtype storage_account_version: str + :keyword extended_info: Additional information about the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureStorageJobExtendedInfo + """ + super(AzureStorageJob, self).__init__(**kwargs) + self.job_type = 'AzureStorageJob' # type: str + self.duration = kwargs.get('duration', None) + self.actions_info = kwargs.get('actions_info', None) + self.error_details = kwargs.get('error_details', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.storage_account_version = kwargs.get('storage_account_version', None) + self.extended_info = kwargs.get('extended_info', None) + + +class AzureStorageJobExtendedInfo(msrest.serialization.Model): + """Azure Storage workload-specific additional information for job. + + :ivar tasks_list: List of tasks for this job. + :vartype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureStorageJobTaskDetails] + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureStorageJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tasks_list: List of tasks for this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureStorageJobTaskDetails] + :keyword property_bag: Job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ + super(AzureStorageJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) + + +class AzureStorageJobTaskDetails(msrest.serialization.Model): + """Azure storage workload specific job task details. + + :ivar task_id: The task display name. + :vartype task_id: str + :ivar status: The status. + :vartype status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword status: The status. + :paramtype status: str + """ + super(AzureStorageJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.status = kwargs.get('status', None) + + +class AzureVmWorkloadProtectedItem(ProtectedItem): + """Azure VM workload-specific protected item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadSAPAseDatabaseProtectedItem, AzureVmWorkloadSAPHanaDatabaseProtectedItem, AzureVmWorkloadSQLDatabaseProtectedItem. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :vartype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last + heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", + "IRPending". + :vartype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + + _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'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_type': {'key': 'parentType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, + 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, + 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, + } + + _subtype_map = { + 'protected_item_type': {'AzureVmWorkloadSAPAseDatabase': 'AzureVmWorkloadSAPAseDatabaseProtectedItem', 'AzureVmWorkloadSAPHanaDatabase': 'AzureVmWorkloadSAPHanaDatabaseProtectedItem', 'AzureVmWorkloadSQLDatabase': 'AzureVmWorkloadSQLDatabaseProtectedItem'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'AzureVmWorkloadProtectedItem' # type: str + self.friendly_name = kwargs.get('friendly_name', None) + self.server_name = kwargs.get('server_name', None) + self.parent_name = kwargs.get('parent_name', None) + self.parent_type = kwargs.get('parent_type', None) + self.protection_status = kwargs.get('protection_status', None) + self.protection_state = kwargs.get('protection_state', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + self.last_backup_time = kwargs.get('last_backup_time', None) + self.last_backup_error_detail = kwargs.get('last_backup_error_detail', None) + self.protected_item_data_source_id = kwargs.get('protected_item_data_source_id', None) + self.protected_item_health_status = kwargs.get('protected_item_health_status', None) + self.extended_info = kwargs.get('extended_info', None) + self.kpis_healths = kwargs.get('kpis_healths', None) + + +class AzureVmWorkloadProtectedItemExtendedInfo(msrest.serialization.Model): + """Additional information on Azure Workload for SQL specific backup item. + + :ivar oldest_recovery_point: The oldest backup copy available for this backup item. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of backup copies available for this backup item. + :vartype recovery_point_count: int + :ivar policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :vartype policy_state: str + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this backup item. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of backup copies available for this backup item. + :paramtype recovery_point_count: int + :keyword policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :paramtype policy_state: str + """ + super(AzureVmWorkloadProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.policy_state = kwargs.get('policy_state', None) + + +class AzureVmWorkloadSAPAseDatabaseProtectedItem(AzureVmWorkloadProtectedItem): + """Azure VM workload-specific protected item representing SAP ASE Database. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :vartype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last + heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", + "IRPending". + :vartype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + + _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'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_type': {'key': 'parentType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, + 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, + 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadSAPAseDatabaseProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'AzureVmWorkloadSAPAseDatabase' # type: str + + +class AzureVmWorkloadSAPHanaDatabaseProtectedItem(AzureVmWorkloadProtectedItem): + """Azure VM workload-specific protected item representing SAP HANA Database. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :vartype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last + heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", + "IRPending". + :vartype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + + _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'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_type': {'key': 'parentType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, + 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, + 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadSAPHanaDatabaseProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'AzureVmWorkloadSAPHanaDatabase' # type: str + + +class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): + """Azure VM workload-specific protected item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :vartype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last + heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", + "IRPending". + :vartype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + + _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'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_type': {'key': 'parentType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, + 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, + 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'AzureVmWorkloadSQLDatabase' # type: str + + +class AzureWorkloadErrorInfo(msrest.serialization.Model): + """Azure storage specific error information. + + :ivar error_code: Error code. + :vartype error_code: int + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar error_title: Title: Typically, the entity that the error pertains to. + :vartype error_title: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] + :ivar additional_details: Additional details for above error code. + :vartype additional_details: str + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'error_title': {'key': 'errorTitle', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + 'additional_details': {'key': 'additionalDetails', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error_code: Error code. + :paramtype error_code: int + :keyword error_string: Localized error string. + :paramtype error_string: str + :keyword error_title: Title: Typically, the entity that the error pertains to. + :paramtype error_title: str + :keyword recommendations: List of localized recommendations for above error code. + :paramtype recommendations: list[str] + :keyword additional_details: Additional details for above error code. + :paramtype additional_details: str + """ + super(AzureWorkloadErrorInfo, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.error_string = kwargs.get('error_string', None) + self.error_title = kwargs.get('error_title', None) + self.recommendations = kwargs.get('recommendations', None) + self.additional_details = kwargs.get('additional_details', None) + + +class AzureWorkloadJob(Job): + """Azure storage specific job. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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. + :vartype job_type: str + :ivar workload_type: Workload type of the job. + :vartype workload_type: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadErrorInfo] + :ivar extended_info: Additional information about the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[str]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureWorkloadErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadJobExtendedInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword workload_type: Workload type of the job. + :paramtype workload_type: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadErrorInfo] + :keyword extended_info: Additional information about the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadJobExtendedInfo + """ + super(AzureWorkloadJob, self).__init__(**kwargs) + self.job_type = 'AzureWorkloadJob' # type: str + self.workload_type = kwargs.get('workload_type', None) + self.duration = kwargs.get('duration', None) + self.actions_info = kwargs.get('actions_info', None) + self.error_details = kwargs.get('error_details', None) + self.extended_info = kwargs.get('extended_info', None) + + +class AzureWorkloadJobExtendedInfo(msrest.serialization.Model): + """Azure VM workload-specific additional information for job. + + :ivar tasks_list: List of tasks for this job. + :vartype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadJobTaskDetails] + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureWorkloadJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tasks_list: List of tasks for this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadJobTaskDetails] + :keyword property_bag: Job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ + super(AzureWorkloadJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) + + +class AzureWorkloadJobTaskDetails(msrest.serialization.Model): + """Azure VM workload specific job task details. + + :ivar task_id: The task display name. + :vartype task_id: str + :ivar status: The status. + :vartype status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword status: The status. + :paramtype status: str + """ + super(AzureWorkloadJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.status = kwargs.get('status', None) + + +class AzureWorkloadRecoveryPoint(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: AzureWorkloadPointInTimeRecoveryPoint, AzureWorkloadSAPHanaRecoveryPoint, AzureWorkloadSQLRecoveryPoint. + + 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. + + :ivar 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. + :vartype 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.crossregionregionrestore.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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': 'AzureWorkloadPointInTimeRecoveryPoint', 'AzureWorkloadSAPHanaRecoveryPoint': 'AzureWorkloadSAPHanaRecoveryPoint', 'AzureWorkloadSQLRecoveryPoint': 'AzureWorkloadSQLRecoveryPoint'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + """ + super(AzureWorkloadRecoveryPoint, 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 AzureWorkloadPointInTimeRecoveryPoint(AzureWorkloadRecoveryPoint): + """Recovery point specific to PointInTime. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSAPHanaPointInTimeRecoveryPoint. + + 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. + + :ivar 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. + :vartype 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.crossregionregionrestore.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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': 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.PointInTimeRange] + """ + super(AzureWorkloadPointInTimeRecoveryPoint, 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. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + is being recovered. + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :vartype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :vartype target_virtual_machine_id: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadPointInTimeRestoreRequest': 'AzureWorkloadPointInTimeRestoreRequest', 'AzureWorkloadSAPHanaRestoreRequest': 'AzureWorkloadSAPHanaRestoreRequest', 'AzureWorkloadSQLRestoreRequest': 'AzureWorkloadSQLRestoreRequest'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + """ + super(AzureWorkloadRestoreRequest, self).__init__(**kwargs) + self.object_type = 'AzureWorkloadRestoreRequest' # type: str + self.recovery_type = kwargs.get('recovery_type', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.property_bag = kwargs.get('property_bag', None) + self.target_info = kwargs.get('target_info', None) + self.recovery_mode = kwargs.get('recovery_mode', None) + self.target_virtual_machine_id = kwargs.get('target_virtual_machine_id', None) + + +class AzureWorkloadPointInTimeRestoreRequest(AzureWorkloadRestoreRequest): + """AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + is being recovered. + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :vartype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :vartype target_virtual_machine_id: str + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + """ + super(AzureWorkloadPointInTimeRestoreRequest, self).__init__(**kwargs) + self.object_type = 'AzureWorkloadPointInTimeRestoreRequest' # type: str + self.point_in_time = kwargs.get('point_in_time', None) + + +class AzureWorkloadSAPHanaPointInTimeRecoveryPoint(AzureWorkloadPointInTimeRecoveryPoint): + """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. + + :ivar 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. + :vartype 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.crossregionregionrestore.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.PointInTimeRange] + """ + super(AzureWorkloadSAPHanaPointInTimeRecoveryPoint, self).__init__(**kwargs) + self.object_type = 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint' # type: str + + +class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): + """AzureWorkload SAP Hana-specific restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSAPHanaPointInTimeRestoreRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + is being recovered. + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :vartype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :vartype target_virtual_machine_id: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSAPHanaPointInTimeRestoreRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreRequest'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + """ + super(AzureWorkloadSAPHanaRestoreRequest, self).__init__(**kwargs) + self.object_type = 'AzureWorkloadSAPHanaRestoreRequest' # type: str + + +class AzureWorkloadSAPHanaPointInTimeRestoreRequest(AzureWorkloadSAPHanaRestoreRequest): + """AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + is being recovered. + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :vartype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :vartype target_virtual_machine_id: str + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + """ + super(AzureWorkloadSAPHanaPointInTimeRestoreRequest, self).__init__(**kwargs) + self.object_type = 'AzureWorkloadSAPHanaPointInTimeRestoreRequest' # type: str + self.point_in_time = kwargs.get('point_in_time', None) + + +class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): + """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. + + :ivar 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. + :vartype 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.crossregionregionrestore.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + """ + super(AzureWorkloadSAPHanaRecoveryPoint, self).__init__(**kwargs) + self.object_type = 'AzureWorkloadSAPHanaRecoveryPoint' # type: str + + +class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): + """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: AzureWorkloadSQLPointInTimeRecoveryPoint. + + 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. + + :ivar 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. + :vartype 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.crossregionregionrestore.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :ivar 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. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadSQLRecoveryPointExtendedInfo + """ + + _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': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRecoveryPoint': 'AzureWorkloadSQLPointInTimeRecoveryPoint'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :keyword 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. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadSQLRecoveryPointExtendedInfo + """ + super(AzureWorkloadSQLRecoveryPoint, self).__init__(**kwargs) + self.object_type = 'AzureWorkloadSQLRecoveryPoint' # type: str + self.extended_info = kwargs.get('extended_info', None) + + +class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): + """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. + + :ivar 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. + :vartype 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.crossregionregionrestore.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :ivar 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. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, + 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :keyword 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. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.PointInTimeRange] + """ + super(AzureWorkloadSQLPointInTimeRecoveryPoint, 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. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLPointInTimeRestoreRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + is being recovered. + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :vartype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :vartype target_virtual_machine_id: str + :ivar should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :vartype should_use_alternate_target_location: bool + :ivar is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :vartype is_non_recoverable: bool + :ivar alternate_directory_paths: Data directory details. + :vartype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryMapping] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRestoreRequest': 'AzureWorkloadSQLPointInTimeRestoreRequest'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :paramtype should_use_alternate_target_location: bool + :keyword is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :paramtype is_non_recoverable: bool + :keyword alternate_directory_paths: Data directory details. + :paramtype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryMapping] + """ + super(AzureWorkloadSQLRestoreRequest, self).__init__(**kwargs) + self.object_type = 'AzureWorkloadSQLRestoreRequest' # type: str + self.should_use_alternate_target_location = kwargs.get('should_use_alternate_target_location', None) + self.is_non_recoverable = kwargs.get('is_non_recoverable', None) + self.alternate_directory_paths = kwargs.get('alternate_directory_paths', None) + + +class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): + """AzureWorkload SQL -specific restore. Specifically for PointInTime/Log restore. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + is being recovered. + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :vartype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :vartype target_virtual_machine_id: str + :ivar should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :vartype should_use_alternate_target_location: bool + :ivar is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :vartype is_non_recoverable: bool + :ivar alternate_directory_paths: Data directory details. + :vartype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryMapping] + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :paramtype should_use_alternate_target_location: bool + :keyword is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :paramtype is_non_recoverable: bool + :keyword alternate_directory_paths: Data directory details. + :paramtype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryMapping] + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + """ + super(AzureWorkloadSQLPointInTimeRestoreRequest, self).__init__(**kwargs) + self.object_type = 'AzureWorkloadSQLPointInTimeRestoreRequest' # type: str + self.point_in_time = kwargs.get('point_in_time', None) + + +class AzureWorkloadSQLRecoveryPointExtendedInfo(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.crossregionregionrestore.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(AzureWorkloadSQLRecoveryPointExtendedInfo, self).__init__(**kwargs) + self.data_directory_time_in_utc = None + self.data_directory_paths = None + + +class BackupManagementUsage(msrest.serialization.Model): + """Backup management usages of a vault. + + :ivar unit: Unit of the usage. Possible values include: "Count", "Bytes", "Seconds", "Percent", + "CountPerSecond", "BytesPerSecond". + :vartype unit: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.UsagesUnit + :ivar quota_period: Quota period of usage. + :vartype quota_period: str + :ivar next_reset_time: Next reset time of usage. + :vartype next_reset_time: ~datetime.datetime + :ivar current_value: Current value of usage. + :vartype current_value: long + :ivar limit: Limit of usage. + :vartype limit: long + :ivar name: Name of usage. + :vartype name: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.NameInfo + """ + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'NameInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword unit: Unit of the usage. Possible values include: "Count", "Bytes", "Seconds", + "Percent", "CountPerSecond", "BytesPerSecond". + :paramtype unit: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.UsagesUnit + :keyword quota_period: Quota period of usage. + :paramtype quota_period: str + :keyword next_reset_time: Next reset time of usage. + :paramtype next_reset_time: ~datetime.datetime + :keyword current_value: Current value of usage. + :paramtype current_value: long + :keyword limit: Limit of usage. + :paramtype limit: long + :keyword name: Name of usage. + :paramtype name: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.NameInfo + """ + super(BackupManagementUsage, self).__init__(**kwargs) + self.unit = kwargs.get('unit', None) + self.quota_period = kwargs.get('quota_period', None) + self.next_reset_time = kwargs.get('next_reset_time', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + + +class BackupManagementUsageList(msrest.serialization.Model): + """Backup management usage for vault. + + :ivar value: The list of backup management usages for the given vault. + :vartype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementUsage] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BackupManagementUsage]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: The list of backup management usages for the given vault. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementUsage] + """ + super(BackupManagementUsageList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class BackupResourceConfig(msrest.serialization.Model): + """The resource storage details. + + :ivar storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :vartype storage_model_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.StorageType + :ivar storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :vartype storage_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.StorageType + :ivar storage_type_state: Locked or Unlocked. Once a machine is registered against a resource, + the storageTypeState is always Locked. Possible values include: "Invalid", "Locked", + "Unlocked". + :vartype storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.StorageTypeState + :ivar cross_region_restore_flag: Opt in details of Cross Region Restore feature. + :vartype cross_region_restore_flag: bool + """ + + _attribute_map = { + 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, + 'cross_region_restore_flag': {'key': 'crossRegionRestoreFlag', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_model_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.StorageType + :keyword storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.StorageType + :keyword storage_type_state: Locked or Unlocked. Once a machine is registered against a + resource, the storageTypeState is always Locked. Possible values include: "Invalid", "Locked", + "Unlocked". + :paramtype storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.StorageTypeState + :keyword cross_region_restore_flag: Opt in details of Cross Region Restore feature. + :paramtype cross_region_restore_flag: bool + """ + super(BackupResourceConfig, self).__init__(**kwargs) + self.storage_model_type = kwargs.get('storage_model_type', None) + self.storage_type = kwargs.get('storage_type', None) + self.storage_type_state = kwargs.get('storage_type_state', None) + self.cross_region_restore_flag = kwargs.get('cross_region_restore_flag', None) + + +class BackupResourceConfigResource(Resource): + """The resource storage details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: BackupResourceConfigResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupResourceConfig + """ + + _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': 'BackupResourceConfig'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: BackupResourceConfigResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupResourceConfig + """ + super(BackupResourceConfigResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class BEKDetails(msrest.serialization.Model): + """BEK is bitlocker encryption key. + + :ivar secret_url: Secret is BEK. + :vartype secret_url: str + :ivar secret_vault_id: ID of the Key Vault where this Secret is stored. + :vartype secret_vault_id: str + :ivar secret_data: BEK data. + :vartype secret_data: str + """ + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'secret_vault_id': {'key': 'secretVaultId', 'type': 'str'}, + 'secret_data': {'key': 'secretData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword secret_url: Secret is BEK. + :paramtype secret_url: str + :keyword secret_vault_id: ID of the Key Vault where this Secret is stored. + :paramtype secret_vault_id: str + :keyword secret_data: BEK data. + :paramtype secret_data: str + """ + super(BEKDetails, self).__init__(**kwargs) + self.secret_url = kwargs.get('secret_url', None) + self.secret_vault_id = kwargs.get('secret_vault_id', None) + self.secret_data = kwargs.get('secret_data', None) + + +class BMSAADPropertiesQueryObject(msrest.serialization.Model): + """Filters to list backup items. + + :ivar backup_management_type: Backup management type for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Backup management type for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + """ + super(BMSAADPropertiesQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_type', None) + + +class BMSBackupSummariesQueryObject(msrest.serialization.Model): + """Query parameters to fetch backup summaries. + + :ivar type: Backup management type for this container. Possible values include: "Invalid", + "BackupProtectedItemCountSummary", "BackupProtectionContainerCountSummary". + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.Type + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword type: Backup management type for this container. Possible values include: "Invalid", + "BackupProtectedItemCountSummary", "BackupProtectionContainerCountSummary". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.Type + """ + super(BMSBackupSummariesQueryObject, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + + +class BMSRPQueryObject(msrest.serialization.Model): + """Filters to list backup copies. + + :ivar start_date: Backup copies created after this time. + :vartype start_date: ~datetime.datetime + :ivar end_date: Backup copies created before this time. + :vartype end_date: ~datetime.datetime + :ivar restore_point_query_type: RestorePoint type. Possible values include: "Invalid", "Full", + "Log", "Differential", "FullAndDifferential", "All", "Incremental". + :vartype restore_point_query_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestorePointQueryType + :ivar extended_info: In Get Recovery Point, it tells whether extended information about + recovery point is asked. + :vartype extended_info: bool + :ivar move_ready_rp_only: Whether the RP can be moved to another tier. + :vartype move_ready_rp_only: bool + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'restore_point_query_type': {'key': 'restorePointQueryType', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'bool'}, + 'move_ready_rp_only': {'key': 'moveReadyRPOnly', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword start_date: Backup copies created after this time. + :paramtype start_date: ~datetime.datetime + :keyword end_date: Backup copies created before this time. + :paramtype end_date: ~datetime.datetime + :keyword restore_point_query_type: RestorePoint type. Possible values include: "Invalid", + "Full", "Log", "Differential", "FullAndDifferential", "All", "Incremental". + :paramtype restore_point_query_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestorePointQueryType + :keyword extended_info: In Get Recovery Point, it tells whether extended information about + recovery point is asked. + :paramtype extended_info: bool + :keyword move_ready_rp_only: Whether the RP can be moved to another tier. + :paramtype move_ready_rp_only: bool + """ + super(BMSRPQueryObject, self).__init__(**kwargs) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + self.restore_point_query_type = kwargs.get('restore_point_query_type', None) + self.extended_info = kwargs.get('extended_info', None) + self.move_ready_rp_only = kwargs.get('move_ready_rp_only', None) + + +class ClientScriptForConnect(msrest.serialization.Model): + """Client script details for file / folder restore. + + :ivar script_content: File content of the client script for file / folder restore. + :vartype script_content: str + :ivar script_extension: File extension of the client script for file / folder restore - .ps1 , + .sh , etc. + :vartype script_extension: str + :ivar os_type: OS type - Windows, Linux etc. for which this file / folder restore client script + works. + :vartype os_type: str + :ivar url: URL of Executable from where to source the content. If this is not null then + ScriptContent should not be used. + :vartype url: str + :ivar script_name_suffix: Mandatory suffix that should be added to the name of script that is + given for download to user. + If its null or empty then , ignore it. + :vartype script_name_suffix: str + """ + + _attribute_map = { + 'script_content': {'key': 'scriptContent', 'type': 'str'}, + 'script_extension': {'key': 'scriptExtension', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'script_name_suffix': {'key': 'scriptNameSuffix', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword script_content: File content of the client script for file / folder restore. + :paramtype script_content: str + :keyword script_extension: File extension of the client script for file / folder restore - .ps1 + , .sh , etc. + :paramtype script_extension: str + :keyword os_type: OS type - Windows, Linux etc. for which this file / folder restore client + script works. + :paramtype os_type: str + :keyword url: URL of Executable from where to source the content. If this is not null then + ScriptContent should not be used. + :paramtype url: str + :keyword script_name_suffix: Mandatory suffix that should be added to the name of script that + is given for download to user. + If its null or empty then , ignore it. + :paramtype script_name_suffix: str + """ + super(ClientScriptForConnect, self).__init__(**kwargs) + self.script_content = kwargs.get('script_content', None) + self.script_extension = kwargs.get('script_extension', None) + self.os_type = kwargs.get('os_type', None) + self.url = kwargs.get('url', None) + self.script_name_suffix = kwargs.get('script_name_suffix', None) + + +class CrossRegionRestoreRequest(msrest.serialization.Model): + """CrossRegionRestoreRequest. + + :ivar cross_region_restore_access_details: Access details for cross region restore. + :vartype cross_region_restore_access_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrrAccessToken + :ivar restore_request: Request object for triggering restore. + :vartype restore_request: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestoreRequest + """ + + _attribute_map = { + 'cross_region_restore_access_details': {'key': 'crossRegionRestoreAccessDetails', 'type': 'CrrAccessToken'}, + 'restore_request': {'key': 'restoreRequest', 'type': 'RestoreRequest'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword cross_region_restore_access_details: Access details for cross region restore. + :paramtype cross_region_restore_access_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrrAccessToken + :keyword restore_request: Request object for triggering restore. + :paramtype restore_request: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestoreRequest + """ + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: CrossRegionRestoreRequestResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: CrossRegionRestoreRequestResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrossRegionRestoreRequest + """ + 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. + + :ivar object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :vartype object_type: str + :ivar access_token_string: Access token used for authentication. + :vartype access_token_string: str + :ivar subscription_id: Subscription Id of the source vault. + :vartype subscription_id: str + :ivar resource_group_name: Resource Group name of the source vault. + :vartype resource_group_name: str + :ivar resource_name: Resource Name of the source vault. + :vartype resource_name: str + :ivar resource_id: Resource Id of the source vault. + :vartype resource_id: str + :ivar protection_container_id: Protected item container id. + :vartype protection_container_id: long + :ivar recovery_point_id: Recovery Point Id. + :vartype recovery_point_id: str + :ivar recovery_point_time: Recovery Point Time. + :vartype recovery_point_time: str + :ivar container_name: Container Unique name. + :vartype container_name: str + :ivar container_type: Container Type. + :vartype container_type: str + :ivar backup_management_type: Backup Management Type. + :vartype backup_management_type: str + :ivar datasource_type: Datasource Type. + :vartype datasource_type: str + :ivar datasource_name: Datasource Friendly Name. + :vartype datasource_name: str + :ivar datasource_id: Datasource Id. + :vartype datasource_id: str + :ivar datasource_container_name: Datasource Container Unique Name. + :vartype datasource_container_name: str + :ivar coordinator_service_stamp_id: CoordinatorServiceStampId to be used by BCM in restore + call. + :vartype coordinator_service_stamp_id: str + :ivar coordinator_service_stamp_uri: CoordinatorServiceStampUri to be used by BCM in restore + call. + :vartype coordinator_service_stamp_uri: str + :ivar protection_service_stamp_id: ProtectionServiceStampId to be used by BCM in restore call. + :vartype protection_service_stamp_id: str + :ivar protection_service_stamp_uri: ProtectionServiceStampUri to be used by BCM in restore + call. + :vartype protection_service_stamp_uri: str + :ivar token_extended_information: Extended Information about the token like FileSpec etc. + :vartype token_extended_information: str + :ivar rp_tier_information: Recovery point Tier Information. + :vartype rp_tier_information: dict[str, str] + :ivar rp_original_sa_option: Recovery point information: Original SA option. + :vartype rp_original_sa_option: bool + :ivar rp_is_managed_virtual_machine: Recovery point information: Managed virtual machine. + :vartype rp_is_managed_virtual_machine: bool + :ivar rp_vm_size_description: Recovery point information: VM size description. + :vartype rp_vm_size_description: str + :ivar b_ms_active_region: Active region name of BMS Stamp. + :vartype 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 + ): + """ + :keyword access_token_string: Access token used for authentication. + :paramtype access_token_string: str + :keyword subscription_id: Subscription Id of the source vault. + :paramtype subscription_id: str + :keyword resource_group_name: Resource Group name of the source vault. + :paramtype resource_group_name: str + :keyword resource_name: Resource Name of the source vault. + :paramtype resource_name: str + :keyword resource_id: Resource Id of the source vault. + :paramtype resource_id: str + :keyword protection_container_id: Protected item container id. + :paramtype protection_container_id: long + :keyword recovery_point_id: Recovery Point Id. + :paramtype recovery_point_id: str + :keyword recovery_point_time: Recovery Point Time. + :paramtype recovery_point_time: str + :keyword container_name: Container Unique name. + :paramtype container_name: str + :keyword container_type: Container Type. + :paramtype container_type: str + :keyword backup_management_type: Backup Management Type. + :paramtype backup_management_type: str + :keyword datasource_type: Datasource Type. + :paramtype datasource_type: str + :keyword datasource_name: Datasource Friendly Name. + :paramtype datasource_name: str + :keyword datasource_id: Datasource Id. + :paramtype datasource_id: str + :keyword datasource_container_name: Datasource Container Unique Name. + :paramtype datasource_container_name: str + :keyword coordinator_service_stamp_id: CoordinatorServiceStampId to be used by BCM in restore + call. + :paramtype coordinator_service_stamp_id: str + :keyword coordinator_service_stamp_uri: CoordinatorServiceStampUri to be used by BCM in restore + call. + :paramtype coordinator_service_stamp_uri: str + :keyword protection_service_stamp_id: ProtectionServiceStampId to be used by BCM in restore + call. + :paramtype protection_service_stamp_id: str + :keyword protection_service_stamp_uri: ProtectionServiceStampUri to be used by BCM in restore + call. + :paramtype protection_service_stamp_uri: str + :keyword token_extended_information: Extended Information about the token like FileSpec etc. + :paramtype token_extended_information: str + :keyword rp_tier_information: Recovery point Tier Information. + :paramtype rp_tier_information: dict[str, str] + :keyword rp_original_sa_option: Recovery point information: Original SA option. + :paramtype rp_original_sa_option: bool + :keyword rp_is_managed_virtual_machine: Recovery point information: Managed virtual machine. + :paramtype rp_is_managed_virtual_machine: bool + :keyword rp_vm_size_description: Recovery point information: VM size description. + :paramtype rp_vm_size_description: str + :keyword b_ms_active_region: Active region name of BMS Stamp. + :paramtype b_ms_active_region: str + """ + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: CrrAccessTokenResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: CrrAccessTokenResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrrAccessToken + """ + super(CrrAccessTokenResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class CrrJobRequest(msrest.serialization.Model): + """Request object for fetching CRR jobs. + + :ivar resource_id: Entire ARM resource id of the resource. + :vartype resource_id: str + :ivar job_name: Job Name of the job to be fetched. + :vartype job_name: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'job_name': {'key': 'jobName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword resource_id: Entire ARM resource id of the resource. + :paramtype resource_id: str + :keyword job_name: Job Name of the job to be fetched. + :paramtype job_name: str + """ + super(CrrJobRequest, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.job_name = kwargs.get('job_name', None) + + +class CrrJobRequestResource(Resource): + """Request object for fetching CRR jobs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: CrrJobRequestResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrrJobRequest + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CrrJobRequest'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: CrrJobRequestResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrrJobRequest + """ + super(CrrJobRequestResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class DiskExclusionProperties(msrest.serialization.Model): + """DiskExclusionProperties. + + :ivar disk_lun_list: List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + :vartype disk_lun_list: list[int] + :ivar is_inclusion_list: Flag to indicate whether DiskLunList is to be included/ excluded from + backup. + :vartype is_inclusion_list: bool + """ + + _attribute_map = { + 'disk_lun_list': {'key': 'diskLunList', 'type': '[int]'}, + 'is_inclusion_list': {'key': 'isInclusionList', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword disk_lun_list: List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + :paramtype disk_lun_list: list[int] + :keyword is_inclusion_list: Flag to indicate whether DiskLunList is to be included/ excluded + from backup. + :paramtype is_inclusion_list: bool + """ + super(DiskExclusionProperties, self).__init__(**kwargs) + self.disk_lun_list = kwargs.get('disk_lun_list', None) + self.is_inclusion_list = kwargs.get('is_inclusion_list', None) + + +class DiskInformation(msrest.serialization.Model): + """Disk information. + + :ivar lun: + :vartype lun: int + :ivar name: + :vartype name: str + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword lun: + :paramtype lun: int + :keyword name: + :paramtype name: str + """ + super(DiskInformation, self).__init__(**kwargs) + self.lun = kwargs.get('lun', None) + self.name = kwargs.get('name', None) + + +class DpmErrorInfo(msrest.serialization.Model): + """DPM workload-specific error information. + + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] + """ + + _attribute_map = { + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error_string: Localized error string. + :paramtype error_string: str + :keyword recommendations: List of localized recommendations for above error code. + :paramtype recommendations: list[str] + """ + super(DpmErrorInfo, self).__init__(**kwargs) + self.error_string = kwargs.get('error_string', None) + self.recommendations = kwargs.get('recommendations', None) + + +class DpmJob(Job): + """DPM workload-specific job object. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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. + :vartype job_type: str + :ivar duration: Time elapsed for job. + :vartype duration: ~datetime.timedelta + :ivar dpm_server_name: DPM server name managing the backup item or backup job. + :vartype dpm_server_name: str + :ivar container_name: Name of cluster/server protecting current backup item, if any. + :vartype container_name: str + :ivar container_type: Type of container. + :vartype container_type: str + :ivar workload_type: Type of backup item. + :vartype workload_type: str + :ivar actions_info: The state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :ivar error_details: The errors. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DpmErrorInfo] + :ivar extended_info: Additional information for this job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DpmJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'dpm_server_name': {'key': 'dpmServerName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[str]'}, + 'error_details': {'key': 'errorDetails', 'type': '[DpmErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DpmJobExtendedInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time elapsed for job. + :paramtype duration: ~datetime.timedelta + :keyword dpm_server_name: DPM server name managing the backup item or backup job. + :paramtype dpm_server_name: str + :keyword container_name: Name of cluster/server protecting current backup item, if any. + :paramtype container_name: str + :keyword container_type: Type of container. + :paramtype container_type: str + :keyword workload_type: Type of backup item. + :paramtype workload_type: str + :keyword actions_info: The state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :keyword error_details: The errors. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DpmErrorInfo] + :keyword extended_info: Additional information for this job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DpmJobExtendedInfo + """ + super(DpmJob, self).__init__(**kwargs) + self.job_type = 'DpmJob' # type: str + self.duration = kwargs.get('duration', None) + self.dpm_server_name = kwargs.get('dpm_server_name', None) + self.container_name = kwargs.get('container_name', None) + self.container_type = kwargs.get('container_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.actions_info = kwargs.get('actions_info', None) + self.error_details = kwargs.get('error_details', None) + self.extended_info = kwargs.get('extended_info', None) + + +class DpmJobExtendedInfo(msrest.serialization.Model): + """Additional information on the DPM workload-specific job. + + :ivar tasks_list: List of tasks associated with this job. + :vartype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DpmJobTaskDetails] + :ivar property_bag: The job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[DpmJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tasks_list: List of tasks associated with this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DpmJobTaskDetails] + :keyword property_bag: The job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ + super(DpmJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) + + +class DpmJobTaskDetails(msrest.serialization.Model): + """DPM workload-specific job task details. + + :ivar task_id: The task display name. + :vartype task_id: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar duration: Time elapsed for task. + :vartype duration: ~datetime.timedelta + :ivar status: The status. + :vartype status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword duration: Time elapsed for task. + :paramtype duration: ~datetime.timedelta + :keyword status: The status. + :paramtype status: str + """ + super(DpmJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.duration = kwargs.get('duration', None) + self.status = kwargs.get('status', None) + + +class DPMProtectedItem(ProtectedItem): + """Additional information on Backup engine specific backup item. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the managed item. + :vartype friendly_name: str + :ivar backup_engine_name: Backup Management server protecting this backup item. + :vartype backup_engine_name: str + :ivar protection_state: Protection state of the backup engine. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemState + :ivar extended_info: Extended info of the backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DPMProtectedItemExtendedInfo + """ + + _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'}, + 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DPMProtectedItemExtendedInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the managed item. + :paramtype friendly_name: str + :keyword backup_engine_name: Backup Management server protecting this backup item. + :paramtype backup_engine_name: str + :keyword protection_state: Protection state of the backup engine. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemState + :keyword extended_info: Extended info of the backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DPMProtectedItemExtendedInfo + """ + super(DPMProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'DPMProtectedItem' # type: str + self.friendly_name = kwargs.get('friendly_name', None) + self.backup_engine_name = kwargs.get('backup_engine_name', None) + self.protection_state = kwargs.get('protection_state', None) + self.extended_info = kwargs.get('extended_info', None) + + +class DPMProtectedItemExtendedInfo(msrest.serialization.Model): + """Additional information of DPM Protected item. + + :ivar protectable_object_load_path: Attribute to provide information on various DBs. + :vartype protectable_object_load_path: dict[str, str] + :ivar protected: To check if backup item is disk protected. + :vartype protected: bool + :ivar is_present_on_cloud: To check if backup item is cloud protected. + :vartype is_present_on_cloud: bool + :ivar last_backup_status: Last backup status information on backup item. + :vartype last_backup_status: str + :ivar last_refreshed_at: Last refresh time on backup item. + :vartype last_refreshed_at: ~datetime.datetime + :ivar oldest_recovery_point: Oldest cloud recovery point time. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: cloud recovery point count. + :vartype recovery_point_count: int + :ivar on_premise_oldest_recovery_point: Oldest disk recovery point time. + :vartype on_premise_oldest_recovery_point: ~datetime.datetime + :ivar on_premise_latest_recovery_point: latest disk recovery point time. + :vartype on_premise_latest_recovery_point: ~datetime.datetime + :ivar on_premise_recovery_point_count: disk recovery point count. + :vartype on_premise_recovery_point_count: int + :ivar is_collocated: To check if backup item is collocated. + :vartype is_collocated: bool + :ivar protection_group_name: Protection group name of the backup item. + :vartype protection_group_name: str + :ivar disk_storage_used_in_bytes: Used Disk storage in bytes. + :vartype disk_storage_used_in_bytes: str + :ivar total_disk_storage_size_in_bytes: total Disk storage in bytes. + :vartype total_disk_storage_size_in_bytes: str + """ + + _attribute_map = { + 'protectable_object_load_path': {'key': 'protectableObjectLoadPath', 'type': '{str}'}, + 'protected': {'key': 'protected', 'type': 'bool'}, + 'is_present_on_cloud': {'key': 'isPresentOnCloud', 'type': 'bool'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'on_premise_oldest_recovery_point': {'key': 'onPremiseOldestRecoveryPoint', 'type': 'iso-8601'}, + 'on_premise_latest_recovery_point': {'key': 'onPremiseLatestRecoveryPoint', 'type': 'iso-8601'}, + 'on_premise_recovery_point_count': {'key': 'onPremiseRecoveryPointCount', 'type': 'int'}, + 'is_collocated': {'key': 'isCollocated', 'type': 'bool'}, + 'protection_group_name': {'key': 'protectionGroupName', 'type': 'str'}, + 'disk_storage_used_in_bytes': {'key': 'diskStorageUsedInBytes', 'type': 'str'}, + 'total_disk_storage_size_in_bytes': {'key': 'totalDiskStorageSizeInBytes', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword protectable_object_load_path: Attribute to provide information on various DBs. + :paramtype protectable_object_load_path: dict[str, str] + :keyword protected: To check if backup item is disk protected. + :paramtype protected: bool + :keyword is_present_on_cloud: To check if backup item is cloud protected. + :paramtype is_present_on_cloud: bool + :keyword last_backup_status: Last backup status information on backup item. + :paramtype last_backup_status: str + :keyword last_refreshed_at: Last refresh time on backup item. + :paramtype last_refreshed_at: ~datetime.datetime + :keyword oldest_recovery_point: Oldest cloud recovery point time. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: cloud recovery point count. + :paramtype recovery_point_count: int + :keyword on_premise_oldest_recovery_point: Oldest disk recovery point time. + :paramtype on_premise_oldest_recovery_point: ~datetime.datetime + :keyword on_premise_latest_recovery_point: latest disk recovery point time. + :paramtype on_premise_latest_recovery_point: ~datetime.datetime + :keyword on_premise_recovery_point_count: disk recovery point count. + :paramtype on_premise_recovery_point_count: int + :keyword is_collocated: To check if backup item is collocated. + :paramtype is_collocated: bool + :keyword protection_group_name: Protection group name of the backup item. + :paramtype protection_group_name: str + :keyword disk_storage_used_in_bytes: Used Disk storage in bytes. + :paramtype disk_storage_used_in_bytes: str + :keyword total_disk_storage_size_in_bytes: total Disk storage in bytes. + :paramtype total_disk_storage_size_in_bytes: str + """ + super(DPMProtectedItemExtendedInfo, self).__init__(**kwargs) + self.protectable_object_load_path = kwargs.get('protectable_object_load_path', None) + self.protected = kwargs.get('protected', None) + self.is_present_on_cloud = kwargs.get('is_present_on_cloud', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + self.last_refreshed_at = kwargs.get('last_refreshed_at', None) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + self.on_premise_oldest_recovery_point = kwargs.get('on_premise_oldest_recovery_point', None) + self.on_premise_latest_recovery_point = kwargs.get('on_premise_latest_recovery_point', None) + self.on_premise_recovery_point_count = kwargs.get('on_premise_recovery_point_count', None) + self.is_collocated = kwargs.get('is_collocated', None) + self.protection_group_name = kwargs.get('protection_group_name', None) + self.disk_storage_used_in_bytes = kwargs.get('disk_storage_used_in_bytes', None) + self.total_disk_storage_size_in_bytes = kwargs.get('total_disk_storage_size_in_bytes', None) + + +class EncryptionDetails(msrest.serialization.Model): + """Details needed if the VM was encrypted at the time of backup. + + :ivar encryption_enabled: Identifies whether this backup copy represents an encrypted VM at the + time of backup. + :vartype encryption_enabled: bool + :ivar kek_url: Key Url. + :vartype kek_url: str + :ivar secret_key_url: Secret Url. + :vartype secret_key_url: str + :ivar kek_vault_id: ID of Key Vault where KEK is stored. + :vartype kek_vault_id: str + :ivar secret_key_vault_id: ID of Key Vault where Secret is stored. + :vartype secret_key_vault_id: str + """ + + _attribute_map = { + 'encryption_enabled': {'key': 'encryptionEnabled', 'type': 'bool'}, + 'kek_url': {'key': 'kekUrl', 'type': 'str'}, + 'secret_key_url': {'key': 'secretKeyUrl', 'type': 'str'}, + 'kek_vault_id': {'key': 'kekVaultId', 'type': 'str'}, + 'secret_key_vault_id': {'key': 'secretKeyVaultId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword encryption_enabled: Identifies whether this backup copy represents an encrypted VM at + the time of backup. + :paramtype encryption_enabled: bool + :keyword kek_url: Key Url. + :paramtype kek_url: str + :keyword secret_key_url: Secret Url. + :paramtype secret_key_url: str + :keyword kek_vault_id: ID of Key Vault where KEK is stored. + :paramtype kek_vault_id: str + :keyword secret_key_vault_id: ID of Key Vault where Secret is stored. + :paramtype secret_key_vault_id: str + """ + super(EncryptionDetails, self).__init__(**kwargs) + self.encryption_enabled = kwargs.get('encryption_enabled', None) + self.kek_url = kwargs.get('kek_url', None) + self.secret_key_url = kwargs.get('secret_key_url', None) + self.kek_vault_id = kwargs.get('kek_vault_id', None) + self.secret_key_vault_id = kwargs.get('secret_key_vault_id', None) + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """Error Detail class which encapsulates Code, Message and Recommendations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error Message related to the Code. + :vartype message: str + :ivar recommendations: List of recommendation strings. + :vartype recommendations: list[str] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'recommendations': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.recommendations = None + + +class ExtendedProperties(msrest.serialization.Model): + """Extended Properties for Azure IaasVM Backup. + + :ivar disk_exclusion_properties: Extended Properties for Disk Exclusion. + :vartype disk_exclusion_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DiskExclusionProperties + """ + + _attribute_map = { + 'disk_exclusion_properties': {'key': 'diskExclusionProperties', 'type': 'DiskExclusionProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword disk_exclusion_properties: Extended Properties for Disk Exclusion. + :paramtype disk_exclusion_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DiskExclusionProperties + """ + super(ExtendedProperties, self).__init__(**kwargs) + self.disk_exclusion_properties = kwargs.get('disk_exclusion_properties', None) + + +class GenericProtectedItem(ProtectedItem): + """Base class for backup items. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :vartype policy_state: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar protected_item_id: Data Plane Service ID of the protected item. + :vartype protected_item_id: long + :ivar source_associations: Loosely coupled (type, value) associations (example - parent of a + protected item). + :vartype source_associations: dict[str, str] + :ivar fabric_name: Name of this backup item's fabric. + :vartype fabric_name: str + """ + + _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'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protected_item_id': {'key': 'protectedItemId', 'type': 'long'}, + 'source_associations': {'key': 'sourceAssociations', 'type': '{str}'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :paramtype policy_state: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword protected_item_id: Data Plane Service ID of the protected item. + :paramtype protected_item_id: long + :keyword source_associations: Loosely coupled (type, value) associations (example - parent of a + protected item). + :paramtype source_associations: dict[str, str] + :keyword fabric_name: Name of this backup item's fabric. + :paramtype fabric_name: str + """ + super(GenericProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'GenericProtectedItem' # type: str + self.friendly_name = kwargs.get('friendly_name', None) + self.policy_state = kwargs.get('policy_state', None) + self.protection_state = kwargs.get('protection_state', None) + self.protected_item_id = kwargs.get('protected_item_id', None) + self.source_associations = kwargs.get('source_associations', None) + self.fabric_name = kwargs.get('fabric_name', None) + + +class GenericRecoveryPoint(RecoveryPoint): + """Generic backup copy. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar friendly_name: Friendly name of the backup copy. + :vartype friendly_name: 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 + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', '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'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword friendly_name: Friendly name of the backup copy. + :paramtype friendly_name: str + :keyword recovery_point_type: Type of the backup copy. + :paramtype recovery_point_type: str + :keyword recovery_point_time: Time at which this backup copy was created. + :paramtype recovery_point_time: ~datetime.datetime + :keyword recovery_point_additional_info: Additional information associated with this backup + copy. + :paramtype recovery_point_additional_info: str + """ + super(GenericRecoveryPoint, self).__init__(**kwargs) + self.object_type = 'GenericRecoveryPoint' # type: str + self.friendly_name = kwargs.get('friendly_name', None) + 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) + + +class IaasVMRecoveryPoint(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. + + :ivar 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. + :vartype 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 + :ivar key_and_secret: Required details for recovering an encrypted VM. Applicable only when + IsSourceVMEncrypted is true. + :vartype key_and_secret: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KeyAndSecretDetails + :ivar is_instant_ilr_session_active: Is the session to recover items from this backup copy + still active. + :vartype is_instant_ilr_session_active: bool + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :ivar is_managed_virtual_machine: Whether VM is with Managed Disks. + :vartype is_managed_virtual_machine: bool + :ivar virtual_machine_size: Virtual Machine Size. + :vartype virtual_machine_size: str + :ivar original_storage_account_option: Original Storage Account Option. + :vartype original_storage_account_option: bool + :ivar os_type: OS type. + :vartype os_type: str + :ivar recovery_point_disk_configuration: Disk configuration. + :vartype recovery_point_disk_configuration: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointDiskConfiguration + :ivar zones: Identifies the zone of the VM at the time of backup. Applicable only for + zone-pinned Vms. + :vartype zones: list[str] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword key_and_secret: Required details for recovering an encrypted VM. Applicable only when + IsSourceVMEncrypted is true. + :paramtype key_and_secret: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KeyAndSecretDetails + :keyword is_instant_ilr_session_active: Is the session to recover items from this backup copy + still active. + :paramtype is_instant_ilr_session_active: bool + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :keyword is_managed_virtual_machine: Whether VM is with Managed Disks. + :paramtype is_managed_virtual_machine: bool + :keyword virtual_machine_size: Virtual Machine Size. + :paramtype virtual_machine_size: str + :keyword original_storage_account_option: Original Storage Account Option. + :paramtype original_storage_account_option: bool + :keyword os_type: OS type. + :paramtype os_type: str + :keyword recovery_point_disk_configuration: Disk configuration. + :paramtype recovery_point_disk_configuration: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointDiskConfiguration + :keyword zones: Identifies the zone of the VM at the time of backup. Applicable only for + zone-pinned Vms. + :paramtype zones: list[str] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + """ + super(IaasVMRecoveryPoint, 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. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_point_id: ID of the backup copy to be recovered. + :vartype recovery_point_id: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM which is being recovered. + :vartype source_resource_id: str + :ivar 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}. + :vartype target_virtual_machine_id: str + :ivar 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}. + :vartype target_resource_group_id: str + :ivar storage_account_id: Fully qualified ARM ID of the storage account to which the VM has to + be restored. + :vartype storage_account_id: str + :ivar 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. + :vartype virtual_network_id: str + :ivar 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. + :vartype subnet_id: str + :ivar 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. + :vartype target_domain_name_id: str + :ivar region: Region in which the virtual machine is restored. + :vartype region: str + :ivar affinity_group: Affinity group associated to VM to be restored. Used only for Classic + Compute Virtual Machines. + :vartype affinity_group: str + :ivar 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. + :vartype create_new_cloud_service: bool + :ivar original_storage_account_option: Original Storage Account Option. + :vartype original_storage_account_option: bool + :ivar encryption_details: Details needed if the VM was encrypted at the time of backup. + :vartype encryption_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.EncryptionDetails + :ivar restore_disk_lun_list: List of Disk LUNs for partial restore. + :vartype restore_disk_lun_list: list[int] + :ivar restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored + with Managed disks. + :vartype restore_with_managed_disks: bool + :ivar disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be encrypted + at rest during restore with customer managed key. + :vartype disk_encryption_set_id: str + :ivar zones: Target zone where the VM and its disks should be restored. + :vartype zones: list[str] + :ivar identity_info: Managed Identity information required to access customer storage account. + :vartype identity_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.IdentityInfo + :ivar identity_based_restore_details: IaaS VM workload specific restore details for restores + using managed identity. + :vartype identity_based_restore_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.IdentityBasedRestoreDetails + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, + 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, + 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, + 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, + 'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'}, + 'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'}, + 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'}, + 'identity_based_restore_details': {'key': 'identityBasedRestoreDetails', 'type': 'IdentityBasedRestoreDetails'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_point_id: ID of the backup copy to be recovered. + :paramtype recovery_point_id: str + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM which is being recovered. + :paramtype source_resource_id: str + :keyword 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}. + :paramtype target_virtual_machine_id: str + :keyword 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}. + :paramtype target_resource_group_id: str + :keyword storage_account_id: Fully qualified ARM ID of the storage account to which the VM has + to be restored. + :paramtype storage_account_id: str + :keyword 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. + :paramtype virtual_network_id: str + :keyword 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. + :paramtype subnet_id: str + :keyword 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. + :paramtype target_domain_name_id: str + :keyword region: Region in which the virtual machine is restored. + :paramtype region: str + :keyword affinity_group: Affinity group associated to VM to be restored. Used only for Classic + Compute Virtual Machines. + :paramtype affinity_group: str + :keyword 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. + :paramtype create_new_cloud_service: bool + :keyword original_storage_account_option: Original Storage Account Option. + :paramtype original_storage_account_option: bool + :keyword encryption_details: Details needed if the VM was encrypted at the time of backup. + :paramtype encryption_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.EncryptionDetails + :keyword restore_disk_lun_list: List of Disk LUNs for partial restore. + :paramtype restore_disk_lun_list: list[int] + :keyword restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored + with Managed disks. + :paramtype restore_with_managed_disks: bool + :keyword disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be + encrypted at rest during restore with customer managed key. + :paramtype disk_encryption_set_id: str + :keyword zones: Target zone where the VM and its disks should be restored. + :paramtype zones: list[str] + :keyword identity_info: Managed Identity information required to access customer storage + account. + :paramtype identity_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.IdentityInfo + :keyword identity_based_restore_details: IaaS VM workload specific restore details for restores + using managed identity. + :paramtype identity_based_restore_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.IdentityBasedRestoreDetails + """ + 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) + 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.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 IdentityBasedRestoreDetails(msrest.serialization.Model): + """IaaS VM workload specific restore details for restores using managed identity. + + :ivar object_type: Gets the class type. + :vartype object_type: str + :ivar target_storage_account_id: Fully qualified ARM ID of the target storage account. + :vartype 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 + ): + """ + :keyword object_type: Gets the class type. + :paramtype object_type: str + :keyword target_storage_account_id: Fully qualified ARM ID of the target storage account. + :paramtype target_storage_account_id: str + """ + 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. + + :ivar is_system_assigned_identity: To differentiate if the managed identity is system assigned + or user assigned. + :vartype is_system_assigned_identity: bool + :ivar managed_identity_resource_id: Managed Identity Resource Id + Optional: Might not be required in the case of system assigned managed identity. + :vartype managed_identity_resource_id: str + """ + + _attribute_map = { + 'is_system_assigned_identity': {'key': 'isSystemAssignedIdentity', 'type': 'bool'}, + 'managed_identity_resource_id': {'key': 'managedIdentityResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword is_system_assigned_identity: To differentiate if the managed identity is system + assigned or user assigned. + :paramtype is_system_assigned_identity: bool + :keyword managed_identity_resource_id: Managed Identity Resource Id + Optional: Might not be required in the case of system assigned managed identity. + :paramtype managed_identity_resource_id: str + """ + super(IdentityInfo, self).__init__(**kwargs) + self.is_system_assigned_identity = kwargs.get('is_system_assigned_identity', None) + self.managed_identity_resource_id = kwargs.get('managed_identity_resource_id', None) + + +class InstantItemRecoveryTarget(msrest.serialization.Model): + """Target details for file / folder restore. + + :ivar client_scripts: List of client scripts. + :vartype client_scripts: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ClientScriptForConnect] + """ + + _attribute_map = { + 'client_scripts': {'key': 'clientScripts', 'type': '[ClientScriptForConnect]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword client_scripts: List of client scripts. + :paramtype client_scripts: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ClientScriptForConnect] + """ + super(InstantItemRecoveryTarget, self).__init__(**kwargs) + self.client_scripts = kwargs.get('client_scripts', None) + + +class JobQueryObject(msrest.serialization.Model): + """Filters to list the jobs. + + :ivar status: Status of the job. Possible values include: "Invalid", "InProgress", "Completed", + "Failed", "CompletedWithWarnings", "Cancelled", "Cancelling". + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobStatus + :ivar backup_management_type: Type of backup management for the job. Possible values include: + "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", + "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar operation: Type of operation. Possible values include: "Invalid", "Register", + "UnRegister", "ConfigureBackup", "Backup", "Restore", "DisableBackup", "DeleteBackupData", + "CrossRegionRestore", "Undelete", "UpdateCustomerManagedKey". + :vartype operation: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobOperationType + :ivar job_id: JobID represents the job uniquely. + :vartype job_id: str + :ivar start_time: Job has started at this time. Value is in UTC. + :vartype start_time: ~datetime.datetime + :ivar end_time: Job has ended at this time. Value is in UTC. + :vartype end_time: ~datetime.datetime + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword status: Status of the job. Possible values include: "Invalid", "InProgress", + "Completed", "Failed", "CompletedWithWarnings", "Cancelled", "Cancelling". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobStatus + :keyword backup_management_type: Type of backup management for the job. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword operation: Type of operation. Possible values include: "Invalid", "Register", + "UnRegister", "ConfigureBackup", "Backup", "Restore", "DisableBackup", "DeleteBackupData", + "CrossRegionRestore", "Undelete", "UpdateCustomerManagedKey". + :paramtype operation: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobOperationType + :keyword job_id: JobID represents the job uniquely. + :paramtype job_id: str + :keyword start_time: Job has started at this time. Value is in UTC. + :paramtype start_time: ~datetime.datetime + :keyword end_time: Job has ended at this time. Value is in UTC. + :paramtype end_time: ~datetime.datetime + """ + super(JobQueryObject, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.operation = kwargs.get('operation', None) + self.job_id = kwargs.get('job_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + + +class JobResource(Resource): + """Defines workload agnostic properties for a job. + + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: JobResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.Job + """ + + _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': 'Job'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: JobResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.Job + """ + super(JobResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ResourceList(msrest.serialization.Model): + """Base for all lists of resources. + + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + """ + super(ResourceList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + + +class JobResourceList(ResourceList): + """List of Job resources. + + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[JobResource]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobResource] + """ + super(JobResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class KEKDetails(msrest.serialization.Model): + """KEK is encryption key for BEK. + + :ivar key_url: Key is KEK. + :vartype key_url: str + :ivar key_vault_id: Key Vault ID where this Key is stored. + :vartype key_vault_id: str + :ivar key_backup_data: KEK data. + :vartype key_backup_data: str + """ + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + 'key_backup_data': {'key': 'keyBackupData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword key_url: Key is KEK. + :paramtype key_url: str + :keyword key_vault_id: Key Vault ID where this Key is stored. + :paramtype key_vault_id: str + :keyword key_backup_data: KEK data. + :paramtype key_backup_data: str + """ + super(KEKDetails, self).__init__(**kwargs) + self.key_url = kwargs.get('key_url', None) + self.key_vault_id = kwargs.get('key_vault_id', None) + self.key_backup_data = kwargs.get('key_backup_data', None) + + +class KeyAndSecretDetails(msrest.serialization.Model): + """BEK is bitlocker key. +KEK is encryption key for BEK +If the VM was encrypted then we will store following details : + + +#. Secret(BEK) - Url + Backup Data + vaultId. +#. Key(KEK) - Url + Backup Data + vaultId. +#. EncryptionMechanism + BEK and KEK can potentially have different vault ids. + + :ivar kek_details: KEK is encryption key for BEK. + :vartype kek_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KEKDetails + :ivar bek_details: BEK is bitlocker encryption key. + :vartype bek_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BEKDetails + :ivar encryption_mechanism: Encryption mechanism: None/ SinglePass/ DoublePass. + :vartype encryption_mechanism: str + """ + + _attribute_map = { + 'kek_details': {'key': 'kekDetails', 'type': 'KEKDetails'}, + 'bek_details': {'key': 'bekDetails', 'type': 'BEKDetails'}, + 'encryption_mechanism': {'key': 'encryptionMechanism', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword kek_details: KEK is encryption key for BEK. + :paramtype kek_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KEKDetails + :keyword bek_details: BEK is bitlocker encryption key. + :paramtype bek_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BEKDetails + :keyword encryption_mechanism: Encryption mechanism: None/ SinglePass/ DoublePass. + :paramtype encryption_mechanism: str + """ + super(KeyAndSecretDetails, self).__init__(**kwargs) + self.kek_details = kwargs.get('kek_details', None) + self.bek_details = kwargs.get('bek_details', None) + self.encryption_mechanism = kwargs.get('encryption_mechanism', None) + + +class KPIResourceHealthDetails(msrest.serialization.Model): + """KPI Resource Health Details. + + :ivar resource_health_status: Resource Health Status. Possible values include: "Healthy", + "TransientDegraded", "PersistentDegraded", "TransientUnhealthy", "PersistentUnhealthy", + "Invalid". + :vartype resource_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ResourceHealthStatus + :ivar resource_health_details: Resource Health Status. + :vartype resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ResourceHealthDetails] + """ + + _attribute_map = { + 'resource_health_status': {'key': 'resourceHealthStatus', 'type': 'str'}, + 'resource_health_details': {'key': 'resourceHealthDetails', 'type': '[ResourceHealthDetails]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword resource_health_status: Resource Health Status. Possible values include: "Healthy", + "TransientDegraded", "PersistentDegraded", "TransientUnhealthy", "PersistentUnhealthy", + "Invalid". + :paramtype resource_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ResourceHealthStatus + :keyword resource_health_details: Resource Health Status. + :paramtype resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ResourceHealthDetails] + """ + super(KPIResourceHealthDetails, self).__init__(**kwargs) + self.resource_health_status = kwargs.get('resource_health_status', None) + self.resource_health_details = kwargs.get('resource_health_details', None) + + +class MabErrorInfo(msrest.serialization.Model): + """MAB workload-specific error information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar recommendations: List of localized recommendations. + :vartype recommendations: list[str] + """ + + _validation = { + 'error_string': {'readonly': True}, + 'recommendations': {'readonly': True}, + } + + _attribute_map = { + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(MabErrorInfo, self).__init__(**kwargs) + self.error_string = None + self.recommendations = None + + +class MabFileFolderProtectedItem(ProtectedItem): + """MAB workload-specific backup item. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of this backup item. + :vartype friendly_name: str + :ivar computer_name: Name of the computer associated with this backup item. + :vartype computer_name: str + :ivar last_backup_status: Status of last backup operation. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protection_state: Protected, ProtectionStopped, IRPending or ProtectionError. + :vartype protection_state: str + :ivar deferred_delete_sync_time_in_utc: Sync time for deferred deletion in UTC. + :vartype deferred_delete_sync_time_in_utc: long + :ivar extended_info: Additional information with this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabFileFolderProtectedItemExtendedInfo + """ + + _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'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'deferred_delete_sync_time_in_utc': {'key': 'deferredDeleteSyncTimeInUTC', 'type': 'long'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'MabFileFolderProtectedItemExtendedInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of this backup item. + :paramtype friendly_name: str + :keyword computer_name: Name of the computer associated with this backup item. + :paramtype computer_name: str + :keyword last_backup_status: Status of last backup operation. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protection_state: Protected, ProtectionStopped, IRPending or ProtectionError. + :paramtype protection_state: str + :keyword deferred_delete_sync_time_in_utc: Sync time for deferred deletion in UTC. + :paramtype deferred_delete_sync_time_in_utc: long + :keyword extended_info: Additional information with this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabFileFolderProtectedItemExtendedInfo + """ + super(MabFileFolderProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'MabFileFolderProtectedItem' # type: str + self.friendly_name = kwargs.get('friendly_name', None) + self.computer_name = kwargs.get('computer_name', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + self.last_backup_time = kwargs.get('last_backup_time', None) + self.protection_state = kwargs.get('protection_state', None) + self.deferred_delete_sync_time_in_utc = kwargs.get('deferred_delete_sync_time_in_utc', None) + self.extended_info = kwargs.get('extended_info', None) + + +class MabFileFolderProtectedItemExtendedInfo(msrest.serialization.Model): + """Additional information on the backed up item. + + :ivar last_refreshed_at: Last time when the agent data synced to service. + :vartype last_refreshed_at: ~datetime.datetime + :ivar oldest_recovery_point: The oldest backup copy available. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of backup copies associated with the backup item. + :vartype recovery_point_count: int + """ + + _attribute_map = { + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword last_refreshed_at: Last time when the agent data synced to service. + :paramtype last_refreshed_at: ~datetime.datetime + :keyword oldest_recovery_point: The oldest backup copy available. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of backup copies associated with the backup item. + :paramtype recovery_point_count: int + """ + super(MabFileFolderProtectedItemExtendedInfo, self).__init__(**kwargs) + self.last_refreshed_at = kwargs.get('last_refreshed_at', None) + self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) + self.recovery_point_count = kwargs.get('recovery_point_count', None) + + +class MabJob(Job): + """MAB workload-specific job. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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. + :vartype job_type: str + :ivar duration: Time taken by job to run. + :vartype duration: ~datetime.timedelta + :ivar actions_info: The state/actions applicable on jobs like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :ivar mab_server_name: Name of server protecting the DS. + :vartype mab_server_name: str + :ivar mab_server_type: Server type of MAB container. Possible values include: "Invalid", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype mab_server_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabServerType + :ivar workload_type: Workload type of backup item. Possible values include: "Invalid", "VM", + "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", + "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", + "SAPAseDatabase". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.WorkloadType + :ivar error_details: The errors. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabErrorInfo] + :ivar extended_info: Additional information on the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[str]'}, + 'mab_server_name': {'key': 'mabServerName', 'type': 'str'}, + 'mab_server_type': {'key': 'mabServerType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'error_details': {'key': 'errorDetails', 'type': '[MabErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'MabJobExtendedInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time taken by job to run. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: The state/actions applicable on jobs like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :keyword mab_server_name: Name of server protecting the DS. + :paramtype mab_server_name: str + :keyword mab_server_type: Server type of MAB container. Possible values include: "Invalid", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :paramtype mab_server_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabServerType + :keyword workload_type: Workload type of backup item. Possible values include: "Invalid", "VM", + "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", + "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", + "SAPAseDatabase". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.WorkloadType + :keyword error_details: The errors. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabErrorInfo] + :keyword extended_info: Additional information on the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabJobExtendedInfo + """ + super(MabJob, self).__init__(**kwargs) + self.job_type = 'MabJob' # type: str + self.duration = kwargs.get('duration', None) + self.actions_info = kwargs.get('actions_info', None) + self.mab_server_name = kwargs.get('mab_server_name', None) + self.mab_server_type = kwargs.get('mab_server_type', None) + self.workload_type = kwargs.get('workload_type', None) + self.error_details = kwargs.get('error_details', None) + self.extended_info = kwargs.get('extended_info', None) + + +class MabJobExtendedInfo(msrest.serialization.Model): + """Additional information for the MAB workload-specific job. + + :ivar tasks_list: List of tasks for this job. + :vartype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabJobTaskDetails] + :ivar property_bag: The job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message specific to this job. + :vartype dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[MabJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tasks_list: List of tasks for this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabJobTaskDetails] + :keyword property_bag: The job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message specific to this job. + :paramtype dynamic_error_message: str + """ + super(MabJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = kwargs.get('tasks_list', None) + self.property_bag = kwargs.get('property_bag', None) + self.dynamic_error_message = kwargs.get('dynamic_error_message', None) + + +class MabJobTaskDetails(msrest.serialization.Model): + """MAB workload-specific job task details. + + :ivar task_id: The task display name. + :vartype task_id: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar duration: Time elapsed for task. + :vartype duration: ~datetime.timedelta + :ivar status: The status. + :vartype status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword duration: Time elapsed for task. + :paramtype duration: ~datetime.timedelta + :keyword status: The status. + :paramtype status: str + """ + super(MabJobTaskDetails, self).__init__(**kwargs) + self.task_id = kwargs.get('task_id', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.duration = kwargs.get('duration', None) + self.status = kwargs.get('status', None) + + +class NameInfo(msrest.serialization.Model): + """The name of usage. + + :ivar value: Value of usage. + :vartype value: str + :ivar localized_value: Localized value of usage. + :vartype localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: Value of usage. + :paramtype value: str + :keyword localized_value: Localized value of usage. + :paramtype localized_value: str + """ + super(NameInfo, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class NewErrorResponse(msrest.serialization.Model): + """The resource management error response. + + :ivar error: The error object. + :vartype error: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.NewErrorResponseError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'NewErrorResponseError'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error: The error object. + :paramtype error: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.NewErrorResponseError + """ + super(NewErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class NewErrorResponseError(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.crossregionregionrestore.models.NewErrorResponse] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[NewErrorResponse]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NewErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class OperationStatus(msrest.serialization.Model): + """Operation status. + + :ivar id: ID of the operation. + :vartype id: str + :ivar name: Name of the operation. + :vartype name: str + :ivar status: Operation status. Possible values include: "Invalid", "InProgress", "Succeeded", + "Failed", "Canceled". + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OperationStatusValues + :ivar start_time: Operation start time. Format: ISO-8601. + :vartype start_time: ~datetime.datetime + :ivar end_time: Operation end time. Format: ISO-8601. + :vartype end_time: ~datetime.datetime + :ivar error: Error information related to this operation. + :vartype error: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OperationStatusError + :ivar properties: Additional information associated with this operation. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OperationStatusExtendedInfo + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'OperationStatusError'}, + 'properties': {'key': 'properties', 'type': 'OperationStatusExtendedInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: ID of the operation. + :paramtype id: str + :keyword name: Name of the operation. + :paramtype name: str + :keyword status: Operation status. Possible values include: "Invalid", "InProgress", + "Succeeded", "Failed", "Canceled". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OperationStatusValues + :keyword start_time: Operation start time. Format: ISO-8601. + :paramtype start_time: ~datetime.datetime + :keyword end_time: Operation end time. Format: ISO-8601. + :paramtype end_time: ~datetime.datetime + :keyword error: Error information related to this operation. + :paramtype error: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OperationStatusError + :keyword properties: Additional information associated with this operation. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OperationStatusExtendedInfo + """ + super(OperationStatus, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.status = kwargs.get('status', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.error = kwargs.get('error', None) + self.properties = kwargs.get('properties', None) + + +class OperationStatusError(msrest.serialization.Model): + """Error information associated with operation status call. + + :ivar code: Error code of the operation failure. + :vartype code: str + :ivar message: Error message displayed if the operation failure. + :vartype message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code: Error code of the operation failure. + :paramtype code: str + :keyword message: Error message displayed if the operation failure. + :paramtype message: str + """ + super(OperationStatusError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +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. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'OperationStatusJobExtendedInfo': 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo': 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo': 'OperationStatusProvisionILRExtendedInfo', 'OperationStatusRecoveryPointExtendedInfo': 'OperationStatusRecoveryPointExtendedInfo'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(OperationStatusExtendedInfo, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class OperationStatusJobExtendedInfo(OperationStatusExtendedInfo): + """Operation status job extended info. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar job_id: ID of the job created for this protected item. + :vartype job_id: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword job_id: ID of the job created for this protected item. + :paramtype job_id: str + """ + super(OperationStatusJobExtendedInfo, self).__init__(**kwargs) + self.object_type = 'OperationStatusJobExtendedInfo' # type: str + self.job_id = kwargs.get('job_id', None) + + +class OperationStatusJobsExtendedInfo(OperationStatusExtendedInfo): + """Operation status extended info for list of jobs. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar job_ids: IDs of the jobs created for the protected item. + :vartype job_ids: list[str] + :ivar failed_jobs_error: Stores all the failed jobs along with the corresponding error codes. + :vartype failed_jobs_error: dict[str, str] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_ids': {'key': 'jobIds', 'type': '[str]'}, + 'failed_jobs_error': {'key': 'failedJobsError', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword job_ids: IDs of the jobs created for the protected item. + :paramtype job_ids: list[str] + :keyword failed_jobs_error: Stores all the failed jobs along with the corresponding error + codes. + :paramtype failed_jobs_error: dict[str, str] + """ + super(OperationStatusJobsExtendedInfo, self).__init__(**kwargs) + self.object_type = 'OperationStatusJobsExtendedInfo' # type: str + self.job_ids = kwargs.get('job_ids', None) + self.failed_jobs_error = kwargs.get('failed_jobs_error', None) + + +class OperationStatusProvisionILRExtendedInfo(OperationStatusExtendedInfo): + """Operation status extended info for ILR provision action. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_target: Target details for file / folder restore. + :vartype recovery_target: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.InstantItemRecoveryTarget + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_target': {'key': 'recoveryTarget', 'type': 'InstantItemRecoveryTarget'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_target: Target details for file / folder restore. + :paramtype recovery_target: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.InstantItemRecoveryTarget + """ + super(OperationStatusProvisionILRExtendedInfo, self).__init__(**kwargs) + self.object_type = 'OperationStatusProvisionILRExtendedInfo' # type: str + 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. + + :ivar 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. + :vartype object_type: str + :ivar updated_recovery_point: Recovery Point info with updated source snapshot URI. + :vartype updated_recovery_point: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPoint + :ivar deleted_backup_item_version: In case the share is in soft-deleted state, populate this + field with deleted backup item. + :vartype 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 + ): + """ + :keyword updated_recovery_point: Recovery Point info with updated source snapshot URI. + :paramtype updated_recovery_point: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPoint + :keyword deleted_backup_item_version: In case the share is in soft-deleted state, populate this + field with deleted backup item. + :paramtype deleted_backup_item_version: str + """ + 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. + + :ivar start_time: Start time of the time range for log recovery. + :vartype start_time: ~datetime.datetime + :ivar end_time: End time of the time range for log recovery. + :vartype end_time: ~datetime.datetime + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword start_time: Start time of the time range for log recovery. + :paramtype start_time: ~datetime.datetime + :keyword end_time: End time of the time range for log recovery. + :paramtype end_time: ~datetime.datetime + """ + super(PointInTimeRange, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + + +class ProtectedItemQueryObject(msrest.serialization.Model): + """Filters to list backup items. + + :ivar health_state: Health State for the backed up item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :vartype health_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthState + :ivar backup_management_type: Backup management type for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar item_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". + :vartype item_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar policy_name: Backup policy name associated with the backup item. + :vartype policy_name: str + :ivar container_name: Name of the container. + :vartype container_name: str + :ivar backup_engine_name: Backup Engine name. + :vartype backup_engine_name: str + :ivar friendly_name: Friendly name of protected item. + :vartype friendly_name: str + :ivar fabric_name: Name of the fabric. + :vartype fabric_name: str + :ivar backup_set_name: Name of the backup set. + :vartype backup_set_name: str + """ + + _attribute_map = { + 'health_state': {'key': 'healthState', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'item_type': {'key': 'itemType', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword health_state: Health State for the backed up item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthState + :keyword backup_management_type: Backup management type for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword item_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". + :paramtype item_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword policy_name: Backup policy name associated with the backup item. + :paramtype policy_name: str + :keyword container_name: Name of the container. + :paramtype container_name: str + :keyword backup_engine_name: Backup Engine name. + :paramtype backup_engine_name: str + :keyword friendly_name: Friendly name of protected item. + :paramtype friendly_name: str + :keyword fabric_name: Name of the fabric. + :paramtype fabric_name: str + :keyword backup_set_name: Name of the backup set. + :paramtype backup_set_name: str + """ + super(ProtectedItemQueryObject, self).__init__(**kwargs) + self.health_state = kwargs.get('health_state', None) + self.backup_management_type = kwargs.get('backup_management_type', None) + self.item_type = kwargs.get('item_type', None) + self.policy_name = kwargs.get('policy_name', None) + self.container_name = kwargs.get('container_name', None) + self.backup_engine_name = kwargs.get('backup_engine_name', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.fabric_name = kwargs.get('fabric_name', None) + self.backup_set_name = kwargs.get('backup_set_name', None) + + +class ProtectedItemResource(Resource): + """Base class for backup items. + + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ProtectedItemResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItem + """ + + _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': 'ProtectedItem'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ProtectedItemResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItem + """ + super(ProtectedItemResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ProtectedItemResourceList(ResourceList): + """List of ProtectedItem resources. + + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ProtectedItemResource]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemResource] + """ + super(ProtectedItemResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class RecoveryPointDiskConfiguration(msrest.serialization.Model): + """Disk configuration. + + :ivar number_of_disks_included_in_backup: Number of disks included in backup. + :vartype number_of_disks_included_in_backup: int + :ivar number_of_disks_attached_to_vm: Number of disks attached to the VM. + :vartype number_of_disks_attached_to_vm: int + :ivar included_disk_list: Information of disks included in backup. + :vartype included_disk_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DiskInformation] + :ivar excluded_disk_list: Information of disks excluded from backup. + :vartype excluded_disk_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DiskInformation] + """ + + _attribute_map = { + 'number_of_disks_included_in_backup': {'key': 'numberOfDisksIncludedInBackup', 'type': 'int'}, + 'number_of_disks_attached_to_vm': {'key': 'numberOfDisksAttachedToVm', 'type': 'int'}, + 'included_disk_list': {'key': 'includedDiskList', 'type': '[DiskInformation]'}, + 'excluded_disk_list': {'key': 'excludedDiskList', 'type': '[DiskInformation]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword number_of_disks_included_in_backup: Number of disks included in backup. + :paramtype number_of_disks_included_in_backup: int + :keyword number_of_disks_attached_to_vm: Number of disks attached to the VM. + :paramtype number_of_disks_attached_to_vm: int + :keyword included_disk_list: Information of disks included in backup. + :paramtype included_disk_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DiskInformation] + :keyword excluded_disk_list: Information of disks excluded from backup. + :paramtype excluded_disk_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DiskInformation] + """ + super(RecoveryPointDiskConfiguration, self).__init__(**kwargs) + self.number_of_disks_included_in_backup = kwargs.get('number_of_disks_included_in_backup', None) + self.number_of_disks_attached_to_vm = kwargs.get('number_of_disks_attached_to_vm', None) + self.included_disk_list = kwargs.get('included_disk_list', None) + self.excluded_disk_list = kwargs.get('excluded_disk_list', None) + + +class RecoveryPointMoveReadinessInfo(msrest.serialization.Model): + """RecoveryPointMoveReadinessInfo. + + :ivar is_ready_for_move: + :vartype is_ready_for_move: bool + :ivar additional_info: + :vartype additional_info: str + """ + + _attribute_map = { + 'is_ready_for_move': {'key': 'isReadyForMove', 'type': 'bool'}, + 'additional_info': {'key': 'additionalInfo', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword is_ready_for_move: + :paramtype is_ready_for_move: bool + :keyword additional_info: + :paramtype additional_info: str + """ + super(RecoveryPointMoveReadinessInfo, self).__init__(**kwargs) + self.is_ready_for_move = kwargs.get('is_ready_for_move', None) + self.additional_info = kwargs.get('additional_info', None) + + +class RecoveryPointResource(Resource): + """Base class for backup copies. Workload-specific backup copies are derived from this class. + + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: RecoveryPointResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPoint + """ + + _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': 'RecoveryPoint'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: RecoveryPointResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPoint + """ + super(RecoveryPointResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class RecoveryPointResourceList(ResourceList): + """List of RecoveryPoint resources. + + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[RecoveryPointResource]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointResource] + """ + super(RecoveryPointResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class RecoveryPointTierInformation(msrest.serialization.Model): + """Recovery point tier information. + + :ivar type: Recovery point tier type. Possible values include: "Invalid", "InstantRP", + "HardenedRP", "ArchivedRP". + :vartype type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierType + :ivar status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierStatus + :ivar extended_info: Recovery point tier status. + :vartype extended_info: dict[str, str] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword type: Recovery point tier type. Possible values include: "Invalid", "InstantRP", + "HardenedRP", "ArchivedRP". + :paramtype type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierType + :keyword status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierStatus + :keyword extended_info: Recovery point tier status. + :paramtype extended_info: dict[str, str] + """ + super(RecoveryPointTierInformation, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.status = kwargs.get('status', None) + self.extended_info = kwargs.get('extended_info', None) + + +class RestoreFileSpecs(msrest.serialization.Model): + """Restore file specs like file path, type and target folder path info. + + :ivar path: Source File/Folder path. + :vartype path: str + :ivar file_spec_type: Indicates what the Path variable stands for. + :vartype file_spec_type: str + :ivar target_folder_path: Destination folder path in target FileShare. + :vartype target_folder_path: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'file_spec_type': {'key': 'fileSpecType', 'type': 'str'}, + 'target_folder_path': {'key': 'targetFolderPath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword path: Source File/Folder path. + :paramtype path: str + :keyword file_spec_type: Indicates what the Path variable stands for. + :paramtype file_spec_type: str + :keyword target_folder_path: Destination folder path in target FileShare. + :paramtype target_folder_path: str + """ + super(RestoreFileSpecs, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.file_spec_type = kwargs.get('file_spec_type', None) + self.target_folder_path = kwargs.get('target_folder_path', None) + + +class SQLDataDirectory(msrest.serialization.Model): + """SQLDataDirectory info. + + :ivar type: Type of data directory mapping. Possible values include: "Invalid", "Data", "Log". + :vartype type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryType + :ivar path: File path. + :vartype path: str + :ivar logical_name: Logical name of the file. + :vartype logical_name: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'logical_name': {'key': 'logicalName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword type: Type of data directory mapping. Possible values include: "Invalid", "Data", + "Log". + :paramtype type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryType + :keyword path: File path. + :paramtype path: str + :keyword logical_name: Logical name of the file. + :paramtype logical_name: str + """ + super(SQLDataDirectory, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.path = kwargs.get('path', None) + self.logical_name = kwargs.get('logical_name', None) + + +class SQLDataDirectoryMapping(msrest.serialization.Model): + """Encapsulates information regarding data directory. + + :ivar mapping_type: Type of data directory mapping. Possible values include: "Invalid", "Data", + "Log". + :vartype mapping_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryType + :ivar source_logical_name: Restore source logical name path. + :vartype source_logical_name: str + :ivar source_path: Restore source path. + :vartype source_path: str + :ivar target_path: Target path. + :vartype target_path: str + """ + + _attribute_map = { + 'mapping_type': {'key': 'mappingType', 'type': 'str'}, + 'source_logical_name': {'key': 'sourceLogicalName', 'type': 'str'}, + 'source_path': {'key': 'sourcePath', 'type': 'str'}, + 'target_path': {'key': 'targetPath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mapping_type: Type of data directory mapping. Possible values include: "Invalid", + "Data", "Log". + :paramtype mapping_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryType + :keyword source_logical_name: Restore source logical name path. + :paramtype source_logical_name: str + :keyword source_path: Restore source path. + :paramtype source_path: str + :keyword target_path: Target path. + :paramtype target_path: str + """ + super(SQLDataDirectoryMapping, self).__init__(**kwargs) + self.mapping_type = kwargs.get('mapping_type', None) + self.source_logical_name = kwargs.get('source_logical_name', None) + self.source_path = kwargs.get('source_path', None) + self.target_path = kwargs.get('target_path', None) + + +class TargetAFSRestoreInfo(msrest.serialization.Model): + """Target Azure File Share Info. + + :ivar name: File share name. + :vartype name: str + :ivar target_resource_id: Target file share resource ARM ID. + :vartype target_resource_id: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: File share name. + :paramtype name: str + :keyword target_resource_id: Target file share resource ARM ID. + :paramtype target_resource_id: str + """ + super(TargetAFSRestoreInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + + +class TargetRestoreInfo(msrest.serialization.Model): + """Details about target workload during restore operation. + + :ivar overwrite_option: Can Overwrite if Target DataBase already exists. Possible values + include: "Invalid", "FailOnConflict", "Overwrite". + :vartype overwrite_option: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OverwriteOptions + :ivar container_id: Resource Id name of the container in which Target DataBase resides. + :vartype container_id: str + :ivar database_name: Database name InstanceName/DataBaseName for SQL or System/DbName for SAP + Hana. + :vartype database_name: str + :ivar target_directory_for_file_restore: Target directory location for restore as files. + :vartype target_directory_for_file_restore: str + """ + + _attribute_map = { + 'overwrite_option': {'key': 'overwriteOption', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'target_directory_for_file_restore': {'key': 'targetDirectoryForFileRestore', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword overwrite_option: Can Overwrite if Target DataBase already exists. Possible values + include: "Invalid", "FailOnConflict", "Overwrite". + :paramtype overwrite_option: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OverwriteOptions + :keyword container_id: Resource Id name of the container in which Target DataBase resides. + :paramtype container_id: str + :keyword database_name: Database name InstanceName/DataBaseName for SQL or System/DbName for + SAP Hana. + :paramtype database_name: str + :keyword target_directory_for_file_restore: Target directory location for restore as files. + :paramtype target_directory_for_file_restore: str + """ + super(TargetRestoreInfo, self).__init__(**kwargs) + self.overwrite_option = kwargs.get('overwrite_option', None) + self.container_id = kwargs.get('container_id', None) + self.database_name = kwargs.get('database_name', None) + self.target_directory_for_file_restore = kwargs.get('target_directory_for_file_restore', None) + + +class WorkloadCrrAccessToken(CrrAccessToken): + """WorkloadCrrAccessToken. + + All required parameters must be populated in order to send to Azure. + + :ivar object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :vartype object_type: str + :ivar access_token_string: Access token used for authentication. + :vartype access_token_string: str + :ivar subscription_id: Subscription Id of the source vault. + :vartype subscription_id: str + :ivar resource_group_name: Resource Group name of the source vault. + :vartype resource_group_name: str + :ivar resource_name: Resource Name of the source vault. + :vartype resource_name: str + :ivar resource_id: Resource Id of the source vault. + :vartype resource_id: str + :ivar protection_container_id: Protected item container id. + :vartype protection_container_id: long + :ivar recovery_point_id: Recovery Point Id. + :vartype recovery_point_id: str + :ivar recovery_point_time: Recovery Point Time. + :vartype recovery_point_time: str + :ivar container_name: Container Unique name. + :vartype container_name: str + :ivar container_type: Container Type. + :vartype container_type: str + :ivar backup_management_type: Backup Management Type. + :vartype backup_management_type: str + :ivar datasource_type: Datasource Type. + :vartype datasource_type: str + :ivar datasource_name: Datasource Friendly Name. + :vartype datasource_name: str + :ivar datasource_id: Datasource Id. + :vartype datasource_id: str + :ivar datasource_container_name: Datasource Container Unique Name. + :vartype datasource_container_name: str + :ivar coordinator_service_stamp_id: CoordinatorServiceStampId to be used by BCM in restore + call. + :vartype coordinator_service_stamp_id: str + :ivar coordinator_service_stamp_uri: CoordinatorServiceStampUri to be used by BCM in restore + call. + :vartype coordinator_service_stamp_uri: str + :ivar protection_service_stamp_id: ProtectionServiceStampId to be used by BCM in restore call. + :vartype protection_service_stamp_id: str + :ivar protection_service_stamp_uri: ProtectionServiceStampUri to be used by BCM in restore + call. + :vartype protection_service_stamp_uri: str + :ivar token_extended_information: Extended Information about the token like FileSpec etc. + :vartype token_extended_information: str + :ivar rp_tier_information: Recovery point Tier Information. + :vartype rp_tier_information: dict[str, str] + :ivar rp_original_sa_option: Recovery point information: Original SA option. + :vartype rp_original_sa_option: bool + :ivar rp_is_managed_virtual_machine: Recovery point information: Managed virtual machine. + :vartype rp_is_managed_virtual_machine: bool + :ivar rp_vm_size_description: Recovery point information: VM size description. + :vartype rp_vm_size_description: str + :ivar b_ms_active_region: Active region name of BMS Stamp. + :vartype b_ms_active_region: str + :ivar protectable_object_unique_name: + :vartype protectable_object_unique_name: str + :ivar protectable_object_friendly_name: + :vartype protectable_object_friendly_name: str + :ivar protectable_object_workload_type: + :vartype protectable_object_workload_type: str + :ivar protectable_object_protection_state: + :vartype protectable_object_protection_state: str + :ivar protectable_object_container_host_os_name: + :vartype protectable_object_container_host_os_name: str + :ivar protectable_object_parent_logical_container_name: + :vartype protectable_object_parent_logical_container_name: str + :ivar container_id: Container Id. + :vartype container_id: str + :ivar policy_name: Policy Name. + :vartype policy_name: str + :ivar policy_id: Policy Id. + :vartype 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 + ): + """ + :keyword access_token_string: Access token used for authentication. + :paramtype access_token_string: str + :keyword subscription_id: Subscription Id of the source vault. + :paramtype subscription_id: str + :keyword resource_group_name: Resource Group name of the source vault. + :paramtype resource_group_name: str + :keyword resource_name: Resource Name of the source vault. + :paramtype resource_name: str + :keyword resource_id: Resource Id of the source vault. + :paramtype resource_id: str + :keyword protection_container_id: Protected item container id. + :paramtype protection_container_id: long + :keyword recovery_point_id: Recovery Point Id. + :paramtype recovery_point_id: str + :keyword recovery_point_time: Recovery Point Time. + :paramtype recovery_point_time: str + :keyword container_name: Container Unique name. + :paramtype container_name: str + :keyword container_type: Container Type. + :paramtype container_type: str + :keyword backup_management_type: Backup Management Type. + :paramtype backup_management_type: str + :keyword datasource_type: Datasource Type. + :paramtype datasource_type: str + :keyword datasource_name: Datasource Friendly Name. + :paramtype datasource_name: str + :keyword datasource_id: Datasource Id. + :paramtype datasource_id: str + :keyword datasource_container_name: Datasource Container Unique Name. + :paramtype datasource_container_name: str + :keyword coordinator_service_stamp_id: CoordinatorServiceStampId to be used by BCM in restore + call. + :paramtype coordinator_service_stamp_id: str + :keyword coordinator_service_stamp_uri: CoordinatorServiceStampUri to be used by BCM in restore + call. + :paramtype coordinator_service_stamp_uri: str + :keyword protection_service_stamp_id: ProtectionServiceStampId to be used by BCM in restore + call. + :paramtype protection_service_stamp_id: str + :keyword protection_service_stamp_uri: ProtectionServiceStampUri to be used by BCM in restore + call. + :paramtype protection_service_stamp_uri: str + :keyword token_extended_information: Extended Information about the token like FileSpec etc. + :paramtype token_extended_information: str + :keyword rp_tier_information: Recovery point Tier Information. + :paramtype rp_tier_information: dict[str, str] + :keyword rp_original_sa_option: Recovery point information: Original SA option. + :paramtype rp_original_sa_option: bool + :keyword rp_is_managed_virtual_machine: Recovery point information: Managed virtual machine. + :paramtype rp_is_managed_virtual_machine: bool + :keyword rp_vm_size_description: Recovery point information: VM size description. + :paramtype rp_vm_size_description: str + :keyword b_ms_active_region: Active region name of BMS Stamp. + :paramtype b_ms_active_region: str + :keyword protectable_object_unique_name: + :paramtype protectable_object_unique_name: str + :keyword protectable_object_friendly_name: + :paramtype protectable_object_friendly_name: str + :keyword protectable_object_workload_type: + :paramtype protectable_object_workload_type: str + :keyword protectable_object_protection_state: + :paramtype protectable_object_protection_state: str + :keyword protectable_object_container_host_os_name: + :paramtype protectable_object_container_host_os_name: str + :keyword protectable_object_parent_logical_container_name: + :paramtype protectable_object_parent_logical_container_name: str + :keyword container_id: Container Id. + :paramtype container_id: str + :keyword policy_name: Policy Name. + :paramtype policy_name: str + :keyword policy_id: Policy Id. + :paramtype policy_id: str + """ + 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) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/models/_models_py3.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/models/_models_py3.py new file mode 100644 index 000000000000..2c1dc1db42e7 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/models/_models_py3.py @@ -0,0 +1,9385 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._cross_region_region_restore_client_enums import * + + +class AADProperties(msrest.serialization.Model): + """AADProperties. + + :ivar service_principal_client_id: + :vartype service_principal_client_id: str + :ivar tenant_id: + :vartype tenant_id: str + :ivar authority: + :vartype authority: str + :ivar audience: + :vartype audience: str + :ivar service_principal_object_id: + :vartype 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 + ): + """ + :keyword service_principal_client_id: + :paramtype service_principal_client_id: str + :keyword tenant_id: + :paramtype tenant_id: str + :keyword authority: + :paramtype authority: str + :keyword audience: + :paramtype audience: str + :keyword service_principal_object_id: + :paramtype service_principal_object_id: str + """ + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype 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 + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + """ + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: AADPropertiesResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: AADPropertiesResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AADProperties + """ + super(AADPropertiesResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +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: AzureFileshareProtectedItem, AzureIaaSVMProtectedItem, AzureVmWorkloadProtectedItem, DPMProtectedItem, GenericProtectedItem, MabFileFolderProtectedItem, AzureSqlProtectedItem. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + """ + + _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]'}, + } + + _subtype_map = { + 'protected_item_type': {'AzureFileShareProtectedItem': 'AzureFileshareProtectedItem', 'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'AzureVmWorkloadProtectedItem': 'AzureVmWorkloadProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'GenericProtectedItem': 'GenericProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem'} + } + + 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, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + """ + super(ProtectedItem, self).__init__(**kwargs) + self.protected_item_type = None # type: Optional[str] + self.backup_management_type = backup_management_type + self.workload_type = workload_type + self.container_name = container_name + self.source_resource_id = source_resource_id + self.policy_id = policy_id + self.last_recovery_point = last_recovery_point + self.backup_set_name = backup_set_name + self.create_mode = create_mode + self.deferred_delete_time_in_utc = deferred_delete_time_in_utc + self.is_scheduled_for_deferred_delete = is_scheduled_for_deferred_delete + self.deferred_delete_time_remaining = deferred_delete_time_remaining + self.is_deferred_delete_schedule_upcoming = is_deferred_delete_schedule_upcoming + self.is_rehydrate = is_rehydrate + self.resource_guard_operation_requests = resource_guard_operation_requests + + +class AzureFileshareProtectedItem(ProtectedItem): + """Azure File Share workload-specific backup item. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the fileshare represented by this backup item. + :vartype friendly_name: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar health_status: backups running status for this backup item. Possible values include: + "Passed", "ActionRequired", "ActionSuggested", "Invalid". + :vartype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :ivar extended_info: Additional information with this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the fileshare represented by this backup item. + :paramtype friendly_name: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword health_status: backups running status for this backup item. Possible values include: + "Passed", "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :keyword extended_info: Additional information with this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureFileshareProtectedItemExtendedInfo + """ + super(AzureFileshareProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, 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. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar oldest_recovery_point: The oldest backup copy available for this item in the service. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of available backup copies associated with this backup item. + :vartype recovery_point_count: int + :ivar policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :vartype policy_state: str + :ivar resource_state: Indicates the state of this resource. Possible values are from enum + ResourceState {Invalid, Active, SoftDeleted, Deleted}. + :vartype resource_state: str + :ivar resource_state_sync_time: The resource state sync time for this backup item. + :vartype resource_state_sync_time: ~datetime.datetime + """ + + _validation = { + 'resource_state': {'readonly': True}, + 'resource_state_sync_time': {'readonly': True}, + } + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + 'resource_state': {'key': 'resourceState', 'type': 'str'}, + 'resource_state_sync_time': {'key': 'resourceStateSyncTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + oldest_recovery_point: Optional[datetime.datetime] = None, + recovery_point_count: Optional[int] = None, + policy_state: Optional[str] = None, + **kwargs + ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this item in the service. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of available backup copies associated with this backup + item. + :paramtype recovery_point_count: int + :keyword policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :paramtype policy_state: str + """ + super(AzureFileshareProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.policy_state = policy_state + self.resource_state = None + self.resource_state_sync_time = None + + +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: AzureFileShareRecoveryPoint, AzureWorkloadRecoveryPoint, GenericRecoveryPoint, IaasVMRecoveryPoint. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureFileShareRecoveryPoint': 'AzureFileShareRecoveryPoint', 'AzureWorkloadRecoveryPoint': 'AzureWorkloadRecoveryPoint', 'GenericRecoveryPoint': 'GenericRecoveryPoint', 'IaasVMRecoveryPoint': 'IaasVMRecoveryPoint'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(RecoveryPoint, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureFileShareRecoveryPoint(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. + + :ivar 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. + :vartype 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(AzureFileShareRecoveryPoint, 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, IaasVMRestoreRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequest'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(RestoreRequest, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureFileShareRestoreRequest(RestoreRequest): + """AzureFileShare Restore Request. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Source storage account ARM Id. + :vartype source_resource_id: str + :ivar copy_options: Options to resolve copy conflicts. Possible values include: "Invalid", + "CreateCopy", "Skip", "Overwrite", "FailOnConflict". + :vartype copy_options: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CopyOptions + :ivar restore_request_type: Restore Type (FullShareRestore or ItemLevelRestore). Possible + values include: "Invalid", "FullShareRestore", "ItemLevelRestore". + :vartype restore_request_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestoreRequestType + :ivar restore_file_specs: List of Source Files/Folders(which need to recover) and + TargetFolderPath details. + :vartype restore_file_specs: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestoreFileSpecs] + :ivar target_details: Target File Share Details. + :vartype target_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetAFSRestoreInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'copy_options': {'key': 'copyOptions', 'type': 'str'}, + 'restore_request_type': {'key': 'restoreRequestType', 'type': 'str'}, + 'restore_file_specs': {'key': 'restoreFileSpecs', 'type': '[RestoreFileSpecs]'}, + 'target_details': {'key': 'targetDetails', 'type': 'TargetAFSRestoreInfo'}, + } + + def __init__( + self, + *, + recovery_type: Optional[Union[str, "RecoveryType"]] = None, + source_resource_id: Optional[str] = None, + copy_options: Optional[Union[str, "CopyOptions"]] = None, + restore_request_type: Optional[Union[str, "RestoreRequestType"]] = None, + restore_file_specs: Optional[List["RestoreFileSpecs"]] = None, + target_details: Optional["TargetAFSRestoreInfo"] = None, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Source storage account ARM Id. + :paramtype source_resource_id: str + :keyword copy_options: Options to resolve copy conflicts. Possible values include: "Invalid", + "CreateCopy", "Skip", "Overwrite", "FailOnConflict". + :paramtype copy_options: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CopyOptions + :keyword restore_request_type: Restore Type (FullShareRestore or ItemLevelRestore). Possible + values include: "Invalid", "FullShareRestore", "ItemLevelRestore". + :paramtype restore_request_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestoreRequestType + :keyword restore_file_specs: List of Source Files/Folders(which need to recover) and + TargetFolderPath details. + :paramtype restore_file_specs: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestoreFileSpecs] + :keyword target_details: Target File Share Details. + :paramtype target_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetAFSRestoreInfo + """ + super(AzureFileShareRestoreRequest, self).__init__(**kwargs) + self.object_type = 'AzureFileShareRestoreRequest' # type: str + self.recovery_type = recovery_type + self.source_resource_id = source_resource_id + self.copy_options = copy_options + self.restore_request_type = restore_request_type + self.restore_file_specs = restore_file_specs + self.target_details = target_details + + +class AzureIaaSVMProtectedItem(ProtectedItem): + """IaaS VM workload-specific backup item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMProtectedItem, AzureIaaSComputeVMProtectedItem. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :vartype virtual_machine_id: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :vartype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :ivar last_backup_status: Last backup operation status. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protected_item_data_id: Data ID of the protected item. + :vartype protected_item_data_id: str + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ExtendedProperties + """ + + _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'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + 'extended_properties': {'key': 'extendedProperties', 'type': 'ExtendedProperties'}, + } + + _subtype_map = { + 'protected_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectedItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectedItem'} + } + + 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, + virtual_machine_id: Optional[str] = None, + protection_status: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionState"]] = None, + health_status: Optional[Union[str, "HealthStatus"]] = None, + health_details: Optional[List["AzureIaaSVMHealthDetails"]] = None, + kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, + last_backup_status: Optional[str] = None, + last_backup_time: Optional[datetime.datetime] = None, + protected_item_data_id: Optional[str] = None, + extended_info: Optional["AzureIaaSVMProtectedItemExtendedInfo"] = None, + extended_properties: Optional["ExtendedProperties"] = None, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the VM represented by this backup item. + :paramtype friendly_name: str + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :paramtype virtual_machine_id: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :keyword last_backup_status: Last backup operation status. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protected_item_data_id: Data ID of the protected item. + :paramtype protected_item_data_id: str + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ExtendedProperties + """ + super(AzureIaaSVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) + self.protected_item_type = 'AzureIaaSVMProtectedItem' # type: str + self.friendly_name = friendly_name + self.virtual_machine_id = virtual_machine_id + self.protection_status = protection_status + self.protection_state = protection_state + self.health_status = health_status + self.health_details = health_details + self.kpis_healths = kpis_healths + self.last_backup_status = last_backup_status + self.last_backup_time = last_backup_time + self.protected_item_data_id = protected_item_data_id + self.extended_info = extended_info + self.extended_properties = extended_properties + + +class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): + """IaaS VM workload-specific backup item representing the Classic Compute VM. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :vartype virtual_machine_id: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :vartype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :ivar last_backup_status: Last backup operation status. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protected_item_data_id: Data ID of the protected item. + :vartype protected_item_data_id: str + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ExtendedProperties + """ + + _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'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + 'extended_properties': {'key': 'extendedProperties', 'type': 'ExtendedProperties'}, + } + + 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, + virtual_machine_id: Optional[str] = None, + protection_status: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionState"]] = None, + health_status: Optional[Union[str, "HealthStatus"]] = None, + health_details: Optional[List["AzureIaaSVMHealthDetails"]] = None, + kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, + last_backup_status: Optional[str] = None, + last_backup_time: Optional[datetime.datetime] = None, + protected_item_data_id: Optional[str] = None, + extended_info: Optional["AzureIaaSVMProtectedItemExtendedInfo"] = None, + extended_properties: Optional["ExtendedProperties"] = None, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the VM represented by this backup item. + :paramtype friendly_name: str + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :paramtype virtual_machine_id: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :keyword last_backup_status: Last backup operation status. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protected_item_data_id: Data ID of the protected item. + :paramtype protected_item_data_id: str + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ExtendedProperties + """ + super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, kpis_healths=kpis_healths, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, extended_properties=extended_properties, **kwargs) + self.protected_item_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str + + +class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): + """IaaS VM workload-specific backup item representing the Azure Resource Manager VM. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :vartype virtual_machine_id: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :vartype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :ivar last_backup_status: Last backup operation status. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protected_item_data_id: Data ID of the protected item. + :vartype protected_item_data_id: str + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ExtendedProperties + """ + + _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'}, + 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'health_details': {'key': 'healthDetails', 'type': '[AzureIaaSVMHealthDetails]'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMProtectedItemExtendedInfo'}, + 'extended_properties': {'key': 'extendedProperties', 'type': 'ExtendedProperties'}, + } + + 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, + virtual_machine_id: Optional[str] = None, + protection_status: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionState"]] = None, + health_status: Optional[Union[str, "HealthStatus"]] = None, + health_details: Optional[List["AzureIaaSVMHealthDetails"]] = None, + kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, + last_backup_status: Optional[str] = None, + last_backup_time: Optional[datetime.datetime] = None, + protected_item_data_id: Optional[str] = None, + extended_info: Optional["AzureIaaSVMProtectedItemExtendedInfo"] = None, + extended_properties: Optional["ExtendedProperties"] = None, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the VM represented by this backup item. + :paramtype friendly_name: str + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :paramtype virtual_machine_id: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + :keyword last_backup_status: Last backup operation status. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protected_item_data_id: Data ID of the protected item. + :paramtype protected_item_data_id: str + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ExtendedProperties + """ + super(AzureIaaSComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, kpis_healths=kpis_healths, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, extended_properties=extended_properties, **kwargs) + self.protected_item_type = 'Microsoft.Compute/virtualMachines' # type: str + + +class AzureIaaSVMErrorInfo(msrest.serialization.Model): + """Azure IaaS VM workload-specific error information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error_code: Error code. + :vartype error_code: int + :ivar error_title: Title: Typically, the entity that the error pertains to. + :vartype error_title: str + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] + """ + + _validation = { + 'error_code': {'readonly': True}, + 'error_title': {'readonly': True}, + 'error_string': {'readonly': True}, + 'recommendations': {'readonly': True}, + } + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_title': {'key': 'errorTitle', 'type': 'str'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AzureIaaSVMErrorInfo, self).__init__(**kwargs) + self.error_code = None + self.error_title = None + self.error_string = None + self.recommendations = None + + +class ResourceHealthDetails(msrest.serialization.Model): + """Health Details for backup items. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Health Code. + :vartype code: int + :ivar title: Health Title. + :vartype title: str + :ivar message: Health Message. + :vartype message: str + :ivar recommendations: Health Recommended Actions. + :vartype recommendations: list[str] + """ + + _validation = { + 'code': {'readonly': True}, + 'title': {'readonly': True}, + 'message': {'readonly': True}, + 'recommendations': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ResourceHealthDetails, self).__init__(**kwargs) + self.code = None + self.title = None + self.message = None + self.recommendations = None + + +class AzureIaaSVMHealthDetails(ResourceHealthDetails): + """Azure IaaS VM workload-specific Health Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Health Code. + :vartype code: int + :ivar title: Health Title. + :vartype title: str + :ivar message: Health Message. + :vartype message: str + :ivar recommendations: Health Recommended Actions. + :vartype recommendations: list[str] + """ + + _validation = { + 'code': {'readonly': True}, + 'title': {'readonly': True}, + 'message': {'readonly': True}, + 'recommendations': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AzureIaaSVMHealthDetails, self).__init__(**kwargs) + + +class Job(msrest.serialization.Model): + """Defines workload agnostic properties for a job. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSVMJob, AzureStorageJob, AzureWorkloadJob, DpmJob, MabJob. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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. + :vartype job_type: str + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + } + + _subtype_map = { + 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob'} + } + + def __init__( + self, + *, + entity_friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + operation: Optional[str] = None, + status: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + activity_id: Optional[str] = None, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + """ + super(Job, self).__init__(**kwargs) + self.entity_friendly_name = entity_friendly_name + self.backup_management_type = backup_management_type + self.operation = operation + self.status = status + self.start_time = start_time + self.end_time = end_time + self.activity_id = activity_id + self.job_type = None # type: Optional[str] + + +class AzureIaaSVMJob(Job): + """Azure IaaS VM workload-specific job object. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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. + :vartype job_type: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMErrorInfo] + :ivar virtual_machine_version: Specifies whether the backup item is a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar extended_info: Additional information for this job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[str]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureIaaSVMErrorInfo]'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMJobExtendedInfo'}, + } + + def __init__( + self, + *, + entity_friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + operation: Optional[str] = None, + status: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + activity_id: Optional[str] = None, + duration: Optional[datetime.timedelta] = None, + actions_info: Optional[List[Union[str, "JobSupportedAction"]]] = None, + error_details: Optional[List["AzureIaaSVMErrorInfo"]] = None, + virtual_machine_version: Optional[str] = None, + extended_info: Optional["AzureIaaSVMJobExtendedInfo"] = None, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMErrorInfo] + :keyword virtual_machine_version: Specifies whether the backup item is a Classic or an Azure + Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword extended_info: Additional information for this job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMJobExtendedInfo + """ + super(AzureIaaSVMJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.job_type = 'AzureIaaSVMJob' # type: str + self.duration = duration + self.actions_info = actions_info + self.error_details = error_details + self.virtual_machine_version = virtual_machine_version + self.extended_info = extended_info + + +class AzureIaaSVMJobExtendedInfo(msrest.serialization.Model): + """Azure IaaS VM workload-specific additional information for job. + + :ivar tasks_list: List of tasks associated with this job. + :vartype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMJobTaskDetails] + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] + :ivar internal_property_bag: Job internal properties. + :vartype internal_property_bag: dict[str, str] + :ivar progress_percentage: Indicates progress of the job. Null if it has not started or + completed. + :vartype progress_percentage: float + :ivar estimated_remaining_duration: Time remaining for execution of this job. + :vartype estimated_remaining_duration: str + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureIaaSVMJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'internal_property_bag': {'key': 'internalPropertyBag', 'type': '{str}'}, + 'progress_percentage': {'key': 'progressPercentage', 'type': 'float'}, + 'estimated_remaining_duration': {'key': 'estimatedRemainingDuration', 'type': 'str'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__( + self, + *, + tasks_list: Optional[List["AzureIaaSVMJobTaskDetails"]] = None, + property_bag: Optional[Dict[str, str]] = None, + internal_property_bag: Optional[Dict[str, str]] = None, + progress_percentage: Optional[float] = None, + estimated_remaining_duration: Optional[str] = None, + dynamic_error_message: Optional[str] = None, + **kwargs + ): + """ + :keyword tasks_list: List of tasks associated with this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureIaaSVMJobTaskDetails] + :keyword property_bag: Job properties. + :paramtype property_bag: dict[str, str] + :keyword internal_property_bag: Job internal properties. + :paramtype internal_property_bag: dict[str, str] + :keyword progress_percentage: Indicates progress of the job. Null if it has not started or + completed. + :paramtype progress_percentage: float + :keyword estimated_remaining_duration: Time remaining for execution of this job. + :paramtype estimated_remaining_duration: str + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ + super(AzureIaaSVMJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.internal_property_bag = internal_property_bag + self.progress_percentage = progress_percentage + self.estimated_remaining_duration = estimated_remaining_duration + self.dynamic_error_message = dynamic_error_message + + +class AzureIaaSVMJobTaskDetails(msrest.serialization.Model): + """Azure IaaS VM workload-specific job task details. + + :ivar task_id: The task display name. + :vartype task_id: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar instance_id: The instanceId. + :vartype instance_id: str + :ivar duration: Time elapsed for task. + :vartype duration: ~datetime.timedelta + :ivar status: The status. + :vartype status: str + :ivar progress_percentage: Progress of the task. + :vartype progress_percentage: float + :ivar task_execution_details: Details about execution of the task. + eg: number of bytes transferred etc. + :vartype task_execution_details: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'instance_id': {'key': 'instanceId', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'status': {'key': 'status', 'type': 'str'}, + 'progress_percentage': {'key': 'progressPercentage', 'type': 'float'}, + 'task_execution_details': {'key': 'taskExecutionDetails', 'type': 'str'}, + } + + def __init__( + self, + *, + task_id: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + instance_id: Optional[str] = None, + duration: Optional[datetime.timedelta] = None, + status: Optional[str] = None, + progress_percentage: Optional[float] = None, + task_execution_details: Optional[str] = None, + **kwargs + ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword instance_id: The instanceId. + :paramtype instance_id: str + :keyword duration: Time elapsed for task. + :paramtype duration: ~datetime.timedelta + :keyword status: The status. + :paramtype status: str + :keyword progress_percentage: Progress of the task. + :paramtype progress_percentage: float + :keyword task_execution_details: Details about execution of the task. + eg: number of bytes transferred etc. + :paramtype task_execution_details: str + """ + super(AzureIaaSVMJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.start_time = start_time + self.end_time = end_time + self.instance_id = instance_id + self.duration = duration + self.status = status + self.progress_percentage = progress_percentage + self.task_execution_details = task_execution_details + + +class AzureIaaSVMProtectedItemExtendedInfo(msrest.serialization.Model): + """Additional information on Azure IaaS VM specific backup item. + + :ivar oldest_recovery_point: The oldest backup copy available for this backup item. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of backup copies available for this backup item. + :vartype recovery_point_count: int + :ivar policy_inconsistent: Specifies if backup policy associated with the backup item is + inconsistent. + :vartype policy_inconsistent: bool + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_inconsistent': {'key': 'policyInconsistent', 'type': 'bool'}, + } + + def __init__( + self, + *, + oldest_recovery_point: Optional[datetime.datetime] = None, + recovery_point_count: Optional[int] = None, + policy_inconsistent: Optional[bool] = None, + **kwargs + ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this backup item. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of backup copies available for this backup item. + :paramtype recovery_point_count: int + :keyword policy_inconsistent: Specifies if backup policy associated with the backup item is + inconsistent. + :paramtype policy_inconsistent: bool + """ + super(AzureIaaSVMProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.policy_inconsistent = policy_inconsistent + + +class AzureSqlProtectedItem(ProtectedItem): + """Azure SQL workload-specific backup item. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar protected_item_data_id: Internal ID of a backup item. Used by Azure SQL Backup engine to + contact Recovery Services. + :vartype protected_item_data_id: str + :ivar protection_state: Backup state of the backed up item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemState + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureSqlProtectedItemExtendedInfo + """ + + _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]'}, + 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureSqlProtectedItemExtendedInfo'}, + } + + 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, + protected_item_data_id: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectedItemState"]] = None, + extended_info: Optional["AzureSqlProtectedItemExtendedInfo"] = None, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword protected_item_data_id: Internal ID of a backup item. Used by Azure SQL Backup engine + to contact Recovery Services. + :paramtype protected_item_data_id: str + :keyword protection_state: Backup state of the backed up item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemState + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureSqlProtectedItemExtendedInfo + """ + super(AzureSqlProtectedItem, 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 = 'Microsoft.Sql/servers/databases' # type: str + self.protected_item_data_id = protected_item_data_id + self.protection_state = protection_state + self.extended_info = extended_info + + +class AzureSqlProtectedItemExtendedInfo(msrest.serialization.Model): + """Additional information on Azure Sql specific protected item. + + :ivar oldest_recovery_point: The oldest backup copy available for this item in the service. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of available backup copies associated with this backup item. + :vartype recovery_point_count: int + :ivar policy_state: State of the backup policy associated with this backup item. + :vartype policy_state: str + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + } + + def __init__( + self, + *, + oldest_recovery_point: Optional[datetime.datetime] = None, + recovery_point_count: Optional[int] = None, + policy_state: Optional[str] = None, + **kwargs + ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this item in the service. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of available backup copies associated with this backup + item. + :paramtype recovery_point_count: int + :keyword policy_state: State of the backup policy associated with this backup item. + :paramtype policy_state: str + """ + super(AzureSqlProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.policy_state = policy_state + + +class AzureStorageErrorInfo(msrest.serialization.Model): + """Azure storage specific error information. + + :ivar error_code: Error code. + :vartype error_code: int + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + *, + error_code: Optional[int] = None, + error_string: Optional[str] = None, + recommendations: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword error_code: Error code. + :paramtype error_code: int + :keyword error_string: Localized error string. + :paramtype error_string: str + :keyword recommendations: List of localized recommendations for above error code. + :paramtype recommendations: list[str] + """ + super(AzureStorageErrorInfo, self).__init__(**kwargs) + self.error_code = error_code + self.error_string = error_string + self.recommendations = recommendations + + +class AzureStorageJob(Job): + """Azure storage specific job. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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. + :vartype job_type: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureStorageErrorInfo] + :ivar storage_account_name: Specifies friendly name of the storage account. + :vartype storage_account_name: str + :ivar storage_account_version: Specifies whether the Storage account is a Classic or an Azure + Resource Manager Storage account. + :vartype storage_account_version: str + :ivar extended_info: Additional information about the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureStorageJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[str]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureStorageErrorInfo]'}, + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + 'storage_account_version': {'key': 'storageAccountVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureStorageJobExtendedInfo'}, + } + + def __init__( + self, + *, + entity_friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + operation: Optional[str] = None, + status: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + activity_id: Optional[str] = None, + duration: Optional[datetime.timedelta] = None, + actions_info: Optional[List[Union[str, "JobSupportedAction"]]] = None, + error_details: Optional[List["AzureStorageErrorInfo"]] = None, + storage_account_name: Optional[str] = None, + storage_account_version: Optional[str] = None, + extended_info: Optional["AzureStorageJobExtendedInfo"] = None, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureStorageErrorInfo] + :keyword storage_account_name: Specifies friendly name of the storage account. + :paramtype storage_account_name: str + :keyword storage_account_version: Specifies whether the Storage account is a Classic or an + Azure Resource Manager Storage account. + :paramtype storage_account_version: str + :keyword extended_info: Additional information about the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureStorageJobExtendedInfo + """ + super(AzureStorageJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.job_type = 'AzureStorageJob' # type: str + self.duration = duration + self.actions_info = actions_info + self.error_details = error_details + self.storage_account_name = storage_account_name + self.storage_account_version = storage_account_version + self.extended_info = extended_info + + +class AzureStorageJobExtendedInfo(msrest.serialization.Model): + """Azure Storage workload-specific additional information for job. + + :ivar tasks_list: List of tasks for this job. + :vartype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureStorageJobTaskDetails] + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureStorageJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__( + self, + *, + tasks_list: Optional[List["AzureStorageJobTaskDetails"]] = None, + property_bag: Optional[Dict[str, str]] = None, + dynamic_error_message: Optional[str] = None, + **kwargs + ): + """ + :keyword tasks_list: List of tasks for this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureStorageJobTaskDetails] + :keyword property_bag: Job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ + super(AzureStorageJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.dynamic_error_message = dynamic_error_message + + +class AzureStorageJobTaskDetails(msrest.serialization.Model): + """Azure storage workload specific job task details. + + :ivar task_id: The task display name. + :vartype task_id: str + :ivar status: The status. + :vartype status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + task_id: Optional[str] = None, + status: Optional[str] = None, + **kwargs + ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword status: The status. + :paramtype status: str + """ + super(AzureStorageJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.status = status + + +class AzureVmWorkloadProtectedItem(ProtectedItem): + """Azure VM workload-specific protected item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadSAPAseDatabaseProtectedItem, AzureVmWorkloadSAPHanaDatabaseProtectedItem, AzureVmWorkloadSQLDatabaseProtectedItem. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :vartype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last + heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", + "IRPending". + :vartype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + + _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'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_type': {'key': 'parentType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, + 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, + 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, + } + + _subtype_map = { + 'protected_item_type': {'AzureVmWorkloadSAPAseDatabase': 'AzureVmWorkloadSAPAseDatabaseProtectedItem', 'AzureVmWorkloadSAPHanaDatabase': 'AzureVmWorkloadSAPHanaDatabaseProtectedItem', 'AzureVmWorkloadSQLDatabase': 'AzureVmWorkloadSQLDatabaseProtectedItem'} + } + + def __init__( + self, + *, + backup_management_type: 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, + server_name: Optional[str] = None, + parent_name: Optional[str] = None, + parent_type: Optional[str] = None, + protection_status: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionState"]] = None, + last_backup_status: Optional[Union[str, "LastBackupStatus"]] = None, + last_backup_time: Optional[datetime.datetime] = None, + last_backup_error_detail: Optional["ErrorDetail"] = None, + protected_item_data_source_id: Optional[str] = None, + protected_item_health_status: Optional[Union[str, "ProtectedItemHealthStatus"]] = None, + extended_info: Optional["AzureVmWorkloadProtectedItemExtendedInfo"] = None, + kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) + self.protected_item_type = 'AzureVmWorkloadProtectedItem' # type: str + self.friendly_name = friendly_name + self.server_name = server_name + self.parent_name = parent_name + self.parent_type = parent_type + self.protection_status = protection_status + self.protection_state = protection_state + self.last_backup_status = last_backup_status + self.last_backup_time = last_backup_time + self.last_backup_error_detail = last_backup_error_detail + self.protected_item_data_source_id = protected_item_data_source_id + self.protected_item_health_status = protected_item_health_status + self.extended_info = extended_info + self.kpis_healths = kpis_healths + + +class AzureVmWorkloadProtectedItemExtendedInfo(msrest.serialization.Model): + """Additional information on Azure Workload for SQL specific backup item. + + :ivar oldest_recovery_point: The oldest backup copy available for this backup item. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of backup copies available for this backup item. + :vartype recovery_point_count: int + :ivar policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :vartype policy_state: str + """ + + _attribute_map = { + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + } + + def __init__( + self, + *, + oldest_recovery_point: Optional[datetime.datetime] = None, + recovery_point_count: Optional[int] = None, + policy_state: Optional[str] = None, + **kwargs + ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this backup item. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of backup copies available for this backup item. + :paramtype recovery_point_count: int + :keyword policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :paramtype policy_state: str + """ + super(AzureVmWorkloadProtectedItemExtendedInfo, self).__init__(**kwargs) + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.policy_state = policy_state + + +class AzureVmWorkloadSAPAseDatabaseProtectedItem(AzureVmWorkloadProtectedItem): + """Azure VM workload-specific protected item representing SAP ASE Database. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :vartype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last + heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", + "IRPending". + :vartype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + + _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'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_type': {'key': 'parentType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, + 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, + 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, + } + + 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, + server_name: Optional[str] = None, + parent_name: Optional[str] = None, + parent_type: Optional[str] = None, + protection_status: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionState"]] = None, + last_backup_status: Optional[Union[str, "LastBackupStatus"]] = None, + last_backup_time: Optional[datetime.datetime] = None, + last_backup_error_detail: Optional["ErrorDetail"] = None, + protected_item_data_source_id: Optional[str] = None, + protected_item_health_status: Optional[Union[str, "ProtectedItemHealthStatus"]] = None, + extended_info: Optional["AzureVmWorkloadProtectedItemExtendedInfo"] = None, + kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadSAPAseDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) + self.protected_item_type = 'AzureVmWorkloadSAPAseDatabase' # type: str + + +class AzureVmWorkloadSAPHanaDatabaseProtectedItem(AzureVmWorkloadProtectedItem): + """Azure VM workload-specific protected item representing SAP HANA Database. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :vartype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last + heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", + "IRPending". + :vartype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + + _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'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_type': {'key': 'parentType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, + 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, + 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, + } + + 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, + server_name: Optional[str] = None, + parent_name: Optional[str] = None, + parent_type: Optional[str] = None, + protection_status: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionState"]] = None, + last_backup_status: Optional[Union[str, "LastBackupStatus"]] = None, + last_backup_time: Optional[datetime.datetime] = None, + last_backup_error_detail: Optional["ErrorDetail"] = None, + protected_item_data_source_id: Optional[str] = None, + protected_item_health_status: Optional[Union[str, "ProtectedItemHealthStatus"]] = None, + extended_info: Optional["AzureVmWorkloadProtectedItemExtendedInfo"] = None, + kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadSAPHanaDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) + self.protected_item_type = 'AzureVmWorkloadSAPHanaDatabase' # type: str + + +class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): + """Azure VM workload-specific protected item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :vartype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last + heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", + "IRPending". + :vartype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + + _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'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_type': {'key': 'parentType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'last_backup_error_detail': {'key': 'lastBackupErrorDetail', 'type': 'ErrorDetail'}, + 'protected_item_data_source_id': {'key': 'protectedItemDataSourceId', 'type': 'str'}, + 'protected_item_health_status': {'key': 'protectedItemHealthStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureVmWorkloadProtectedItemExtendedInfo'}, + 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, + } + + 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, + server_name: Optional[str] = None, + parent_name: Optional[str] = None, + parent_type: Optional[str] = None, + protection_status: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionState"]] = None, + last_backup_status: Optional[Union[str, "LastBackupStatus"]] = None, + last_backup_time: Optional[datetime.datetime] = None, + last_backup_error_detail: Optional["ErrorDetail"] = None, + protected_item_data_source_id: Optional[str] = None, + protected_item_health_status: Optional[Union[str, "ProtectedItemHealthStatus"]] = None, + extended_info: Optional["AzureVmWorkloadProtectedItemExtendedInfo"] = None, + kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) + self.protected_item_type = 'AzureVmWorkloadSQLDatabase' # type: str + + +class AzureWorkloadErrorInfo(msrest.serialization.Model): + """Azure storage specific error information. + + :ivar error_code: Error code. + :vartype error_code: int + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar error_title: Title: Typically, the entity that the error pertains to. + :vartype error_title: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] + :ivar additional_details: Additional details for above error code. + :vartype additional_details: str + """ + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'error_title': {'key': 'errorTitle', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + 'additional_details': {'key': 'additionalDetails', 'type': 'str'}, + } + + def __init__( + self, + *, + error_code: Optional[int] = None, + error_string: Optional[str] = None, + error_title: Optional[str] = None, + recommendations: Optional[List[str]] = None, + additional_details: Optional[str] = None, + **kwargs + ): + """ + :keyword error_code: Error code. + :paramtype error_code: int + :keyword error_string: Localized error string. + :paramtype error_string: str + :keyword error_title: Title: Typically, the entity that the error pertains to. + :paramtype error_title: str + :keyword recommendations: List of localized recommendations for above error code. + :paramtype recommendations: list[str] + :keyword additional_details: Additional details for above error code. + :paramtype additional_details: str + """ + super(AzureWorkloadErrorInfo, self).__init__(**kwargs) + self.error_code = error_code + self.error_string = error_string + self.error_title = error_title + self.recommendations = recommendations + self.additional_details = additional_details + + +class AzureWorkloadJob(Job): + """Azure storage specific job. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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. + :vartype job_type: str + :ivar workload_type: Workload type of the job. + :vartype workload_type: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadErrorInfo] + :ivar extended_info: Additional information about the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[str]'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureWorkloadErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadJobExtendedInfo'}, + } + + def __init__( + self, + *, + entity_friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + operation: Optional[str] = None, + status: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + activity_id: Optional[str] = None, + workload_type: Optional[str] = None, + duration: Optional[datetime.timedelta] = None, + actions_info: Optional[List[Union[str, "JobSupportedAction"]]] = None, + error_details: Optional[List["AzureWorkloadErrorInfo"]] = None, + extended_info: Optional["AzureWorkloadJobExtendedInfo"] = None, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword workload_type: Workload type of the job. + :paramtype workload_type: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadErrorInfo] + :keyword extended_info: Additional information about the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadJobExtendedInfo + """ + super(AzureWorkloadJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.job_type = 'AzureWorkloadJob' # type: str + self.workload_type = workload_type + self.duration = duration + self.actions_info = actions_info + self.error_details = error_details + self.extended_info = extended_info + + +class AzureWorkloadJobExtendedInfo(msrest.serialization.Model): + """Azure VM workload-specific additional information for job. + + :ivar tasks_list: List of tasks for this job. + :vartype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadJobTaskDetails] + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[AzureWorkloadJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__( + self, + *, + tasks_list: Optional[List["AzureWorkloadJobTaskDetails"]] = None, + property_bag: Optional[Dict[str, str]] = None, + dynamic_error_message: Optional[str] = None, + **kwargs + ): + """ + :keyword tasks_list: List of tasks for this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadJobTaskDetails] + :keyword property_bag: Job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ + super(AzureWorkloadJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.dynamic_error_message = dynamic_error_message + + +class AzureWorkloadJobTaskDetails(msrest.serialization.Model): + """Azure VM workload specific job task details. + + :ivar task_id: The task display name. + :vartype task_id: str + :ivar status: The status. + :vartype status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + task_id: Optional[str] = None, + status: Optional[str] = None, + **kwargs + ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword status: The status. + :paramtype status: str + """ + super(AzureWorkloadJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.status = status + + +class AzureWorkloadRecoveryPoint(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: AzureWorkloadPointInTimeRecoveryPoint, AzureWorkloadSAPHanaRecoveryPoint, AzureWorkloadSQLRecoveryPoint. + + 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. + + :ivar 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. + :vartype 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.crossregionregionrestore.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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': 'AzureWorkloadPointInTimeRecoveryPoint', 'AzureWorkloadSAPHanaRecoveryPoint': 'AzureWorkloadSAPHanaRecoveryPoint', 'AzureWorkloadSQLRecoveryPoint': 'AzureWorkloadSQLRecoveryPoint'} + } + + def __init__( + self, + *, + recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, + recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, + **kwargs + ): + """ + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + """ + super(AzureWorkloadRecoveryPoint, 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 AzureWorkloadPointInTimeRecoveryPoint(AzureWorkloadRecoveryPoint): + """Recovery point specific to PointInTime. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSAPHanaPointInTimeRecoveryPoint. + + 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. + + :ivar 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. + :vartype 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.crossregionregionrestore.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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': 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint'} + } + + 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 + ): + """ + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.PointInTimeRange] + """ + super(AzureWorkloadPointInTimeRecoveryPoint, 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. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadPointInTimeRestoreRequest, AzureWorkloadSAPHanaRestoreRequest, AzureWorkloadSQLRestoreRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + is being recovered. + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :vartype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :vartype target_virtual_machine_id: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadPointInTimeRestoreRequest': 'AzureWorkloadPointInTimeRestoreRequest', 'AzureWorkloadSAPHanaRestoreRequest': 'AzureWorkloadSAPHanaRestoreRequest', 'AzureWorkloadSQLRestoreRequest': 'AzureWorkloadSQLRestoreRequest'} + } + + def __init__( + self, + *, + recovery_type: Optional[Union[str, "RecoveryType"]] = None, + source_resource_id: Optional[str] = None, + property_bag: Optional[Dict[str, str]] = None, + target_info: Optional["TargetRestoreInfo"] = None, + recovery_mode: Optional[Union[str, "RecoveryMode"]] = None, + target_virtual_machine_id: Optional[str] = None, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + """ + super(AzureWorkloadRestoreRequest, self).__init__(**kwargs) + self.object_type = 'AzureWorkloadRestoreRequest' # type: str + self.recovery_type = recovery_type + self.source_resource_id = source_resource_id + self.property_bag = property_bag + self.target_info = target_info + self.recovery_mode = recovery_mode + self.target_virtual_machine_id = target_virtual_machine_id + + +class AzureWorkloadPointInTimeRestoreRequest(AzureWorkloadRestoreRequest): + """AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + is being recovered. + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :vartype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :vartype target_virtual_machine_id: str + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + recovery_type: Optional[Union[str, "RecoveryType"]] = None, + source_resource_id: Optional[str] = None, + property_bag: Optional[Dict[str, str]] = None, + target_info: Optional["TargetRestoreInfo"] = None, + recovery_mode: Optional[Union[str, "RecoveryMode"]] = None, + target_virtual_machine_id: Optional[str] = None, + point_in_time: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + """ + super(AzureWorkloadPointInTimeRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, **kwargs) + self.object_type = 'AzureWorkloadPointInTimeRestoreRequest' # type: str + self.point_in_time = point_in_time + + +class AzureWorkloadSAPHanaPointInTimeRecoveryPoint(AzureWorkloadPointInTimeRecoveryPoint): + """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. + + :ivar 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. + :vartype 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.crossregionregionrestore.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.PointInTimeRange] + """ + super(AzureWorkloadSAPHanaPointInTimeRecoveryPoint, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, time_ranges=time_ranges, **kwargs) + self.object_type = 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint' # type: str + + +class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): + """AzureWorkload SAP Hana-specific restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSAPHanaPointInTimeRestoreRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + is being recovered. + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :vartype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :vartype target_virtual_machine_id: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSAPHanaPointInTimeRestoreRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreRequest'} + } + + def __init__( + self, + *, + recovery_type: Optional[Union[str, "RecoveryType"]] = None, + source_resource_id: Optional[str] = None, + property_bag: Optional[Dict[str, str]] = None, + target_info: Optional["TargetRestoreInfo"] = None, + recovery_mode: Optional[Union[str, "RecoveryMode"]] = None, + target_virtual_machine_id: Optional[str] = None, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + """ + super(AzureWorkloadSAPHanaRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, **kwargs) + self.object_type = 'AzureWorkloadSAPHanaRestoreRequest' # type: str + + +class AzureWorkloadSAPHanaPointInTimeRestoreRequest(AzureWorkloadSAPHanaRestoreRequest): + """AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + is being recovered. + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :vartype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :vartype target_virtual_machine_id: str + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + recovery_type: Optional[Union[str, "RecoveryType"]] = None, + source_resource_id: Optional[str] = None, + property_bag: Optional[Dict[str, str]] = None, + target_info: Optional["TargetRestoreInfo"] = None, + recovery_mode: Optional[Union[str, "RecoveryMode"]] = None, + target_virtual_machine_id: Optional[str] = None, + point_in_time: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + """ + super(AzureWorkloadSAPHanaPointInTimeRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, **kwargs) + self.object_type = 'AzureWorkloadSAPHanaPointInTimeRestoreRequest' # type: str + self.point_in_time = point_in_time + + +class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): + """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. + + :ivar 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. + :vartype 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.crossregionregionrestore.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + """ + super(AzureWorkloadSAPHanaRecoveryPoint, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, **kwargs) + self.object_type = 'AzureWorkloadSAPHanaRecoveryPoint' # type: str + + +class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): + """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: AzureWorkloadSQLPointInTimeRecoveryPoint. + + 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. + + :ivar 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. + :vartype 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.crossregionregionrestore.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :ivar 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. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadSQLRecoveryPointExtendedInfo + """ + + _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': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRecoveryPoint': 'AzureWorkloadSQLPointInTimeRecoveryPoint'} + } + + def __init__( + self, + *, + recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, + recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, + extended_info: Optional["AzureWorkloadSQLRecoveryPointExtendedInfo"] = None, + **kwargs + ): + """ + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :keyword 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. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadSQLRecoveryPointExtendedInfo + """ + super(AzureWorkloadSQLRecoveryPoint, 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 AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): + """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. + + :ivar 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. + :vartype 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.crossregionregionrestore.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :ivar 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. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, + '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["AzureWorkloadSQLRecoveryPointExtendedInfo"] = None, + time_ranges: Optional[List["PointInTimeRange"]] = None, + **kwargs + ): + """ + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + :keyword 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. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.PointInTimeRange] + """ + super(AzureWorkloadSQLPointInTimeRecoveryPoint, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, extended_info=extended_info, **kwargs) + self.object_type = 'AzureWorkloadSQLPointInTimeRecoveryPoint' # type: str + self.time_ranges = time_ranges + + +class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): + """AzureWorkload SQL -specific restore. Specifically for full/diff restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLPointInTimeRestoreRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + is being recovered. + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :vartype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :vartype target_virtual_machine_id: str + :ivar should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :vartype should_use_alternate_target_location: bool + :ivar is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :vartype is_non_recoverable: bool + :ivar alternate_directory_paths: Data directory details. + :vartype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryMapping] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRestoreRequest': 'AzureWorkloadSQLPointInTimeRestoreRequest'} + } + + def __init__( + self, + *, + recovery_type: Optional[Union[str, "RecoveryType"]] = None, + source_resource_id: Optional[str] = None, + property_bag: Optional[Dict[str, str]] = None, + target_info: Optional["TargetRestoreInfo"] = None, + recovery_mode: Optional[Union[str, "RecoveryMode"]] = None, + target_virtual_machine_id: Optional[str] = None, + should_use_alternate_target_location: Optional[bool] = None, + is_non_recoverable: Optional[bool] = None, + alternate_directory_paths: Optional[List["SQLDataDirectoryMapping"]] = None, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :paramtype should_use_alternate_target_location: bool + :keyword is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :paramtype is_non_recoverable: bool + :keyword alternate_directory_paths: Data directory details. + :paramtype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryMapping] + """ + super(AzureWorkloadSQLRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, **kwargs) + self.object_type = 'AzureWorkloadSQLRestoreRequest' # type: str + self.should_use_alternate_target_location = should_use_alternate_target_location + self.is_non_recoverable = is_non_recoverable + self.alternate_directory_paths = alternate_directory_paths + + +class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): + """AzureWorkload SQL -specific restore. Specifically for PointInTime/Log restore. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + is being recovered. + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :vartype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :vartype target_virtual_machine_id: str + :ivar should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :vartype should_use_alternate_target_location: bool + :ivar is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :vartype is_non_recoverable: bool + :ivar alternate_directory_paths: Data directory details. + :vartype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryMapping] + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + recovery_type: Optional[Union[str, "RecoveryType"]] = None, + source_resource_id: Optional[str] = None, + property_bag: Optional[Dict[str, str]] = None, + target_info: Optional["TargetRestoreInfo"] = None, + recovery_mode: Optional[Union[str, "RecoveryMode"]] = None, + target_virtual_machine_id: Optional[str] = None, + should_use_alternate_target_location: Optional[bool] = None, + is_non_recoverable: Optional[bool] = None, + alternate_directory_paths: Optional[List["SQLDataDirectoryMapping"]] = None, + point_in_time: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :paramtype should_use_alternate_target_location: bool + :keyword is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :paramtype is_non_recoverable: bool + :keyword alternate_directory_paths: Data directory details. + :paramtype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryMapping] + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + """ + super(AzureWorkloadSQLPointInTimeRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, should_use_alternate_target_location=should_use_alternate_target_location, is_non_recoverable=is_non_recoverable, alternate_directory_paths=alternate_directory_paths, **kwargs) + self.object_type = 'AzureWorkloadSQLPointInTimeRestoreRequest' # type: str + self.point_in_time = point_in_time + + +class AzureWorkloadSQLRecoveryPointExtendedInfo(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.crossregionregionrestore.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(AzureWorkloadSQLRecoveryPointExtendedInfo, self).__init__(**kwargs) + self.data_directory_time_in_utc = None + self.data_directory_paths = None + + +class BackupManagementUsage(msrest.serialization.Model): + """Backup management usages of a vault. + + :ivar unit: Unit of the usage. Possible values include: "Count", "Bytes", "Seconds", "Percent", + "CountPerSecond", "BytesPerSecond". + :vartype unit: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.UsagesUnit + :ivar quota_period: Quota period of usage. + :vartype quota_period: str + :ivar next_reset_time: Next reset time of usage. + :vartype next_reset_time: ~datetime.datetime + :ivar current_value: Current value of usage. + :vartype current_value: long + :ivar limit: Limit of usage. + :vartype limit: long + :ivar name: Name of usage. + :vartype name: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.NameInfo + """ + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'quota_period': {'key': 'quotaPeriod', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'NameInfo'}, + } + + def __init__( + self, + *, + unit: Optional[Union[str, "UsagesUnit"]] = None, + quota_period: Optional[str] = None, + next_reset_time: Optional[datetime.datetime] = None, + current_value: Optional[int] = None, + limit: Optional[int] = None, + name: Optional["NameInfo"] = None, + **kwargs + ): + """ + :keyword unit: Unit of the usage. Possible values include: "Count", "Bytes", "Seconds", + "Percent", "CountPerSecond", "BytesPerSecond". + :paramtype unit: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.UsagesUnit + :keyword quota_period: Quota period of usage. + :paramtype quota_period: str + :keyword next_reset_time: Next reset time of usage. + :paramtype next_reset_time: ~datetime.datetime + :keyword current_value: Current value of usage. + :paramtype current_value: long + :keyword limit: Limit of usage. + :paramtype limit: long + :keyword name: Name of usage. + :paramtype name: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.NameInfo + """ + super(BackupManagementUsage, self).__init__(**kwargs) + self.unit = unit + self.quota_period = quota_period + self.next_reset_time = next_reset_time + self.current_value = current_value + self.limit = limit + self.name = name + + +class BackupManagementUsageList(msrest.serialization.Model): + """Backup management usage for vault. + + :ivar value: The list of backup management usages for the given vault. + :vartype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementUsage] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BackupManagementUsage]'}, + } + + def __init__( + self, + *, + value: Optional[List["BackupManagementUsage"]] = None, + **kwargs + ): + """ + :keyword value: The list of backup management usages for the given vault. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementUsage] + """ + super(BackupManagementUsageList, self).__init__(**kwargs) + self.value = value + + +class BackupResourceConfig(msrest.serialization.Model): + """The resource storage details. + + :ivar storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :vartype storage_model_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.StorageType + :ivar storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :vartype storage_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.StorageType + :ivar storage_type_state: Locked or Unlocked. Once a machine is registered against a resource, + the storageTypeState is always Locked. Possible values include: "Invalid", "Locked", + "Unlocked". + :vartype storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.StorageTypeState + :ivar cross_region_restore_flag: Opt in details of Cross Region Restore feature. + :vartype cross_region_restore_flag: bool + """ + + _attribute_map = { + 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, + 'cross_region_restore_flag': {'key': 'crossRegionRestoreFlag', 'type': 'bool'}, + } + + def __init__( + self, + *, + storage_model_type: Optional[Union[str, "StorageType"]] = None, + storage_type: Optional[Union[str, "StorageType"]] = None, + storage_type_state: Optional[Union[str, "StorageTypeState"]] = None, + cross_region_restore_flag: Optional[bool] = None, + **kwargs + ): + """ + :keyword storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_model_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.StorageType + :keyword storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.StorageType + :keyword storage_type_state: Locked or Unlocked. Once a machine is registered against a + resource, the storageTypeState is always Locked. Possible values include: "Invalid", "Locked", + "Unlocked". + :paramtype storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.StorageTypeState + :keyword cross_region_restore_flag: Opt in details of Cross Region Restore feature. + :paramtype cross_region_restore_flag: bool + """ + super(BackupResourceConfig, self).__init__(**kwargs) + self.storage_model_type = storage_model_type + self.storage_type = storage_type + self.storage_type_state = storage_type_state + self.cross_region_restore_flag = cross_region_restore_flag + + +class BackupResourceConfigResource(Resource): + """The resource storage details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: BackupResourceConfigResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupResourceConfig + """ + + _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': 'BackupResourceConfig'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + properties: Optional["BackupResourceConfig"] = None, + **kwargs + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: BackupResourceConfigResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupResourceConfig + """ + super(BackupResourceConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class BEKDetails(msrest.serialization.Model): + """BEK is bitlocker encryption key. + + :ivar secret_url: Secret is BEK. + :vartype secret_url: str + :ivar secret_vault_id: ID of the Key Vault where this Secret is stored. + :vartype secret_vault_id: str + :ivar secret_data: BEK data. + :vartype secret_data: str + """ + + _attribute_map = { + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + 'secret_vault_id': {'key': 'secretVaultId', 'type': 'str'}, + 'secret_data': {'key': 'secretData', 'type': 'str'}, + } + + def __init__( + self, + *, + secret_url: Optional[str] = None, + secret_vault_id: Optional[str] = None, + secret_data: Optional[str] = None, + **kwargs + ): + """ + :keyword secret_url: Secret is BEK. + :paramtype secret_url: str + :keyword secret_vault_id: ID of the Key Vault where this Secret is stored. + :paramtype secret_vault_id: str + :keyword secret_data: BEK data. + :paramtype secret_data: str + """ + super(BEKDetails, self).__init__(**kwargs) + self.secret_url = secret_url + self.secret_vault_id = secret_vault_id + self.secret_data = secret_data + + +class BMSAADPropertiesQueryObject(msrest.serialization.Model): + """Filters to list backup items. + + :ivar backup_management_type: Backup management type for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + **kwargs + ): + """ + :keyword backup_management_type: Backup management type for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + """ + super(BMSAADPropertiesQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + + +class BMSBackupSummariesQueryObject(msrest.serialization.Model): + """Query parameters to fetch backup summaries. + + :ivar type: Backup management type for this container. Possible values include: "Invalid", + "BackupProtectedItemCountSummary", "BackupProtectionContainerCountSummary". + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.Type + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "Type"]] = None, + **kwargs + ): + """ + :keyword type: Backup management type for this container. Possible values include: "Invalid", + "BackupProtectedItemCountSummary", "BackupProtectionContainerCountSummary". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.Type + """ + super(BMSBackupSummariesQueryObject, self).__init__(**kwargs) + self.type = type + + +class BMSRPQueryObject(msrest.serialization.Model): + """Filters to list backup copies. + + :ivar start_date: Backup copies created after this time. + :vartype start_date: ~datetime.datetime + :ivar end_date: Backup copies created before this time. + :vartype end_date: ~datetime.datetime + :ivar restore_point_query_type: RestorePoint type. Possible values include: "Invalid", "Full", + "Log", "Differential", "FullAndDifferential", "All", "Incremental". + :vartype restore_point_query_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestorePointQueryType + :ivar extended_info: In Get Recovery Point, it tells whether extended information about + recovery point is asked. + :vartype extended_info: bool + :ivar move_ready_rp_only: Whether the RP can be moved to another tier. + :vartype move_ready_rp_only: bool + """ + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'restore_point_query_type': {'key': 'restorePointQueryType', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'bool'}, + 'move_ready_rp_only': {'key': 'moveReadyRPOnly', 'type': 'bool'}, + } + + def __init__( + self, + *, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + restore_point_query_type: Optional[Union[str, "RestorePointQueryType"]] = None, + extended_info: Optional[bool] = None, + move_ready_rp_only: Optional[bool] = None, + **kwargs + ): + """ + :keyword start_date: Backup copies created after this time. + :paramtype start_date: ~datetime.datetime + :keyword end_date: Backup copies created before this time. + :paramtype end_date: ~datetime.datetime + :keyword restore_point_query_type: RestorePoint type. Possible values include: "Invalid", + "Full", "Log", "Differential", "FullAndDifferential", "All", "Incremental". + :paramtype restore_point_query_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestorePointQueryType + :keyword extended_info: In Get Recovery Point, it tells whether extended information about + recovery point is asked. + :paramtype extended_info: bool + :keyword move_ready_rp_only: Whether the RP can be moved to another tier. + :paramtype move_ready_rp_only: bool + """ + super(BMSRPQueryObject, self).__init__(**kwargs) + self.start_date = start_date + self.end_date = end_date + self.restore_point_query_type = restore_point_query_type + self.extended_info = extended_info + self.move_ready_rp_only = move_ready_rp_only + + +class ClientScriptForConnect(msrest.serialization.Model): + """Client script details for file / folder restore. + + :ivar script_content: File content of the client script for file / folder restore. + :vartype script_content: str + :ivar script_extension: File extension of the client script for file / folder restore - .ps1 , + .sh , etc. + :vartype script_extension: str + :ivar os_type: OS type - Windows, Linux etc. for which this file / folder restore client script + works. + :vartype os_type: str + :ivar url: URL of Executable from where to source the content. If this is not null then + ScriptContent should not be used. + :vartype url: str + :ivar script_name_suffix: Mandatory suffix that should be added to the name of script that is + given for download to user. + If its null or empty then , ignore it. + :vartype script_name_suffix: str + """ + + _attribute_map = { + 'script_content': {'key': 'scriptContent', 'type': 'str'}, + 'script_extension': {'key': 'scriptExtension', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'script_name_suffix': {'key': 'scriptNameSuffix', 'type': 'str'}, + } + + def __init__( + self, + *, + script_content: Optional[str] = None, + script_extension: Optional[str] = None, + os_type: Optional[str] = None, + url: Optional[str] = None, + script_name_suffix: Optional[str] = None, + **kwargs + ): + """ + :keyword script_content: File content of the client script for file / folder restore. + :paramtype script_content: str + :keyword script_extension: File extension of the client script for file / folder restore - .ps1 + , .sh , etc. + :paramtype script_extension: str + :keyword os_type: OS type - Windows, Linux etc. for which this file / folder restore client + script works. + :paramtype os_type: str + :keyword url: URL of Executable from where to source the content. If this is not null then + ScriptContent should not be used. + :paramtype url: str + :keyword script_name_suffix: Mandatory suffix that should be added to the name of script that + is given for download to user. + If its null or empty then , ignore it. + :paramtype script_name_suffix: str + """ + super(ClientScriptForConnect, self).__init__(**kwargs) + self.script_content = script_content + self.script_extension = script_extension + self.os_type = os_type + self.url = url + self.script_name_suffix = script_name_suffix + + +class CrossRegionRestoreRequest(msrest.serialization.Model): + """CrossRegionRestoreRequest. + + :ivar cross_region_restore_access_details: Access details for cross region restore. + :vartype cross_region_restore_access_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrrAccessToken + :ivar restore_request: Request object for triggering restore. + :vartype restore_request: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword cross_region_restore_access_details: Access details for cross region restore. + :paramtype cross_region_restore_access_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrrAccessToken + :keyword restore_request: Request object for triggering restore. + :paramtype restore_request: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RestoreRequest + """ + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: CrossRegionRestoreRequestResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: CrossRegionRestoreRequestResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrossRegionRestoreRequest + """ + 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. + + :ivar object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :vartype object_type: str + :ivar access_token_string: Access token used for authentication. + :vartype access_token_string: str + :ivar subscription_id: Subscription Id of the source vault. + :vartype subscription_id: str + :ivar resource_group_name: Resource Group name of the source vault. + :vartype resource_group_name: str + :ivar resource_name: Resource Name of the source vault. + :vartype resource_name: str + :ivar resource_id: Resource Id of the source vault. + :vartype resource_id: str + :ivar protection_container_id: Protected item container id. + :vartype protection_container_id: long + :ivar recovery_point_id: Recovery Point Id. + :vartype recovery_point_id: str + :ivar recovery_point_time: Recovery Point Time. + :vartype recovery_point_time: str + :ivar container_name: Container Unique name. + :vartype container_name: str + :ivar container_type: Container Type. + :vartype container_type: str + :ivar backup_management_type: Backup Management Type. + :vartype backup_management_type: str + :ivar datasource_type: Datasource Type. + :vartype datasource_type: str + :ivar datasource_name: Datasource Friendly Name. + :vartype datasource_name: str + :ivar datasource_id: Datasource Id. + :vartype datasource_id: str + :ivar datasource_container_name: Datasource Container Unique Name. + :vartype datasource_container_name: str + :ivar coordinator_service_stamp_id: CoordinatorServiceStampId to be used by BCM in restore + call. + :vartype coordinator_service_stamp_id: str + :ivar coordinator_service_stamp_uri: CoordinatorServiceStampUri to be used by BCM in restore + call. + :vartype coordinator_service_stamp_uri: str + :ivar protection_service_stamp_id: ProtectionServiceStampId to be used by BCM in restore call. + :vartype protection_service_stamp_id: str + :ivar protection_service_stamp_uri: ProtectionServiceStampUri to be used by BCM in restore + call. + :vartype protection_service_stamp_uri: str + :ivar token_extended_information: Extended Information about the token like FileSpec etc. + :vartype token_extended_information: str + :ivar rp_tier_information: Recovery point Tier Information. + :vartype rp_tier_information: dict[str, str] + :ivar rp_original_sa_option: Recovery point information: Original SA option. + :vartype rp_original_sa_option: bool + :ivar rp_is_managed_virtual_machine: Recovery point information: Managed virtual machine. + :vartype rp_is_managed_virtual_machine: bool + :ivar rp_vm_size_description: Recovery point information: VM size description. + :vartype rp_vm_size_description: str + :ivar b_ms_active_region: Active region name of BMS Stamp. + :vartype 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 + ): + """ + :keyword access_token_string: Access token used for authentication. + :paramtype access_token_string: str + :keyword subscription_id: Subscription Id of the source vault. + :paramtype subscription_id: str + :keyword resource_group_name: Resource Group name of the source vault. + :paramtype resource_group_name: str + :keyword resource_name: Resource Name of the source vault. + :paramtype resource_name: str + :keyword resource_id: Resource Id of the source vault. + :paramtype resource_id: str + :keyword protection_container_id: Protected item container id. + :paramtype protection_container_id: long + :keyword recovery_point_id: Recovery Point Id. + :paramtype recovery_point_id: str + :keyword recovery_point_time: Recovery Point Time. + :paramtype recovery_point_time: str + :keyword container_name: Container Unique name. + :paramtype container_name: str + :keyword container_type: Container Type. + :paramtype container_type: str + :keyword backup_management_type: Backup Management Type. + :paramtype backup_management_type: str + :keyword datasource_type: Datasource Type. + :paramtype datasource_type: str + :keyword datasource_name: Datasource Friendly Name. + :paramtype datasource_name: str + :keyword datasource_id: Datasource Id. + :paramtype datasource_id: str + :keyword datasource_container_name: Datasource Container Unique Name. + :paramtype datasource_container_name: str + :keyword coordinator_service_stamp_id: CoordinatorServiceStampId to be used by BCM in restore + call. + :paramtype coordinator_service_stamp_id: str + :keyword coordinator_service_stamp_uri: CoordinatorServiceStampUri to be used by BCM in restore + call. + :paramtype coordinator_service_stamp_uri: str + :keyword protection_service_stamp_id: ProtectionServiceStampId to be used by BCM in restore + call. + :paramtype protection_service_stamp_id: str + :keyword protection_service_stamp_uri: ProtectionServiceStampUri to be used by BCM in restore + call. + :paramtype protection_service_stamp_uri: str + :keyword token_extended_information: Extended Information about the token like FileSpec etc. + :paramtype token_extended_information: str + :keyword rp_tier_information: Recovery point Tier Information. + :paramtype rp_tier_information: dict[str, str] + :keyword rp_original_sa_option: Recovery point information: Original SA option. + :paramtype rp_original_sa_option: bool + :keyword rp_is_managed_virtual_machine: Recovery point information: Managed virtual machine. + :paramtype rp_is_managed_virtual_machine: bool + :keyword rp_vm_size_description: Recovery point information: VM size description. + :paramtype rp_vm_size_description: str + :keyword b_ms_active_region: Active region name of BMS Stamp. + :paramtype b_ms_active_region: str + """ + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: CrrAccessTokenResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: CrrAccessTokenResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrrAccessToken + """ + 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. + + :ivar resource_id: Entire ARM resource id of the resource. + :vartype resource_id: str + :ivar job_name: Job Name of the job to be fetched. + :vartype 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 + ): + """ + :keyword resource_id: Entire ARM resource id of the resource. + :paramtype resource_id: str + :keyword job_name: Job Name of the job to be fetched. + :paramtype job_name: str + """ + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: CrrJobRequestResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrrJobRequest + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CrrJobRequest'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + properties: Optional["CrrJobRequest"] = None, + **kwargs + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: CrrJobRequestResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrrJobRequest + """ + super(CrrJobRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class DiskExclusionProperties(msrest.serialization.Model): + """DiskExclusionProperties. + + :ivar disk_lun_list: List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + :vartype disk_lun_list: list[int] + :ivar is_inclusion_list: Flag to indicate whether DiskLunList is to be included/ excluded from + backup. + :vartype is_inclusion_list: bool + """ + + _attribute_map = { + 'disk_lun_list': {'key': 'diskLunList', 'type': '[int]'}, + 'is_inclusion_list': {'key': 'isInclusionList', 'type': 'bool'}, + } + + def __init__( + self, + *, + disk_lun_list: Optional[List[int]] = None, + is_inclusion_list: Optional[bool] = None, + **kwargs + ): + """ + :keyword disk_lun_list: List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + :paramtype disk_lun_list: list[int] + :keyword is_inclusion_list: Flag to indicate whether DiskLunList is to be included/ excluded + from backup. + :paramtype is_inclusion_list: bool + """ + super(DiskExclusionProperties, self).__init__(**kwargs) + self.disk_lun_list = disk_lun_list + self.is_inclusion_list = is_inclusion_list + + +class DiskInformation(msrest.serialization.Model): + """Disk information. + + :ivar lun: + :vartype lun: int + :ivar name: + :vartype name: str + """ + + _attribute_map = { + 'lun': {'key': 'lun', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + lun: Optional[int] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :keyword lun: + :paramtype lun: int + :keyword name: + :paramtype name: str + """ + super(DiskInformation, self).__init__(**kwargs) + self.lun = lun + self.name = name + + +class DpmErrorInfo(msrest.serialization.Model): + """DPM workload-specific error information. + + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] + """ + + _attribute_map = { + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + *, + error_string: Optional[str] = None, + recommendations: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword error_string: Localized error string. + :paramtype error_string: str + :keyword recommendations: List of localized recommendations for above error code. + :paramtype recommendations: list[str] + """ + super(DpmErrorInfo, self).__init__(**kwargs) + self.error_string = error_string + self.recommendations = recommendations + + +class DpmJob(Job): + """DPM workload-specific job object. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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. + :vartype job_type: str + :ivar duration: Time elapsed for job. + :vartype duration: ~datetime.timedelta + :ivar dpm_server_name: DPM server name managing the backup item or backup job. + :vartype dpm_server_name: str + :ivar container_name: Name of cluster/server protecting current backup item, if any. + :vartype container_name: str + :ivar container_type: Type of container. + :vartype container_type: str + :ivar workload_type: Type of backup item. + :vartype workload_type: str + :ivar actions_info: The state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :ivar error_details: The errors. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DpmErrorInfo] + :ivar extended_info: Additional information for this job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DpmJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'dpm_server_name': {'key': 'dpmServerName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[str]'}, + 'error_details': {'key': 'errorDetails', 'type': '[DpmErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DpmJobExtendedInfo'}, + } + + def __init__( + self, + *, + entity_friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + operation: Optional[str] = None, + status: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + activity_id: Optional[str] = None, + duration: Optional[datetime.timedelta] = None, + dpm_server_name: Optional[str] = None, + container_name: Optional[str] = None, + container_type: Optional[str] = None, + workload_type: Optional[str] = None, + actions_info: Optional[List[Union[str, "JobSupportedAction"]]] = None, + error_details: Optional[List["DpmErrorInfo"]] = None, + extended_info: Optional["DpmJobExtendedInfo"] = None, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time elapsed for job. + :paramtype duration: ~datetime.timedelta + :keyword dpm_server_name: DPM server name managing the backup item or backup job. + :paramtype dpm_server_name: str + :keyword container_name: Name of cluster/server protecting current backup item, if any. + :paramtype container_name: str + :keyword container_type: Type of container. + :paramtype container_type: str + :keyword workload_type: Type of backup item. + :paramtype workload_type: str + :keyword actions_info: The state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :keyword error_details: The errors. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DpmErrorInfo] + :keyword extended_info: Additional information for this job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DpmJobExtendedInfo + """ + super(DpmJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.job_type = 'DpmJob' # type: str + self.duration = duration + self.dpm_server_name = dpm_server_name + self.container_name = container_name + self.container_type = container_type + self.workload_type = workload_type + self.actions_info = actions_info + self.error_details = error_details + self.extended_info = extended_info + + +class DpmJobExtendedInfo(msrest.serialization.Model): + """Additional information on the DPM workload-specific job. + + :ivar tasks_list: List of tasks associated with this job. + :vartype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DpmJobTaskDetails] + :ivar property_bag: The job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[DpmJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__( + self, + *, + tasks_list: Optional[List["DpmJobTaskDetails"]] = None, + property_bag: Optional[Dict[str, str]] = None, + dynamic_error_message: Optional[str] = None, + **kwargs + ): + """ + :keyword tasks_list: List of tasks associated with this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DpmJobTaskDetails] + :keyword property_bag: The job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ + super(DpmJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.dynamic_error_message = dynamic_error_message + + +class DpmJobTaskDetails(msrest.serialization.Model): + """DPM workload-specific job task details. + + :ivar task_id: The task display name. + :vartype task_id: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar duration: Time elapsed for task. + :vartype duration: ~datetime.timedelta + :ivar status: The status. + :vartype status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + task_id: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + duration: Optional[datetime.timedelta] = None, + status: Optional[str] = None, + **kwargs + ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword duration: Time elapsed for task. + :paramtype duration: ~datetime.timedelta + :keyword status: The status. + :paramtype status: str + """ + super(DpmJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.start_time = start_time + self.end_time = end_time + self.duration = duration + self.status = status + + +class DPMProtectedItem(ProtectedItem): + """Additional information on Backup engine specific backup item. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the managed item. + :vartype friendly_name: str + :ivar backup_engine_name: Backup Management server protecting this backup item. + :vartype backup_engine_name: str + :ivar protection_state: Protection state of the backup engine. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemState + :ivar extended_info: Extended info of the backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DPMProtectedItemExtendedInfo + """ + + _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'}, + 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DPMProtectedItemExtendedInfo'}, + } + + 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, + backup_engine_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectedItemState"]] = None, + extended_info: Optional["DPMProtectedItemExtendedInfo"] = None, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the managed item. + :paramtype friendly_name: str + :keyword backup_engine_name: Backup Management server protecting this backup item. + :paramtype backup_engine_name: str + :keyword protection_state: Protection state of the backup engine. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemState + :keyword extended_info: Extended info of the backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DPMProtectedItemExtendedInfo + """ + super(DPMProtectedItem, 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 = 'DPMProtectedItem' # type: str + self.friendly_name = friendly_name + self.backup_engine_name = backup_engine_name + self.protection_state = protection_state + self.extended_info = extended_info + + +class DPMProtectedItemExtendedInfo(msrest.serialization.Model): + """Additional information of DPM Protected item. + + :ivar protectable_object_load_path: Attribute to provide information on various DBs. + :vartype protectable_object_load_path: dict[str, str] + :ivar protected: To check if backup item is disk protected. + :vartype protected: bool + :ivar is_present_on_cloud: To check if backup item is cloud protected. + :vartype is_present_on_cloud: bool + :ivar last_backup_status: Last backup status information on backup item. + :vartype last_backup_status: str + :ivar last_refreshed_at: Last refresh time on backup item. + :vartype last_refreshed_at: ~datetime.datetime + :ivar oldest_recovery_point: Oldest cloud recovery point time. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: cloud recovery point count. + :vartype recovery_point_count: int + :ivar on_premise_oldest_recovery_point: Oldest disk recovery point time. + :vartype on_premise_oldest_recovery_point: ~datetime.datetime + :ivar on_premise_latest_recovery_point: latest disk recovery point time. + :vartype on_premise_latest_recovery_point: ~datetime.datetime + :ivar on_premise_recovery_point_count: disk recovery point count. + :vartype on_premise_recovery_point_count: int + :ivar is_collocated: To check if backup item is collocated. + :vartype is_collocated: bool + :ivar protection_group_name: Protection group name of the backup item. + :vartype protection_group_name: str + :ivar disk_storage_used_in_bytes: Used Disk storage in bytes. + :vartype disk_storage_used_in_bytes: str + :ivar total_disk_storage_size_in_bytes: total Disk storage in bytes. + :vartype total_disk_storage_size_in_bytes: str + """ + + _attribute_map = { + 'protectable_object_load_path': {'key': 'protectableObjectLoadPath', 'type': '{str}'}, + 'protected': {'key': 'protected', 'type': 'bool'}, + 'is_present_on_cloud': {'key': 'isPresentOnCloud', 'type': 'bool'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + 'on_premise_oldest_recovery_point': {'key': 'onPremiseOldestRecoveryPoint', 'type': 'iso-8601'}, + 'on_premise_latest_recovery_point': {'key': 'onPremiseLatestRecoveryPoint', 'type': 'iso-8601'}, + 'on_premise_recovery_point_count': {'key': 'onPremiseRecoveryPointCount', 'type': 'int'}, + 'is_collocated': {'key': 'isCollocated', 'type': 'bool'}, + 'protection_group_name': {'key': 'protectionGroupName', 'type': 'str'}, + 'disk_storage_used_in_bytes': {'key': 'diskStorageUsedInBytes', 'type': 'str'}, + 'total_disk_storage_size_in_bytes': {'key': 'totalDiskStorageSizeInBytes', 'type': 'str'}, + } + + def __init__( + self, + *, + protectable_object_load_path: Optional[Dict[str, str]] = None, + protected: Optional[bool] = None, + is_present_on_cloud: Optional[bool] = None, + last_backup_status: Optional[str] = None, + last_refreshed_at: Optional[datetime.datetime] = None, + oldest_recovery_point: Optional[datetime.datetime] = None, + recovery_point_count: Optional[int] = None, + on_premise_oldest_recovery_point: Optional[datetime.datetime] = None, + on_premise_latest_recovery_point: Optional[datetime.datetime] = None, + on_premise_recovery_point_count: Optional[int] = None, + is_collocated: Optional[bool] = None, + protection_group_name: Optional[str] = None, + disk_storage_used_in_bytes: Optional[str] = None, + total_disk_storage_size_in_bytes: Optional[str] = None, + **kwargs + ): + """ + :keyword protectable_object_load_path: Attribute to provide information on various DBs. + :paramtype protectable_object_load_path: dict[str, str] + :keyword protected: To check if backup item is disk protected. + :paramtype protected: bool + :keyword is_present_on_cloud: To check if backup item is cloud protected. + :paramtype is_present_on_cloud: bool + :keyword last_backup_status: Last backup status information on backup item. + :paramtype last_backup_status: str + :keyword last_refreshed_at: Last refresh time on backup item. + :paramtype last_refreshed_at: ~datetime.datetime + :keyword oldest_recovery_point: Oldest cloud recovery point time. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: cloud recovery point count. + :paramtype recovery_point_count: int + :keyword on_premise_oldest_recovery_point: Oldest disk recovery point time. + :paramtype on_premise_oldest_recovery_point: ~datetime.datetime + :keyword on_premise_latest_recovery_point: latest disk recovery point time. + :paramtype on_premise_latest_recovery_point: ~datetime.datetime + :keyword on_premise_recovery_point_count: disk recovery point count. + :paramtype on_premise_recovery_point_count: int + :keyword is_collocated: To check if backup item is collocated. + :paramtype is_collocated: bool + :keyword protection_group_name: Protection group name of the backup item. + :paramtype protection_group_name: str + :keyword disk_storage_used_in_bytes: Used Disk storage in bytes. + :paramtype disk_storage_used_in_bytes: str + :keyword total_disk_storage_size_in_bytes: total Disk storage in bytes. + :paramtype total_disk_storage_size_in_bytes: str + """ + super(DPMProtectedItemExtendedInfo, self).__init__(**kwargs) + self.protectable_object_load_path = protectable_object_load_path + self.protected = protected + self.is_present_on_cloud = is_present_on_cloud + self.last_backup_status = last_backup_status + self.last_refreshed_at = last_refreshed_at + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + self.on_premise_oldest_recovery_point = on_premise_oldest_recovery_point + self.on_premise_latest_recovery_point = on_premise_latest_recovery_point + self.on_premise_recovery_point_count = on_premise_recovery_point_count + self.is_collocated = is_collocated + self.protection_group_name = protection_group_name + self.disk_storage_used_in_bytes = disk_storage_used_in_bytes + self.total_disk_storage_size_in_bytes = total_disk_storage_size_in_bytes + + +class EncryptionDetails(msrest.serialization.Model): + """Details needed if the VM was encrypted at the time of backup. + + :ivar encryption_enabled: Identifies whether this backup copy represents an encrypted VM at the + time of backup. + :vartype encryption_enabled: bool + :ivar kek_url: Key Url. + :vartype kek_url: str + :ivar secret_key_url: Secret Url. + :vartype secret_key_url: str + :ivar kek_vault_id: ID of Key Vault where KEK is stored. + :vartype kek_vault_id: str + :ivar secret_key_vault_id: ID of Key Vault where Secret is stored. + :vartype secret_key_vault_id: str + """ + + _attribute_map = { + 'encryption_enabled': {'key': 'encryptionEnabled', 'type': 'bool'}, + 'kek_url': {'key': 'kekUrl', 'type': 'str'}, + 'secret_key_url': {'key': 'secretKeyUrl', 'type': 'str'}, + 'kek_vault_id': {'key': 'kekVaultId', 'type': 'str'}, + 'secret_key_vault_id': {'key': 'secretKeyVaultId', 'type': 'str'}, + } + + def __init__( + self, + *, + encryption_enabled: Optional[bool] = None, + kek_url: Optional[str] = None, + secret_key_url: Optional[str] = None, + kek_vault_id: Optional[str] = None, + secret_key_vault_id: Optional[str] = None, + **kwargs + ): + """ + :keyword encryption_enabled: Identifies whether this backup copy represents an encrypted VM at + the time of backup. + :paramtype encryption_enabled: bool + :keyword kek_url: Key Url. + :paramtype kek_url: str + :keyword secret_key_url: Secret Url. + :paramtype secret_key_url: str + :keyword kek_vault_id: ID of Key Vault where KEK is stored. + :paramtype kek_vault_id: str + :keyword secret_key_vault_id: ID of Key Vault where Secret is stored. + :paramtype secret_key_vault_id: str + """ + super(EncryptionDetails, self).__init__(**kwargs) + self.encryption_enabled = encryption_enabled + self.kek_url = kek_url + self.secret_key_url = secret_key_url + self.kek_vault_id = kek_vault_id + self.secret_key_vault_id = secret_key_vault_id + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """Error Detail class which encapsulates Code, Message and Recommendations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error Message related to the Code. + :vartype message: str + :ivar recommendations: List of recommendation strings. + :vartype recommendations: list[str] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'recommendations': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.recommendations = None + + +class ExtendedProperties(msrest.serialization.Model): + """Extended Properties for Azure IaasVM Backup. + + :ivar disk_exclusion_properties: Extended Properties for Disk Exclusion. + :vartype disk_exclusion_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DiskExclusionProperties + """ + + _attribute_map = { + 'disk_exclusion_properties': {'key': 'diskExclusionProperties', 'type': 'DiskExclusionProperties'}, + } + + def __init__( + self, + *, + disk_exclusion_properties: Optional["DiskExclusionProperties"] = None, + **kwargs + ): + """ + :keyword disk_exclusion_properties: Extended Properties for Disk Exclusion. + :paramtype disk_exclusion_properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DiskExclusionProperties + """ + super(ExtendedProperties, self).__init__(**kwargs) + self.disk_exclusion_properties = disk_exclusion_properties + + +class GenericProtectedItem(ProtectedItem): + """Base class for backup items. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :vartype policy_state: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :ivar protected_item_id: Data Plane Service ID of the protected item. + :vartype protected_item_id: long + :ivar source_associations: Loosely coupled (type, value) associations (example - parent of a + protected item). + :vartype source_associations: dict[str, str] + :ivar fabric_name: Name of this backup item's fabric. + :vartype fabric_name: str + """ + + _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'}, + 'policy_state': {'key': 'policyState', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'protected_item_id': {'key': 'protectedItemId', 'type': 'long'}, + 'source_associations': {'key': 'sourceAssociations', 'type': '{str}'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + } + + 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, + policy_state: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionState"]] = None, + protected_item_id: Optional[int] = None, + source_associations: Optional[Dict[str, str]] = None, + fabric_name: Optional[str] = None, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :paramtype policy_state: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectionState + :keyword protected_item_id: Data Plane Service ID of the protected item. + :paramtype protected_item_id: long + :keyword source_associations: Loosely coupled (type, value) associations (example - parent of a + protected item). + :paramtype source_associations: dict[str, str] + :keyword fabric_name: Name of this backup item's fabric. + :paramtype fabric_name: str + """ + super(GenericProtectedItem, 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 = 'GenericProtectedItem' # type: str + self.friendly_name = friendly_name + self.policy_state = policy_state + self.protection_state = protection_state + self.protected_item_id = protected_item_id + self.source_associations = source_associations + self.fabric_name = fabric_name + + +class GenericRecoveryPoint(RecoveryPoint): + """Generic backup copy. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar friendly_name: Friendly name of the backup copy. + :vartype friendly_name: 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 + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', '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'}, + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + recovery_point_type: Optional[str] = None, + recovery_point_time: Optional[datetime.datetime] = None, + recovery_point_additional_info: Optional[str] = None, + **kwargs + ): + """ + :keyword friendly_name: Friendly name of the backup copy. + :paramtype friendly_name: str + :keyword recovery_point_type: Type of the backup copy. + :paramtype recovery_point_type: str + :keyword recovery_point_time: Time at which this backup copy was created. + :paramtype recovery_point_time: ~datetime.datetime + :keyword recovery_point_additional_info: Additional information associated with this backup + copy. + :paramtype recovery_point_additional_info: str + """ + super(GenericRecoveryPoint, self).__init__(**kwargs) + self.object_type = 'GenericRecoveryPoint' # type: str + self.friendly_name = friendly_name + self.recovery_point_type = recovery_point_type + self.recovery_point_time = recovery_point_time + self.recovery_point_additional_info = recovery_point_additional_info + + +class IaasVMRecoveryPoint(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. + + :ivar 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. + :vartype 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 + :ivar key_and_secret: Required details for recovering an encrypted VM. Applicable only when + IsSourceVMEncrypted is true. + :vartype key_and_secret: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KeyAndSecretDetails + :ivar is_instant_ilr_session_active: Is the session to recover items from this backup copy + still active. + :vartype is_instant_ilr_session_active: bool + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :ivar is_managed_virtual_machine: Whether VM is with Managed Disks. + :vartype is_managed_virtual_machine: bool + :ivar virtual_machine_size: Virtual Machine Size. + :vartype virtual_machine_size: str + :ivar original_storage_account_option: Original Storage Account Option. + :vartype original_storage_account_option: bool + :ivar os_type: OS type. + :vartype os_type: str + :ivar recovery_point_disk_configuration: Disk configuration. + :vartype recovery_point_disk_configuration: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointDiskConfiguration + :ivar zones: Identifies the zone of the VM at the time of backup. Applicable only for + zone-pinned Vms. + :vartype zones: list[str] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.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 + ): + """ + :keyword key_and_secret: Required details for recovering an encrypted VM. Applicable only when + IsSourceVMEncrypted is true. + :paramtype key_and_secret: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KeyAndSecretDetails + :keyword is_instant_ilr_session_active: Is the session to recover items from this backup copy + still active. + :paramtype is_instant_ilr_session_active: bool + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierInformation] + :keyword is_managed_virtual_machine: Whether VM is with Managed Disks. + :paramtype is_managed_virtual_machine: bool + :keyword virtual_machine_size: Virtual Machine Size. + :paramtype virtual_machine_size: str + :keyword original_storage_account_option: Original Storage Account Option. + :paramtype original_storage_account_option: bool + :keyword os_type: OS type. + :paramtype os_type: str + :keyword recovery_point_disk_configuration: Disk configuration. + :paramtype recovery_point_disk_configuration: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointDiskConfiguration + :keyword zones: Identifies the zone of the VM at the time of backup. Applicable only for + zone-pinned Vms. + :paramtype zones: list[str] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointMoveReadinessInfo] + """ + super(IaasVMRecoveryPoint, 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. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_point_id: ID of the backup copy to be recovered. + :vartype recovery_point_id: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM which is being recovered. + :vartype source_resource_id: str + :ivar 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}. + :vartype target_virtual_machine_id: str + :ivar 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}. + :vartype target_resource_group_id: str + :ivar storage_account_id: Fully qualified ARM ID of the storage account to which the VM has to + be restored. + :vartype storage_account_id: str + :ivar 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. + :vartype virtual_network_id: str + :ivar 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. + :vartype subnet_id: str + :ivar 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. + :vartype target_domain_name_id: str + :ivar region: Region in which the virtual machine is restored. + :vartype region: str + :ivar affinity_group: Affinity group associated to VM to be restored. Used only for Classic + Compute Virtual Machines. + :vartype affinity_group: str + :ivar 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. + :vartype create_new_cloud_service: bool + :ivar original_storage_account_option: Original Storage Account Option. + :vartype original_storage_account_option: bool + :ivar encryption_details: Details needed if the VM was encrypted at the time of backup. + :vartype encryption_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.EncryptionDetails + :ivar restore_disk_lun_list: List of Disk LUNs for partial restore. + :vartype restore_disk_lun_list: list[int] + :ivar restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored + with Managed disks. + :vartype restore_with_managed_disks: bool + :ivar disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be encrypted + at rest during restore with customer managed key. + :vartype disk_encryption_set_id: str + :ivar zones: Target zone where the VM and its disks should be restored. + :vartype zones: list[str] + :ivar identity_info: Managed Identity information required to access customer storage account. + :vartype identity_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.IdentityInfo + :ivar identity_based_restore_details: IaaS VM workload specific restore details for restores + using managed identity. + :vartype identity_based_restore_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.IdentityBasedRestoreDetails + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, + 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, + 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, + 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, + 'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'}, + 'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'}, + 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'}, + 'identity_based_restore_details': {'key': 'identityBasedRestoreDetails', 'type': 'IdentityBasedRestoreDetails'}, + } + + 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, + 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, + zones: Optional[List[str]] = None, + identity_info: Optional["IdentityInfo"] = None, + identity_based_restore_details: Optional["IdentityBasedRestoreDetails"] = None, + **kwargs + ): + """ + :keyword recovery_point_id: ID of the backup copy to be recovered. + :paramtype recovery_point_id: str + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM which is being recovered. + :paramtype source_resource_id: str + :keyword 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}. + :paramtype target_virtual_machine_id: str + :keyword 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}. + :paramtype target_resource_group_id: str + :keyword storage_account_id: Fully qualified ARM ID of the storage account to which the VM has + to be restored. + :paramtype storage_account_id: str + :keyword 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. + :paramtype virtual_network_id: str + :keyword 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. + :paramtype subnet_id: str + :keyword 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. + :paramtype target_domain_name_id: str + :keyword region: Region in which the virtual machine is restored. + :paramtype region: str + :keyword affinity_group: Affinity group associated to VM to be restored. Used only for Classic + Compute Virtual Machines. + :paramtype affinity_group: str + :keyword 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. + :paramtype create_new_cloud_service: bool + :keyword original_storage_account_option: Original Storage Account Option. + :paramtype original_storage_account_option: bool + :keyword encryption_details: Details needed if the VM was encrypted at the time of backup. + :paramtype encryption_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.EncryptionDetails + :keyword restore_disk_lun_list: List of Disk LUNs for partial restore. + :paramtype restore_disk_lun_list: list[int] + :keyword restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored + with Managed disks. + :paramtype restore_with_managed_disks: bool + :keyword disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be + encrypted at rest during restore with customer managed key. + :paramtype disk_encryption_set_id: str + :keyword zones: Target zone where the VM and its disks should be restored. + :paramtype zones: list[str] + :keyword identity_info: Managed Identity information required to access customer storage + account. + :paramtype identity_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.IdentityInfo + :keyword identity_based_restore_details: IaaS VM workload specific restore details for restores + using managed identity. + :paramtype identity_based_restore_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.IdentityBasedRestoreDetails + """ + 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 + 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.zones = zones + self.identity_info = identity_info + self.identity_based_restore_details = identity_based_restore_details + + +class IdentityBasedRestoreDetails(msrest.serialization.Model): + """IaaS VM workload specific restore details for restores using managed identity. + + :ivar object_type: Gets the class type. + :vartype object_type: str + :ivar target_storage_account_id: Fully qualified ARM ID of the target storage account. + :vartype 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 + ): + """ + :keyword object_type: Gets the class type. + :paramtype object_type: str + :keyword target_storage_account_id: Fully qualified ARM ID of the target storage account. + :paramtype target_storage_account_id: str + """ + 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. + + :ivar is_system_assigned_identity: To differentiate if the managed identity is system assigned + or user assigned. + :vartype is_system_assigned_identity: bool + :ivar managed_identity_resource_id: Managed Identity Resource Id + Optional: Might not be required in the case of system assigned managed identity. + :vartype managed_identity_resource_id: str + """ + + _attribute_map = { + 'is_system_assigned_identity': {'key': 'isSystemAssignedIdentity', 'type': 'bool'}, + 'managed_identity_resource_id': {'key': 'managedIdentityResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + is_system_assigned_identity: Optional[bool] = None, + managed_identity_resource_id: Optional[str] = None, + **kwargs + ): + """ + :keyword is_system_assigned_identity: To differentiate if the managed identity is system + assigned or user assigned. + :paramtype is_system_assigned_identity: bool + :keyword managed_identity_resource_id: Managed Identity Resource Id + Optional: Might not be required in the case of system assigned managed identity. + :paramtype managed_identity_resource_id: str + """ + super(IdentityInfo, self).__init__(**kwargs) + self.is_system_assigned_identity = is_system_assigned_identity + self.managed_identity_resource_id = managed_identity_resource_id + + +class InstantItemRecoveryTarget(msrest.serialization.Model): + """Target details for file / folder restore. + + :ivar client_scripts: List of client scripts. + :vartype client_scripts: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ClientScriptForConnect] + """ + + _attribute_map = { + 'client_scripts': {'key': 'clientScripts', 'type': '[ClientScriptForConnect]'}, + } + + def __init__( + self, + *, + client_scripts: Optional[List["ClientScriptForConnect"]] = None, + **kwargs + ): + """ + :keyword client_scripts: List of client scripts. + :paramtype client_scripts: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ClientScriptForConnect] + """ + super(InstantItemRecoveryTarget, self).__init__(**kwargs) + self.client_scripts = client_scripts + + +class JobQueryObject(msrest.serialization.Model): + """Filters to list the jobs. + + :ivar status: Status of the job. Possible values include: "Invalid", "InProgress", "Completed", + "Failed", "CompletedWithWarnings", "Cancelled", "Cancelling". + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobStatus + :ivar backup_management_type: Type of backup management for the job. Possible values include: + "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", + "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar operation: Type of operation. Possible values include: "Invalid", "Register", + "UnRegister", "ConfigureBackup", "Backup", "Restore", "DisableBackup", "DeleteBackupData", + "CrossRegionRestore", "Undelete", "UpdateCustomerManagedKey". + :vartype operation: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobOperationType + :ivar job_id: JobID represents the job uniquely. + :vartype job_id: str + :ivar start_time: Job has started at this time. Value is in UTC. + :vartype start_time: ~datetime.datetime + :ivar end_time: Job has ended at this time. Value is in UTC. + :vartype end_time: ~datetime.datetime + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "JobStatus"]] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + operation: Optional[Union[str, "JobOperationType"]] = None, + job_id: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword status: Status of the job. Possible values include: "Invalid", "InProgress", + "Completed", "Failed", "CompletedWithWarnings", "Cancelled", "Cancelling". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobStatus + :keyword backup_management_type: Type of backup management for the job. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword operation: Type of operation. Possible values include: "Invalid", "Register", + "UnRegister", "ConfigureBackup", "Backup", "Restore", "DisableBackup", "DeleteBackupData", + "CrossRegionRestore", "Undelete", "UpdateCustomerManagedKey". + :paramtype operation: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobOperationType + :keyword job_id: JobID represents the job uniquely. + :paramtype job_id: str + :keyword start_time: Job has started at this time. Value is in UTC. + :paramtype start_time: ~datetime.datetime + :keyword end_time: Job has ended at this time. Value is in UTC. + :paramtype end_time: ~datetime.datetime + """ + super(JobQueryObject, self).__init__(**kwargs) + self.status = status + self.backup_management_type = backup_management_type + self.operation = operation + self.job_id = job_id + self.start_time = start_time + self.end_time = end_time + + +class JobResource(Resource): + """Defines workload agnostic properties for a job. + + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: JobResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.Job + """ + + _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': 'Job'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + properties: Optional["Job"] = None, + **kwargs + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: JobResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.Job + """ + super(JobResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class ResourceList(msrest.serialization.Model): + """Base for all lists of resources. + + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + """ + super(ResourceList, self).__init__(**kwargs) + self.next_link = next_link + + +class JobResourceList(ResourceList): + """List of Job resources. + + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[JobResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["JobResource"]] = None, + **kwargs + ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobResource] + """ + super(JobResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class KEKDetails(msrest.serialization.Model): + """KEK is encryption key for BEK. + + :ivar key_url: Key is KEK. + :vartype key_url: str + :ivar key_vault_id: Key Vault ID where this Key is stored. + :vartype key_vault_id: str + :ivar key_backup_data: KEK data. + :vartype key_backup_data: str + """ + + _attribute_map = { + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + 'key_vault_id': {'key': 'keyVaultId', 'type': 'str'}, + 'key_backup_data': {'key': 'keyBackupData', 'type': 'str'}, + } + + def __init__( + self, + *, + key_url: Optional[str] = None, + key_vault_id: Optional[str] = None, + key_backup_data: Optional[str] = None, + **kwargs + ): + """ + :keyword key_url: Key is KEK. + :paramtype key_url: str + :keyword key_vault_id: Key Vault ID where this Key is stored. + :paramtype key_vault_id: str + :keyword key_backup_data: KEK data. + :paramtype key_backup_data: str + """ + super(KEKDetails, self).__init__(**kwargs) + self.key_url = key_url + self.key_vault_id = key_vault_id + self.key_backup_data = key_backup_data + + +class KeyAndSecretDetails(msrest.serialization.Model): + """BEK is bitlocker key. +KEK is encryption key for BEK +If the VM was encrypted then we will store following details : + + +#. Secret(BEK) - Url + Backup Data + vaultId. +#. Key(KEK) - Url + Backup Data + vaultId. +#. EncryptionMechanism + BEK and KEK can potentially have different vault ids. + + :ivar kek_details: KEK is encryption key for BEK. + :vartype kek_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KEKDetails + :ivar bek_details: BEK is bitlocker encryption key. + :vartype bek_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BEKDetails + :ivar encryption_mechanism: Encryption mechanism: None/ SinglePass/ DoublePass. + :vartype encryption_mechanism: str + """ + + _attribute_map = { + 'kek_details': {'key': 'kekDetails', 'type': 'KEKDetails'}, + 'bek_details': {'key': 'bekDetails', 'type': 'BEKDetails'}, + 'encryption_mechanism': {'key': 'encryptionMechanism', 'type': 'str'}, + } + + def __init__( + self, + *, + kek_details: Optional["KEKDetails"] = None, + bek_details: Optional["BEKDetails"] = None, + encryption_mechanism: Optional[str] = None, + **kwargs + ): + """ + :keyword kek_details: KEK is encryption key for BEK. + :paramtype kek_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.KEKDetails + :keyword bek_details: BEK is bitlocker encryption key. + :paramtype bek_details: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BEKDetails + :keyword encryption_mechanism: Encryption mechanism: None/ SinglePass/ DoublePass. + :paramtype encryption_mechanism: str + """ + super(KeyAndSecretDetails, self).__init__(**kwargs) + self.kek_details = kek_details + self.bek_details = bek_details + self.encryption_mechanism = encryption_mechanism + + +class KPIResourceHealthDetails(msrest.serialization.Model): + """KPI Resource Health Details. + + :ivar resource_health_status: Resource Health Status. Possible values include: "Healthy", + "TransientDegraded", "PersistentDegraded", "TransientUnhealthy", "PersistentUnhealthy", + "Invalid". + :vartype resource_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ResourceHealthStatus + :ivar resource_health_details: Resource Health Status. + :vartype resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ResourceHealthDetails] + """ + + _attribute_map = { + 'resource_health_status': {'key': 'resourceHealthStatus', 'type': 'str'}, + 'resource_health_details': {'key': 'resourceHealthDetails', 'type': '[ResourceHealthDetails]'}, + } + + def __init__( + self, + *, + resource_health_status: Optional[Union[str, "ResourceHealthStatus"]] = None, + resource_health_details: Optional[List["ResourceHealthDetails"]] = None, + **kwargs + ): + """ + :keyword resource_health_status: Resource Health Status. Possible values include: "Healthy", + "TransientDegraded", "PersistentDegraded", "TransientUnhealthy", "PersistentUnhealthy", + "Invalid". + :paramtype resource_health_status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ResourceHealthStatus + :keyword resource_health_details: Resource Health Status. + :paramtype resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ResourceHealthDetails] + """ + super(KPIResourceHealthDetails, self).__init__(**kwargs) + self.resource_health_status = resource_health_status + self.resource_health_details = resource_health_details + + +class MabErrorInfo(msrest.serialization.Model): + """MAB workload-specific error information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar recommendations: List of localized recommendations. + :vartype recommendations: list[str] + """ + + _validation = { + 'error_string': {'readonly': True}, + 'recommendations': {'readonly': True}, + } + + _attribute_map = { + 'error_string': {'key': 'errorString', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(MabErrorInfo, self).__init__(**kwargs) + self.error_string = None + self.recommendations = None + + +class MabFileFolderProtectedItem(ProtectedItem): + """MAB workload-specific backup item. + + All required parameters must be populated in order to send to Azure. + + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar 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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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". + :vartype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :vartype is_scheduled_for_deferred_delete: bool + :ivar deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete + is permanently deleted. + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar friendly_name: Friendly name of this backup item. + :vartype friendly_name: str + :ivar computer_name: Name of the computer associated with this backup item. + :vartype computer_name: str + :ivar last_backup_status: Status of last backup operation. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protection_state: Protected, ProtectionStopped, IRPending or ProtectionError. + :vartype protection_state: str + :ivar deferred_delete_sync_time_in_utc: Sync time for deferred deletion in UTC. + :vartype deferred_delete_sync_time_in_utc: long + :ivar extended_info: Additional information with this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabFileFolderProtectedItemExtendedInfo + """ + + _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'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'deferred_delete_sync_time_in_utc': {'key': 'deferredDeleteSyncTimeInUTC', 'type': 'long'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'MabFileFolderProtectedItemExtendedInfo'}, + } + + 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, + computer_name: Optional[str] = None, + last_backup_status: Optional[str] = None, + last_backup_time: Optional[datetime.datetime] = None, + protection_state: Optional[str] = None, + deferred_delete_sync_time_in_utc: Optional[int] = None, + extended_info: Optional["MabFileFolderProtectedItemExtendedInfo"] = None, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword friendly_name: Friendly name of this backup item. + :paramtype friendly_name: str + :keyword computer_name: Name of the computer associated with this backup item. + :paramtype computer_name: str + :keyword last_backup_status: Status of last backup operation. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protection_state: Protected, ProtectionStopped, IRPending or ProtectionError. + :paramtype protection_state: str + :keyword deferred_delete_sync_time_in_utc: Sync time for deferred deletion in UTC. + :paramtype deferred_delete_sync_time_in_utc: long + :keyword extended_info: Additional information with this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabFileFolderProtectedItemExtendedInfo + """ + super(MabFileFolderProtectedItem, 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 = 'MabFileFolderProtectedItem' # type: str + self.friendly_name = friendly_name + self.computer_name = computer_name + self.last_backup_status = last_backup_status + self.last_backup_time = last_backup_time + self.protection_state = protection_state + self.deferred_delete_sync_time_in_utc = deferred_delete_sync_time_in_utc + self.extended_info = extended_info + + +class MabFileFolderProtectedItemExtendedInfo(msrest.serialization.Model): + """Additional information on the backed up item. + + :ivar last_refreshed_at: Last time when the agent data synced to service. + :vartype last_refreshed_at: ~datetime.datetime + :ivar oldest_recovery_point: The oldest backup copy available. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of backup copies associated with the backup item. + :vartype recovery_point_count: int + """ + + _attribute_map = { + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, + 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, + } + + def __init__( + self, + *, + last_refreshed_at: Optional[datetime.datetime] = None, + oldest_recovery_point: Optional[datetime.datetime] = None, + recovery_point_count: Optional[int] = None, + **kwargs + ): + """ + :keyword last_refreshed_at: Last time when the agent data synced to service. + :paramtype last_refreshed_at: ~datetime.datetime + :keyword oldest_recovery_point: The oldest backup copy available. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of backup copies associated with the backup item. + :paramtype recovery_point_count: int + """ + super(MabFileFolderProtectedItemExtendedInfo, self).__init__(**kwargs) + self.last_refreshed_at = last_refreshed_at + self.oldest_recovery_point = oldest_recovery_point + self.recovery_point_count = recovery_point_count + + +class MabJob(Job): + """MAB workload-specific job. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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. + :vartype job_type: str + :ivar duration: Time taken by job to run. + :vartype duration: ~datetime.timedelta + :ivar actions_info: The state/actions applicable on jobs like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :ivar mab_server_name: Name of server protecting the DS. + :vartype mab_server_name: str + :ivar mab_server_type: Server type of MAB container. Possible values include: "Invalid", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype mab_server_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabServerType + :ivar workload_type: Workload type of backup item. Possible values include: "Invalid", "VM", + "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", + "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", + "SAPAseDatabase". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.WorkloadType + :ivar error_details: The errors. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabErrorInfo] + :ivar extended_info: Additional information on the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[str]'}, + 'mab_server_name': {'key': 'mabServerName', 'type': 'str'}, + 'mab_server_type': {'key': 'mabServerType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'error_details': {'key': 'errorDetails', 'type': '[MabErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'MabJobExtendedInfo'}, + } + + def __init__( + self, + *, + entity_friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + operation: Optional[str] = None, + status: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + activity_id: Optional[str] = None, + duration: Optional[datetime.timedelta] = None, + actions_info: Optional[List[Union[str, "JobSupportedAction"]]] = None, + mab_server_name: Optional[str] = None, + mab_server_type: Optional[Union[str, "MabServerType"]] = None, + workload_type: Optional[Union[str, "WorkloadType"]] = None, + error_details: Optional[List["MabErrorInfo"]] = None, + extended_info: Optional["MabJobExtendedInfo"] = None, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time taken by job to run. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: The state/actions applicable on jobs like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobSupportedAction] + :keyword mab_server_name: Name of server protecting the DS. + :paramtype mab_server_name: str + :keyword mab_server_type: Server type of MAB container. Possible values include: "Invalid", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :paramtype mab_server_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabServerType + :keyword workload_type: Workload type of backup item. Possible values include: "Invalid", "VM", + "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", + "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", + "SAPAseDatabase". + :paramtype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.WorkloadType + :keyword error_details: The errors. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabErrorInfo] + :keyword extended_info: Additional information on the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabJobExtendedInfo + """ + super(MabJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.job_type = 'MabJob' # type: str + self.duration = duration + self.actions_info = actions_info + self.mab_server_name = mab_server_name + self.mab_server_type = mab_server_type + self.workload_type = workload_type + self.error_details = error_details + self.extended_info = extended_info + + +class MabJobExtendedInfo(msrest.serialization.Model): + """Additional information for the MAB workload-specific job. + + :ivar tasks_list: List of tasks for this job. + :vartype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabJobTaskDetails] + :ivar property_bag: The job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message specific to this job. + :vartype dynamic_error_message: str + """ + + _attribute_map = { + 'tasks_list': {'key': 'tasksList', 'type': '[MabJobTaskDetails]'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'dynamic_error_message': {'key': 'dynamicErrorMessage', 'type': 'str'}, + } + + def __init__( + self, + *, + tasks_list: Optional[List["MabJobTaskDetails"]] = None, + property_bag: Optional[Dict[str, str]] = None, + dynamic_error_message: Optional[str] = None, + **kwargs + ): + """ + :keyword tasks_list: List of tasks for this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.MabJobTaskDetails] + :keyword property_bag: The job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message specific to this job. + :paramtype dynamic_error_message: str + """ + super(MabJobExtendedInfo, self).__init__(**kwargs) + self.tasks_list = tasks_list + self.property_bag = property_bag + self.dynamic_error_message = dynamic_error_message + + +class MabJobTaskDetails(msrest.serialization.Model): + """MAB workload-specific job task details. + + :ivar task_id: The task display name. + :vartype task_id: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar duration: Time elapsed for task. + :vartype duration: ~datetime.timedelta + :ivar status: The status. + :vartype status: str + """ + + _attribute_map = { + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + task_id: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + duration: Optional[datetime.timedelta] = None, + status: Optional[str] = None, + **kwargs + ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword duration: Time elapsed for task. + :paramtype duration: ~datetime.timedelta + :keyword status: The status. + :paramtype status: str + """ + super(MabJobTaskDetails, self).__init__(**kwargs) + self.task_id = task_id + self.start_time = start_time + self.end_time = end_time + self.duration = duration + self.status = status + + +class NameInfo(msrest.serialization.Model): + """The name of usage. + + :ivar value: Value of usage. + :vartype value: str + :ivar localized_value: Localized value of usage. + :vartype localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[str] = None, + localized_value: Optional[str] = None, + **kwargs + ): + """ + :keyword value: Value of usage. + :paramtype value: str + :keyword localized_value: Localized value of usage. + :paramtype localized_value: str + """ + super(NameInfo, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class NewErrorResponse(msrest.serialization.Model): + """The resource management error response. + + :ivar error: The error object. + :vartype error: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.NewErrorResponseError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'NewErrorResponseError'}, + } + + def __init__( + self, + *, + error: Optional["NewErrorResponseError"] = None, + **kwargs + ): + """ + :keyword error: The error object. + :paramtype error: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.NewErrorResponseError + """ + super(NewErrorResponse, self).__init__(**kwargs) + self.error = error + + +class NewErrorResponseError(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.crossregionregionrestore.models.NewErrorResponse] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[NewErrorResponse]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NewErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class OperationStatus(msrest.serialization.Model): + """Operation status. + + :ivar id: ID of the operation. + :vartype id: str + :ivar name: Name of the operation. + :vartype name: str + :ivar status: Operation status. Possible values include: "Invalid", "InProgress", "Succeeded", + "Failed", "Canceled". + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OperationStatusValues + :ivar start_time: Operation start time. Format: ISO-8601. + :vartype start_time: ~datetime.datetime + :ivar end_time: Operation end time. Format: ISO-8601. + :vartype end_time: ~datetime.datetime + :ivar error: Error information related to this operation. + :vartype error: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OperationStatusError + :ivar properties: Additional information associated with this operation. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OperationStatusExtendedInfo + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'OperationStatusError'}, + 'properties': {'key': 'properties', 'type': 'OperationStatusExtendedInfo'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + status: Optional[Union[str, "OperationStatusValues"]] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + error: Optional["OperationStatusError"] = None, + properties: Optional["OperationStatusExtendedInfo"] = None, + **kwargs + ): + """ + :keyword id: ID of the operation. + :paramtype id: str + :keyword name: Name of the operation. + :paramtype name: str + :keyword status: Operation status. Possible values include: "Invalid", "InProgress", + "Succeeded", "Failed", "Canceled". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OperationStatusValues + :keyword start_time: Operation start time. Format: ISO-8601. + :paramtype start_time: ~datetime.datetime + :keyword end_time: Operation end time. Format: ISO-8601. + :paramtype end_time: ~datetime.datetime + :keyword error: Error information related to this operation. + :paramtype error: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OperationStatusError + :keyword properties: Additional information associated with this operation. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OperationStatusExtendedInfo + """ + super(OperationStatus, self).__init__(**kwargs) + self.id = id + self.name = name + self.status = status + self.start_time = start_time + self.end_time = end_time + self.error = error + self.properties = properties + + +class OperationStatusError(msrest.serialization.Model): + """Error information associated with operation status call. + + :ivar code: Error code of the operation failure. + :vartype code: str + :ivar message: Error message displayed if the operation failure. + :vartype message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + """ + :keyword code: Error code of the operation failure. + :paramtype code: str + :keyword message: Error message displayed if the operation failure. + :paramtype message: str + """ + super(OperationStatusError, self).__init__(**kwargs) + self.code = code + self.message = message + + +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. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'OperationStatusJobExtendedInfo': 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo': 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo': 'OperationStatusProvisionILRExtendedInfo', 'OperationStatusRecoveryPointExtendedInfo': 'OperationStatusRecoveryPointExtendedInfo'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(OperationStatusExtendedInfo, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class OperationStatusJobExtendedInfo(OperationStatusExtendedInfo): + """Operation status job extended info. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar job_id: ID of the job created for this protected item. + :vartype job_id: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + } + + def __init__( + self, + *, + job_id: Optional[str] = None, + **kwargs + ): + """ + :keyword job_id: ID of the job created for this protected item. + :paramtype job_id: str + """ + super(OperationStatusJobExtendedInfo, self).__init__(**kwargs) + self.object_type = 'OperationStatusJobExtendedInfo' # type: str + self.job_id = job_id + + +class OperationStatusJobsExtendedInfo(OperationStatusExtendedInfo): + """Operation status extended info for list of jobs. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar job_ids: IDs of the jobs created for the protected item. + :vartype job_ids: list[str] + :ivar failed_jobs_error: Stores all the failed jobs along with the corresponding error codes. + :vartype failed_jobs_error: dict[str, str] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_ids': {'key': 'jobIds', 'type': '[str]'}, + 'failed_jobs_error': {'key': 'failedJobsError', 'type': '{str}'}, + } + + def __init__( + self, + *, + job_ids: Optional[List[str]] = None, + failed_jobs_error: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword job_ids: IDs of the jobs created for the protected item. + :paramtype job_ids: list[str] + :keyword failed_jobs_error: Stores all the failed jobs along with the corresponding error + codes. + :paramtype failed_jobs_error: dict[str, str] + """ + super(OperationStatusJobsExtendedInfo, self).__init__(**kwargs) + self.object_type = 'OperationStatusJobsExtendedInfo' # type: str + self.job_ids = job_ids + self.failed_jobs_error = failed_jobs_error + + +class OperationStatusProvisionILRExtendedInfo(OperationStatusExtendedInfo): + """Operation status extended info for ILR provision action. + + All required parameters must be populated in order to send to Azure. + + :ivar 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. + :vartype object_type: str + :ivar recovery_target: Target details for file / folder restore. + :vartype recovery_target: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.InstantItemRecoveryTarget + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_target': {'key': 'recoveryTarget', 'type': 'InstantItemRecoveryTarget'}, + } + + def __init__( + self, + *, + recovery_target: Optional["InstantItemRecoveryTarget"] = None, + **kwargs + ): + """ + :keyword recovery_target: Target details for file / folder restore. + :paramtype recovery_target: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.InstantItemRecoveryTarget + """ + super(OperationStatusProvisionILRExtendedInfo, self).__init__(**kwargs) + self.object_type = 'OperationStatusProvisionILRExtendedInfo' # type: str + 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. + + :ivar 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. + :vartype object_type: str + :ivar updated_recovery_point: Recovery Point info with updated source snapshot URI. + :vartype updated_recovery_point: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPoint + :ivar deleted_backup_item_version: In case the share is in soft-deleted state, populate this + field with deleted backup item. + :vartype 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 + ): + """ + :keyword updated_recovery_point: Recovery Point info with updated source snapshot URI. + :paramtype updated_recovery_point: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPoint + :keyword deleted_backup_item_version: In case the share is in soft-deleted state, populate this + field with deleted backup item. + :paramtype deleted_backup_item_version: str + """ + 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. + + :ivar start_time: Start time of the time range for log recovery. + :vartype start_time: ~datetime.datetime + :ivar end_time: End time of the time range for log recovery. + :vartype end_time: ~datetime.datetime + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword start_time: Start time of the time range for log recovery. + :paramtype start_time: ~datetime.datetime + :keyword end_time: End time of the time range for log recovery. + :paramtype end_time: ~datetime.datetime + """ + super(PointInTimeRange, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + + +class ProtectedItemQueryObject(msrest.serialization.Model): + """Filters to list backup items. + + :ivar health_state: Health State for the backed up item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :vartype health_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthState + :ivar backup_management_type: Backup management type for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :ivar item_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". + :vartype item_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :ivar policy_name: Backup policy name associated with the backup item. + :vartype policy_name: str + :ivar container_name: Name of the container. + :vartype container_name: str + :ivar backup_engine_name: Backup Engine name. + :vartype backup_engine_name: str + :ivar friendly_name: Friendly name of protected item. + :vartype friendly_name: str + :ivar fabric_name: Name of the fabric. + :vartype fabric_name: str + :ivar backup_set_name: Name of the backup set. + :vartype backup_set_name: str + """ + + _attribute_map = { + 'health_state': {'key': 'healthState', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'item_type': {'key': 'itemType', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, + } + + def __init__( + self, + *, + health_state: Optional[Union[str, "HealthState"]] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + item_type: Optional[Union[str, "DataSourceType"]] = None, + policy_name: Optional[str] = None, + container_name: Optional[str] = None, + backup_engine_name: Optional[str] = None, + friendly_name: Optional[str] = None, + fabric_name: Optional[str] = None, + backup_set_name: Optional[str] = None, + **kwargs + ): + """ + :keyword health_state: Health State for the backed up item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_state: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.HealthState + :keyword backup_management_type: Backup management type for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementType + :keyword item_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". + :paramtype item_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DataSourceType + :keyword policy_name: Backup policy name associated with the backup item. + :paramtype policy_name: str + :keyword container_name: Name of the container. + :paramtype container_name: str + :keyword backup_engine_name: Backup Engine name. + :paramtype backup_engine_name: str + :keyword friendly_name: Friendly name of protected item. + :paramtype friendly_name: str + :keyword fabric_name: Name of the fabric. + :paramtype fabric_name: str + :keyword backup_set_name: Name of the backup set. + :paramtype backup_set_name: str + """ + super(ProtectedItemQueryObject, self).__init__(**kwargs) + self.health_state = health_state + self.backup_management_type = backup_management_type + self.item_type = item_type + self.policy_name = policy_name + self.container_name = container_name + self.backup_engine_name = backup_engine_name + self.friendly_name = friendly_name + self.fabric_name = fabric_name + self.backup_set_name = backup_set_name + + +class ProtectedItemResource(Resource): + """Base class for backup items. + + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ProtectedItemResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItem + """ + + _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': 'ProtectedItem'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + properties: Optional["ProtectedItem"] = None, + **kwargs + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ProtectedItemResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItem + """ + super(ProtectedItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class ProtectedItemResourceList(ResourceList): + """List of ProtectedItem resources. + + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ProtectedItemResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["ProtectedItemResource"]] = None, + **kwargs + ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemResource] + """ + super(ProtectedItemResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class RecoveryPointDiskConfiguration(msrest.serialization.Model): + """Disk configuration. + + :ivar number_of_disks_included_in_backup: Number of disks included in backup. + :vartype number_of_disks_included_in_backup: int + :ivar number_of_disks_attached_to_vm: Number of disks attached to the VM. + :vartype number_of_disks_attached_to_vm: int + :ivar included_disk_list: Information of disks included in backup. + :vartype included_disk_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DiskInformation] + :ivar excluded_disk_list: Information of disks excluded from backup. + :vartype excluded_disk_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DiskInformation] + """ + + _attribute_map = { + 'number_of_disks_included_in_backup': {'key': 'numberOfDisksIncludedInBackup', 'type': 'int'}, + 'number_of_disks_attached_to_vm': {'key': 'numberOfDisksAttachedToVm', 'type': 'int'}, + 'included_disk_list': {'key': 'includedDiskList', 'type': '[DiskInformation]'}, + 'excluded_disk_list': {'key': 'excludedDiskList', 'type': '[DiskInformation]'}, + } + + def __init__( + self, + *, + number_of_disks_included_in_backup: Optional[int] = None, + number_of_disks_attached_to_vm: Optional[int] = None, + included_disk_list: Optional[List["DiskInformation"]] = None, + excluded_disk_list: Optional[List["DiskInformation"]] = None, + **kwargs + ): + """ + :keyword number_of_disks_included_in_backup: Number of disks included in backup. + :paramtype number_of_disks_included_in_backup: int + :keyword number_of_disks_attached_to_vm: Number of disks attached to the VM. + :paramtype number_of_disks_attached_to_vm: int + :keyword included_disk_list: Information of disks included in backup. + :paramtype included_disk_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DiskInformation] + :keyword excluded_disk_list: Information of disks excluded from backup. + :paramtype excluded_disk_list: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.DiskInformation] + """ + super(RecoveryPointDiskConfiguration, self).__init__(**kwargs) + self.number_of_disks_included_in_backup = number_of_disks_included_in_backup + self.number_of_disks_attached_to_vm = number_of_disks_attached_to_vm + self.included_disk_list = included_disk_list + self.excluded_disk_list = excluded_disk_list + + +class RecoveryPointMoveReadinessInfo(msrest.serialization.Model): + """RecoveryPointMoveReadinessInfo. + + :ivar is_ready_for_move: + :vartype is_ready_for_move: bool + :ivar additional_info: + :vartype additional_info: str + """ + + _attribute_map = { + 'is_ready_for_move': {'key': 'isReadyForMove', 'type': 'bool'}, + 'additional_info': {'key': 'additionalInfo', 'type': 'str'}, + } + + def __init__( + self, + *, + is_ready_for_move: Optional[bool] = None, + additional_info: Optional[str] = None, + **kwargs + ): + """ + :keyword is_ready_for_move: + :paramtype is_ready_for_move: bool + :keyword additional_info: + :paramtype additional_info: str + """ + super(RecoveryPointMoveReadinessInfo, self).__init__(**kwargs) + self.is_ready_for_move = is_ready_for_move + self.additional_info = additional_info + + +class RecoveryPointResource(Resource): + """Base class for backup copies. Workload-specific backup copies are derived from this class. + + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: RecoveryPointResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPoint + """ + + _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': 'RecoveryPoint'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + properties: Optional["RecoveryPoint"] = None, + **kwargs + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: RecoveryPointResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPoint + """ + super(RecoveryPointResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class RecoveryPointResourceList(ResourceList): + """List of RecoveryPoint resources. + + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[RecoveryPointResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["RecoveryPointResource"]] = None, + **kwargs + ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointResource] + """ + super(RecoveryPointResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class RecoveryPointTierInformation(msrest.serialization.Model): + """Recovery point tier information. + + :ivar type: Recovery point tier type. Possible values include: "Invalid", "InstantRP", + "HardenedRP", "ArchivedRP". + :vartype type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierType + :ivar status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierStatus + :ivar extended_info: Recovery point tier status. + :vartype extended_info: dict[str, str] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': '{str}'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "RecoveryPointTierType"]] = None, + status: Optional[Union[str, "RecoveryPointTierStatus"]] = None, + extended_info: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword type: Recovery point tier type. Possible values include: "Invalid", "InstantRP", + "HardenedRP", "ArchivedRP". + :paramtype type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierType + :keyword status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointTierStatus + :keyword extended_info: Recovery point tier status. + :paramtype extended_info: dict[str, str] + """ + super(RecoveryPointTierInformation, self).__init__(**kwargs) + self.type = type + self.status = status + self.extended_info = extended_info + + +class RestoreFileSpecs(msrest.serialization.Model): + """Restore file specs like file path, type and target folder path info. + + :ivar path: Source File/Folder path. + :vartype path: str + :ivar file_spec_type: Indicates what the Path variable stands for. + :vartype file_spec_type: str + :ivar target_folder_path: Destination folder path in target FileShare. + :vartype target_folder_path: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'file_spec_type': {'key': 'fileSpecType', 'type': 'str'}, + 'target_folder_path': {'key': 'targetFolderPath', 'type': 'str'}, + } + + def __init__( + self, + *, + path: Optional[str] = None, + file_spec_type: Optional[str] = None, + target_folder_path: Optional[str] = None, + **kwargs + ): + """ + :keyword path: Source File/Folder path. + :paramtype path: str + :keyword file_spec_type: Indicates what the Path variable stands for. + :paramtype file_spec_type: str + :keyword target_folder_path: Destination folder path in target FileShare. + :paramtype target_folder_path: str + """ + super(RestoreFileSpecs, self).__init__(**kwargs) + self.path = path + self.file_spec_type = file_spec_type + self.target_folder_path = target_folder_path + + +class SQLDataDirectory(msrest.serialization.Model): + """SQLDataDirectory info. + + :ivar type: Type of data directory mapping. Possible values include: "Invalid", "Data", "Log". + :vartype type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryType + :ivar path: File path. + :vartype path: str + :ivar logical_name: Logical name of the file. + :vartype logical_name: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'logical_name': {'key': 'logicalName', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "SQLDataDirectoryType"]] = None, + path: Optional[str] = None, + logical_name: Optional[str] = None, + **kwargs + ): + """ + :keyword type: Type of data directory mapping. Possible values include: "Invalid", "Data", + "Log". + :paramtype type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryType + :keyword path: File path. + :paramtype path: str + :keyword logical_name: Logical name of the file. + :paramtype logical_name: str + """ + super(SQLDataDirectory, self).__init__(**kwargs) + self.type = type + self.path = path + self.logical_name = logical_name + + +class SQLDataDirectoryMapping(msrest.serialization.Model): + """Encapsulates information regarding data directory. + + :ivar mapping_type: Type of data directory mapping. Possible values include: "Invalid", "Data", + "Log". + :vartype mapping_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryType + :ivar source_logical_name: Restore source logical name path. + :vartype source_logical_name: str + :ivar source_path: Restore source path. + :vartype source_path: str + :ivar target_path: Target path. + :vartype target_path: str + """ + + _attribute_map = { + 'mapping_type': {'key': 'mappingType', 'type': 'str'}, + 'source_logical_name': {'key': 'sourceLogicalName', 'type': 'str'}, + 'source_path': {'key': 'sourcePath', 'type': 'str'}, + 'target_path': {'key': 'targetPath', 'type': 'str'}, + } + + def __init__( + self, + *, + mapping_type: Optional[Union[str, "SQLDataDirectoryType"]] = None, + source_logical_name: Optional[str] = None, + source_path: Optional[str] = None, + target_path: Optional[str] = None, + **kwargs + ): + """ + :keyword mapping_type: Type of data directory mapping. Possible values include: "Invalid", + "Data", "Log". + :paramtype mapping_type: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.SQLDataDirectoryType + :keyword source_logical_name: Restore source logical name path. + :paramtype source_logical_name: str + :keyword source_path: Restore source path. + :paramtype source_path: str + :keyword target_path: Target path. + :paramtype target_path: str + """ + super(SQLDataDirectoryMapping, self).__init__(**kwargs) + self.mapping_type = mapping_type + self.source_logical_name = source_logical_name + self.source_path = source_path + self.target_path = target_path + + +class TargetAFSRestoreInfo(msrest.serialization.Model): + """Target Azure File Share Info. + + :ivar name: File share name. + :vartype name: str + :ivar target_resource_id: Target file share resource ARM ID. + :vartype target_resource_id: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + target_resource_id: Optional[str] = None, + **kwargs + ): + """ + :keyword name: File share name. + :paramtype name: str + :keyword target_resource_id: Target file share resource ARM ID. + :paramtype target_resource_id: str + """ + super(TargetAFSRestoreInfo, self).__init__(**kwargs) + self.name = name + self.target_resource_id = target_resource_id + + +class TargetRestoreInfo(msrest.serialization.Model): + """Details about target workload during restore operation. + + :ivar overwrite_option: Can Overwrite if Target DataBase already exists. Possible values + include: "Invalid", "FailOnConflict", "Overwrite". + :vartype overwrite_option: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OverwriteOptions + :ivar container_id: Resource Id name of the container in which Target DataBase resides. + :vartype container_id: str + :ivar database_name: Database name InstanceName/DataBaseName for SQL or System/DbName for SAP + Hana. + :vartype database_name: str + :ivar target_directory_for_file_restore: Target directory location for restore as files. + :vartype target_directory_for_file_restore: str + """ + + _attribute_map = { + 'overwrite_option': {'key': 'overwriteOption', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'target_directory_for_file_restore': {'key': 'targetDirectoryForFileRestore', 'type': 'str'}, + } + + def __init__( + self, + *, + overwrite_option: Optional[Union[str, "OverwriteOptions"]] = None, + container_id: Optional[str] = None, + database_name: Optional[str] = None, + target_directory_for_file_restore: Optional[str] = None, + **kwargs + ): + """ + :keyword overwrite_option: Can Overwrite if Target DataBase already exists. Possible values + include: "Invalid", "FailOnConflict", "Overwrite". + :paramtype overwrite_option: str or + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OverwriteOptions + :keyword container_id: Resource Id name of the container in which Target DataBase resides. + :paramtype container_id: str + :keyword database_name: Database name InstanceName/DataBaseName for SQL or System/DbName for + SAP Hana. + :paramtype database_name: str + :keyword target_directory_for_file_restore: Target directory location for restore as files. + :paramtype target_directory_for_file_restore: str + """ + super(TargetRestoreInfo, self).__init__(**kwargs) + self.overwrite_option = overwrite_option + self.container_id = container_id + self.database_name = database_name + self.target_directory_for_file_restore = target_directory_for_file_restore + + +class WorkloadCrrAccessToken(CrrAccessToken): + """WorkloadCrrAccessToken. + + All required parameters must be populated in order to send to Azure. + + :ivar object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :vartype object_type: str + :ivar access_token_string: Access token used for authentication. + :vartype access_token_string: str + :ivar subscription_id: Subscription Id of the source vault. + :vartype subscription_id: str + :ivar resource_group_name: Resource Group name of the source vault. + :vartype resource_group_name: str + :ivar resource_name: Resource Name of the source vault. + :vartype resource_name: str + :ivar resource_id: Resource Id of the source vault. + :vartype resource_id: str + :ivar protection_container_id: Protected item container id. + :vartype protection_container_id: long + :ivar recovery_point_id: Recovery Point Id. + :vartype recovery_point_id: str + :ivar recovery_point_time: Recovery Point Time. + :vartype recovery_point_time: str + :ivar container_name: Container Unique name. + :vartype container_name: str + :ivar container_type: Container Type. + :vartype container_type: str + :ivar backup_management_type: Backup Management Type. + :vartype backup_management_type: str + :ivar datasource_type: Datasource Type. + :vartype datasource_type: str + :ivar datasource_name: Datasource Friendly Name. + :vartype datasource_name: str + :ivar datasource_id: Datasource Id. + :vartype datasource_id: str + :ivar datasource_container_name: Datasource Container Unique Name. + :vartype datasource_container_name: str + :ivar coordinator_service_stamp_id: CoordinatorServiceStampId to be used by BCM in restore + call. + :vartype coordinator_service_stamp_id: str + :ivar coordinator_service_stamp_uri: CoordinatorServiceStampUri to be used by BCM in restore + call. + :vartype coordinator_service_stamp_uri: str + :ivar protection_service_stamp_id: ProtectionServiceStampId to be used by BCM in restore call. + :vartype protection_service_stamp_id: str + :ivar protection_service_stamp_uri: ProtectionServiceStampUri to be used by BCM in restore + call. + :vartype protection_service_stamp_uri: str + :ivar token_extended_information: Extended Information about the token like FileSpec etc. + :vartype token_extended_information: str + :ivar rp_tier_information: Recovery point Tier Information. + :vartype rp_tier_information: dict[str, str] + :ivar rp_original_sa_option: Recovery point information: Original SA option. + :vartype rp_original_sa_option: bool + :ivar rp_is_managed_virtual_machine: Recovery point information: Managed virtual machine. + :vartype rp_is_managed_virtual_machine: bool + :ivar rp_vm_size_description: Recovery point information: VM size description. + :vartype rp_vm_size_description: str + :ivar b_ms_active_region: Active region name of BMS Stamp. + :vartype b_ms_active_region: str + :ivar protectable_object_unique_name: + :vartype protectable_object_unique_name: str + :ivar protectable_object_friendly_name: + :vartype protectable_object_friendly_name: str + :ivar protectable_object_workload_type: + :vartype protectable_object_workload_type: str + :ivar protectable_object_protection_state: + :vartype protectable_object_protection_state: str + :ivar protectable_object_container_host_os_name: + :vartype protectable_object_container_host_os_name: str + :ivar protectable_object_parent_logical_container_name: + :vartype protectable_object_parent_logical_container_name: str + :ivar container_id: Container Id. + :vartype container_id: str + :ivar policy_name: Policy Name. + :vartype policy_name: str + :ivar policy_id: Policy Id. + :vartype 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 + ): + """ + :keyword access_token_string: Access token used for authentication. + :paramtype access_token_string: str + :keyword subscription_id: Subscription Id of the source vault. + :paramtype subscription_id: str + :keyword resource_group_name: Resource Group name of the source vault. + :paramtype resource_group_name: str + :keyword resource_name: Resource Name of the source vault. + :paramtype resource_name: str + :keyword resource_id: Resource Id of the source vault. + :paramtype resource_id: str + :keyword protection_container_id: Protected item container id. + :paramtype protection_container_id: long + :keyword recovery_point_id: Recovery Point Id. + :paramtype recovery_point_id: str + :keyword recovery_point_time: Recovery Point Time. + :paramtype recovery_point_time: str + :keyword container_name: Container Unique name. + :paramtype container_name: str + :keyword container_type: Container Type. + :paramtype container_type: str + :keyword backup_management_type: Backup Management Type. + :paramtype backup_management_type: str + :keyword datasource_type: Datasource Type. + :paramtype datasource_type: str + :keyword datasource_name: Datasource Friendly Name. + :paramtype datasource_name: str + :keyword datasource_id: Datasource Id. + :paramtype datasource_id: str + :keyword datasource_container_name: Datasource Container Unique Name. + :paramtype datasource_container_name: str + :keyword coordinator_service_stamp_id: CoordinatorServiceStampId to be used by BCM in restore + call. + :paramtype coordinator_service_stamp_id: str + :keyword coordinator_service_stamp_uri: CoordinatorServiceStampUri to be used by BCM in restore + call. + :paramtype coordinator_service_stamp_uri: str + :keyword protection_service_stamp_id: ProtectionServiceStampId to be used by BCM in restore + call. + :paramtype protection_service_stamp_id: str + :keyword protection_service_stamp_uri: ProtectionServiceStampUri to be used by BCM in restore + call. + :paramtype protection_service_stamp_uri: str + :keyword token_extended_information: Extended Information about the token like FileSpec etc. + :paramtype token_extended_information: str + :keyword rp_tier_information: Recovery point Tier Information. + :paramtype rp_tier_information: dict[str, str] + :keyword rp_original_sa_option: Recovery point information: Original SA option. + :paramtype rp_original_sa_option: bool + :keyword rp_is_managed_virtual_machine: Recovery point information: Managed virtual machine. + :paramtype rp_is_managed_virtual_machine: bool + :keyword rp_vm_size_description: Recovery point information: VM size description. + :paramtype rp_vm_size_description: str + :keyword b_ms_active_region: Active region name of BMS Stamp. + :paramtype b_ms_active_region: str + :keyword protectable_object_unique_name: + :paramtype protectable_object_unique_name: str + :keyword protectable_object_friendly_name: + :paramtype protectable_object_friendly_name: str + :keyword protectable_object_workload_type: + :paramtype protectable_object_workload_type: str + :keyword protectable_object_protection_state: + :paramtype protectable_object_protection_state: str + :keyword protectable_object_container_host_os_name: + :paramtype protectable_object_container_host_os_name: str + :keyword protectable_object_parent_logical_container_name: + :paramtype protectable_object_parent_logical_container_name: str + :keyword container_id: Container Id. + :paramtype container_id: str + :keyword policy_name: Policy Name. + :paramtype policy_name: str + :keyword policy_id: Policy Id. + :paramtype policy_id: str + """ + 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 diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/__init__.py new file mode 100644 index 000000000000..7ac30ce43fb3 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/__init__.py @@ -0,0 +1,33 @@ +# 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 ._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 ._recovery_points_operations import RecoveryPointsOperations +from ._backup_resource_storage_configs_operations import BackupResourceStorageConfigsOperations +from ._recovery_points_crr_operations import RecoveryPointsCrrOperations +from ._backup_protected_items_crr_operations import BackupProtectedItemsCrrOperations + +__all__ = [ + 'BackupUsageSummariesCRROperations', + 'AadPropertiesOperations', + 'CrossRegionRestoreOperations', + 'BackupCrrJobDetailsOperations', + 'BackupCrrJobsOperations', + 'CrrOperationResultsOperations', + 'CrrOperationStatusOperations', + 'RecoveryPointsOperations', + '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/crossregionregionrestore/operations/_aad_properties_operations.py similarity index 57% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_aad_properties_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_aad_properties_operations.py index e99a8c16e9c0..986bec6c6c2e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_aad_properties_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_aad_properties_operations.py @@ -5,23 +5,69 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + azure_region, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties') + path_format_arguments = { + "azureRegion": _SERIALIZER.url("azure_region", azure_region, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class AadPropertiesOperations(object): """AadPropertiesOperations operations. @@ -29,7 +75,7 @@ class AadPropertiesOperations(object): 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -44,6 +90,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, azure_region, # type: str @@ -59,9 +106,13 @@ def get( :type azure_region: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 + :rtype: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.AADPropertiesResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AADPropertiesResource"] @@ -69,34 +120,26 @@ def get( 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') + api_version = kwargs.pop('api_version', "2018-12-20") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AADPropertiesResource', pipeline_response) @@ -105,4 +148,6 @@ def get( 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/crossregionregionrestore/operations/_backup_crr_job_details_operations.py similarity index 54% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_job_details_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_backup_crr_job_details_operations.py index 8716bcc1cad1..f813ac166be1 100644 --- 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/crossregionregionrestore/operations/_backup_crr_job_details_operations.py @@ -5,23 +5,69 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + azure_region, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob') + path_format_arguments = { + "azureRegion": _SERIALIZER.url("azure_region", azure_region, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupCrrJobDetailsOperations(object): """BackupCrrJobDetailsOperations operations. @@ -29,7 +75,7 @@ class BackupCrrJobDetailsOperations(object): 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -44,6 +90,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, azure_region, # type: str @@ -58,10 +105,14 @@ def get( :param azure_region: Azure region to hit Api. :type azure_region: str :param parameters: CRR Job request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.CrrJobRequest + :type parameters: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrrJobRequest + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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 + :rtype: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] @@ -69,37 +120,29 @@ def get( 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') + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'CrrJobRequest') - # 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') + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JobResource', pipeline_response) @@ -108,4 +151,6 @@ def get( 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/crossregionregionrestore/operations/_backup_crr_jobs_operations.py similarity index 50% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_jobs_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_backup_crr_jobs_operations.py index dd79a28a027c..4a8cd3d947d9 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_jobs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_backup_crr_jobs_operations.py @@ -5,24 +5,76 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + azure_region, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs') + path_format_arguments = { + "azureRegion": _SERIALIZER.url("azure_region", azure_region, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupCrrJobsOperations(object): """BackupCrrJobsOperations operations. @@ -30,7 +82,7 @@ class BackupCrrJobsOperations(object): 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,6 +97,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, azure_region, # type: str @@ -61,62 +114,66 @@ def list( :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 + :type parameters: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrrJobRequest :param filter: OData filter options. :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.JobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + 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) + _json = self._serialize.body(parameters, 'CrrJobRequest') + + request = build_list_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + 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) + _json = self._serialize.body(parameters, 'CrrJobRequest') + + request = build_list_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('JobResourceList', pipeline_response) + deserialized = self._deserialize("JobResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -129,12 +186,13 @@ def get_next(next_link=None): 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response + return ItemPaged( get_next, extract_data ) 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/crossregionregionrestore/operations/_backup_protected_items_crr_operations.py similarity index 52% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_crr_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_backup_protected_items_crr_operations.py index 1fdbb0bfbffb..9922e124ab85 100644 --- 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/crossregionregionrestore/operations/_backup_protected_items_crr_operations.py @@ -5,24 +5,75 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupProtectedItemsCrrOperations(object): """BackupProtectedItemsCrrOperations operations. @@ -30,7 +81,7 @@ class BackupProtectedItemsCrrOperations(object): 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,6 +96,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -65,50 +117,56 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :return: An iterator like instance of either ProtectedItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.ProtectedItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectedItemResourceList', pipeline_response) + deserialized = self._deserialize("ProtectedItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -121,12 +179,13 @@ def get_next(next_link=None): 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response + return ItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_backup_resource_storage_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_backup_resource_storage_configs_operations.py new file mode 100644 index 000000000000..8c5458101f45 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_backup_resource_storage_configs_operations.py @@ -0,0 +1,364 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +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 HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +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]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_update_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_patch_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +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.crossregionregionrestore.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 + + @distributed_trace + 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 api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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.crossregionregionrestore.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 = kwargs.pop('api_version', "2018-12-20") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + 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.NewErrorResponse, pipeline_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 + + + @distributed_trace + 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.crossregionregionrestore.models.BackupResourceConfigResource + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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.crossregionregionrestore.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 = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupResourceConfigResource') + + request = build_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + 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.NewErrorResponse, pipeline_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 + + + @distributed_trace + 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.crossregionregionrestore.models.BackupResourceConfigResource + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupResourceConfigResource') + + request = build_patch_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.patch.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + 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.NewErrorResponse, pipeline_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/crossregionregionrestore/operations/_backup_usage_summaries_crr_operations.py similarity index 52% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_crr_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_backup_usage_summaries_crr_operations.py index 4a3a68574fd2..7051de6ba2b5 100644 --- 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/crossregionregionrestore/operations/_backup_usage_summaries_crr_operations.py @@ -5,24 +5,75 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupUsageSummariesCRROperations(object): """BackupUsageSummariesCRROperations operations. @@ -30,7 +81,7 @@ class BackupUsageSummariesCRROperations(object): 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,6 +96,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -65,50 +117,56 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :return: An iterator like instance of either BackupManagementUsageList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.BackupManagementUsageList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('BackupManagementUsageList', pipeline_response) + deserialized = self._deserialize("BackupManagementUsageList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -121,12 +179,13 @@ def get_next(next_link=None): 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response + return ItemPaged( get_next, extract_data ) 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/crossregionregionrestore/operations/_cross_region_restore_operations.py similarity index 59% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_cross_region_restore_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_cross_region_restore_operations.py index 3a32161293a5..0c23c1a6971c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_cross_region_restore_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_cross_region_restore_operations.py @@ -5,25 +5,71 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_trigger_request_initial( + azure_region, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore') + path_format_arguments = { + "azureRegion": _SERIALIZER.url("azure_region", azure_region, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class CrossRegionRestoreOperations(object): """CrossRegionRestoreOperations operations. @@ -31,7 +77,7 @@ class CrossRegionRestoreOperations(object): 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -58,44 +104,37 @@ def _trigger_initial( 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') + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'CrossRegionRestoreRequest') + + request = build_trigger_request_initial( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._trigger_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) _trigger_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore'} # type: ignore + + @distributed_trace def begin_trigger( self, azure_region, # type: str @@ -103,7 +142,8 @@ def begin_trigger( **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. Restores the specified backed up data in a different region as compared to where the data is backed up. @@ -111,18 +151,26 @@ def begin_trigger( :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 + :type parameters: + ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.CrossRegionRestoreRequest + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -133,23 +181,19 @@ def begin_trigger( raw_result = self._trigger_initial( azure_region=azure_region, parameters=parameters, + api_version=api_version, + content_type=content_type, 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) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -161,4 +205,5 @@ def get_long_running_output(pipeline_response): ) 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/crossregionregionrestore/operations/_crr_operation_results_operations.py similarity index 57% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_results_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_crr_operation_results_operations.py index b65e4435fb91..70d1c8ed35c1 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_crr_operation_results_operations.py @@ -5,23 +5,68 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + azure_region, # type: str + subscription_id, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}') + path_format_arguments = { + "azureRegion": _SERIALIZER.url("azure_region", azure_region, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class CrrOperationResultsOperations(object): """CrrOperationResultsOperations operations. @@ -29,7 +74,7 @@ class CrrOperationResultsOperations(object): 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -44,6 +89,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, azure_region, # type: str @@ -57,6 +103,9 @@ def get( :type azure_region: str :param operation_id: :type operation_id: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -67,36 +116,30 @@ def get( 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') + api_version = kwargs.pop('api_version', "2018-12-20") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_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/crossregionregionrestore/operations/_crr_operation_status_operations.py similarity index 57% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_status_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_crr_operation_status_operations.py index 7307c4bc17a6..a1c3ce3a9770 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_status_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_crr_operation_status_operations.py @@ -5,23 +5,68 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + azure_region, # type: str + subscription_id, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}') + path_format_arguments = { + "azureRegion": _SERIALIZER.url("azure_region", azure_region, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class CrrOperationStatusOperations(object): """CrrOperationStatusOperations operations. @@ -29,7 +74,7 @@ class CrrOperationStatusOperations(object): 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -44,6 +89,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, azure_region, # type: str @@ -57,9 +103,12 @@ def get( :type azure_region: str :param operation_id: :type operation_id: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 + :rtype: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.OperationStatus :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationStatus"] @@ -67,33 +116,26 @@ def get( 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') + api_version = kwargs.pop('api_version', "2018-12-20") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('OperationStatus', pipeline_response) @@ -102,4 +144,6 @@ def get( 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/crossregionregionrestore/operations/_recovery_points_crr_operations.py similarity index 52% rename from sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_crr_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_recovery_points_crr_operations.py index f4100034a834..3201eeabd215 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_crr_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_recovery_points_crr_operations.py @@ -5,24 +5,78 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class RecoveryPointsCrrOperations(object): """RecoveryPointsCrrOperations operations. @@ -30,7 +84,7 @@ class RecoveryPointsCrrOperations(object): 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 + :type models: ~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,6 +99,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -71,51 +126,60 @@ def list( :type protected_item_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :return: An iterator like instance of either RecoveryPointResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.crossregionregionrestore.models.RecoveryPointResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('RecoveryPointResourceList', pipeline_response) + deserialized = self._deserialize("RecoveryPointResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -128,12 +192,13 @@ def get_next(next_link=None): 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response + return ItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_recovery_points_operations.py new file mode 100644 index 000000000000..9cc12bb2f0a5 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/operations/_recovery_points_operations.py @@ -0,0 +1,191 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +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 HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +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]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_access_token_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + recovery_point_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/accessToken') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + "recoveryPointId": _SERIALIZER.url("recovery_point_id", recovery_point_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class RecoveryPointsOperations(object): + """RecoveryPointsOperations 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.crossregionregionrestore.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 + + @distributed_trace + 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.crossregionregionrestore.models.AADPropertiesResource + :keyword api_version: Api Version. The default value is "2018-12-20". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :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.crossregionregionrestore.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 = kwargs.pop('api_version', "2018-12-20") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'AADPropertiesResource') + + request = build_get_access_token_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.get_access_token.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + 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.NewErrorResponse, pipeline_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/crossregionregionrestore/py.typed b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/crossregionregionrestore/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file 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..f7b2600047dc 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 @@ -33,6 +29,7 @@ from ._models_py3 import AzureIaaSVMJob from ._models_py3 import AzureIaaSVMJobExtendedInfo from ._models_py3 import AzureIaaSVMJobTaskDetails + from ._models_py3 import AzureIaaSVMJobV2 from ._models_py3 import AzureIaaSVMProtectedItem from ._models_py3 import AzureIaaSVMProtectedItemExtendedInfo from ._models_py3 import AzureIaaSVMProtectionPolicy @@ -76,38 +73,31 @@ from ._models_py3 import AzureWorkloadAutoProtectionIntent from ._models_py3 import AzureWorkloadBackupRequest from ._models_py3 import AzureWorkloadContainer + from ._models_py3 import AzureWorkloadContainerAutoProtectionIntent from ._models_py3 import AzureWorkloadContainerExtendedInfo from ._models_py3 import AzureWorkloadErrorInfo from ._models_py3 import AzureWorkloadJob 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 +134,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 @@ -177,6 +161,7 @@ from ._models_py3 import GenericProtectionPolicy from ._models_py3 import GenericRecoveryPoint from ._models_py3 import GetProtectedItemQueryObject + from ._models_py3 import HourlySchedule from ._models_py3 import ILRRequest from ._models_py3 import ILRRequestResource from ._models_py3 import IaaSVMContainer @@ -184,9 +169,7 @@ 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 @@ -219,9 +202,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 +212,7 @@ from ._models_py3 import OperationStatusJobExtendedInfo from ._models_py3 import OperationStatusJobsExtendedInfo from ._models_py3 import OperationStatusProvisionILRExtendedInfo - from ._models_py3 import OperationStatusRecoveryPointExtendedInfo + from ._models_py3 import OperationStatusValidateOperationExtendedInfo from ._models_py3 import OperationWorkerResponse from ._models_py3 import PointInTimeRange from ._models_py3 import PreBackupValidation @@ -268,6 +249,7 @@ from ._models_py3 import RecoveryPointResource from ._models_py3 import RecoveryPointResourceList from ._models_py3 import RecoveryPointTierInformation + from ._models_py3 import RecoveryPointTierInformationV2 from ._models_py3 import Resource from ._models_py3 import ResourceGuardOperationDetail from ._models_py3 import ResourceGuardProxyBase @@ -305,7 +287,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 +296,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 +304,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 @@ -341,6 +318,7 @@ from ._models import AzureIaaSVMJob # type: ignore from ._models import AzureIaaSVMJobExtendedInfo # type: ignore from ._models import AzureIaaSVMJobTaskDetails # type: ignore + from ._models import AzureIaaSVMJobV2 # type: ignore from ._models import AzureIaaSVMProtectedItem # type: ignore from ._models import AzureIaaSVMProtectedItemExtendedInfo # type: ignore from ._models import AzureIaaSVMProtectionPolicy # type: ignore @@ -384,38 +362,31 @@ from ._models import AzureWorkloadAutoProtectionIntent # type: ignore from ._models import AzureWorkloadBackupRequest # type: ignore from ._models import AzureWorkloadContainer # type: ignore + from ._models import AzureWorkloadContainerAutoProtectionIntent # type: ignore from ._models import AzureWorkloadContainerExtendedInfo # type: ignore from ._models import AzureWorkloadErrorInfo # type: ignore from ._models import AzureWorkloadJob # type: ignore 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 +423,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 @@ -485,6 +450,7 @@ from ._models import GenericProtectionPolicy # type: ignore from ._models import GenericRecoveryPoint # type: ignore from ._models import GetProtectedItemQueryObject # type: ignore + from ._models import HourlySchedule # type: ignore from ._models import ILRRequest # type: ignore from ._models import ILRRequestResource # type: ignore from ._models import IaaSVMContainer # type: ignore @@ -492,9 +458,7 @@ 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 @@ -527,9 +491,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 +501,7 @@ 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 OperationStatusValidateOperationExtendedInfo # type: ignore from ._models import OperationWorkerResponse # type: ignore from ._models import PointInTimeRange # type: ignore from ._models import PreBackupValidation # type: ignore @@ -576,6 +538,7 @@ from ._models import RecoveryPointResource # type: ignore from ._models import RecoveryPointResourceList # type: ignore from ._models import RecoveryPointTierInformation # type: ignore + from ._models import RecoveryPointTierInformationV2 # type: ignore from ._models import Resource # type: ignore from ._models import ResourceGuardOperationDetail # type: ignore from ._models import ResourceGuardProxyBase # type: ignore @@ -613,7 +576,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 @@ -624,6 +586,7 @@ from ._models import YearlyRetentionSchedule # type: ignore from ._recovery_services_backup_client_enums import ( + AcquireStorageAccountLock, AzureFileShareType, BackupEngineType, BackupItemType, @@ -635,6 +598,7 @@ DataMoveLevel, DataSourceType, DayOfWeek, + DedupState, EncryptionAtRestType, EnhancedSecurityState, FabricName, @@ -658,6 +622,7 @@ PrivateEndpointConnectionStatus, ProtectedItemHealthStatus, ProtectedItemState, + ProtectionIntentItemType, ProtectionState, ProtectionStatus, ProvisioningState, @@ -684,11 +649,10 @@ WeekOfMonth, WorkloadItemType, WorkloadType, + XcoolState, ) __all__ = [ - 'AADProperties', - 'AADPropertiesResource', 'AzureBackupGoalFeatureSupportRequest', 'AzureBackupServerContainer', 'AzureBackupServerEngine', @@ -697,10 +661,8 @@ 'AzureFileShareProtectionPolicy', 'AzureFileShareProvisionILRRequest', 'AzureFileShareRecoveryPoint', - 'AzureFileShareRecoveryPointAutoGenerated', 'AzureFileShareRestoreRequest', 'AzureFileshareProtectedItem', - 'AzureFileshareProtectedItemAutoGenerated', 'AzureFileshareProtectedItemExtendedInfo', 'AzureIaaSClassicComputeVMContainer', 'AzureIaaSClassicComputeVMProtectableItem', @@ -713,6 +675,7 @@ 'AzureIaaSVMJob', 'AzureIaaSVMJobExtendedInfo', 'AzureIaaSVMJobTaskDetails', + 'AzureIaaSVMJobV2', 'AzureIaaSVMProtectedItem', 'AzureIaaSVMProtectedItemExtendedInfo', 'AzureIaaSVMProtectionPolicy', @@ -756,38 +719,31 @@ 'AzureWorkloadAutoProtectionIntent', 'AzureWorkloadBackupRequest', 'AzureWorkloadContainer', + 'AzureWorkloadContainerAutoProtectionIntent', 'AzureWorkloadContainerExtendedInfo', 'AzureWorkloadErrorInfo', 'AzureWorkloadJob', '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 +780,6 @@ 'ClientScriptForConnect', 'CloudErrorBody', 'ContainerIdentityInfo', - 'CrossRegionRestoreRequest', - 'CrossRegionRestoreRequestResource', - 'CrrAccessToken', - 'CrrAccessTokenResource', - 'CrrJobRequest', - 'CrrJobRequestResource', 'DPMContainerExtendedInfo', 'DPMProtectedItem', 'DPMProtectedItemExtendedInfo', @@ -857,6 +807,7 @@ 'GenericProtectionPolicy', 'GenericRecoveryPoint', 'GetProtectedItemQueryObject', + 'HourlySchedule', 'ILRRequest', 'ILRRequestResource', 'IaaSVMContainer', @@ -864,9 +815,7 @@ 'IaasVMBackupRequest', 'IaasVMILRRegistrationRequest', 'IaasVMRecoveryPoint', - 'IaasVMRecoveryPointAutoGenerated', 'IaasVMRestoreRequest', - 'IaasVMRestoreRequestAutoGenerated', 'IaasVMRestoreWithRehydrationRequest', 'IdentityBasedRestoreDetails', 'IdentityInfo', @@ -899,9 +848,7 @@ 'MoveRPAcrossTiersRequest', 'NameInfo', 'NewErrorResponse', - 'NewErrorResponseAutoGenerated', 'NewErrorResponseError', - 'NewErrorResponseErrorAutoGenerated', 'OperationResultInfo', 'OperationResultInfoBase', 'OperationResultInfoBaseResource', @@ -911,7 +858,7 @@ 'OperationStatusJobExtendedInfo', 'OperationStatusJobsExtendedInfo', 'OperationStatusProvisionILRExtendedInfo', - 'OperationStatusRecoveryPointExtendedInfo', + 'OperationStatusValidateOperationExtendedInfo', 'OperationWorkerResponse', 'PointInTimeRange', 'PreBackupValidation', @@ -948,6 +895,7 @@ 'RecoveryPointResource', 'RecoveryPointResourceList', 'RecoveryPointTierInformation', + 'RecoveryPointTierInformationV2', 'Resource', 'ResourceGuardOperationDetail', 'ResourceGuardProxyBase', @@ -985,7 +933,6 @@ 'VaultStorageConfigOperationResultResponse', 'WeeklyRetentionFormat', 'WeeklyRetentionSchedule', - 'WorkloadCrrAccessToken', 'WorkloadInquiryDetails', 'WorkloadItem', 'WorkloadItemResource', @@ -994,6 +941,7 @@ 'WorkloadProtectableItemResource', 'WorkloadProtectableItemResourceList', 'YearlyRetentionSchedule', + 'AcquireStorageAccountLock', 'AzureFileShareType', 'BackupEngineType', 'BackupItemType', @@ -1005,6 +953,7 @@ 'DataMoveLevel', 'DataSourceType', 'DayOfWeek', + 'DedupState', 'EncryptionAtRestType', 'EnhancedSecurityState', 'FabricName', @@ -1028,6 +977,7 @@ 'PrivateEndpointConnectionStatus', 'ProtectedItemHealthStatus', 'ProtectedItemState', + 'ProtectionIntentItemType', 'ProtectionState', 'ProtectionStatus', 'ProvisioningState', @@ -1054,4 +1004,5 @@ 'WeekOfMonth', 'WorkloadItemType', 'WorkloadType', + 'XcoolState', ] 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..1f253f004a18 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. @@ -147,8 +18,8 @@ class FeatureSupportRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param feature_type: Required. backup support feature type.Constant filled by server. - :type feature_type: str + :ivar feature_type: Required. backup support feature type.Constant filled by server. + :vartype feature_type: str """ _validation = { @@ -167,6 +38,8 @@ def __init__( self, **kwargs ): + """ + """ super(FeatureSupportRequest, self).__init__(**kwargs) self.feature_type = None # type: Optional[str] @@ -176,8 +49,8 @@ class AzureBackupGoalFeatureSupportRequest(FeatureSupportRequest): All required parameters must be populated in order to send to Azure. - :param feature_type: Required. backup support feature type.Constant filled by server. - :type feature_type: str + :ivar feature_type: Required. backup support feature type.Constant filled by server. + :vartype feature_type: str """ _validation = { @@ -192,6 +65,8 @@ def __init__( self, **kwargs ): + """ + """ super(AzureBackupGoalFeatureSupportRequest, self).__init__(**kwargs) self.feature_type = 'AzureBackupGoals' # type: str @@ -204,29 +79,31 @@ class ProtectionContainer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str """ _validation = { @@ -239,6 +116,7 @@ class ProtectionContainer(msrest.serialization.Model): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, } _subtype_map = { @@ -249,12 +127,30 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + """ super(ProtectionContainer, self).__init__(**kwargs) self.friendly_name = kwargs.get('friendly_name', None) self.backup_management_type = kwargs.get('backup_management_type', None) self.registration_status = kwargs.get('registration_status', None) self.health_status = kwargs.get('health_status', None) self.container_type = None # type: Optional[str] + self.protectable_object_type = kwargs.get('protectable_object_type', None) class DpmContainer(ProtectionContainer): @@ -265,45 +161,47 @@ class DpmContainer(ProtectionContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param can_re_register: Specifies whether the container is re-registrable. - :type can_re_register: bool - :param container_id: ID of container. - :type container_id: str - :param protected_item_count: Number of protected items in the BackupEngine. - :type protected_item_count: long - :param dpm_agent_version: Backup engine Agent version. - :type dpm_agent_version: str - :param dpm_servers: List of BackupEngines protecting the container. - :type dpm_servers: list[str] - :param upgrade_available: To check if upgrade available. - :type upgrade_available: bool - :param protection_status: Protection status of the container. - :type protection_status: str - :param extended_info: Extended Info of the container. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar can_re_register: Specifies whether the container is re-registrable. + :vartype can_re_register: bool + :ivar container_id: ID of container. + :vartype container_id: str + :ivar protected_item_count: Number of protected items in the BackupEngine. + :vartype protected_item_count: long + :ivar dpm_agent_version: Backup engine Agent version. + :vartype dpm_agent_version: str + :ivar dpm_servers: List of BackupEngines protecting the container. + :vartype dpm_servers: list[str] + :ivar upgrade_available: To check if upgrade available. + :vartype upgrade_available: bool + :ivar protection_status: Protection status of the container. + :vartype protection_status: str + :ivar extended_info: Extended Info of the container. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo """ _validation = { @@ -316,6 +214,7 @@ class DpmContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, 'container_id': {'key': 'containerId', 'type': 'str'}, 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, @@ -334,6 +233,39 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword can_re_register: Specifies whether the container is re-registrable. + :paramtype can_re_register: bool + :keyword container_id: ID of container. + :paramtype container_id: str + :keyword protected_item_count: Number of protected items in the BackupEngine. + :paramtype protected_item_count: long + :keyword dpm_agent_version: Backup engine Agent version. + :paramtype dpm_agent_version: str + :keyword dpm_servers: List of BackupEngines protecting the container. + :paramtype dpm_servers: list[str] + :keyword upgrade_available: To check if upgrade available. + :paramtype upgrade_available: bool + :keyword protection_status: Protection status of the container. + :paramtype protection_status: str + :keyword extended_info: Extended Info of the container. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo + """ super(DpmContainer, self).__init__(**kwargs) self.container_type = 'DPMContainer' # type: str self.can_re_register = kwargs.get('can_re_register', None) @@ -351,45 +283,47 @@ class AzureBackupServerContainer(DpmContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param can_re_register: Specifies whether the container is re-registrable. - :type can_re_register: bool - :param container_id: ID of container. - :type container_id: str - :param protected_item_count: Number of protected items in the BackupEngine. - :type protected_item_count: long - :param dpm_agent_version: Backup engine Agent version. - :type dpm_agent_version: str - :param dpm_servers: List of BackupEngines protecting the container. - :type dpm_servers: list[str] - :param upgrade_available: To check if upgrade available. - :type upgrade_available: bool - :param protection_status: Protection status of the container. - :type protection_status: str - :param extended_info: Extended Info of the container. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar can_re_register: Specifies whether the container is re-registrable. + :vartype can_re_register: bool + :ivar container_id: ID of container. + :vartype container_id: str + :ivar protected_item_count: Number of protected items in the BackupEngine. + :vartype protected_item_count: long + :ivar dpm_agent_version: Backup engine Agent version. + :vartype dpm_agent_version: str + :ivar dpm_servers: List of BackupEngines protecting the container. + :vartype dpm_servers: list[str] + :ivar upgrade_available: To check if upgrade available. + :vartype upgrade_available: bool + :ivar protection_status: Protection status of the container. + :vartype protection_status: str + :ivar extended_info: Extended Info of the container. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo """ _validation = { @@ -402,6 +336,7 @@ class AzureBackupServerContainer(DpmContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, 'container_id': {'key': 'containerId', 'type': 'str'}, 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, @@ -416,6 +351,39 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword can_re_register: Specifies whether the container is re-registrable. + :paramtype can_re_register: bool + :keyword container_id: ID of container. + :paramtype container_id: str + :keyword protected_item_count: Number of protected items in the BackupEngine. + :paramtype protected_item_count: long + :keyword dpm_agent_version: Backup engine Agent version. + :paramtype dpm_agent_version: str + :keyword dpm_servers: List of BackupEngines protecting the container. + :paramtype dpm_servers: list[str] + :keyword upgrade_available: To check if upgrade available. + :paramtype upgrade_available: bool + :keyword protection_status: Protection status of the container. + :paramtype protection_status: str + :keyword extended_info: Extended Info of the container. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo + """ super(AzureBackupServerContainer, self).__init__(**kwargs) self.container_type = 'AzureBackupServerContainer' # type: str @@ -428,39 +396,39 @@ class BackupEngineBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the backup engine. - :type friendly_name: str - :param backup_management_type: Type of backup management for the backup engine. Possible values + :ivar friendly_name: Friendly name of the backup engine. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the backup engine. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Registration status of the backup engine with the Recovery Services + :ivar registration_status: Registration status of the backup engine with the Recovery Services Vault. - :type registration_status: str - :param backup_engine_state: Status of the backup engine with the Recovery Services Vault. = + :vartype registration_status: str + :ivar backup_engine_state: Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed}. - :type backup_engine_state: str - :param health_status: Backup status of the backup engine. - :type health_status: str - :param backup_engine_type: Required. Type of the backup engine.Constant filled by server. + :vartype backup_engine_state: str + :ivar health_status: Backup status of the backup engine. + :vartype health_status: str + :ivar backup_engine_type: Required. Type of the backup engine.Constant filled by server. Possible values include: "Invalid", "DpmBackupEngine", "AzureBackupServerEngine". - :type backup_engine_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupEngineType - :param can_re_register: Flag indicating if the backup engine be registered, once already + :vartype backup_engine_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupEngineType + :ivar can_re_register: Flag indicating if the backup engine be registered, once already registered. - :type can_re_register: bool - :param backup_engine_id: ID of the backup engine. - :type backup_engine_id: str - :param dpm_version: Backup engine version. - :type dpm_version: str - :param azure_backup_agent_version: Backup agent version. - :type azure_backup_agent_version: str - :param is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. - :type is_azure_backup_agent_upgrade_available: bool - :param is_dpm_upgrade_available: To check if backup engine upgrade available. - :type is_dpm_upgrade_available: bool - :param extended_info: Extended info of the backupengine. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :vartype can_re_register: bool + :ivar backup_engine_id: ID of the backup engine. + :vartype backup_engine_id: str + :ivar dpm_version: Backup engine version. + :vartype dpm_version: str + :ivar azure_backup_agent_version: Backup agent version. + :vartype azure_backup_agent_version: str + :ivar is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. + :vartype is_azure_backup_agent_upgrade_available: bool + :ivar is_dpm_upgrade_available: To check if backup engine upgrade available. + :vartype is_dpm_upgrade_available: bool + :ivar extended_info: Extended info of the backupengine. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo """ _validation = { @@ -491,6 +459,38 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the backup engine. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the backup engine. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Registration status of the backup engine with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword backup_engine_state: Status of the backup engine with the Recovery Services Vault. = + {Active/Deleting/DeleteFailed}. + :paramtype backup_engine_state: str + :keyword health_status: Backup status of the backup engine. + :paramtype health_status: str + :keyword can_re_register: Flag indicating if the backup engine be registered, once already + registered. + :paramtype can_re_register: bool + :keyword backup_engine_id: ID of the backup engine. + :paramtype backup_engine_id: str + :keyword dpm_version: Backup engine version. + :paramtype dpm_version: str + :keyword azure_backup_agent_version: Backup agent version. + :paramtype azure_backup_agent_version: str + :keyword is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. + :paramtype is_azure_backup_agent_upgrade_available: bool + :keyword is_dpm_upgrade_available: To check if backup engine upgrade available. + :paramtype is_dpm_upgrade_available: bool + :keyword extended_info: Extended info of the backupengine. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + """ super(BackupEngineBase, self).__init__(**kwargs) self.friendly_name = kwargs.get('friendly_name', None) self.backup_management_type = kwargs.get('backup_management_type', None) @@ -512,39 +512,39 @@ class AzureBackupServerEngine(BackupEngineBase): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the backup engine. - :type friendly_name: str - :param backup_management_type: Type of backup management for the backup engine. Possible values + :ivar friendly_name: Friendly name of the backup engine. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the backup engine. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Registration status of the backup engine with the Recovery Services + :ivar registration_status: Registration status of the backup engine with the Recovery Services Vault. - :type registration_status: str - :param backup_engine_state: Status of the backup engine with the Recovery Services Vault. = + :vartype registration_status: str + :ivar backup_engine_state: Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed}. - :type backup_engine_state: str - :param health_status: Backup status of the backup engine. - :type health_status: str - :param backup_engine_type: Required. Type of the backup engine.Constant filled by server. + :vartype backup_engine_state: str + :ivar health_status: Backup status of the backup engine. + :vartype health_status: str + :ivar backup_engine_type: Required. Type of the backup engine.Constant filled by server. Possible values include: "Invalid", "DpmBackupEngine", "AzureBackupServerEngine". - :type backup_engine_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupEngineType - :param can_re_register: Flag indicating if the backup engine be registered, once already + :vartype backup_engine_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupEngineType + :ivar can_re_register: Flag indicating if the backup engine be registered, once already registered. - :type can_re_register: bool - :param backup_engine_id: ID of the backup engine. - :type backup_engine_id: str - :param dpm_version: Backup engine version. - :type dpm_version: str - :param azure_backup_agent_version: Backup agent version. - :type azure_backup_agent_version: str - :param is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. - :type is_azure_backup_agent_upgrade_available: bool - :param is_dpm_upgrade_available: To check if backup engine upgrade available. - :type is_dpm_upgrade_available: bool - :param extended_info: Extended info of the backupengine. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :vartype can_re_register: bool + :ivar backup_engine_id: ID of the backup engine. + :vartype backup_engine_id: str + :ivar dpm_version: Backup engine version. + :vartype dpm_version: str + :ivar azure_backup_agent_version: Backup agent version. + :vartype azure_backup_agent_version: str + :ivar is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. + :vartype is_azure_backup_agent_upgrade_available: bool + :ivar is_dpm_upgrade_available: To check if backup engine upgrade available. + :vartype is_dpm_upgrade_available: bool + :ivar extended_info: Extended info of the backupengine. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo """ _validation = { @@ -571,6 +571,38 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the backup engine. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the backup engine. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Registration status of the backup engine with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword backup_engine_state: Status of the backup engine with the Recovery Services Vault. = + {Active/Deleting/DeleteFailed}. + :paramtype backup_engine_state: str + :keyword health_status: Backup status of the backup engine. + :paramtype health_status: str + :keyword can_re_register: Flag indicating if the backup engine be registered, once already + registered. + :paramtype can_re_register: bool + :keyword backup_engine_id: ID of the backup engine. + :paramtype backup_engine_id: str + :keyword dpm_version: Backup engine version. + :paramtype dpm_version: str + :keyword azure_backup_agent_version: Backup agent version. + :paramtype azure_backup_agent_version: str + :keyword is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. + :paramtype is_azure_backup_agent_upgrade_available: bool + :keyword is_dpm_upgrade_available: To check if backup engine upgrade available. + :paramtype is_dpm_upgrade_available: bool + :keyword extended_info: Extended info of the backupengine. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + """ super(AzureBackupServerEngine, self).__init__(**kwargs) self.backup_engine_type = 'AzureBackupServerEngine' # type: str @@ -583,9 +615,9 @@ class BackupRequest(msrest.serialization.Model): 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 + :ivar 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 + :vartype object_type: str """ _validation = { @@ -604,6 +636,8 @@ def __init__( self, **kwargs ): + """ + """ super(BackupRequest, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -613,12 +647,12 @@ class AzureFileShareBackupRequest(BackupRequest): 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 + :ivar 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_expiry_time_in_utc: Backup copy will expire after the time specified + :vartype object_type: str + :ivar recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified (UTC). - :type recovery_point_expiry_time_in_utc: ~datetime.datetime + :vartype recovery_point_expiry_time_in_utc: ~datetime.datetime """ _validation = { @@ -634,6 +668,11 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified + (UTC). + :paramtype recovery_point_expiry_time_in_utc: ~datetime.datetime + """ super(AzureFileShareBackupRequest, self).__init__(**kwargs) self.object_type = 'AzureFileShareBackupRequest' # type: str self.recovery_point_expiry_time_in_utc = kwargs.get('recovery_point_expiry_time_in_utc', None) @@ -647,17 +686,17 @@ class WorkloadProtectableItem(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus """ _validation = { @@ -680,6 +719,17 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ super(WorkloadProtectableItem, self).__init__(**kwargs) self.backup_management_type = kwargs.get('backup_management_type', None) self.workload_type = kwargs.get('workload_type', None) @@ -693,26 +743,26 @@ class AzureFileShareProtectableItem(WorkloadProtectableItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_container_fabric_id: Full Fabric ID of container to which this protectable item + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_container_fabric_id: Full Fabric ID of container to which this protectable item belongs. For example, ARM ID. - :type parent_container_fabric_id: str - :param parent_container_friendly_name: Friendly name of container to which this protectable - item belongs. - :type parent_container_friendly_name: str - :param azure_file_share_type: File Share type XSync or XSMB. Possible values include: - "Invalid", "XSMB", "XSync". - :type azure_file_share_type: str or + :vartype parent_container_fabric_id: str + :ivar parent_container_friendly_name: Friendly name of container to which this protectable item + belongs. + :vartype parent_container_friendly_name: str + :ivar azure_file_share_type: File Share type XSync or XSMB. Possible values include: "Invalid", + "XSMB", "XSync". + :vartype azure_file_share_type: str or ~azure.mgmt.recoveryservicesbackup.models.AzureFileShareType """ @@ -735,6 +785,27 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_container_fabric_id: Full Fabric ID of container to which this protectable item + belongs. For example, ARM ID. + :paramtype parent_container_fabric_id: str + :keyword parent_container_friendly_name: Friendly name of container to which this protectable + item belongs. + :paramtype parent_container_friendly_name: str + :keyword azure_file_share_type: File Share type XSync or XSMB. Possible values include: + "Invalid", "XSMB", "XSync". + :paramtype azure_file_share_type: str or + ~azure.mgmt.recoveryservicesbackup.models.AzureFileShareType + """ super(AzureFileShareProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'AzureFileShare' # type: str self.parent_container_fabric_id = kwargs.get('parent_container_fabric_id', None) @@ -746,52 +817,56 @@ 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. - :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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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] + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str """ _validation = { @@ -814,16 +889,65 @@ class ProtectedItem(msrest.serialization.Model): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, } _subtype_map = { - 'protected_item_type': {'AzureFileShareProtectedItem': 'AzureFileshareProtectedItemAutoGenerated', 'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'AzureVmWorkloadProtectedItem': 'AzureVmWorkloadProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'GenericProtectedItem': 'GenericProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem'} - } - - def __init__( - self, - **kwargs - ): + 'protected_item_type': {'AzureFileShareProtectedItem': 'AzureFileshareProtectedItem', 'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'AzureVmWorkloadProtectedItem': 'AzureVmWorkloadProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'GenericProtectedItem': 'GenericProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + """ super(ProtectedItem, self).__init__(**kwargs) self.protected_item_type = None # type: Optional[str] self.backup_management_type = kwargs.get('backup_management_type', None) @@ -840,6 +964,8 @@ def __init__( self.is_deferred_delete_schedule_upcoming = kwargs.get('is_deferred_delete_schedule_upcoming', None) self.is_rehydrate = kwargs.get('is_rehydrate', None) self.resource_guard_operation_requests = kwargs.get('resource_guard_operation_requests', None) + self.is_archive_enabled = kwargs.get('is_archive_enabled', None) + self.policy_name = kwargs.get('policy_name', None) class AzureFileshareProtectedItem(ProtectedItem): @@ -847,64 +973,68 @@ class AzureFileshareProtectedItem(ProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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", + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the fileshare represented by this backup item. + :vartype friendly_name: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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 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, + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param extended_info: Additional information with this backup item. - :type extended_info: + :ivar extended_info: Additional information with this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo """ @@ -928,6 +1058,8 @@ class AzureFileshareProtectedItem(ProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, @@ -941,6 +1073,71 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the fileshare represented by this backup item. + :paramtype friendly_name: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + :keyword extended_info: Additional information with this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo + """ super(AzureFileshareProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'AzureFileShareProtectedItem' # type: str self.friendly_name = kwargs.get('friendly_name', None) @@ -952,134 +1149,18 @@ 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. Variables are only populated by the server, and will be ignored when sending a request. - :param oldest_recovery_point: The oldest backup copy available for this item in the service. - :type oldest_recovery_point: ~datetime.datetime - :param recovery_point_count: Number of available backup copies associated with this backup - item. - :type recovery_point_count: int - :param policy_state: Indicates consistency of policy object and policy applied to this backup + :ivar oldest_recovery_point: The oldest backup copy available for this item in the service. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of available backup copies associated with this backup item. + :vartype recovery_point_count: int + :ivar policy_state: Indicates consistency of policy object and policy applied to this backup item. - :type policy_state: str + :vartype policy_state: str :ivar resource_state: Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted}. :vartype resource_state: str @@ -1104,6 +1185,16 @@ def __init__( self, **kwargs ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this item in the service. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of available backup copies associated with this backup + item. + :paramtype recovery_point_count: int + :keyword policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :paramtype policy_state: str + """ super(AzureFileshareProtectedItemExtendedInfo, self).__init__(**kwargs) self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) self.recovery_point_count = kwargs.get('recovery_point_count', None) @@ -1120,13 +1211,13 @@ class ProtectionPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param protected_items_count: Number of items associated with this policy. - :type protected_items_count: int - :param backup_management_type: Required. This property will be used as the discriminator for + :ivar protected_items_count: Number of items associated with this policy. + :vartype protected_items_count: int + :ivar backup_management_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 backup_management_type: str - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] """ _validation = { @@ -1147,6 +1238,12 @@ def __init__( self, **kwargs ): + """ + :keyword protected_items_count: Number of items associated with this policy. + :paramtype protected_items_count: int + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + """ super(ProtectionPolicy, self).__init__(**kwargs) self.protected_items_count = kwargs.get('protected_items_count', None) self.backup_management_type = None # type: Optional[str] @@ -1158,25 +1255,25 @@ class AzureFileShareProtectionPolicy(ProtectionPolicy): All required parameters must be populated in order to send to Azure. - :param protected_items_count: Number of items associated with this policy. - :type protected_items_count: int - :param backup_management_type: Required. This property will be used as the discriminator for + :ivar protected_items_count: Number of items associated with this policy. + :vartype protected_items_count: int + :ivar backup_management_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 backup_management_type: str - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] - :param work_load_type: Type of workload for the backup management. Possible values include: + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + :ivar work_load_type: Type of workload for the backup management. Possible values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase". - :type work_load_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType - :param schedule_policy: Backup schedule specified as part of backup policy. - :type schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy - :param retention_policy: Retention policy with the details on backup copy retention ranges. - :type retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy - :param time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard + :vartype work_load_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar schedule_policy: Backup schedule specified as part of backup policy. + :vartype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :ivar retention_policy: Retention policy with the details on backup copy retention ranges. + :vartype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :ivar time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - :type time_zone: str + :vartype time_zone: str """ _validation = { @@ -1197,6 +1294,24 @@ def __init__( self, **kwargs ): + """ + :keyword protected_items_count: Number of items associated with this policy. + :paramtype protected_items_count: int + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + :keyword work_load_type: Type of workload for the backup management. Possible values include: + "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", + "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype work_load_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword schedule_policy: Backup schedule specified as part of backup policy. + :paramtype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :keyword retention_policy: Retention policy with the details on backup copy retention ranges. + :paramtype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :keyword time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific + Standard Time". + :paramtype time_zone: str + """ super(AzureFileShareProtectionPolicy, self).__init__(**kwargs) self.backup_management_type = 'AzureStorage' # type: str self.work_load_type = kwargs.get('work_load_type', None) @@ -1213,9 +1328,9 @@ class ILRRequest(msrest.serialization.Model): 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 + :ivar 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 + :vartype object_type: str """ _validation = { @@ -1234,6 +1349,8 @@ def __init__( self, **kwargs ): + """ + """ super(ILRRequest, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -1243,13 +1360,13 @@ class AzureFileShareProvisionILRRequest(ILRRequest): 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 + :ivar 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: Recovery point ID. - :type recovery_point_id: str - :param source_resource_id: Source Storage account ARM Id. - :type source_resource_id: str + :vartype object_type: str + :ivar recovery_point_id: Recovery point ID. + :vartype recovery_point_id: str + :ivar source_resource_id: Source Storage account ARM Id. + :vartype source_resource_id: str """ _validation = { @@ -1266,6 +1383,12 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_point_id: Recovery point ID. + :paramtype recovery_point_id: str + :keyword source_resource_id: Source Storage account ARM Id. + :paramtype source_resource_id: str + """ super(AzureFileShareProvisionILRRequest, self).__init__(**kwargs) self.object_type = 'AzureFileShareProvisionILRRequest' # type: str self.recovery_point_id = kwargs.get('recovery_point_id', None) @@ -1276,13 +1399,13 @@ 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. - :param object_type: Required. This property will be used as the discriminator for deciding the + :ivar 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 + :vartype object_type: str """ _validation = { @@ -1294,13 +1417,15 @@ 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__( self, **kwargs ): + """ + """ super(RecoveryPoint, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -1310,54 +1435,9 @@ class AzureFileShareRecoveryPoint(RecoveryPoint): 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_type: Type of the backup copy. Specifies whether it is a crash consistent - backup or app consistent. - :type recovery_point_type: str - :param recovery_point_time: Time at which this backup copy was created. - :type recovery_point_time: ~datetime.datetime - :param file_share_snapshot_uri: Contains Url to the snapshot of fileshare, if applicable. - :type file_share_snapshot_uri: str - :param recovery_point_size_in_gb: Contains recovery point size. - :type recovery_point_size_in_gb: int - """ - - _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'}, - 'file_share_snapshot_uri': {'key': 'fileShareSnapshotUri', 'type': 'str'}, - 'recovery_point_size_in_gb': {'key': 'recoveryPointSizeInGB', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureFileShareRecoveryPoint, self).__init__(**kwargs) - self.object_type = 'AzureFileShareRecoveryPoint' # type: str - self.recovery_point_type = kwargs.get('recovery_point_type', None) - self.recovery_point_time = kwargs.get('recovery_point_time', None) - self.file_share_snapshot_uri = kwargs.get('file_share_snapshot_uri', None) - 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 + :ivar 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 + :vartype 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 @@ -1371,10 +1451,6 @@ class AzureFileShareRecoveryPointAutoGenerated(RecoveryPoint): _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 = { @@ -1389,25 +1465,36 @@ def __init__( self, **kwargs ): - super(AzureFileShareRecoveryPointAutoGenerated, self).__init__(**kwargs) + """ + :keyword recovery_point_type: Type of the backup copy. Specifies whether it is a crash + consistent backup or app consistent. + :paramtype recovery_point_type: str + :keyword recovery_point_time: Time at which this backup copy was created. + :paramtype recovery_point_time: ~datetime.datetime + :keyword file_share_snapshot_uri: Contains Url to the snapshot of fileshare, if applicable. + :paramtype file_share_snapshot_uri: str + :keyword recovery_point_size_in_gb: Contains recovery point size. + :paramtype recovery_point_size_in_gb: int + """ + super(AzureFileShareRecoveryPoint, 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 + self.recovery_point_type = kwargs.get('recovery_point_type', None) + self.recovery_point_time = kwargs.get('recovery_point_time', None) + self.file_share_snapshot_uri = kwargs.get('file_share_snapshot_uri', None) + self.recovery_point_size_in_gb = kwargs.get('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. - :param object_type: Required. This property will be used as the discriminator for deciding the + :ivar 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 + :vartype object_type: str """ _validation = { @@ -1419,13 +1506,15 @@ 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__( self, **kwargs ): + """ + """ super(RestoreRequest, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -1435,25 +1524,26 @@ class AzureFileShareRestoreRequest(RestoreRequest): 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar 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: Source storage account ARM Id. - :type source_resource_id: str - :param copy_options: Options to resolve copy conflicts. Possible values include: "Invalid", + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Source storage account ARM Id. + :vartype source_resource_id: str + :ivar copy_options: Options to resolve copy conflicts. Possible values include: "Invalid", "CreateCopy", "Skip", "Overwrite", "FailOnConflict". - :type copy_options: str or ~azure.mgmt.recoveryservicesbackup.models.CopyOptions - :param restore_request_type: Restore Type (FullShareRestore or ItemLevelRestore). Possible + :vartype copy_options: str or ~azure.mgmt.recoveryservicesbackup.models.CopyOptions + :ivar restore_request_type: Restore Type (FullShareRestore or ItemLevelRestore). Possible values include: "Invalid", "FullShareRestore", "ItemLevelRestore". - :type restore_request_type: str or ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestType - :param restore_file_specs: List of Source Files/Folders(which need to recover) and + :vartype restore_request_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestType + :ivar restore_file_specs: List of Source Files/Folders(which need to recover) and TargetFolderPath details. - :type restore_file_specs: list[~azure.mgmt.recoveryservicesbackup.models.RestoreFileSpecs] - :param target_details: Target File Share Details. - :type target_details: ~azure.mgmt.recoveryservicesbackup.models.TargetAFSRestoreInfo + :vartype restore_file_specs: list[~azure.mgmt.recoveryservicesbackup.models.RestoreFileSpecs] + :ivar target_details: Target File Share Details. + :vartype target_details: ~azure.mgmt.recoveryservicesbackup.models.TargetAFSRestoreInfo """ _validation = { @@ -1474,6 +1564,25 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Source storage account ARM Id. + :paramtype source_resource_id: str + :keyword copy_options: Options to resolve copy conflicts. Possible values include: "Invalid", + "CreateCopy", "Skip", "Overwrite", "FailOnConflict". + :paramtype copy_options: str or ~azure.mgmt.recoveryservicesbackup.models.CopyOptions + :keyword restore_request_type: Restore Type (FullShareRestore or ItemLevelRestore). Possible + values include: "Invalid", "FullShareRestore", "ItemLevelRestore". + :paramtype restore_request_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestType + :keyword restore_file_specs: List of Source Files/Folders(which need to recover) and + TargetFolderPath details. + :paramtype restore_file_specs: list[~azure.mgmt.recoveryservicesbackup.models.RestoreFileSpecs] + :keyword target_details: Target File Share Details. + :paramtype target_details: ~azure.mgmt.recoveryservicesbackup.models.TargetAFSRestoreInfo + """ super(AzureFileShareRestoreRequest, self).__init__(**kwargs) self.object_type = 'AzureFileShareRestoreRequest' # type: str self.recovery_type = kwargs.get('recovery_type', None) @@ -1492,37 +1601,39 @@ class IaaSVMContainer(ProtectionContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. - :type virtual_machine_id: str - :param virtual_machine_version: Specifies whether the container represents a Classic or an - Azure Resource Manager VM. - :type virtual_machine_version: str - :param resource_group: Resource group name of Recovery Services Vault. - :type resource_group: str + :vartype virtual_machine_id: str + :ivar virtual_machine_version: Specifies whether the container represents a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar resource_group: Resource group name of Recovery Services Vault. + :vartype resource_group: str """ _validation = { @@ -1535,6 +1646,7 @@ class IaaSVMContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, @@ -1548,6 +1660,31 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this + Azure IaaS VM container. + :paramtype virtual_machine_id: str + :keyword virtual_machine_version: Specifies whether the container represents a Classic or an + Azure Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword resource_group: Resource group name of Recovery Services Vault. + :paramtype resource_group: str + """ super(IaaSVMContainer, self).__init__(**kwargs) self.container_type = 'IaaSVMContainer' # type: str self.virtual_machine_id = kwargs.get('virtual_machine_id', None) @@ -1560,37 +1697,39 @@ class AzureIaaSClassicComputeVMContainer(IaaSVMContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. - :type virtual_machine_id: str - :param virtual_machine_version: Specifies whether the container represents a Classic or an - Azure Resource Manager VM. - :type virtual_machine_version: str - :param resource_group: Resource group name of Recovery Services Vault. - :type resource_group: str + :vartype virtual_machine_id: str + :ivar virtual_machine_version: Specifies whether the container represents a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar resource_group: Resource group name of Recovery Services Vault. + :vartype resource_group: str """ _validation = { @@ -1603,6 +1742,7 @@ class AzureIaaSClassicComputeVMContainer(IaaSVMContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, @@ -1612,6 +1752,31 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this + Azure IaaS VM container. + :paramtype virtual_machine_id: str + :keyword virtual_machine_version: Specifies whether the container represents a Classic or an + Azure Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword resource_group: Resource group name of Recovery Services Vault. + :paramtype resource_group: str + """ super(AzureIaaSClassicComputeVMContainer, self).__init__(**kwargs) self.container_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str @@ -1624,19 +1789,24 @@ class IaaSVMProtectableItem(WorkloadProtectableItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. - :type virtual_machine_id: str + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :vartype virtual_machine_id: str + :ivar virtual_machine_version: Specifies whether the container represents a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar resource_group: Resource group name of Recovery Services Vault. + :vartype resource_group: str """ _validation = { @@ -1650,6 +1820,8 @@ class IaaSVMProtectableItem(WorkloadProtectableItem): 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, } _subtype_map = { @@ -1660,9 +1832,29 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :paramtype virtual_machine_id: str + :keyword virtual_machine_version: Specifies whether the container represents a Classic or an + Azure Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword resource_group: Resource group name of Recovery Services Vault. + :paramtype resource_group: str + """ super(IaaSVMProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'IaaSVMProtectableItem' # type: str self.virtual_machine_id = kwargs.get('virtual_machine_id', None) + self.virtual_machine_version = kwargs.get('virtual_machine_version', None) + self.resource_group = kwargs.get('resource_group', None) class AzureIaaSClassicComputeVMProtectableItem(IaaSVMProtectableItem): @@ -1670,19 +1862,24 @@ class AzureIaaSClassicComputeVMProtectableItem(IaaSVMProtectableItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. - :type virtual_machine_id: str + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :vartype virtual_machine_id: str + :ivar virtual_machine_version: Specifies whether the container represents a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar resource_group: Resource group name of Recovery Services Vault. + :vartype resource_group: str """ _validation = { @@ -1696,12 +1893,32 @@ class AzureIaaSClassicComputeVMProtectableItem(IaaSVMProtectableItem): 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, } def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :paramtype virtual_machine_id: str + :keyword virtual_machine_version: Specifies whether the container represents a Classic or an + Azure Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword resource_group: Resource group name of Recovery Services Vault. + :paramtype resource_group: str + """ super(AzureIaaSClassicComputeVMProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str @@ -1714,77 +1931,82 @@ class AzureIaaSVMProtectedItem(ProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 VM represented by this backup item. - :type friendly_name: str - :param virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this item. - :type virtual_machine_id: 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", + :vartype virtual_machine_id: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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: Health status of protected item. Possible values include: "Passed", + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar health_status: Health status of protected item. Possible values include: "Passed", "ActionRequired", "ActionSuggested", "Invalid". - :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, + :vartype health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param last_backup_status: Last backup operation status. - :type last_backup_status: str - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param protected_item_data_id: Data ID of the protected item. - :type protected_item_data_id: str - :param extended_info: Additional information for this backup item. - :type extended_info: + :ivar last_backup_status: Last backup operation status. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protected_item_data_id: Data ID of the protected item. + :vartype protected_item_data_id: str + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo - :param extended_properties: Extended Properties for Azure IaasVM Backup. - :type extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties """ _validation = { @@ -1807,6 +2029,8 @@ class AzureIaaSVMProtectedItem(ProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, @@ -1829,6 +2053,84 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the VM represented by this backup item. + :paramtype friendly_name: str + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :paramtype virtual_machine_id: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + :keyword last_backup_status: Last backup operation status. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protected_item_data_id: Data ID of the protected item. + :paramtype protected_item_data_id: str + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties + """ super(AzureIaaSVMProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'AzureIaaSVMProtectedItem' # type: str self.friendly_name = kwargs.get('friendly_name', None) @@ -1850,77 +2152,82 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 VM represented by this backup item. - :type friendly_name: str - :param virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this item. - :type virtual_machine_id: 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", + :vartype virtual_machine_id: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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: Health status of protected item. Possible values include: "Passed", + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar health_status: Health status of protected item. Possible values include: "Passed", "ActionRequired", "ActionSuggested", "Invalid". - :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, + :vartype health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param last_backup_status: Last backup operation status. - :type last_backup_status: str - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param protected_item_data_id: Data ID of the protected item. - :type protected_item_data_id: str - :param extended_info: Additional information for this backup item. - :type extended_info: + :ivar last_backup_status: Last backup operation status. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protected_item_data_id: Data ID of the protected item. + :vartype protected_item_data_id: str + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo - :param extended_properties: Extended Properties for Azure IaasVM Backup. - :type extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties """ _validation = { @@ -1943,6 +2250,8 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, @@ -1961,6 +2270,84 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the VM represented by this backup item. + :paramtype friendly_name: str + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :paramtype virtual_machine_id: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + :keyword last_backup_status: Last backup operation status. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protected_item_data_id: Data ID of the protected item. + :paramtype protected_item_data_id: str + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties + """ super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str @@ -1970,37 +2357,39 @@ class AzureIaaSComputeVMContainer(IaaSVMContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. - :type virtual_machine_id: str - :param virtual_machine_version: Specifies whether the container represents a Classic or an - Azure Resource Manager VM. - :type virtual_machine_version: str - :param resource_group: Resource group name of Recovery Services Vault. - :type resource_group: str + :vartype virtual_machine_id: str + :ivar virtual_machine_version: Specifies whether the container represents a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar resource_group: Resource group name of Recovery Services Vault. + :vartype resource_group: str """ _validation = { @@ -2013,6 +2402,7 @@ class AzureIaaSComputeVMContainer(IaaSVMContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, @@ -2022,6 +2412,31 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this + Azure IaaS VM container. + :paramtype virtual_machine_id: str + :keyword virtual_machine_version: Specifies whether the container represents a Classic or an + Azure Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword resource_group: Resource group name of Recovery Services Vault. + :paramtype resource_group: str + """ super(AzureIaaSComputeVMContainer, self).__init__(**kwargs) self.container_type = 'Microsoft.Compute/virtualMachines' # type: str @@ -2031,19 +2446,24 @@ class AzureIaaSComputeVMProtectableItem(IaaSVMProtectableItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. - :type virtual_machine_id: str + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :vartype virtual_machine_id: str + :ivar virtual_machine_version: Specifies whether the container represents a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar resource_group: Resource group name of Recovery Services Vault. + :vartype resource_group: str """ _validation = { @@ -2057,12 +2477,32 @@ class AzureIaaSComputeVMProtectableItem(IaaSVMProtectableItem): 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, } def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :paramtype virtual_machine_id: str + :keyword virtual_machine_version: Specifies whether the container represents a Classic or an + Azure Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword resource_group: Resource group name of Recovery Services Vault. + :paramtype resource_group: str + """ super(AzureIaaSComputeVMProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'Microsoft.Compute/virtualMachines' # type: str @@ -2072,77 +2512,82 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 VM represented by this backup item. - :type friendly_name: str - :param virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this item. - :type virtual_machine_id: 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", + :vartype virtual_machine_id: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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: Health status of protected item. Possible values include: "Passed", + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar health_status: Health status of protected item. Possible values include: "Passed", "ActionRequired", "ActionSuggested", "Invalid". - :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, + :vartype health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param last_backup_status: Last backup operation status. - :type last_backup_status: str - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param protected_item_data_id: Data ID of the protected item. - :type protected_item_data_id: str - :param extended_info: Additional information for this backup item. - :type extended_info: + :ivar last_backup_status: Last backup operation status. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protected_item_data_id: Data ID of the protected item. + :vartype protected_item_data_id: str + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo - :param extended_properties: Extended Properties for Azure IaasVM Backup. - :type extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties """ _validation = { @@ -2165,6 +2610,8 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, @@ -2183,6 +2630,84 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the VM represented by this backup item. + :paramtype friendly_name: str + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :paramtype virtual_machine_id: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + :keyword last_backup_status: Last backup operation status. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protected_item_data_id: Data ID of the protected item. + :paramtype protected_item_data_id: str + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties + """ super(AzureIaaSComputeVMProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'Microsoft.Compute/virtualMachines' # type: str @@ -2220,6 +2745,8 @@ def __init__( self, **kwargs ): + """ + """ super(AzureIaaSVMErrorInfo, self).__init__(**kwargs) self.error_code = None self.error_title = None @@ -2260,6 +2787,8 @@ def __init__( self, **kwargs ): + """ + """ super(ResourceHealthDetails, self).__init__(**kwargs) self.code = None self.title = None @@ -2300,6 +2829,8 @@ def __init__( self, **kwargs ): + """ + """ super(AzureIaaSVMHealthDetails, self).__init__(**kwargs) @@ -2307,30 +2838,30 @@ class Job(msrest.serialization.Model): """Defines workload agnostic properties for a job. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureIaaSVMJob, AzureStorageJob, AzureWorkloadJob, DpmJob, MabJob, VaultJob. + sub-classes are: AzureIaaSVMJob, AzureIaaSVMJobV2, AzureStorageJob, AzureWorkloadJob, DpmJob, MabJob, VaultJob. All required parameters must be populated in order to send to Azure. - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param activity_id: ActivityId of job. - :type activity_id: str - :param job_type: Required. This property will be used as the discriminator for deciding the + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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 job_type: str + :vartype job_type: str """ _validation = { @@ -2349,13 +2880,33 @@ class Job(msrest.serialization.Model): } _subtype_map = { - 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob', 'VaultJob': 'VaultJob'} + 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'AzureIaaSVMJobV2': 'AzureIaaSVMJobV2', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob', 'VaultJob': 'VaultJob'} } def __init__( self, **kwargs ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + """ super(Job, self).__init__(**kwargs) self.entity_friendly_name = kwargs.get('entity_friendly_name', None) self.backup_management_type = kwargs.get('backup_management_type', None) @@ -2372,37 +2923,42 @@ class AzureIaaSVMJob(Job): All required parameters must be populated in order to send to Azure. - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param activity_id: ActivityId of job. - :type activity_id: str - :param job_type: Required. This property will be used as the discriminator for deciding the + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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 job_type: str - :param duration: Time elapsed during the execution of this job. - :type duration: ~datetime.timedelta - :param actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. - :type actions_info: list[str or ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] - :param error_details: Error details on execution of this job. - :type error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMErrorInfo] - :param virtual_machine_version: Specifies whether the backup item is a Classic or an Azure + :vartype job_type: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMErrorInfo] + :ivar virtual_machine_version: Specifies whether the backup item is a Classic or an Azure Resource Manager VM. - :type virtual_machine_version: str - :param extended_info: Additional information for this job. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobExtendedInfo + :vartype virtual_machine_version: str + :ivar extended_info: Additional information for this job. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobExtendedInfo + :ivar container_name: Container name of the entity on which the current job is executing. + :vartype container_name: str + :ivar is_user_triggered: Indicated that whether the job is adhoc(true) or scheduled(false). + :vartype is_user_triggered: bool """ _validation = { @@ -2423,12 +2979,50 @@ class AzureIaaSVMJob(Job): 'error_details': {'key': 'errorDetails', 'type': '[AzureIaaSVMErrorInfo]'}, 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMJobExtendedInfo'}, - } - - def __init__( - self, - **kwargs - ): + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'is_user_triggered': {'key': 'isUserTriggered', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMErrorInfo] + :keyword virtual_machine_version: Specifies whether the backup item is a Classic or an Azure + Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword extended_info: Additional information for this job. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobExtendedInfo + :keyword container_name: Container name of the entity on which the current job is executing. + :paramtype container_name: str + :keyword is_user_triggered: Indicated that whether the job is adhoc(true) or scheduled(false). + :paramtype is_user_triggered: bool + """ super(AzureIaaSVMJob, self).__init__(**kwargs) self.job_type = 'AzureIaaSVMJob' # type: str self.duration = kwargs.get('duration', None) @@ -2436,24 +3030,26 @@ def __init__( self.error_details = kwargs.get('error_details', None) self.virtual_machine_version = kwargs.get('virtual_machine_version', None) self.extended_info = kwargs.get('extended_info', None) + self.container_name = kwargs.get('container_name', None) + self.is_user_triggered = kwargs.get('is_user_triggered', None) class AzureIaaSVMJobExtendedInfo(msrest.serialization.Model): """Azure IaaS VM workload-specific additional information for job. - :param tasks_list: List of tasks associated with this job. - :type tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobTaskDetails] - :param property_bag: Job properties. - :type property_bag: dict[str, str] - :param internal_property_bag: Job internal properties. - :type internal_property_bag: dict[str, str] - :param progress_percentage: Indicates progress of the job. Null if it has not started or + :ivar tasks_list: List of tasks associated with this job. + :vartype tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobTaskDetails] + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] + :ivar internal_property_bag: Job internal properties. + :vartype internal_property_bag: dict[str, str] + :ivar progress_percentage: Indicates progress of the job. Null if it has not started or completed. - :type progress_percentage: float - :param estimated_remaining_duration: Time remaining for execution of this job. - :type estimated_remaining_duration: str - :param dynamic_error_message: Non localized error message on job execution. - :type dynamic_error_message: str + :vartype progress_percentage: float + :ivar estimated_remaining_duration: Time remaining for execution of this job. + :vartype estimated_remaining_duration: str + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str """ _attribute_map = { @@ -2469,6 +3065,22 @@ def __init__( self, **kwargs ): + """ + :keyword tasks_list: List of tasks associated with this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobTaskDetails] + :keyword property_bag: Job properties. + :paramtype property_bag: dict[str, str] + :keyword internal_property_bag: Job internal properties. + :paramtype internal_property_bag: dict[str, str] + :keyword progress_percentage: Indicates progress of the job. Null if it has not started or + completed. + :paramtype progress_percentage: float + :keyword estimated_remaining_duration: Time remaining for execution of this job. + :paramtype estimated_remaining_duration: str + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ super(AzureIaaSVMJobExtendedInfo, self).__init__(**kwargs) self.tasks_list = kwargs.get('tasks_list', None) self.property_bag = kwargs.get('property_bag', None) @@ -2481,23 +3093,23 @@ def __init__( class AzureIaaSVMJobTaskDetails(msrest.serialization.Model): """Azure IaaS VM workload-specific job task details. - :param task_id: The task display name. - :type task_id: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param instance_id: The instanceId. - :type instance_id: str - :param duration: Time elapsed for task. - :type duration: ~datetime.timedelta - :param status: The status. - :type status: str - :param progress_percentage: Progress of the task. - :type progress_percentage: float - :param task_execution_details: Details about execution of the task. + :ivar task_id: The task display name. + :vartype task_id: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar instance_id: The instanceId. + :vartype instance_id: str + :ivar duration: Time elapsed for task. + :vartype duration: ~datetime.timedelta + :ivar status: The status. + :vartype status: str + :ivar progress_percentage: Progress of the task. + :vartype progress_percentage: float + :ivar task_execution_details: Details about execution of the task. eg: number of bytes transferred etc. - :type task_execution_details: str + :vartype task_execution_details: str """ _attribute_map = { @@ -2515,6 +3127,25 @@ def __init__( self, **kwargs ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword instance_id: The instanceId. + :paramtype instance_id: str + :keyword duration: Time elapsed for task. + :paramtype duration: ~datetime.timedelta + :keyword status: The status. + :paramtype status: str + :keyword progress_percentage: Progress of the task. + :paramtype progress_percentage: float + :keyword task_execution_details: Details about execution of the task. + eg: number of bytes transferred etc. + :paramtype task_execution_details: str + """ super(AzureIaaSVMJobTaskDetails, self).__init__(**kwargs) self.task_id = kwargs.get('task_id', None) self.start_time = kwargs.get('start_time', None) @@ -2526,16 +3157,126 @@ def __init__( self.task_execution_details = kwargs.get('task_execution_details', None) +class AzureIaaSVMJobV2(Job): + """Azure IaaS VM workload-specific job object. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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. + :vartype job_type: str + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :ivar container_name: Container name of the entity on which the current job is executing. + :vartype container_name: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar error_details: Error details on execution of this job. + :vartype error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMErrorInfo] + :ivar virtual_machine_version: Specifies whether the backup item is a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar extended_info: Additional information for this job. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[str]'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureIaaSVMErrorInfo]'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMJobExtendedInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :keyword container_name: Container name of the entity on which the current job is executing. + :paramtype container_name: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword error_details: Error details on execution of this job. + :paramtype error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMErrorInfo] + :keyword virtual_machine_version: Specifies whether the backup item is a Classic or an Azure + Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword extended_info: Additional information for this job. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobExtendedInfo + """ + super(AzureIaaSVMJobV2, self).__init__(**kwargs) + self.job_type = 'AzureIaaSVMJobV2' # type: str + self.actions_info = kwargs.get('actions_info', None) + self.container_name = kwargs.get('container_name', None) + self.duration = kwargs.get('duration', None) + self.error_details = kwargs.get('error_details', None) + self.virtual_machine_version = kwargs.get('virtual_machine_version', None) + self.extended_info = kwargs.get('extended_info', None) + + class AzureIaaSVMProtectedItemExtendedInfo(msrest.serialization.Model): """Additional information on Azure IaaS VM specific backup item. - :param oldest_recovery_point: The oldest backup copy available for this backup item. - :type oldest_recovery_point: ~datetime.datetime - :param recovery_point_count: Number of backup copies available for this backup item. - :type recovery_point_count: int - :param policy_inconsistent: Specifies if backup policy associated with the backup item is + :ivar oldest_recovery_point: The oldest backup copy available for this backup item. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of backup copies available for this backup item. + :vartype recovery_point_count: int + :ivar policy_inconsistent: Specifies if backup policy associated with the backup item is inconsistent. - :type policy_inconsistent: bool + :vartype policy_inconsistent: bool """ _attribute_map = { @@ -2548,6 +3289,15 @@ def __init__( self, **kwargs ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this backup item. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of backup copies available for this backup item. + :paramtype recovery_point_count: int + :keyword policy_inconsistent: Specifies if backup policy associated with the backup item is + inconsistent. + :paramtype policy_inconsistent: bool + """ super(AzureIaaSVMProtectedItemExtendedInfo, self).__init__(**kwargs) self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) self.recovery_point_count = kwargs.get('recovery_point_count', None) @@ -2559,24 +3309,25 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy): All required parameters must be populated in order to send to Azure. - :param protected_items_count: Number of items associated with this policy. - :type protected_items_count: int - :param backup_management_type: Required. This property will be used as the discriminator for + :ivar protected_items_count: Number of items associated with this policy. + :vartype protected_items_count: int + :ivar backup_management_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 backup_management_type: str - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] - :param instant_rp_details: - :type instant_rp_details: ~azure.mgmt.recoveryservicesbackup.models.InstantRPAdditionalDetails - :param schedule_policy: Backup schedule specified as part of backup policy. - :type schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy - :param retention_policy: Retention policy with the details on backup copy retention ranges. - :type retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy - :param instant_rp_retention_range_in_days: Instant RP retention policy range in days. - :type instant_rp_retention_range_in_days: int - :param time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + :ivar instant_rp_details: + :vartype instant_rp_details: + ~azure.mgmt.recoveryservicesbackup.models.InstantRPAdditionalDetails + :ivar schedule_policy: Backup schedule specified as part of backup policy. + :vartype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :ivar retention_policy: Retention policy with the details on backup copy retention ranges. + :vartype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :ivar instant_rp_retention_range_in_days: Instant RP retention policy range in days. + :vartype instant_rp_retention_range_in_days: int + :ivar time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - :type time_zone: str + :vartype time_zone: str """ _validation = { @@ -2598,6 +3349,24 @@ def __init__( self, **kwargs ): + """ + :keyword protected_items_count: Number of items associated with this policy. + :paramtype protected_items_count: int + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + :keyword instant_rp_details: + :paramtype instant_rp_details: + ~azure.mgmt.recoveryservicesbackup.models.InstantRPAdditionalDetails + :keyword schedule_policy: Backup schedule specified as part of backup policy. + :paramtype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :keyword retention_policy: Retention policy with the details on backup copy retention ranges. + :paramtype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :keyword instant_rp_retention_range_in_days: Instant RP retention policy range in days. + :paramtype instant_rp_retention_range_in_days: int + :keyword time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific + Standard Time". + :paramtype time_zone: str + """ super(AzureIaaSVMProtectionPolicy, self).__init__(**kwargs) self.backup_management_type = 'AzureIaasVM' # type: str self.instant_rp_details = kwargs.get('instant_rp_details', None) @@ -2611,28 +3380,30 @@ class ProtectionIntent(msrest.serialization.Model): """Base class for backup ProtectionIntent. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureResourceProtectionIntent, AzureRecoveryServiceVaultProtectionIntent. + sub-classes are: AzureResourceProtectionIntent, AzureWorkloadContainerAutoProtectionIntent, AzureRecoveryServiceVaultProtectionIntent. All required parameters must be populated in order to send to Azure. - :param protection_intent_item_type: Required. backup protectionIntent type.Constant filled by - server. - :type protection_intent_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", + :ivar protection_intent_item_type: Required. backup protectionIntent type.Constant filled by + server. Possible values include: "Invalid", "AzureResourceItem", "RecoveryServiceVaultItem", + "AzureWorkloadContainerAutoProtectionIntent". + :vartype protection_intent_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentItemType + :ivar 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 + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param source_resource_id: ARM ID of the resource to be backed up. - :type source_resource_id: str - :param item_id: ID of the item which is getting protected, In case of Azure Vm , it is + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar item_id: ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId. - :type item_id: str - :param policy_id: ID of the backup policy with which this item is backed up. - :type policy_id: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", + :vartype item_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus """ _validation = { @@ -2649,13 +3420,30 @@ class ProtectionIntent(msrest.serialization.Model): } _subtype_map = { - 'protection_intent_item_type': {'AzureResourceItem': 'AzureResourceProtectionIntent', 'RecoveryServiceVaultItem': 'AzureRecoveryServiceVaultProtectionIntent'} + 'protection_intent_item_type': {'AzureResourceItem': 'AzureResourceProtectionIntent', 'AzureWorkloadContainerAutoProtectionIntent': 'AzureWorkloadContainerAutoProtectionIntent', 'RecoveryServiceVaultItem': 'AzureRecoveryServiceVaultProtectionIntent'} } def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword item_id: ID of the item which is getting protected, In case of Azure Vm , it is + ProtectedItemId. + :paramtype item_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ super(ProtectionIntent, self).__init__(**kwargs) self.protection_intent_item_type = None # type: Optional[str] self.backup_management_type = kwargs.get('backup_management_type', None) @@ -2673,24 +3461,26 @@ class AzureRecoveryServiceVaultProtectionIntent(ProtectionIntent): All required parameters must be populated in order to send to Azure. - :param protection_intent_item_type: Required. backup protectionIntent type.Constant filled by - server. - :type protection_intent_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", + :ivar protection_intent_item_type: Required. backup protectionIntent type.Constant filled by + server. Possible values include: "Invalid", "AzureResourceItem", "RecoveryServiceVaultItem", + "AzureWorkloadContainerAutoProtectionIntent". + :vartype protection_intent_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentItemType + :ivar 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 + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param source_resource_id: ARM ID of the resource to be backed up. - :type source_resource_id: str - :param item_id: ID of the item which is getting protected, In case of Azure Vm , it is + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar item_id: ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId. - :type item_id: str - :param policy_id: ID of the backup policy with which this item is backed up. - :type policy_id: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", + :vartype item_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus """ _validation = { @@ -2714,6 +3504,23 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword item_id: ID of the item which is getting protected, In case of Azure Vm , it is + ProtectedItemId. + :paramtype item_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ super(AzureRecoveryServiceVaultProtectionIntent, self).__init__(**kwargs) self.protection_intent_item_type = 'RecoveryServiceVaultItem' # type: str @@ -2723,26 +3530,28 @@ class AzureResourceProtectionIntent(ProtectionIntent): All required parameters must be populated in order to send to Azure. - :param protection_intent_item_type: Required. backup protectionIntent type.Constant filled by - server. - :type protection_intent_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", + :ivar protection_intent_item_type: Required. backup protectionIntent type.Constant filled by + server. Possible values include: "Invalid", "AzureResourceItem", "RecoveryServiceVaultItem", + "AzureWorkloadContainerAutoProtectionIntent". + :vartype protection_intent_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentItemType + :ivar 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 + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param source_resource_id: ARM ID of the resource to be backed up. - :type source_resource_id: str - :param item_id: ID of the item which is getting protected, In case of Azure Vm , it is + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar item_id: ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId. - :type item_id: str - :param policy_id: ID of the backup policy with which this item is backed up. - :type policy_id: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", + :vartype item_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param friendly_name: Friendly name of the VM represented by this backup item. - :type friendly_name: str + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str """ _validation = { @@ -2763,6 +3572,25 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword item_id: ID of the item which is getting protected, In case of Azure Vm , it is + ProtectedItemId. + :paramtype item_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword friendly_name: Friendly name of the VM represented by this backup item. + :paramtype friendly_name: str + """ super(AzureResourceProtectionIntent, self).__init__(**kwargs) self.protection_intent_item_type = 'AzureResourceItem' # type: str self.friendly_name = kwargs.get('friendly_name', None) @@ -2776,45 +3604,47 @@ class AzureWorkloadContainer(ProtectionContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param source_resource_id: ARM ID of the virtual machine represented by this Azure Workload + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar source_resource_id: ARM ID of the virtual machine represented by this Azure Workload Container. - :type source_resource_id: str - :param last_updated_time: Time stamp when this container was updated. - :type last_updated_time: ~datetime.datetime - :param extended_info: Additional details of a workload container. - :type extended_info: + :vartype source_resource_id: str + :ivar last_updated_time: Time stamp when this container was updated. + :vartype last_updated_time: ~datetime.datetime + :ivar extended_info: Additional details of a workload container. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo - :param workload_type: Workload type for which registration was sent. Possible values include: + :ivar workload_type: Workload type for which registration was sent. 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.WorkloadType - :param operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", "Reregister". - :type operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType + :vartype operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType """ _validation = { @@ -2827,6 +3657,7 @@ class AzureWorkloadContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, @@ -2842,6 +3673,39 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword source_resource_id: ARM ID of the virtual machine represented by this Azure Workload + Container. + :paramtype source_resource_id: str + :keyword last_updated_time: Time stamp when this container was updated. + :paramtype last_updated_time: ~datetime.datetime + :keyword extended_info: Additional details of a workload container. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + :keyword workload_type: Workload type for which registration was sent. Possible values include: + "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", + "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :paramtype operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType + """ super(AzureWorkloadContainer, self).__init__(**kwargs) self.container_type = 'AzureWorkloadContainer' # type: str self.source_resource_id = kwargs.get('source_resource_id', None) @@ -2856,45 +3720,47 @@ class AzureSQLAGWorkloadContainerProtectionContainer(AzureWorkloadContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param source_resource_id: ARM ID of the virtual machine represented by this Azure Workload + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar source_resource_id: ARM ID of the virtual machine represented by this Azure Workload Container. - :type source_resource_id: str - :param last_updated_time: Time stamp when this container was updated. - :type last_updated_time: ~datetime.datetime - :param extended_info: Additional details of a workload container. - :type extended_info: + :vartype source_resource_id: str + :ivar last_updated_time: Time stamp when this container was updated. + :vartype last_updated_time: ~datetime.datetime + :ivar extended_info: Additional details of a workload container. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo - :param workload_type: Workload type for which registration was sent. Possible values include: + :ivar workload_type: Workload type for which registration was sent. 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.WorkloadType - :param operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", "Reregister". - :type operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType + :vartype operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType """ _validation = { @@ -2907,6 +3773,7 @@ class AzureSQLAGWorkloadContainerProtectionContainer(AzureWorkloadContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, @@ -2918,6 +3785,39 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword source_resource_id: ARM ID of the virtual machine represented by this Azure Workload + Container. + :paramtype source_resource_id: str + :keyword last_updated_time: Time stamp when this container was updated. + :paramtype last_updated_time: ~datetime.datetime + :keyword extended_info: Additional details of a workload container. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + :keyword workload_type: Workload type for which registration was sent. Possible values include: + "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", + "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :paramtype operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType + """ super(AzureSQLAGWorkloadContainerProtectionContainer, self).__init__(**kwargs) self.container_type = 'SQLAGWorkLoadContainer' # type: str @@ -2927,29 +3827,31 @@ class AzureSqlContainer(ProtectionContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str """ _validation = { @@ -2962,12 +3864,30 @@ class AzureSqlContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, } def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + """ super(AzureSqlContainer, self).__init__(**kwargs) self.container_type = 'AzureSqlContainer' # type: str @@ -2977,57 +3897,60 @@ class AzureSqlProtectedItem(ProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 protected_item_data_id: Internal ID of a backup item. Used by Azure SQL Backup engine to + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar protected_item_data_id: Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. - :type protected_item_data_id: str - :param protection_state: Backup state of the backed up item. Possible values include: - "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", - "ProtectionPaused". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState - :param extended_info: Additional information for this backup item. - :type extended_info: + :vartype protected_item_data_id: str + :ivar protection_state: Backup state of the backed up item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureSqlProtectedItemExtendedInfo """ @@ -3051,6 +3974,8 @@ class AzureSqlProtectedItem(ProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureSqlProtectedItemExtendedInfo'}, @@ -3060,6 +3985,64 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword protected_item_data_id: Internal ID of a backup item. Used by Azure SQL Backup engine + to contact Recovery Services. + :paramtype protected_item_data_id: str + :keyword protection_state: Backup state of the backed up item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureSqlProtectedItemExtendedInfo + """ super(AzureSqlProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'Microsoft.Sql/servers/databases' # type: str self.protected_item_data_id = kwargs.get('protected_item_data_id', None) @@ -3070,13 +4053,12 @@ def __init__( class AzureSqlProtectedItemExtendedInfo(msrest.serialization.Model): """Additional information on Azure Sql specific protected item. - :param oldest_recovery_point: The oldest backup copy available for this item in the service. - :type oldest_recovery_point: ~datetime.datetime - :param recovery_point_count: Number of available backup copies associated with this backup - item. - :type recovery_point_count: int - :param policy_state: State of the backup policy associated with this backup item. - :type policy_state: str + :ivar oldest_recovery_point: The oldest backup copy available for this item in the service. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of available backup copies associated with this backup item. + :vartype recovery_point_count: int + :ivar policy_state: State of the backup policy associated with this backup item. + :vartype policy_state: str """ _attribute_map = { @@ -3089,6 +4071,15 @@ def __init__( self, **kwargs ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this item in the service. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of available backup copies associated with this backup + item. + :paramtype recovery_point_count: int + :keyword policy_state: State of the backup policy associated with this backup item. + :paramtype policy_state: str + """ super(AzureSqlProtectedItemExtendedInfo, self).__init__(**kwargs) self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) self.recovery_point_count = kwargs.get('recovery_point_count', None) @@ -3100,15 +4091,15 @@ class AzureSqlProtectionPolicy(ProtectionPolicy): All required parameters must be populated in order to send to Azure. - :param protected_items_count: Number of items associated with this policy. - :type protected_items_count: int - :param backup_management_type: Required. This property will be used as the discriminator for + :ivar protected_items_count: Number of items associated with this policy. + :vartype protected_items_count: int + :ivar backup_management_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 backup_management_type: str - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] - :param retention_policy: Retention policy details. - :type retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + :ivar retention_policy: Retention policy details. + :vartype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy """ _validation = { @@ -3126,6 +4117,14 @@ def __init__( self, **kwargs ): + """ + :keyword protected_items_count: Number of items associated with this policy. + :paramtype protected_items_count: int + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + :keyword retention_policy: Retention policy details. + :paramtype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + """ super(AzureSqlProtectionPolicy, self).__init__(**kwargs) self.backup_management_type = 'AzureSql' # type: str self.retention_policy = kwargs.get('retention_policy', None) @@ -3136,37 +4135,43 @@ class AzureStorageContainer(ProtectionContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param source_resource_id: Fully qualified ARM url. - :type source_resource_id: str - :param storage_account_version: Storage account version. - :type storage_account_version: str - :param resource_group: Resource group name of Recovery Services Vault. - :type resource_group: str - :param protected_item_count: Number of items backed up in this container. - :type protected_item_count: long + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar source_resource_id: Fully qualified ARM url. + :vartype source_resource_id: str + :ivar storage_account_version: Storage account version. + :vartype storage_account_version: str + :ivar resource_group: Resource group name of Recovery Services Vault. + :vartype resource_group: str + :ivar protected_item_count: Number of items backed up in this container. + :vartype protected_item_count: long + :ivar acquire_storage_account_lock: Whether storage account lock is to be acquired for this + container or not. Possible values include: "Acquire", "NotAcquire". + :vartype acquire_storage_account_lock: str or + ~azure.mgmt.recoveryservicesbackup.models.AcquireStorageAccountLock """ _validation = { @@ -3179,33 +4184,65 @@ class AzureStorageContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'storage_account_version': {'key': 'storageAccountVersion', 'type': 'str'}, 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): + 'acquire_storage_account_lock': {'key': 'acquireStorageAccountLock', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword source_resource_id: Fully qualified ARM url. + :paramtype source_resource_id: str + :keyword storage_account_version: Storage account version. + :paramtype storage_account_version: str + :keyword resource_group: Resource group name of Recovery Services Vault. + :paramtype resource_group: str + :keyword protected_item_count: Number of items backed up in this container. + :paramtype protected_item_count: long + :keyword acquire_storage_account_lock: Whether storage account lock is to be acquired for this + container or not. Possible values include: "Acquire", "NotAcquire". + :paramtype acquire_storage_account_lock: str or + ~azure.mgmt.recoveryservicesbackup.models.AcquireStorageAccountLock + """ super(AzureStorageContainer, self).__init__(**kwargs) self.container_type = 'StorageContainer' # type: str self.source_resource_id = kwargs.get('source_resource_id', None) self.storage_account_version = kwargs.get('storage_account_version', None) self.resource_group = kwargs.get('resource_group', None) self.protected_item_count = kwargs.get('protected_item_count', None) + self.acquire_storage_account_lock = kwargs.get('acquire_storage_account_lock', None) class AzureStorageErrorInfo(msrest.serialization.Model): """Azure storage specific error information. - :param error_code: Error code. - :type error_code: int - :param error_string: Localized error string. - :type error_string: str - :param recommendations: List of localized recommendations for above error code. - :type recommendations: list[str] + :ivar error_code: Error code. + :vartype error_code: int + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] """ _attribute_map = { @@ -3218,6 +4255,14 @@ def __init__( self, **kwargs ): + """ + :keyword error_code: Error code. + :paramtype error_code: int + :keyword error_string: Localized error string. + :paramtype error_string: str + :keyword recommendations: List of localized recommendations for above error code. + :paramtype recommendations: list[str] + """ super(AzureStorageErrorInfo, self).__init__(**kwargs) self.error_code = kwargs.get('error_code', None) self.error_string = kwargs.get('error_string', None) @@ -3229,39 +4274,42 @@ class AzureStorageJob(Job): All required parameters must be populated in order to send to Azure. - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param activity_id: ActivityId of job. - :type activity_id: str - :param job_type: Required. This property will be used as the discriminator for deciding the + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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 job_type: str - :param duration: Time elapsed during the execution of this job. - :type duration: ~datetime.timedelta - :param actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. - :type actions_info: list[str or ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] - :param error_details: Error details on execution of this job. - :type error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageErrorInfo] - :param storage_account_name: Specifies friendly name of the storage account. - :type storage_account_name: str - :param storage_account_version: Specifies whether the Storage account is a Classic or an Azure + :vartype job_type: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageErrorInfo] + :ivar storage_account_name: Specifies friendly name of the storage account. + :vartype storage_account_name: str + :ivar storage_account_version: Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account. - :type storage_account_version: str - :param extended_info: Additional information about the job. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobExtendedInfo + :vartype storage_account_version: str + :ivar extended_info: Additional information about the job. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobExtendedInfo + :ivar is_user_triggered: Indicated that whether the job is adhoc(true) or scheduled(false). + :vartype is_user_triggered: bool """ _validation = { @@ -3283,12 +4331,49 @@ class AzureStorageJob(Job): 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, 'storage_account_version': {'key': 'storageAccountVersion', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureStorageJobExtendedInfo'}, - } - - def __init__( - self, - **kwargs - ): + 'is_user_triggered': {'key': 'isUserTriggered', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageErrorInfo] + :keyword storage_account_name: Specifies friendly name of the storage account. + :paramtype storage_account_name: str + :keyword storage_account_version: Specifies whether the Storage account is a Classic or an + Azure Resource Manager Storage account. + :paramtype storage_account_version: str + :keyword extended_info: Additional information about the job. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobExtendedInfo + :keyword is_user_triggered: Indicated that whether the job is adhoc(true) or scheduled(false). + :paramtype is_user_triggered: bool + """ super(AzureStorageJob, self).__init__(**kwargs) self.job_type = 'AzureStorageJob' # type: str self.duration = kwargs.get('duration', None) @@ -3297,17 +4382,18 @@ def __init__( self.storage_account_name = kwargs.get('storage_account_name', None) self.storage_account_version = kwargs.get('storage_account_version', None) self.extended_info = kwargs.get('extended_info', None) + self.is_user_triggered = kwargs.get('is_user_triggered', None) class AzureStorageJobExtendedInfo(msrest.serialization.Model): """Azure Storage workload-specific additional information for job. - :param tasks_list: List of tasks for this job. - :type tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobTaskDetails] - :param property_bag: Job properties. - :type property_bag: dict[str, str] - :param dynamic_error_message: Non localized error message on job execution. - :type dynamic_error_message: str + :ivar tasks_list: List of tasks for this job. + :vartype tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobTaskDetails] + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str """ _attribute_map = { @@ -3320,6 +4406,15 @@ def __init__( self, **kwargs ): + """ + :keyword tasks_list: List of tasks for this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobTaskDetails] + :keyword property_bag: Job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ super(AzureStorageJobExtendedInfo, self).__init__(**kwargs) self.tasks_list = kwargs.get('tasks_list', None) self.property_bag = kwargs.get('property_bag', None) @@ -3329,10 +4424,10 @@ def __init__( class AzureStorageJobTaskDetails(msrest.serialization.Model): """Azure storage workload specific job task details. - :param task_id: The task display name. - :type task_id: str - :param status: The status. - :type status: str + :ivar task_id: The task display name. + :vartype task_id: str + :ivar status: The status. + :vartype status: str """ _attribute_map = { @@ -3344,6 +4439,12 @@ def __init__( self, **kwargs ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword status: The status. + :paramtype status: str + """ super(AzureStorageJobTaskDetails, self).__init__(**kwargs) self.task_id = kwargs.get('task_id', None) self.status = kwargs.get('status', None) @@ -3357,29 +4458,29 @@ class ProtectableContainer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param protectable_container_type: Required. Type of the container. The value of this property + :ivar protectable_container_type: Required. Type of the container. The value of this property for #. Compute Azure VM is Microsoft.Compute/virtualMachines #. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines.Constant filled by - server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", + server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type protectable_container_type: str or + :vartype protectable_container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param health_status: Status of health of the container. - :type health_status: str - :param container_id: Fabric Id of the container such as ARM Id. - :type container_id: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_id: Fabric Id of the container such as ARM Id. + :vartype container_id: str """ _validation = { @@ -3402,6 +4503,19 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword container_id: Fabric Id of the container such as ARM Id. + :paramtype container_id: str + """ super(ProtectableContainer, self).__init__(**kwargs) self.friendly_name = kwargs.get('friendly_name', None) self.backup_management_type = kwargs.get('backup_management_type', None) @@ -3415,29 +4529,29 @@ class AzureStorageProtectableContainer(ProtectableContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param protectable_container_type: Required. Type of the container. The value of this property + :ivar protectable_container_type: Required. Type of the container. The value of this property for #. Compute Azure VM is Microsoft.Compute/virtualMachines #. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines.Constant filled by - server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", + server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type protectable_container_type: str or + :vartype protectable_container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param health_status: Status of health of the container. - :type health_status: str - :param container_id: Fabric Id of the container such as ARM Id. - :type container_id: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_id: Fabric Id of the container such as ARM Id. + :vartype container_id: str """ _validation = { @@ -3456,6 +4570,19 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword container_id: Fabric Id of the container such as ARM Id. + :paramtype container_id: str + """ super(AzureStorageProtectableContainer, self).__init__(**kwargs) self.protectable_container_type = 'StorageContainer' # type: str @@ -3465,29 +4592,29 @@ class AzureVMAppContainerProtectableContainer(ProtectableContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param protectable_container_type: Required. Type of the container. The value of this property + :ivar protectable_container_type: Required. Type of the container. The value of this property for #. Compute Azure VM is Microsoft.Compute/virtualMachines #. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines.Constant filled by - server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", + server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type protectable_container_type: str or + :vartype protectable_container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param health_status: Status of health of the container. - :type health_status: str - :param container_id: Fabric Id of the container such as ARM Id. - :type container_id: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_id: Fabric Id of the container such as ARM Id. + :vartype container_id: str """ _validation = { @@ -3506,6 +4633,19 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword container_id: Fabric Id of the container such as ARM Id. + :paramtype container_id: str + """ super(AzureVMAppContainerProtectableContainer, self).__init__(**kwargs) self.protectable_container_type = 'VMAppContainer' # type: str @@ -3515,45 +4655,47 @@ class AzureVMAppContainerProtectionContainer(AzureWorkloadContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param source_resource_id: ARM ID of the virtual machine represented by this Azure Workload + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar source_resource_id: ARM ID of the virtual machine represented by this Azure Workload Container. - :type source_resource_id: str - :param last_updated_time: Time stamp when this container was updated. - :type last_updated_time: ~datetime.datetime - :param extended_info: Additional details of a workload container. - :type extended_info: + :vartype source_resource_id: str + :ivar last_updated_time: Time stamp when this container was updated. + :vartype last_updated_time: ~datetime.datetime + :ivar extended_info: Additional details of a workload container. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo - :param workload_type: Workload type for which registration was sent. Possible values include: + :ivar workload_type: Workload type for which registration was sent. 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.WorkloadType - :param operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", "Reregister". - :type operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType + :vartype operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType """ _validation = { @@ -3566,6 +4708,7 @@ class AzureVMAppContainerProtectionContainer(AzureWorkloadContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, @@ -3577,6 +4720,39 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword source_resource_id: ARM ID of the virtual machine represented by this Azure Workload + Container. + :paramtype source_resource_id: str + :keyword last_updated_time: Time stamp when this container was updated. + :paramtype last_updated_time: ~datetime.datetime + :keyword extended_info: Additional details of a workload container. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + :keyword workload_type: Workload type for which registration was sent. Possible values include: + "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", + "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :paramtype operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType + """ super(AzureVMAppContainerProtectionContainer, self).__init__(**kwargs) self.container_type = 'VMAppContainer' # type: str @@ -3586,12 +4762,12 @@ class AzureVMResourceFeatureSupportRequest(FeatureSupportRequest): All required parameters must be populated in order to send to Azure. - :param feature_type: Required. backup support feature type.Constant filled by server. - :type feature_type: str - :param vm_size: Size of the resource: VM size(A/D series etc) in case of IaasVM. - :type vm_size: str - :param vm_sku: SKUs (Premium/Managed etc) in case of IaasVM. - :type vm_sku: str + :ivar feature_type: Required. backup support feature type.Constant filled by server. + :vartype feature_type: str + :ivar vm_size: Size of the resource: VM size(A/D series etc) in case of IaasVM. + :vartype vm_size: str + :ivar vm_sku: SKUs (Premium/Managed etc) in case of IaasVM. + :vartype vm_sku: str """ _validation = { @@ -3608,6 +4784,12 @@ def __init__( self, **kwargs ): + """ + :keyword vm_size: Size of the resource: VM size(A/D series etc) in case of IaasVM. + :paramtype vm_size: str + :keyword vm_sku: SKUs (Premium/Managed etc) in case of IaasVM. + :paramtype vm_sku: str + """ super(AzureVMResourceFeatureSupportRequest, self).__init__(**kwargs) self.feature_type = 'AzureVMResourceBackup' # type: str self.vm_size = kwargs.get('vm_size', None) @@ -3617,9 +4799,9 @@ def __init__( class AzureVMResourceFeatureSupportResponse(msrest.serialization.Model): """Response for feature support requests for Azure IaasVm. - :param support_status: Support status of feature. Possible values include: "Invalid", + :ivar support_status: Support status of feature. Possible values include: "Invalid", "Supported", "DefaultOFF", "DefaultON", "NotSupported". - :type support_status: str or ~azure.mgmt.recoveryservicesbackup.models.SupportStatus + :vartype support_status: str or ~azure.mgmt.recoveryservicesbackup.models.SupportStatus """ _attribute_map = { @@ -3630,6 +4812,11 @@ def __init__( self, **kwargs ): + """ + :keyword support_status: Support status of feature. Possible values include: "Invalid", + "Supported", "DefaultOFF", "DefaultON", "NotSupported". + :paramtype support_status: str or ~azure.mgmt.recoveryservicesbackup.models.SupportStatus + """ super(AzureVMResourceFeatureSupportResponse, self).__init__(**kwargs) self.support_status = kwargs.get('support_status', None) @@ -3642,17 +4829,17 @@ class WorkloadItem(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus """ _validation = { @@ -3675,6 +4862,17 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ super(WorkloadItem, self).__init__(**kwargs) self.backup_management_type = kwargs.get('backup_management_type', None) self.workload_type = kwargs.get('workload_type', None) @@ -3691,27 +4889,27 @@ class AzureVmWorkloadItem(WorkloadItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if workload item is auto-protectable. - :type is_auto_protectable: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. - :type sub_workload_item_count: int + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if workload item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :vartype sub_workload_item_count: int """ _validation = { @@ -3739,6 +4937,27 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if workload item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :paramtype sub_workload_item_count: int + """ super(AzureVmWorkloadItem, self).__init__(**kwargs) self.workload_item_type = 'AzureVmWorkloadItem' # type: str self.parent_name = kwargs.get('parent_name', None) @@ -3756,35 +4975,35 @@ class AzureVmWorkloadProtectableItem(WorkloadProtectableItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param parent_unique_name: Parent Unique Name is added to provide the service formatted URI - Name of the Parent + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar parent_unique_name: Parent Unique Name is added to provide the service formatted URI Name + of the Parent Only Applicable for data bases where the parent would be either Instance or a SQL AG. - :type parent_unique_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if protectable item is auto-protectable. - :type is_auto_protectable: bool - :param is_auto_protected: Indicates if protectable item is auto-protected. - :type is_auto_protected: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. - :type subprotectableitemcount: int - :param prebackupvalidation: Pre-backup validation for protectable objects. - :type prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + :vartype parent_unique_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if protectable item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar is_auto_protected: Indicates if protectable item is auto-protected. + :vartype is_auto_protected: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :vartype subprotectableitemcount: int + :ivar prebackupvalidation: Pre-backup validation for protectable objects. + :vartype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation """ _validation = { @@ -3815,6 +5034,35 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword parent_unique_name: Parent Unique Name is added to provide the service formatted URI + Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG. + :paramtype parent_unique_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if protectable item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword is_auto_protected: Indicates if protectable item is auto-protected. + :paramtype is_auto_protected: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :paramtype subprotectableitemcount: int + :keyword prebackupvalidation: Pre-backup validation for protectable objects. + :paramtype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ super(AzureVmWorkloadProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'AzureVmWorkloadProtectableItem' # type: str self.parent_name = kwargs.get('parent_name', None) @@ -3835,81 +5083,85 @@ class AzureVmWorkloadProtectedItem(ProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 DB represented by this backup item. - :type friendly_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param parent_name: Parent name of the DB such as Instance or Availability Group. - :type parent_name: str - :param parent_type: Parent type of protected item, example: for a DB, standalone server or + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or distributed. - :type parent_type: 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", + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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 last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". - :type last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param last_backup_error_detail: Error details in last backup. - :type last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail - :param protected_item_data_source_id: Data ID of the protected item. - :type protected_item_data_source_id: str - :param protected_item_health_status: Health status of the backup item, evaluated based on last + :vartype last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", "IRPending". - :type protected_item_health_status: str or + :vartype protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ @@ -3933,6 +5185,8 @@ class AzureVmWorkloadProtectedItem(ProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -3956,6 +5210,89 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + """ super(AzureVmWorkloadProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'AzureVmWorkloadProtectedItem' # type: str self.friendly_name = kwargs.get('friendly_name', None) @@ -3976,29 +5313,46 @@ def __init__( class AzureVmWorkloadProtectedItemExtendedInfo(msrest.serialization.Model): """Additional information on Azure Workload for SQL specific backup item. - :param oldest_recovery_point: The oldest backup copy available for this backup item. - :type oldest_recovery_point: ~datetime.datetime - :param recovery_point_count: Number of backup copies available for this backup item. - :type recovery_point_count: int - :param policy_state: Indicates consistency of policy object and policy applied to this backup + :ivar oldest_recovery_point: The oldest backup copy available for this backup item. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of backup copies available for this backup item. + :vartype recovery_point_count: int + :ivar policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :vartype policy_state: str + :ivar recovery_model: Indicates consistency of policy object and policy applied to this backup item. - :type policy_state: str + :vartype recovery_model: str """ _attribute_map = { 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, 'policy_state': {'key': 'policyState', 'type': 'str'}, + 'recovery_model': {'key': 'recoveryModel', 'type': 'str'}, } def __init__( self, **kwargs ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this backup item. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of backup copies available for this backup item. + :paramtype recovery_point_count: int + :keyword policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :paramtype policy_state: str + :keyword recovery_model: Indicates consistency of policy object and policy applied to this + backup item. + :paramtype recovery_model: str + """ super(AzureVmWorkloadProtectedItemExtendedInfo, self).__init__(**kwargs) self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) self.recovery_point_count = kwargs.get('recovery_point_count', None) self.policy_state = kwargs.get('policy_state', None) + self.recovery_model = kwargs.get('recovery_model', None) class AzureVmWorkloadProtectionPolicy(ProtectionPolicy): @@ -4006,26 +5360,26 @@ class AzureVmWorkloadProtectionPolicy(ProtectionPolicy): All required parameters must be populated in order to send to Azure. - :param protected_items_count: Number of items associated with this policy. - :type protected_items_count: int - :param backup_management_type: Required. This property will be used as the discriminator for + :ivar protected_items_count: Number of items associated with this policy. + :vartype protected_items_count: int + :ivar backup_management_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 backup_management_type: str - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] - :param work_load_type: Type of workload for the backup management. Possible values include: + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + :ivar work_load_type: Type of workload for the backup management. Possible values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase". - :type work_load_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType - :param settings: Common settings for the backup management. - :type settings: ~azure.mgmt.recoveryservicesbackup.models.Settings - :param sub_protection_policy: List of sub-protection policies which includes schedule and + :vartype work_load_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar settings: Common settings for the backup management. + :vartype settings: ~azure.mgmt.recoveryservicesbackup.models.Settings + :ivar sub_protection_policy: List of sub-protection policies which includes schedule and retention. - :type sub_protection_policy: + :vartype sub_protection_policy: list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] - :param make_policy_consistent: Fix the policy inconsistency. - :type make_policy_consistent: bool + :ivar make_policy_consistent: Fix the policy inconsistency. + :vartype make_policy_consistent: bool """ _validation = { @@ -4046,6 +5400,25 @@ def __init__( self, **kwargs ): + """ + :keyword protected_items_count: Number of items associated with this policy. + :paramtype protected_items_count: int + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + :keyword work_load_type: Type of workload for the backup management. Possible values include: + "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", + "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype work_load_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword settings: Common settings for the backup management. + :paramtype settings: ~azure.mgmt.recoveryservicesbackup.models.Settings + :keyword sub_protection_policy: List of sub-protection policies which includes schedule and + retention. + :paramtype sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] + :keyword make_policy_consistent: Fix the policy inconsistency. + :paramtype make_policy_consistent: bool + """ super(AzureVmWorkloadProtectionPolicy, self).__init__(**kwargs) self.backup_management_type = 'AzureWorkload' # type: str self.work_load_type = kwargs.get('work_load_type', None) @@ -4059,81 +5432,85 @@ class AzureVmWorkloadSAPAseDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 DB represented by this backup item. - :type friendly_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param parent_name: Parent name of the DB such as Instance or Availability Group. - :type parent_name: str - :param parent_type: Parent type of protected item, example: for a DB, standalone server or + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or distributed. - :type parent_type: 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", + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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 last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". - :type last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param last_backup_error_detail: Error details in last backup. - :type last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail - :param protected_item_data_source_id: Data ID of the protected item. - :type protected_item_data_source_id: str - :param protected_item_health_status: Health status of the backup item, evaluated based on last + :vartype last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", "IRPending". - :type protected_item_health_status: str or + :vartype protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ @@ -4157,6 +5534,8 @@ class AzureVmWorkloadSAPAseDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -4176,6 +5555,89 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + """ super(AzureVmWorkloadSAPAseDatabaseProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'AzureVmWorkloadSAPAseDatabase' # type: str @@ -4185,27 +5647,27 @@ class AzureVmWorkloadSAPAseDatabaseWorkloadItem(AzureVmWorkloadItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if workload item is auto-protectable. - :type is_auto_protectable: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. - :type sub_workload_item_count: int + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if workload item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :vartype sub_workload_item_count: int """ _validation = { @@ -4229,6 +5691,27 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if workload item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :paramtype sub_workload_item_count: int + """ super(AzureVmWorkloadSAPAseDatabaseWorkloadItem, self).__init__(**kwargs) self.workload_item_type = 'SAPAseDatabase' # type: str @@ -4238,35 +5721,35 @@ class AzureVmWorkloadSAPAseSystemProtectableItem(AzureVmWorkloadProtectableItem) All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param parent_unique_name: Parent Unique Name is added to provide the service formatted URI - Name of the Parent + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar parent_unique_name: Parent Unique Name is added to provide the service formatted URI Name + of the Parent Only Applicable for data bases where the parent would be either Instance or a SQL AG. - :type parent_unique_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if protectable item is auto-protectable. - :type is_auto_protectable: bool - :param is_auto_protected: Indicates if protectable item is auto-protected. - :type is_auto_protected: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. - :type subprotectableitemcount: int - :param prebackupvalidation: Pre-backup validation for protectable objects. - :type prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + :vartype parent_unique_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if protectable item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar is_auto_protected: Indicates if protectable item is auto-protected. + :vartype is_auto_protected: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :vartype subprotectableitemcount: int + :ivar prebackupvalidation: Pre-backup validation for protectable objects. + :vartype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation """ _validation = { @@ -4293,6 +5776,35 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword parent_unique_name: Parent Unique Name is added to provide the service formatted URI + Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG. + :paramtype parent_unique_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if protectable item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword is_auto_protected: Indicates if protectable item is auto-protected. + :paramtype is_auto_protected: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :paramtype subprotectableitemcount: int + :keyword prebackupvalidation: Pre-backup validation for protectable objects. + :paramtype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ super(AzureVmWorkloadSAPAseSystemProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'SAPAseSystem' # type: str @@ -4302,27 +5814,27 @@ class AzureVmWorkloadSAPAseSystemWorkloadItem(AzureVmWorkloadItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if workload item is auto-protectable. - :type is_auto_protectable: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. - :type sub_workload_item_count: int + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if workload item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :vartype sub_workload_item_count: int """ _validation = { @@ -4346,6 +5858,27 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if workload item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :paramtype sub_workload_item_count: int + """ super(AzureVmWorkloadSAPAseSystemWorkloadItem, self).__init__(**kwargs) self.workload_item_type = 'SAPAseSystem' # type: str @@ -4355,35 +5888,35 @@ class AzureVmWorkloadSAPHanaDatabaseProtectableItem(AzureVmWorkloadProtectableIt All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param parent_unique_name: Parent Unique Name is added to provide the service formatted URI - Name of the Parent + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar parent_unique_name: Parent Unique Name is added to provide the service formatted URI Name + of the Parent Only Applicable for data bases where the parent would be either Instance or a SQL AG. - :type parent_unique_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if protectable item is auto-protectable. - :type is_auto_protectable: bool - :param is_auto_protected: Indicates if protectable item is auto-protected. - :type is_auto_protected: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. - :type subprotectableitemcount: int - :param prebackupvalidation: Pre-backup validation for protectable objects. - :type prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + :vartype parent_unique_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if protectable item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar is_auto_protected: Indicates if protectable item is auto-protected. + :vartype is_auto_protected: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :vartype subprotectableitemcount: int + :ivar prebackupvalidation: Pre-backup validation for protectable objects. + :vartype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation """ _validation = { @@ -4410,6 +5943,35 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword parent_unique_name: Parent Unique Name is added to provide the service formatted URI + Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG. + :paramtype parent_unique_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if protectable item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword is_auto_protected: Indicates if protectable item is auto-protected. + :paramtype is_auto_protected: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :paramtype subprotectableitemcount: int + :keyword prebackupvalidation: Pre-backup validation for protectable objects. + :paramtype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ super(AzureVmWorkloadSAPHanaDatabaseProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'SAPHanaDatabase' # type: str @@ -4419,81 +5981,85 @@ class AzureVmWorkloadSAPHanaDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 DB represented by this backup item. - :type friendly_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param parent_name: Parent name of the DB such as Instance or Availability Group. - :type parent_name: str - :param parent_type: Parent type of protected item, example: for a DB, standalone server or + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or distributed. - :type parent_type: 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", + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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 last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". - :type last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param last_backup_error_detail: Error details in last backup. - :type last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail - :param protected_item_data_source_id: Data ID of the protected item. - :type protected_item_data_source_id: str - :param protected_item_health_status: Health status of the backup item, evaluated based on last + :vartype last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", "IRPending". - :type protected_item_health_status: str or + :vartype protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ @@ -4517,6 +6083,8 @@ class AzureVmWorkloadSAPHanaDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -4536,6 +6104,89 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + """ super(AzureVmWorkloadSAPHanaDatabaseProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'AzureVmWorkloadSAPHanaDatabase' # type: str @@ -4545,27 +6196,27 @@ class AzureVmWorkloadSAPHanaDatabaseWorkloadItem(AzureVmWorkloadItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if workload item is auto-protectable. - :type is_auto_protectable: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. - :type sub_workload_item_count: int + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if workload item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :vartype sub_workload_item_count: int """ _validation = { @@ -4589,6 +6240,27 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if workload item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :paramtype sub_workload_item_count: int + """ super(AzureVmWorkloadSAPHanaDatabaseWorkloadItem, self).__init__(**kwargs) self.workload_item_type = 'SAPHanaDatabase' # type: str @@ -4598,35 +6270,35 @@ class AzureVmWorkloadSAPHanaSystemProtectableItem(AzureVmWorkloadProtectableItem All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param parent_unique_name: Parent Unique Name is added to provide the service formatted URI - Name of the Parent + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar parent_unique_name: Parent Unique Name is added to provide the service formatted URI Name + of the Parent Only Applicable for data bases where the parent would be either Instance or a SQL AG. - :type parent_unique_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if protectable item is auto-protectable. - :type is_auto_protectable: bool - :param is_auto_protected: Indicates if protectable item is auto-protected. - :type is_auto_protected: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. - :type subprotectableitemcount: int - :param prebackupvalidation: Pre-backup validation for protectable objects. - :type prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + :vartype parent_unique_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if protectable item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar is_auto_protected: Indicates if protectable item is auto-protected. + :vartype is_auto_protected: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :vartype subprotectableitemcount: int + :ivar prebackupvalidation: Pre-backup validation for protectable objects. + :vartype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation """ _validation = { @@ -4653,6 +6325,35 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword parent_unique_name: Parent Unique Name is added to provide the service formatted URI + Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG. + :paramtype parent_unique_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if protectable item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword is_auto_protected: Indicates if protectable item is auto-protected. + :paramtype is_auto_protected: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :paramtype subprotectableitemcount: int + :keyword prebackupvalidation: Pre-backup validation for protectable objects. + :paramtype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ super(AzureVmWorkloadSAPHanaSystemProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'SAPHanaSystem' # type: str @@ -4662,27 +6363,27 @@ class AzureVmWorkloadSAPHanaSystemWorkloadItem(AzureVmWorkloadItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if workload item is auto-protectable. - :type is_auto_protectable: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. - :type sub_workload_item_count: int + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if workload item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :vartype sub_workload_item_count: int """ _validation = { @@ -4706,6 +6407,27 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if workload item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :paramtype sub_workload_item_count: int + """ super(AzureVmWorkloadSAPHanaSystemWorkloadItem, self).__init__(**kwargs) self.workload_item_type = 'SAPHanaSystem' # type: str @@ -4715,35 +6437,35 @@ class AzureVmWorkloadSQLAvailabilityGroupProtectableItem(AzureVmWorkloadProtecta All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param parent_unique_name: Parent Unique Name is added to provide the service formatted URI - Name of the Parent + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar parent_unique_name: Parent Unique Name is added to provide the service formatted URI Name + of the Parent Only Applicable for data bases where the parent would be either Instance or a SQL AG. - :type parent_unique_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if protectable item is auto-protectable. - :type is_auto_protectable: bool - :param is_auto_protected: Indicates if protectable item is auto-protected. - :type is_auto_protected: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. - :type subprotectableitemcount: int - :param prebackupvalidation: Pre-backup validation for protectable objects. - :type prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + :vartype parent_unique_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if protectable item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar is_auto_protected: Indicates if protectable item is auto-protected. + :vartype is_auto_protected: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :vartype subprotectableitemcount: int + :ivar prebackupvalidation: Pre-backup validation for protectable objects. + :vartype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation """ _validation = { @@ -4770,6 +6492,35 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword parent_unique_name: Parent Unique Name is added to provide the service formatted URI + Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG. + :paramtype parent_unique_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if protectable item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword is_auto_protected: Indicates if protectable item is auto-protected. + :paramtype is_auto_protected: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :paramtype subprotectableitemcount: int + :keyword prebackupvalidation: Pre-backup validation for protectable objects. + :paramtype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ super(AzureVmWorkloadSQLAvailabilityGroupProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'SQLAvailabilityGroupContainer' # type: str @@ -4779,35 +6530,35 @@ class AzureVmWorkloadSQLDatabaseProtectableItem(AzureVmWorkloadProtectableItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param parent_unique_name: Parent Unique Name is added to provide the service formatted URI - Name of the Parent + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar parent_unique_name: Parent Unique Name is added to provide the service formatted URI Name + of the Parent Only Applicable for data bases where the parent would be either Instance or a SQL AG. - :type parent_unique_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if protectable item is auto-protectable. - :type is_auto_protectable: bool - :param is_auto_protected: Indicates if protectable item is auto-protected. - :type is_auto_protected: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. - :type subprotectableitemcount: int - :param prebackupvalidation: Pre-backup validation for protectable objects. - :type prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + :vartype parent_unique_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if protectable item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar is_auto_protected: Indicates if protectable item is auto-protected. + :vartype is_auto_protected: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :vartype subprotectableitemcount: int + :ivar prebackupvalidation: Pre-backup validation for protectable objects. + :vartype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation """ _validation = { @@ -4834,6 +6585,35 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword parent_unique_name: Parent Unique Name is added to provide the service formatted URI + Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG. + :paramtype parent_unique_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if protectable item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword is_auto_protected: Indicates if protectable item is auto-protected. + :paramtype is_auto_protected: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :paramtype subprotectableitemcount: int + :keyword prebackupvalidation: Pre-backup validation for protectable objects. + :paramtype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ super(AzureVmWorkloadSQLDatabaseProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'SQLDataBase' # type: str @@ -4843,81 +6623,85 @@ class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 DB represented by this backup item. - :type friendly_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param parent_name: Parent name of the DB such as Instance or Availability Group. - :type parent_name: str - :param parent_type: Parent type of protected item, example: for a DB, standalone server or + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or distributed. - :type parent_type: 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", + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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 last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". - :type last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param last_backup_error_detail: Error details in last backup. - :type last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail - :param protected_item_data_source_id: Data ID of the protected item. - :type protected_item_data_source_id: str - :param protected_item_health_status: Health status of the backup item, evaluated based on last + :vartype last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", "IRPending". - :type protected_item_health_status: str or + :vartype protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ @@ -4941,6 +6725,8 @@ class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -4960,6 +6746,89 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + """ super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'AzureVmWorkloadSQLDatabase' # type: str @@ -4969,27 +6838,27 @@ class AzureVmWorkloadSQLDatabaseWorkloadItem(AzureVmWorkloadItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if workload item is auto-protectable. - :type is_auto_protectable: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. - :type sub_workload_item_count: int + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if workload item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :vartype sub_workload_item_count: int """ _validation = { @@ -5013,6 +6882,27 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if workload item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :paramtype sub_workload_item_count: int + """ super(AzureVmWorkloadSQLDatabaseWorkloadItem, self).__init__(**kwargs) self.workload_item_type = 'SQLDataBase' # type: str @@ -5022,35 +6912,35 @@ class AzureVmWorkloadSQLInstanceProtectableItem(AzureVmWorkloadProtectableItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param parent_unique_name: Parent Unique Name is added to provide the service formatted URI - Name of the Parent + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar parent_unique_name: Parent Unique Name is added to provide the service formatted URI Name + of the Parent Only Applicable for data bases where the parent would be either Instance or a SQL AG. - :type parent_unique_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if protectable item is auto-protectable. - :type is_auto_protectable: bool - :param is_auto_protected: Indicates if protectable item is auto-protected. - :type is_auto_protected: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. - :type subprotectableitemcount: int - :param prebackupvalidation: Pre-backup validation for protectable objects. - :type prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + :vartype parent_unique_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if protectable item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar is_auto_protected: Indicates if protectable item is auto-protected. + :vartype is_auto_protected: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :vartype subprotectableitemcount: int + :ivar prebackupvalidation: Pre-backup validation for protectable objects. + :vartype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation """ _validation = { @@ -5077,6 +6967,35 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword parent_unique_name: Parent Unique Name is added to provide the service formatted URI + Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG. + :paramtype parent_unique_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if protectable item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword is_auto_protected: Indicates if protectable item is auto-protected. + :paramtype is_auto_protected: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :paramtype subprotectableitemcount: int + :keyword prebackupvalidation: Pre-backup validation for protectable objects. + :paramtype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ super(AzureVmWorkloadSQLInstanceProtectableItem, self).__init__(**kwargs) self.protectable_item_type = 'SQLInstance' # type: str @@ -5086,29 +7005,29 @@ class AzureVmWorkloadSQLInstanceWorkloadItem(AzureVmWorkloadItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if workload item is auto-protectable. - :type is_auto_protectable: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. - :type sub_workload_item_count: int - :param data_directory_paths: Data Directory Paths for default directories. - :type data_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if workload item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :vartype sub_workload_item_count: int + :ivar data_directory_paths: Data Directory Paths for default directories. + :vartype data_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] """ _validation = { @@ -5133,6 +7052,30 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if workload item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :paramtype sub_workload_item_count: int + :keyword data_directory_paths: Data Directory Paths for default directories. + :paramtype data_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + """ super(AzureVmWorkloadSQLInstanceWorkloadItem, self).__init__(**kwargs) self.workload_item_type = 'SQLInstance' # type: str self.data_directory_paths = kwargs.get('data_directory_paths', None) @@ -5146,24 +7089,26 @@ class AzureWorkloadAutoProtectionIntent(AzureRecoveryServiceVaultProtectionInten All required parameters must be populated in order to send to Azure. - :param protection_intent_item_type: Required. backup protectionIntent type.Constant filled by - server. - :type protection_intent_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", + :ivar protection_intent_item_type: Required. backup protectionIntent type.Constant filled by + server. Possible values include: "Invalid", "AzureResourceItem", "RecoveryServiceVaultItem", + "AzureWorkloadContainerAutoProtectionIntent". + :vartype protection_intent_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentItemType + :ivar 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 + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param source_resource_id: ARM ID of the resource to be backed up. - :type source_resource_id: str - :param item_id: ID of the item which is getting protected, In case of Azure Vm , it is + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar item_id: ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId. - :type item_id: str - :param policy_id: ID of the backup policy with which this item is backed up. - :type policy_id: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", + :vartype item_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus """ _validation = { @@ -5187,6 +7132,23 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword item_id: ID of the item which is getting protected, In case of Azure Vm , it is + ProtectedItemId. + :paramtype item_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ super(AzureWorkloadAutoProtectionIntent, self).__init__(**kwargs) self.protection_intent_item_type = 'AzureWorkloadAutoProtectionIntent' # type: str @@ -5196,17 +7158,17 @@ class AzureWorkloadBackupRequest(BackupRequest): 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 + :ivar 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 backup_type: Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible + :vartype object_type: str + :ivar backup_type: Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible values include: "Invalid", "Full", "Differential", "Log", "CopyOnlyFull", "Incremental". - :type backup_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupType - :param enable_compression: Bool for Compression setting. - :type enable_compression: bool - :param recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified + :vartype backup_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupType + :ivar enable_compression: Bool for Compression setting. + :vartype enable_compression: bool + :ivar recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified (UTC). - :type recovery_point_expiry_time_in_utc: ~datetime.datetime + :vartype recovery_point_expiry_time_in_utc: ~datetime.datetime """ _validation = { @@ -5224,6 +7186,16 @@ def __init__( self, **kwargs ): + """ + :keyword backup_type: Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible + values include: "Invalid", "Full", "Differential", "Log", "CopyOnlyFull", "Incremental". + :paramtype backup_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupType + :keyword enable_compression: Bool for Compression setting. + :paramtype enable_compression: bool + :keyword recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified + (UTC). + :paramtype recovery_point_expiry_time_in_utc: ~datetime.datetime + """ super(AzureWorkloadBackupRequest, self).__init__(**kwargs) self.object_type = 'AzureWorkloadBackupRequest' # type: str self.backup_type = kwargs.get('backup_type', None) @@ -5231,16 +7203,81 @@ def __init__( self.recovery_point_expiry_time_in_utc = kwargs.get('recovery_point_expiry_time_in_utc', None) +class AzureWorkloadContainerAutoProtectionIntent(ProtectionIntent): + """Azure workload specific protection intent item. + + All required parameters must be populated in order to send to Azure. + + :ivar protection_intent_item_type: Required. backup protectionIntent type.Constant filled by + server. Possible values include: "Invalid", "AzureResourceItem", "RecoveryServiceVaultItem", + "AzureWorkloadContainerAutoProtectionIntent". + :vartype protection_intent_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentItemType + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar item_id: ID of the item which is getting protected, In case of Azure Vm , it is + ProtectedItemId. + :vartype item_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ + + _validation = { + 'protection_intent_item_type': {'required': True}, + } + + _attribute_map = { + 'protection_intent_item_type': {'key': 'protectionIntentItemType', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword item_id: ID of the item which is getting protected, In case of Azure Vm , it is + ProtectedItemId. + :paramtype item_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ + super(AzureWorkloadContainerAutoProtectionIntent, self).__init__(**kwargs) + self.protection_intent_item_type = 'AzureWorkloadContainerAutoProtectionIntent' # type: str + + class AzureWorkloadContainerExtendedInfo(msrest.serialization.Model): """Extended information of the container. - :param host_server_name: Host Os Name in case of Stand Alone and Cluster Name in case of + :ivar host_server_name: Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. - :type host_server_name: str - :param inquiry_info: Inquiry Status for the container. - :type inquiry_info: ~azure.mgmt.recoveryservicesbackup.models.InquiryInfo - :param nodes_list: List of the nodes in case of distributed container. - :type nodes_list: list[~azure.mgmt.recoveryservicesbackup.models.DistributedNodesInfo] + :vartype host_server_name: str + :ivar inquiry_info: Inquiry Status for the container. + :vartype inquiry_info: ~azure.mgmt.recoveryservicesbackup.models.InquiryInfo + :ivar nodes_list: List of the nodes in case of distributed container. + :vartype nodes_list: list[~azure.mgmt.recoveryservicesbackup.models.DistributedNodesInfo] """ _attribute_map = { @@ -5253,6 +7290,15 @@ def __init__( self, **kwargs ): + """ + :keyword host_server_name: Host Os Name in case of Stand Alone and Cluster Name in case of + distributed container. + :paramtype host_server_name: str + :keyword inquiry_info: Inquiry Status for the container. + :paramtype inquiry_info: ~azure.mgmt.recoveryservicesbackup.models.InquiryInfo + :keyword nodes_list: List of the nodes in case of distributed container. + :paramtype nodes_list: list[~azure.mgmt.recoveryservicesbackup.models.DistributedNodesInfo] + """ super(AzureWorkloadContainerExtendedInfo, self).__init__(**kwargs) self.host_server_name = kwargs.get('host_server_name', None) self.inquiry_info = kwargs.get('inquiry_info', None) @@ -5262,16 +7308,16 @@ def __init__( class AzureWorkloadErrorInfo(msrest.serialization.Model): """Azure storage specific error information. - :param error_code: Error code. - :type error_code: int - :param error_string: Localized error string. - :type error_string: str - :param error_title: Title: Typically, the entity that the error pertains to. - :type error_title: str - :param recommendations: List of localized recommendations for above error code. - :type recommendations: list[str] - :param additional_details: Additional details for above error code. - :type additional_details: str + :ivar error_code: Error code. + :vartype error_code: int + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar error_title: Title: Typically, the entity that the error pertains to. + :vartype error_title: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] + :ivar additional_details: Additional details for above error code. + :vartype additional_details: str """ _attribute_map = { @@ -5286,6 +7332,18 @@ def __init__( self, **kwargs ): + """ + :keyword error_code: Error code. + :paramtype error_code: int + :keyword error_string: Localized error string. + :paramtype error_string: str + :keyword error_title: Title: Typically, the entity that the error pertains to. + :paramtype error_title: str + :keyword recommendations: List of localized recommendations for above error code. + :paramtype recommendations: list[str] + :keyword additional_details: Additional details for above error code. + :paramtype additional_details: str + """ super(AzureWorkloadErrorInfo, self).__init__(**kwargs) self.error_code = kwargs.get('error_code', None) self.error_string = kwargs.get('error_string', None) @@ -5299,36 +7357,37 @@ class AzureWorkloadJob(Job): All required parameters must be populated in order to send to Azure. - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param activity_id: ActivityId of job. - :type activity_id: str - :param job_type: Required. This property will be used as the discriminator for deciding the + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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 job_type: str - :param workload_type: Workload type of the job. - :type workload_type: str - :param duration: Time elapsed during the execution of this job. - :type duration: ~datetime.timedelta - :param actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. - :type actions_info: list[str or ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] - :param error_details: Error details on execution of this job. - :type error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadErrorInfo] - :param extended_info: Additional information about the job. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobExtendedInfo + :vartype job_type: str + :ivar workload_type: Workload type of the job. + :vartype workload_type: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadErrorInfo] + :ivar extended_info: Additional information about the job. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobExtendedInfo """ _validation = { @@ -5355,6 +7414,39 @@ def __init__( self, **kwargs ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword workload_type: Workload type of the job. + :paramtype workload_type: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadErrorInfo] + :keyword extended_info: Additional information about the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobExtendedInfo + """ super(AzureWorkloadJob, self).__init__(**kwargs) self.job_type = 'AzureWorkloadJob' # type: str self.workload_type = kwargs.get('workload_type', None) @@ -5367,12 +7459,13 @@ def __init__( class AzureWorkloadJobExtendedInfo(msrest.serialization.Model): """Azure VM workload-specific additional information for job. - :param tasks_list: List of tasks for this job. - :type tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobTaskDetails] - :param property_bag: Job properties. - :type property_bag: dict[str, str] - :param dynamic_error_message: Non localized error message on job execution. - :type dynamic_error_message: str + :ivar tasks_list: List of tasks for this job. + :vartype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobTaskDetails] + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str """ _attribute_map = { @@ -5385,6 +7478,15 @@ def __init__( self, **kwargs ): + """ + :keyword tasks_list: List of tasks for this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobTaskDetails] + :keyword property_bag: Job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ super(AzureWorkloadJobExtendedInfo, self).__init__(**kwargs) self.tasks_list = kwargs.get('tasks_list', None) self.property_bag = kwargs.get('property_bag', None) @@ -5394,10 +7496,10 @@ def __init__( class AzureWorkloadJobTaskDetails(msrest.serialization.Model): """Azure VM workload specific job task details. - :param task_id: The task display name. - :type task_id: str - :param status: The status. - :type status: str + :ivar task_id: The task display name. + :vartype task_id: str + :ivar status: The status. + :vartype status: str """ _attribute_map = { @@ -5409,6 +7511,12 @@ def __init__( self, **kwargs ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword status: The status. + :paramtype status: str + """ super(AzureWorkloadJobTaskDetails, self).__init__(**kwargs) self.task_id = kwargs.get('task_id', None) self.status = kwargs.get('status', None) @@ -5422,19 +7530,19 @@ class AzureWorkloadRecoveryPoint(RecoveryPoint): 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 + :ivar 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_time_in_utc: UTC time at which recovery point was created. - :type recovery_point_time_in_utc: ~datetime.datetime - :param type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + :vartype 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". - :type 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, + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] """ @@ -5446,7 +7554,7 @@ class AzureWorkloadRecoveryPoint(RecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformationV2]'}, 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, } @@ -5458,6 +7566,19 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_point_time_in_utc: UTC time at which recovery point was created. + :paramtype recovery_point_time_in_utc: ~datetime.datetime + :keyword type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + "Differential", "Incremental". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + """ super(AzureWorkloadRecoveryPoint, self).__init__(**kwargs) self.object_type = 'AzureWorkloadRecoveryPoint' # type: str self.recovery_point_time_in_utc = kwargs.get('recovery_point_time_in_utc', None) @@ -5474,22 +7595,22 @@ class AzureWorkloadPointInTimeRecoveryPoint(AzureWorkloadRecoveryPoint): 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 + :ivar 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_time_in_utc: UTC time at which recovery point was created. - :type recovery_point_time_in_utc: ~datetime.datetime - :param type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + :vartype 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". - :type 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, + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype 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] + :ivar time_ranges: List of log ranges. + :vartype time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] """ _validation = { @@ -5500,7 +7621,7 @@ class AzureWorkloadPointInTimeRecoveryPoint(AzureWorkloadRecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformationV2]'}, 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, } @@ -5513,233 +7634,176 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_point_time_in_utc: UTC time at which recovery point was created. + :paramtype recovery_point_time_in_utc: ~datetime.datetime + :keyword type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + "Differential", "Incremental". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] + """ super(AzureWorkloadPointInTimeRecoveryPoint, self).__init__(**kwargs) self.object_type = 'AzureWorkloadPointInTimeRecoveryPoint' # type: str 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. + sub-classes are: AzureWorkloadPointInTimeRestoreRequest, AzureWorkloadSAPHanaRestoreRequest, AzureWorkloadSQLRestoreRequest. 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 + :ivar 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] + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + is being recovered. + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :vartype target_virtual_machine_id: str """ _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}'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, } _subtype_map = { - 'object_type': {'AzureWorkloadPointInTimeRecoveryPoint': 'AzureWorkloadPointInTimeRecoveryPointAutoGenerated', 'AzureWorkloadSAPHanaRecoveryPoint': 'AzureWorkloadSAPHanaRecoveryPointAutoGenerated', 'AzureWorkloadSQLRecoveryPoint': 'AzureWorkloadSQLRecoveryPointAutoGenerated'} + 'object_type': {'AzureWorkloadPointInTimeRestoreRequest': 'AzureWorkloadPointInTimeRestoreRequest', 'AzureWorkloadSAPHanaRestoreRequest': 'AzureWorkloadSAPHanaRestoreRequest', 'AzureWorkloadSQLRestoreRequest': 'AzureWorkloadSQLRestoreRequest'} } 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. + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + """ + super(AzureWorkloadRestoreRequest, self).__init__(**kwargs) + self.object_type = 'AzureWorkloadRestoreRequest' # type: str + self.recovery_type = kwargs.get('recovery_type', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.property_bag = kwargs.get('property_bag', None) + self.target_info = kwargs.get('target_info', None) + self.recovery_mode = kwargs.get('recovery_mode', None) + self.target_virtual_machine_id = kwargs.get('target_virtual_machine_id', None) - 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. +class AzureWorkloadPointInTimeRestoreRequest(AzureWorkloadRestoreRequest): + """AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore. 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 + :ivar 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] + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + is being recovered. + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :vartype target_virtual_machine_id: str + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime """ _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. - - 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_type: Type of this recovery. Possible values include: "Invalid", - "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running - is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database - restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM - For e.g. - /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, - 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, - 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadPointInTimeRestoreRequest': 'AzureWorkloadPointInTimeRestoreRequest', 'AzureWorkloadSAPHanaRestoreRequest': 'AzureWorkloadSAPHanaRestoreRequest', 'AzureWorkloadSQLRestoreRequest': 'AzureWorkloadSQLRestoreRequest'} - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadRestoreRequest, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadRestoreRequest' # type: str - self.recovery_type = kwargs.get('recovery_type', None) - self.source_resource_id = kwargs.get('source_resource_id', None) - self.property_bag = kwargs.get('property_bag', None) - self.target_info = kwargs.get('target_info', None) - self.recovery_mode = kwargs.get('recovery_mode', None) - self.target_virtual_machine_id = kwargs.get('target_virtual_machine_id', None) - - -class AzureWorkloadPointInTimeRestoreRequest(AzureWorkloadRestoreRequest): - """AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore. - - 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_type: Type of this recovery. Possible values include: "Invalid", - "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running - is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database - restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM - For e.g. - /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param point_in_time: PointInTime value. - :type point_in_time: ~datetime.datetime - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, - 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, - 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, } def __init__( self, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + """ super(AzureWorkloadPointInTimeRestoreRequest, self).__init__(**kwargs) self.object_type = 'AzureWorkloadPointInTimeRestoreRequest' # type: str self.point_in_time = kwargs.get('point_in_time', None) @@ -5750,81 +7814,33 @@ class AzureWorkloadSAPHanaPointInTimeRecoveryPoint(AzureWorkloadPointInTimeRecov 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 + :ivar 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_time_in_utc: UTC time at which recovery point was created. - :type recovery_point_time_in_utc: ~datetime.datetime - :param type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :type 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}, - } - - _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(AzureWorkloadSAPHanaPointInTimeRecoveryPoint, self).__init__(**kwargs) - 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 + :vartype 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, + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype 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] + :ivar time_ranges: List of log ranges. + :vartype 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_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformationV2]'}, 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, } @@ -5833,7 +7849,22 @@ def __init__( self, **kwargs ): - super(AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated, self).__init__(**kwargs) + """ + :keyword recovery_point_time_in_utc: UTC time at which recovery point was created. + :paramtype recovery_point_time_in_utc: ~datetime.datetime + :keyword type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + "Differential", "Incremental". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] + """ + super(AzureWorkloadSAPHanaPointInTimeRecoveryPoint, self).__init__(**kwargs) self.object_type = 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint' # type: str @@ -5845,26 +7876,26 @@ class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str + :vartype target_virtual_machine_id: str """ _validation = { @@ -5889,6 +7920,25 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + """ super(AzureWorkloadSAPHanaRestoreRequest, self).__init__(**kwargs) self.object_type = 'AzureWorkloadSAPHanaRestoreRequest' # type: str @@ -5901,28 +7951,28 @@ class AzureWorkloadSAPHanaPointInTimeRestoreRequest(AzureWorkloadSAPHanaRestoreR 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param point_in_time: PointInTime value. - :type point_in_time: ~datetime.datetime + :vartype target_virtual_machine_id: str + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime """ _validation = { @@ -5948,6 +7998,27 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + """ super(AzureWorkloadSAPHanaPointInTimeRestoreRequest, self).__init__(**kwargs) self.object_type = 'AzureWorkloadSAPHanaPointInTimeRestoreRequest' # type: str self.point_in_time = kwargs.get('point_in_time', None) @@ -5958,30 +8029,30 @@ class AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSA 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param point_in_time: PointInTime value. - :type point_in_time: ~datetime.datetime - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: + :vartype target_virtual_machine_id: str + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo """ @@ -6005,6 +8076,30 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + :keyword recovery_point_rehydration_info: RP Rehydration Info. + :paramtype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ super(AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, self).__init__(**kwargs) self.object_type = 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest' # type: str self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) @@ -6015,76 +8110,31 @@ class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): 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 + :ivar 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_time_in_utc: UTC time at which recovery point was created. - :type recovery_point_time_in_utc: ~datetime.datetime - :param type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :type 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}, - } - - _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(AzureWorkloadSAPHanaRecoveryPoint, self).__init__(**kwargs) - 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 + :vartype 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, + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype 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_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformationV2]'}, 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, } @@ -6092,7 +8142,20 @@ def __init__( self, **kwargs ): - super(AzureWorkloadSAPHanaRecoveryPointAutoGenerated, self).__init__(**kwargs) + """ + :keyword recovery_point_time_in_utc: UTC time at which recovery point was created. + :paramtype recovery_point_time_in_utc: ~datetime.datetime + :keyword type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + "Differential", "Incremental". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + """ + super(AzureWorkloadSAPHanaRecoveryPoint, self).__init__(**kwargs) self.object_type = 'AzureWorkloadSAPHanaRecoveryPoint' # type: str @@ -6101,28 +8164,28 @@ class AzureWorkloadSAPHanaRestoreWithRehydrateRequest(AzureWorkloadSAPHanaRestor 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: + :vartype target_virtual_machine_id: str + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo """ @@ -6145,6 +8208,28 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword recovery_point_rehydration_info: RP Rehydration Info. + :paramtype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ super(AzureWorkloadSAPHanaRestoreWithRehydrateRequest, self).__init__(**kwargs) self.object_type = 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest' # type: str self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) @@ -6155,28 +8240,30 @@ class AzureWorkloadSQLAutoProtectionIntent(AzureWorkloadAutoProtectionIntent): All required parameters must be populated in order to send to Azure. - :param protection_intent_item_type: Required. backup protectionIntent type.Constant filled by - server. - :type protection_intent_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", + :ivar protection_intent_item_type: Required. backup protectionIntent type.Constant filled by + server. Possible values include: "Invalid", "AzureResourceItem", "RecoveryServiceVaultItem", + "AzureWorkloadContainerAutoProtectionIntent". + :vartype protection_intent_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentItemType + :ivar 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 + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param source_resource_id: ARM ID of the resource to be backed up. - :type source_resource_id: str - :param item_id: ID of the item which is getting protected, In case of Azure Vm , it is + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar item_id: ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId. - :type item_id: str - :param policy_id: ID of the backup policy with which this item is backed up. - :type policy_id: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", + :vartype item_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param workload_item_type: Workload item type of the item for which intent is to be set. + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar workload_item_type: Workload item type of the item for which intent is to be set. Possible values include: "Invalid", "SQLInstance", "SQLDataBase", "SAPHanaSystem", "SAPHanaDatabase", "SAPAseSystem", "SAPAseDatabase". - :type workload_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType + :vartype workload_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType """ _validation = { @@ -6197,6 +8284,28 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword item_id: ID of the item which is getting protected, In case of Azure Vm , it is + ProtectedItemId. + :paramtype item_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword workload_item_type: Workload item type of the item for which intent is to be set. + Possible values include: "Invalid", "SQLInstance", "SQLDataBase", "SAPHanaSystem", + "SAPHanaDatabase", "SAPAseSystem", "SAPAseDatabase". + :paramtype workload_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType + """ super(AzureWorkloadSQLAutoProtectionIntent, self).__init__(**kwargs) self.protection_intent_item_type = 'AzureWorkloadSQLAutoProtectionIntent' # type: str self.workload_item_type = kwargs.get('workload_item_type', None) @@ -6210,25 +8319,25 @@ class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): 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 + :ivar 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_time_in_utc: UTC time at which recovery point was created. - :type recovery_point_time_in_utc: ~datetime.datetime - :param type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + :vartype 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". - :type 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, + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype 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 + :ivar 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: + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo """ @@ -6240,7 +8349,7 @@ class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformationV2]'}, 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, } @@ -6253,6 +8362,25 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_point_time_in_utc: UTC time at which recovery point was created. + :paramtype recovery_point_time_in_utc: ~datetime.datetime + :keyword type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + "Differential", "Incremental". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + :keyword 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. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo + """ super(AzureWorkloadSQLRecoveryPoint, self).__init__(**kwargs) self.object_type = 'AzureWorkloadSQLRecoveryPoint' # type: str self.extended_info = kwargs.get('extended_info', None) @@ -6263,157 +8391,41 @@ class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): 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_time_in_utc: UTC time at which recovery point was created. - :type recovery_point_time_in_utc: ~datetime.datetime - :param type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :type 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.AzureWorkloadSQLRecoveryPointExtendedInfo - :param time_ranges: List of log ranges. - :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] - """ - - _validation = { - 'object_type': {'required': 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': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, - 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSQLPointInTimeRecoveryPoint, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSQLPointInTimeRecoveryPoint' # type: str - 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 + :ivar 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 + :vartype 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, + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype 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 + :ivar 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] + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :ivar time_ranges: List of log ranges. + :vartype 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_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformationV2]'}, 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, } @@ -6421,7 +8433,28 @@ def __init__( self, **kwargs ): - super(AzureWorkloadSQLPointInTimeRecoveryPointAutoGenerated, self).__init__(**kwargs) + """ + :keyword recovery_point_time_in_utc: UTC time at which recovery point was created. + :paramtype recovery_point_time_in_utc: ~datetime.datetime + :keyword type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + "Differential", "Incremental". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + :keyword 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. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] + """ + super(AzureWorkloadSQLPointInTimeRecoveryPoint, self).__init__(**kwargs) self.object_type = 'AzureWorkloadSQLPointInTimeRecoveryPoint' # type: str self.time_ranges = kwargs.get('time_ranges', None) @@ -6434,34 +8467,34 @@ class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param should_use_alternate_target_location: Default option set to true. If this is set to + :vartype target_virtual_machine_id: str + :ivar should_use_alternate_target_location: Default option set to true. If this is set to false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when + :vartype should_use_alternate_target_location: bool + :ivar is_non_recoverable: SQL specific property where user can chose to set no-recovery when restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: + :vartype is_non_recoverable: bool + :ivar alternate_directory_paths: Data directory details. + :vartype alternate_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] """ @@ -6490,6 +8523,34 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :paramtype should_use_alternate_target_location: bool + :keyword is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :paramtype is_non_recoverable: bool + :keyword alternate_directory_paths: Data directory details. + :paramtype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + """ super(AzureWorkloadSQLRestoreRequest, self).__init__(**kwargs) self.object_type = 'AzureWorkloadSQLRestoreRequest' # type: str self.should_use_alternate_target_location = kwargs.get('should_use_alternate_target_location', None) @@ -6505,37 +8566,37 @@ class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param should_use_alternate_target_location: Default option set to true. If this is set to + :vartype target_virtual_machine_id: str + :ivar should_use_alternate_target_location: Default option set to true. If this is set to false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when + :vartype should_use_alternate_target_location: bool + :ivar is_non_recoverable: SQL specific property where user can chose to set no-recovery when restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: + :vartype is_non_recoverable: bool + :ivar alternate_directory_paths: Data directory details. + :vartype alternate_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] - :param point_in_time: PointInTime value. - :type point_in_time: ~datetime.datetime + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime """ _validation = { @@ -6564,6 +8625,36 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :paramtype should_use_alternate_target_location: bool + :keyword is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :paramtype is_non_recoverable: bool + :keyword alternate_directory_paths: Data directory details. + :paramtype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + """ super(AzureWorkloadSQLPointInTimeRestoreRequest, self).__init__(**kwargs) self.object_type = 'AzureWorkloadSQLPointInTimeRestoreRequest' # type: str self.point_in_time = kwargs.get('point_in_time', None) @@ -6574,39 +8665,39 @@ class AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSQLPoi 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param should_use_alternate_target_location: Default option set to true. If this is set to + :vartype target_virtual_machine_id: str + :ivar should_use_alternate_target_location: Default option set to true. If this is set to false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when + :vartype should_use_alternate_target_location: bool + :ivar is_non_recoverable: SQL specific property where user can chose to set no-recovery when restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: + :vartype is_non_recoverable: bool + :ivar alternate_directory_paths: Data directory details. + :vartype alternate_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] - :param point_in_time: PointInTime value. - :type point_in_time: ~datetime.datetime - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo """ @@ -6633,6 +8724,39 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :paramtype should_use_alternate_target_location: bool + :keyword is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :paramtype is_non_recoverable: bool + :keyword alternate_directory_paths: Data directory details. + :paramtype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + :keyword recovery_point_rehydration_info: RP Rehydration Info. + :paramtype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ super(AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, self).__init__(**kwargs) self.object_type = 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest' # type: str self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) @@ -6641,42 +8765,12 @@ def __init__( class AzureWorkloadSQLRecoveryPointExtendedInfo(msrest.serialization.Model): """Extended info class details. - :param data_directory_time_in_utc: UTC time at which data directory info was captured. - :type data_directory_time_in_utc: ~datetime.datetime - :param data_directory_paths: List of data directory paths during restore operation. - :type data_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] - """ - - _attribute_map = { - 'data_directory_time_in_utc': {'key': 'dataDirectoryTimeInUTC', 'type': 'iso-8601'}, - 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, - } - - def __init__( - self, - **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]'}, @@ -6686,9 +8780,16 @@ def __init__( self, **kwargs ): - super(AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated, self).__init__(**kwargs) - self.data_directory_time_in_utc = None - self.data_directory_paths = None + """ + :keyword data_directory_time_in_utc: UTC time at which data directory info was captured. + :paramtype data_directory_time_in_utc: ~datetime.datetime + :keyword data_directory_paths: List of data directory paths during restore operation. + :paramtype data_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + """ + 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 AzureWorkloadSQLRestoreWithRehydrateRequest(AzureWorkloadSQLRestoreRequest): @@ -6696,37 +8797,37 @@ class AzureWorkloadSQLRestoreWithRehydrateRequest(AzureWorkloadSQLRestoreRequest 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param should_use_alternate_target_location: Default option set to true. If this is set to + :vartype target_virtual_machine_id: str + :ivar should_use_alternate_target_location: Default option set to true. If this is set to false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when + :vartype should_use_alternate_target_location: bool + :ivar is_non_recoverable: SQL specific property where user can chose to set no-recovery when restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: + :vartype is_non_recoverable: bool + :ivar alternate_directory_paths: Data directory details. + :vartype alternate_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo """ @@ -6752,11 +8853,98 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :paramtype should_use_alternate_target_location: bool + :keyword is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :paramtype is_non_recoverable: bool + :keyword alternate_directory_paths: Data directory details. + :paramtype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + :keyword recovery_point_rehydration_info: RP Rehydration Info. + :paramtype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ super(AzureWorkloadSQLRestoreWithRehydrateRequest, self).__init__(**kwargs) self.object_type = 'AzureWorkloadSQLRestoreWithRehydrateRequest' # type: str 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype 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 + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + """ + 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. @@ -6769,14 +8957,14 @@ class BackupEngineBaseResource(Resource): :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: BackupEngineBaseResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBase + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: BackupEngineBaseResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBase """ _validation = { @@ -6799,6 +8987,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: BackupEngineBaseResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBase + """ super(BackupEngineBaseResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -6806,9 +9004,9 @@ def __init__( class ResourceList(msrest.serialization.Model): """Base for all lists of resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str """ _attribute_map = { @@ -6819,6 +9017,11 @@ def __init__( self, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + """ super(ResourceList, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) @@ -6826,11 +9029,11 @@ def __init__( class BackupEngineBaseResourceList(ResourceList): """List of BackupEngineBase resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResource] """ _attribute_map = { @@ -6842,6 +9045,13 @@ def __init__( self, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResource] + """ super(BackupEngineBaseResourceList, self).__init__(**kwargs) self.value = kwargs.get('value', None) @@ -6849,22 +9059,22 @@ def __init__( class BackupEngineExtendedInfo(msrest.serialization.Model): """Additional information on backup engine. - :param database_name: Database name of backup engine. - :type database_name: str - :param protected_items_count: Number of protected items in the backup engine. - :type protected_items_count: int - :param protected_servers_count: Number of protected servers in the backup engine. - :type protected_servers_count: int - :param disk_count: Number of disks in the backup engine. - :type disk_count: int - :param used_disk_space: Disk space used in the backup engine. - :type used_disk_space: float - :param available_disk_space: Disk space currently available in the backup engine. - :type available_disk_space: float - :param refreshed_at: Last refresh time in the backup engine. - :type refreshed_at: ~datetime.datetime - :param azure_protected_instances: Protected instances in the backup engine. - :type azure_protected_instances: int + :ivar database_name: Database name of backup engine. + :vartype database_name: str + :ivar protected_items_count: Number of protected items in the backup engine. + :vartype protected_items_count: int + :ivar protected_servers_count: Number of protected servers in the backup engine. + :vartype protected_servers_count: int + :ivar disk_count: Number of disks in the backup engine. + :vartype disk_count: int + :ivar used_disk_space: Disk space used in the backup engine. + :vartype used_disk_space: float + :ivar available_disk_space: Disk space currently available in the backup engine. + :vartype available_disk_space: float + :ivar refreshed_at: Last refresh time in the backup engine. + :vartype refreshed_at: ~datetime.datetime + :ivar azure_protected_instances: Protected instances in the backup engine. + :vartype azure_protected_instances: int """ _attribute_map = { @@ -6882,6 +9092,24 @@ def __init__( self, **kwargs ): + """ + :keyword database_name: Database name of backup engine. + :paramtype database_name: str + :keyword protected_items_count: Number of protected items in the backup engine. + :paramtype protected_items_count: int + :keyword protected_servers_count: Number of protected servers in the backup engine. + :paramtype protected_servers_count: int + :keyword disk_count: Number of disks in the backup engine. + :paramtype disk_count: int + :keyword used_disk_space: Disk space used in the backup engine. + :paramtype used_disk_space: float + :keyword available_disk_space: Disk space currently available in the backup engine. + :paramtype available_disk_space: float + :keyword refreshed_at: Last refresh time in the backup engine. + :paramtype refreshed_at: ~datetime.datetime + :keyword azure_protected_instances: Protected instances in the backup engine. + :paramtype azure_protected_instances: int + """ super(BackupEngineExtendedInfo, self).__init__(**kwargs) self.database_name = kwargs.get('database_name', None) self.protected_items_count = kwargs.get('protected_items_count', None) @@ -6896,19 +9124,19 @@ def __init__( class BackupManagementUsage(msrest.serialization.Model): """Backup management usages of a vault. - :param unit: Unit of the usage. Possible values include: "Count", "Bytes", "Seconds", - "Percent", "CountPerSecond", "BytesPerSecond". - :type unit: str or ~azure.mgmt.recoveryservicesbackup.models.UsagesUnit - :param quota_period: Quota period of usage. - :type quota_period: str - :param next_reset_time: Next reset time of usage. - :type next_reset_time: ~datetime.datetime - :param current_value: Current value of usage. - :type current_value: long - :param limit: Limit of usage. - :type limit: long - :param name: Name of usage. - :type name: ~azure.mgmt.recoveryservicesbackup.models.NameInfo + :ivar unit: Unit of the usage. Possible values include: "Count", "Bytes", "Seconds", "Percent", + "CountPerSecond", "BytesPerSecond". + :vartype unit: str or ~azure.mgmt.recoveryservicesbackup.models.UsagesUnit + :ivar quota_period: Quota period of usage. + :vartype quota_period: str + :ivar next_reset_time: Next reset time of usage. + :vartype next_reset_time: ~datetime.datetime + :ivar current_value: Current value of usage. + :vartype current_value: long + :ivar limit: Limit of usage. + :vartype limit: long + :ivar name: Name of usage. + :vartype name: ~azure.mgmt.recoveryservicesbackup.models.NameInfo """ _attribute_map = { @@ -6924,6 +9152,21 @@ def __init__( self, **kwargs ): + """ + :keyword unit: Unit of the usage. Possible values include: "Count", "Bytes", "Seconds", + "Percent", "CountPerSecond", "BytesPerSecond". + :paramtype unit: str or ~azure.mgmt.recoveryservicesbackup.models.UsagesUnit + :keyword quota_period: Quota period of usage. + :paramtype quota_period: str + :keyword next_reset_time: Next reset time of usage. + :paramtype next_reset_time: ~datetime.datetime + :keyword current_value: Current value of usage. + :paramtype current_value: long + :keyword limit: Limit of usage. + :paramtype limit: long + :keyword name: Name of usage. + :paramtype name: ~azure.mgmt.recoveryservicesbackup.models.NameInfo + """ super(BackupManagementUsage, self).__init__(**kwargs) self.unit = kwargs.get('unit', None) self.quota_period = kwargs.get('quota_period', None) @@ -6936,8 +9179,8 @@ def __init__( class BackupManagementUsageList(msrest.serialization.Model): """Backup management usage for vault. - :param value: The list of backup management usages for the given vault. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsage] + :ivar value: The list of backup management usages for the given vault. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsage] """ _attribute_map = { @@ -6948,6 +9191,10 @@ def __init__( self, **kwargs ): + """ + :keyword value: The list of backup management usages for the given vault. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsage] + """ super(BackupManagementUsageList, self).__init__(**kwargs) self.value = kwargs.get('value', None) @@ -6964,14 +9211,14 @@ class BackupRequestResource(Resource): :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: BackupRequestResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupRequest + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: BackupRequestResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupRequest """ _validation = { @@ -6994,6 +9241,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: BackupRequestResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupRequest + """ super(BackupRequestResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -7001,18 +9258,24 @@ def __init__( class BackupResourceConfig(msrest.serialization.Model): """The resource storage details. - :param storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + :ivar storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". - :type storage_model_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType - :param storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + :vartype storage_model_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :ivar storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". - :type storage_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType - :param storage_type_state: Locked or Unlocked. Once a machine is registered against a resource, + :vartype storage_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :ivar storage_type_state: Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: "Invalid", "Locked", "Unlocked". - :type storage_type_state: str or ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState - :param cross_region_restore_flag: Opt in details of Cross Region Restore feature. - :type cross_region_restore_flag: bool + :vartype storage_type_state: str or ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState + :ivar cross_region_restore_flag: Opt in details of Cross Region Restore feature. + :vartype cross_region_restore_flag: bool + :ivar dedup_state: Vault Dedup state. Possible values include: "Invalid", "Enabled", + "Disabled". + :vartype dedup_state: str or ~azure.mgmt.recoveryservicesbackup.models.DedupState + :ivar xcool_state: Vault x-cool state. Possible values include: "Invalid", "Enabled", + "Disabled". + :vartype xcool_state: str or ~azure.mgmt.recoveryservicesbackup.models.XcoolState """ _attribute_map = { @@ -7020,17 +9283,42 @@ class BackupResourceConfig(msrest.serialization.Model): 'storage_type': {'key': 'storageType', 'type': 'str'}, 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, 'cross_region_restore_flag': {'key': 'crossRegionRestoreFlag', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): + 'dedup_state': {'key': 'dedupState', 'type': 'str'}, + 'xcool_state': {'key': 'xcoolState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_model_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :keyword storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :keyword storage_type_state: Locked or Unlocked. Once a machine is registered against a + resource, the storageTypeState is always Locked. Possible values include: "Invalid", "Locked", + "Unlocked". + :paramtype storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState + :keyword cross_region_restore_flag: Opt in details of Cross Region Restore feature. + :paramtype cross_region_restore_flag: bool + :keyword dedup_state: Vault Dedup state. Possible values include: "Invalid", "Enabled", + "Disabled". + :paramtype dedup_state: str or ~azure.mgmt.recoveryservicesbackup.models.DedupState + :keyword xcool_state: Vault x-cool state. Possible values include: "Invalid", "Enabled", + "Disabled". + :paramtype xcool_state: str or ~azure.mgmt.recoveryservicesbackup.models.XcoolState + """ super(BackupResourceConfig, self).__init__(**kwargs) self.storage_model_type = kwargs.get('storage_model_type', None) self.storage_type = kwargs.get('storage_type', None) self.storage_type_state = kwargs.get('storage_type_state', None) self.cross_region_restore_flag = kwargs.get('cross_region_restore_flag', None) + self.dedup_state = kwargs.get('dedup_state', None) + self.xcool_state = kwargs.get('xcool_state', None) class BackupResourceConfigResource(Resource): @@ -7045,14 +9333,14 @@ class BackupResourceConfigResource(Resource): :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: BackupResourceConfigResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfig + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: BackupResourceConfigResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfig """ _validation = { @@ -7075,6 +9363,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: BackupResourceConfigResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfig + """ super(BackupResourceConfigResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -7082,21 +9380,21 @@ def __init__( class BackupResourceEncryptionConfig(msrest.serialization.Model): """BackupResourceEncryptionConfig. - :param encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", + :ivar encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", "MicrosoftManaged", "CustomerManaged". - :type encryption_at_rest_type: str or + :vartype encryption_at_rest_type: str or ~azure.mgmt.recoveryservicesbackup.models.EncryptionAtRestType - :param key_uri: Key Vault Key URI. - :type key_uri: str - :param subscription_id: Key Vault Subscription Id. - :type subscription_id: str - :param last_update_status: Possible values include: "Invalid", "NotEnabled", + :ivar key_uri: Key Vault Key URI. + :vartype key_uri: str + :ivar subscription_id: Key Vault Subscription Id. + :vartype subscription_id: str + :ivar last_update_status: Possible values include: "Invalid", "NotEnabled", "PartiallySucceeded", "PartiallyFailed", "Failed", "Succeeded", "Initialized", "FirstInitialization". - :type last_update_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastUpdateStatus - :param infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + :vartype last_update_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastUpdateStatus + :ivar infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", "Enabled". - :type infrastructure_encryption_state: str or + :vartype infrastructure_encryption_state: str or ~azure.mgmt.recoveryservicesbackup.models.InfrastructureEncryptionState """ @@ -7112,6 +9410,25 @@ def __init__( self, **kwargs ): + """ + :keyword encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", + "MicrosoftManaged", "CustomerManaged". + :paramtype encryption_at_rest_type: str or + ~azure.mgmt.recoveryservicesbackup.models.EncryptionAtRestType + :keyword key_uri: Key Vault Key URI. + :paramtype key_uri: str + :keyword subscription_id: Key Vault Subscription Id. + :paramtype subscription_id: str + :keyword last_update_status: Possible values include: "Invalid", "NotEnabled", + "PartiallySucceeded", "PartiallyFailed", "Failed", "Succeeded", "Initialized", + "FirstInitialization". + :paramtype last_update_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastUpdateStatus + :keyword infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + "Enabled". + :paramtype infrastructure_encryption_state: str or + ~azure.mgmt.recoveryservicesbackup.models.InfrastructureEncryptionState + """ super(BackupResourceEncryptionConfig, self).__init__(**kwargs) self.encryption_at_rest_type = kwargs.get('encryption_at_rest_type', None) self.key_uri = kwargs.get('key_uri', None) @@ -7123,27 +9440,27 @@ def __init__( class BackupResourceEncryptionConfigExtended(BackupResourceEncryptionConfig): """BackupResourceEncryptionConfigExtended. - :param encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", + :ivar encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", "MicrosoftManaged", "CustomerManaged". - :type encryption_at_rest_type: str or + :vartype encryption_at_rest_type: str or ~azure.mgmt.recoveryservicesbackup.models.EncryptionAtRestType - :param key_uri: Key Vault Key URI. - :type key_uri: str - :param subscription_id: Key Vault Subscription Id. - :type subscription_id: str - :param last_update_status: Possible values include: "Invalid", "NotEnabled", + :ivar key_uri: Key Vault Key URI. + :vartype key_uri: str + :ivar subscription_id: Key Vault Subscription Id. + :vartype subscription_id: str + :ivar last_update_status: Possible values include: "Invalid", "NotEnabled", "PartiallySucceeded", "PartiallyFailed", "Failed", "Succeeded", "Initialized", "FirstInitialization". - :type last_update_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastUpdateStatus - :param infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + :vartype last_update_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastUpdateStatus + :ivar infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", "Enabled". - :type infrastructure_encryption_state: str or + :vartype infrastructure_encryption_state: str or ~azure.mgmt.recoveryservicesbackup.models.InfrastructureEncryptionState - :param user_assigned_identity: User Assigned Identity Id. - :type user_assigned_identity: str - :param use_system_assigned_identity: bool to indicate whether to use system Assigned Identity - or not. - :type use_system_assigned_identity: bool + :ivar user_assigned_identity: User Assigned Identity Id. + :vartype user_assigned_identity: str + :ivar use_system_assigned_identity: bool to indicate whether to use system Assigned Identity or + not. + :vartype use_system_assigned_identity: bool """ _attribute_map = { @@ -7160,6 +9477,30 @@ def __init__( self, **kwargs ): + """ + :keyword encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", + "MicrosoftManaged", "CustomerManaged". + :paramtype encryption_at_rest_type: str or + ~azure.mgmt.recoveryservicesbackup.models.EncryptionAtRestType + :keyword key_uri: Key Vault Key URI. + :paramtype key_uri: str + :keyword subscription_id: Key Vault Subscription Id. + :paramtype subscription_id: str + :keyword last_update_status: Possible values include: "Invalid", "NotEnabled", + "PartiallySucceeded", "PartiallyFailed", "Failed", "Succeeded", "Initialized", + "FirstInitialization". + :paramtype last_update_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastUpdateStatus + :keyword infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + "Enabled". + :paramtype infrastructure_encryption_state: str or + ~azure.mgmt.recoveryservicesbackup.models.InfrastructureEncryptionState + :keyword user_assigned_identity: User Assigned Identity Id. + :paramtype user_assigned_identity: str + :keyword use_system_assigned_identity: bool to indicate whether to use system Assigned Identity + or not. + :paramtype use_system_assigned_identity: bool + """ super(BackupResourceEncryptionConfigExtended, self).__init__(**kwargs) self.user_assigned_identity = kwargs.get('user_assigned_identity', None) self.use_system_assigned_identity = kwargs.get('use_system_assigned_identity', None) @@ -7177,14 +9518,14 @@ class BackupResourceEncryptionConfigExtendedResource(Resource): :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: BackupResourceEncryptionConfigExtendedResource properties. - :type properties: + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: BackupResourceEncryptionConfigExtendedResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtended """ @@ -7208,6 +9549,17 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: BackupResourceEncryptionConfigExtendedResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtended + """ super(BackupResourceEncryptionConfigExtendedResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -7224,14 +9576,14 @@ class BackupResourceEncryptionConfigResource(Resource): :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: BackupResourceEncryptionConfigResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfig + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: BackupResourceEncryptionConfigResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfig """ _validation = { @@ -7254,6 +9606,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: BackupResourceEncryptionConfigResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfig + """ super(BackupResourceEncryptionConfigResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -7261,26 +9623,28 @@ def __init__( class BackupResourceVaultConfig(msrest.serialization.Model): """Backup resource vault config details. - :param storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + :ivar storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". - :type storage_model_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType - :param storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + :vartype storage_model_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :ivar storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". - :type storage_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType - :param storage_type_state: Locked or Unlocked. Once a machine is registered against a resource, + :vartype storage_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :ivar storage_type_state: Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: "Invalid", "Locked", "Unlocked". - :type storage_type_state: str or ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState - :param enhanced_security_state: Enabled or Disabled. Possible values include: "Invalid", + :vartype storage_type_state: str or ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState + :ivar enhanced_security_state: Enabled or Disabled. Possible values include: "Invalid", "Enabled", "Disabled". - :type enhanced_security_state: str or + :vartype enhanced_security_state: str or ~azure.mgmt.recoveryservicesbackup.models.EnhancedSecurityState - :param soft_delete_feature_state: Soft Delete feature state. Possible values include: - "Invalid", "Enabled", "Disabled". - :type soft_delete_feature_state: str or + :ivar soft_delete_feature_state: Soft Delete feature state. Possible values include: "Invalid", + "Enabled", "Disabled". + :vartype soft_delete_feature_state: str or ~azure.mgmt.recoveryservicesbackup.models.SoftDeleteFeatureState - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + :ivar is_soft_delete_feature_state_editable: Is soft delete feature state editable. + :vartype is_soft_delete_feature_state_editable: bool """ _attribute_map = { @@ -7290,12 +9654,38 @@ class BackupResourceVaultConfig(msrest.serialization.Model): 'enhanced_security_state': {'key': 'enhancedSecurityState', 'type': 'str'}, 'soft_delete_feature_state': {'key': 'softDeleteFeatureState', 'type': 'str'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): + 'is_soft_delete_feature_state_editable': {'key': 'isSoftDeleteFeatureStateEditable', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_model_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :keyword storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :keyword storage_type_state: Locked or Unlocked. Once a machine is registered against a + resource, the storageTypeState is always Locked. Possible values include: "Invalid", "Locked", + "Unlocked". + :paramtype storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState + :keyword enhanced_security_state: Enabled or Disabled. Possible values include: "Invalid", + "Enabled", "Disabled". + :paramtype enhanced_security_state: str or + ~azure.mgmt.recoveryservicesbackup.models.EnhancedSecurityState + :keyword soft_delete_feature_state: Soft Delete feature state. Possible values include: + "Invalid", "Enabled", "Disabled". + :paramtype soft_delete_feature_state: str or + ~azure.mgmt.recoveryservicesbackup.models.SoftDeleteFeatureState + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_soft_delete_feature_state_editable: Is soft delete feature state editable. + :paramtype is_soft_delete_feature_state_editable: bool + """ super(BackupResourceVaultConfig, self).__init__(**kwargs) self.storage_model_type = kwargs.get('storage_model_type', None) self.storage_type = kwargs.get('storage_type', None) @@ -7303,6 +9693,7 @@ def __init__( self.enhanced_security_state = kwargs.get('enhanced_security_state', None) self.soft_delete_feature_state = kwargs.get('soft_delete_feature_state', None) self.resource_guard_operation_requests = kwargs.get('resource_guard_operation_requests', None) + self.is_soft_delete_feature_state_editable = kwargs.get('is_soft_delete_feature_state_editable', None) class BackupResourceVaultConfigResource(Resource): @@ -7317,14 +9708,14 @@ class BackupResourceVaultConfigResource(Resource): :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: BackupResourceVaultConfigResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfig + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: BackupResourceVaultConfigResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfig """ _validation = { @@ -7347,6 +9738,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: BackupResourceVaultConfigResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfig + """ super(BackupResourceVaultConfigResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -7354,15 +9755,15 @@ def __init__( class BackupStatusRequest(msrest.serialization.Model): """BackupStatus request. - :param resource_type: Container Type - VM, SQLPaaS, DPM, AzureFileShare... Possible values + :ivar resource_type: Container Type - VM, SQLPaaS, DPM, AzureFileShare... Possible values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase". - :type resource_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType - :param resource_id: Entire ARM resource id of the resource. - :type resource_id: str - :param po_logical_name: Protectable Item Logical Name. - :type po_logical_name: str + :vartype resource_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar resource_id: Entire ARM resource id of the resource. + :vartype resource_id: str + :ivar po_logical_name: Protectable Item Logical Name. + :vartype po_logical_name: str """ _attribute_map = { @@ -7375,6 +9776,17 @@ def __init__( self, **kwargs ): + """ + :keyword resource_type: Container Type - VM, SQLPaaS, DPM, AzureFileShare... Possible values + include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", + "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype resource_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword resource_id: Entire ARM resource id of the resource. + :paramtype resource_id: str + :keyword po_logical_name: Protectable Item Logical Name. + :paramtype po_logical_name: str + """ super(BackupStatusRequest, self).__init__(**kwargs) self.resource_type = kwargs.get('resource_type', None) self.resource_id = kwargs.get('resource_id', None) @@ -7384,28 +9796,28 @@ def __init__( class BackupStatusResponse(msrest.serialization.Model): """BackupStatus response. - :param protection_status: Specifies whether the container is registered or not. Possible values + :ivar protection_status: Specifies whether the container is registered or not. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param vault_id: Specifies the arm resource id of the vault. - :type vault_id: str - :param fabric_name: Specifies the fabric name - Azure or AD. Possible values include: - "Invalid", "Azure". - :type fabric_name: str or ~azure.mgmt.recoveryservicesbackup.models.FabricName - :param container_name: Specifies the product specific container name. E.g. + :vartype protection_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar vault_id: Specifies the arm resource id of the vault. + :vartype vault_id: str + :ivar fabric_name: Specifies the fabric name - Azure or AD. Possible values include: "Invalid", + "Azure". + :vartype fabric_name: str or ~azure.mgmt.recoveryservicesbackup.models.FabricName + :ivar container_name: Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname. - :type container_name: str - :param protected_item_name: Specifies the product specific ds name. E.g. + :vartype container_name: str + :ivar protected_item_name: Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. - :type protected_item_name: str - :param error_code: ErrorCode in case of intent failed. - :type error_code: str - :param error_message: ErrorMessage in case of intent failed. - :type error_message: str - :param policy_name: Specifies the policy name which is used for protection. - :type policy_name: str - :param registration_status: Container registration status. - :type registration_status: str + :vartype protected_item_name: str + :ivar error_code: ErrorCode in case of intent failed. + :vartype error_code: str + :ivar error_message: ErrorMessage in case of intent failed. + :vartype error_message: str + :ivar policy_name: Specifies the policy name which is used for protection. + :vartype policy_name: str + :ivar registration_status: Container registration status. + :vartype registration_status: str """ _attribute_map = { @@ -7424,6 +9836,30 @@ def __init__( self, **kwargs ): + """ + :keyword protection_status: Specifies whether the container is registered or not. Possible + values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword vault_id: Specifies the arm resource id of the vault. + :paramtype vault_id: str + :keyword fabric_name: Specifies the fabric name - Azure or AD. Possible values include: + "Invalid", "Azure". + :paramtype fabric_name: str or ~azure.mgmt.recoveryservicesbackup.models.FabricName + :keyword container_name: Specifies the product specific container name. E.g. + iaasvmcontainer;iaasvmcontainer;csname;vmname. + :paramtype container_name: str + :keyword protected_item_name: Specifies the product specific ds name. E.g. + vm;iaasvmcontainer;csname;vmname. + :paramtype protected_item_name: str + :keyword error_code: ErrorCode in case of intent failed. + :paramtype error_code: str + :keyword error_message: ErrorMessage in case of intent failed. + :paramtype error_message: str + :keyword policy_name: Specifies the policy name which is used for protection. + :paramtype policy_name: str + :keyword registration_status: Container registration status. + :paramtype registration_status: str + """ super(BackupStatusResponse, self).__init__(**kwargs) self.protection_status = kwargs.get('protection_status', None) self.vault_id = kwargs.get('vault_id', None) @@ -7439,12 +9875,12 @@ def __init__( class BEKDetails(msrest.serialization.Model): """BEK is bitlocker encryption key. - :param secret_url: Secret is BEK. - :type secret_url: str - :param secret_vault_id: ID of the Key Vault where this Secret is stored. - :type secret_vault_id: str - :param secret_data: BEK data. - :type secret_data: str + :ivar secret_url: Secret is BEK. + :vartype secret_url: str + :ivar secret_vault_id: ID of the Key Vault where this Secret is stored. + :vartype secret_vault_id: str + :ivar secret_data: BEK data. + :vartype secret_data: str """ _attribute_map = { @@ -7457,39 +9893,25 @@ def __init__( self, **kwargs ): + """ + :keyword secret_url: Secret is BEK. + :paramtype secret_url: str + :keyword secret_vault_id: ID of the Key Vault where this Secret is stored. + :paramtype secret_vault_id: str + :keyword secret_data: BEK data. + :paramtype secret_data: str + """ super(BEKDetails, self).__init__(**kwargs) self.secret_url = kwargs.get('secret_url', None) self.secret_vault_id = kwargs.get('secret_vault_id', None) self.secret_data = kwargs.get('secret_data', None) -class BMSAADPropertiesQueryObject(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. - :param expand: attribute to add extended info. - :type expand: str + :ivar expand: attribute to add extended info. + :vartype expand: str """ _attribute_map = { @@ -7500,6 +9922,10 @@ def __init__( self, **kwargs ): + """ + :keyword expand: attribute to add extended info. + :paramtype expand: str + """ super(BMSBackupEngineQueryObject, self).__init__(**kwargs) self.expand = kwargs.get('expand', None) @@ -7507,15 +9933,15 @@ def __init__( class BMSBackupEnginesQueryObject(msrest.serialization.Model): """Query parameters to fetch list of backup engines. - :param backup_management_type: Backup management type for the backup engine. Possible values + :ivar backup_management_type: Backup management type for the backup engine. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param friendly_name: Friendly name of the backup engine. - :type friendly_name: str - :param expand: Attribute to add extended info. - :type expand: str + :ivar friendly_name: Friendly name of the backup engine. + :vartype friendly_name: str + :ivar expand: Attribute to add extended info. + :vartype expand: str """ _attribute_map = { @@ -7528,6 +9954,17 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Backup management type for the backup engine. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword friendly_name: Friendly name of the backup engine. + :paramtype friendly_name: str + :keyword expand: Attribute to add extended info. + :paramtype expand: str + """ super(BMSBackupEnginesQueryObject, self).__init__(**kwargs) self.backup_management_type = kwargs.get('backup_management_type', None) self.friendly_name = kwargs.get('friendly_name', None) @@ -7537,9 +9974,9 @@ def __init__( class BMSBackupSummariesQueryObject(msrest.serialization.Model): """Query parameters to fetch backup summaries. - :param type: Backup management type for this container. Possible values include: "Invalid", + :ivar type: Backup management type for this container. Possible values include: "Invalid", "BackupProtectedItemCountSummary", "BackupProtectionContainerCountSummary". - :type type: str or ~azure.mgmt.recoveryservicesbackup.models.Type + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.Type """ _attribute_map = { @@ -7550,6 +9987,11 @@ def __init__( self, **kwargs ): + """ + :keyword type: Backup management type for this container. Possible values include: "Invalid", + "BackupProtectedItemCountSummary", "BackupProtectionContainerCountSummary". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.Type + """ super(BMSBackupSummariesQueryObject, self).__init__(**kwargs) self.type = kwargs.get('type', None) @@ -7559,24 +10001,24 @@ class BMSContainerQueryObject(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Required. Backup management type for this container. Possible + :ivar backup_management_type: Required. Backup management type for this container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param container_type: Type of container for filter. Possible values include: "Invalid", + :ivar container_type: Type of container for filter. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param backup_engine_name: Backup engine name. - :type backup_engine_name: str - :param fabric_name: Fabric name for filter. - :type fabric_name: str - :param status: Status of registration of this container with the Recovery Services Vault. - :type status: str - :param friendly_name: Friendly name of this container. - :type friendly_name: str + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar backup_engine_name: Backup engine name. + :vartype backup_engine_name: str + :ivar fabric_name: Fabric name for filter. + :vartype fabric_name: str + :ivar status: Status of registration of this container with the Recovery Services Vault. + :vartype status: str + :ivar friendly_name: Friendly name of this container. + :vartype friendly_name: str """ _validation = { @@ -7596,6 +10038,26 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Required. Backup management type for this container. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword container_type: Type of container for filter. Possible values include: "Invalid", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :paramtype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :keyword backup_engine_name: Backup engine name. + :paramtype backup_engine_name: str + :keyword fabric_name: Fabric name for filter. + :paramtype fabric_name: str + :keyword status: Status of registration of this container with the Recovery Services Vault. + :paramtype status: str + :keyword friendly_name: Friendly name of this container. + :paramtype friendly_name: str + """ super(BMSContainerQueryObject, self).__init__(**kwargs) self.backup_management_type = kwargs['backup_management_type'] self.container_type = kwargs.get('container_type', None) @@ -7608,16 +10070,16 @@ def __init__( class BMSContainersInquiryQueryObject(msrest.serialization.Model): """The query filters that can be used with the inquire container API. - :param backup_management_type: Backup management type for this container. Possible values + :ivar backup_management_type: Backup management type for this container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param workload_type: Workload type for this container. Possible values include: "Invalid", + :ivar workload_type: Workload type for this container. 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.WorkloadType + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType """ _attribute_map = { @@ -7629,6 +10091,18 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Backup management type for this container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword workload_type: Workload type for this container. Possible values include: "Invalid", + "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", + "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", + "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + """ super(BMSContainersInquiryQueryObject, self).__init__(**kwargs) self.backup_management_type = kwargs.get('backup_management_type', None) self.workload_type = kwargs.get('workload_type', None) @@ -7637,21 +10111,21 @@ def __init__( class BMSPOQueryObject(msrest.serialization.Model): """Filters to list items that can be backed up. - :param backup_management_type: Backup management type. Possible values include: "Invalid", + :ivar backup_management_type: Backup management type. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param workload_type: Workload type. Possible values include: "Invalid", "VM", "FileFolder", + :ivar workload_type: Workload type. 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.WorkloadType - :param container_name: Full name of the container whose Protectable Objects should be returned. - :type container_name: str - :param status: Backup status query parameter. - :type status: str - :param friendly_name: Friendly name. - :type friendly_name: str + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar container_name: Full name of the container whose Protectable Objects should be returned. + :vartype container_name: str + :ivar status: Backup status query parameter. + :vartype status: str + :ivar friendly_name: Friendly name. + :vartype friendly_name: str """ _attribute_map = { @@ -7666,6 +10140,24 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Backup management type. Possible values include: "Invalid", + "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", + "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword workload_type: Workload type. Possible values include: "Invalid", "VM", "FileFolder", + "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", + "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword container_name: Full name of the container whose Protectable Objects should be + returned. + :paramtype container_name: str + :keyword status: Backup status query parameter. + :paramtype status: str + :keyword friendly_name: Friendly name. + :paramtype friendly_name: str + """ super(BMSPOQueryObject, self).__init__(**kwargs) self.backup_management_type = kwargs.get('backup_management_type', None) self.workload_type = kwargs.get('workload_type', None) @@ -7677,10 +10169,10 @@ def __init__( class BMSRefreshContainersQueryObject(msrest.serialization.Model): """The query filters that can be used with the refresh container API. - :param backup_management_type: Backup management type for this container. Possible values + :ivar backup_management_type: Backup management type for this container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType """ @@ -7692,6 +10184,13 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Backup management type for this container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + """ super(BMSRefreshContainersQueryObject, self).__init__(**kwargs) self.backup_management_type = kwargs.get('backup_management_type', None) @@ -7699,19 +10198,19 @@ def __init__( class BMSRPQueryObject(msrest.serialization.Model): """Filters to list backup copies. - :param start_date: Backup copies created after this time. - :type start_date: ~datetime.datetime - :param end_date: Backup copies created before this time. - :type end_date: ~datetime.datetime - :param restore_point_query_type: RestorePoint type. Possible values include: "Invalid", "Full", + :ivar start_date: Backup copies created after this time. + :vartype start_date: ~datetime.datetime + :ivar end_date: Backup copies created before this time. + :vartype end_date: ~datetime.datetime + :ivar restore_point_query_type: RestorePoint type. Possible values include: "Invalid", "Full", "Log", "Differential", "FullAndDifferential", "All", "Incremental". - :type restore_point_query_type: str or + :vartype restore_point_query_type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointQueryType - :param extended_info: In Get Recovery Point, it tells whether extended information about + :ivar extended_info: In Get Recovery Point, it tells whether extended information about recovery point is asked. - :type extended_info: bool - :param move_ready_rp_only: Whether the RP can be moved to another tier. - :type move_ready_rp_only: bool + :vartype extended_info: bool + :ivar move_ready_rp_only: Whether the RP can be moved to another tier. + :vartype move_ready_rp_only: bool """ _attribute_map = { @@ -7726,6 +10225,21 @@ def __init__( self, **kwargs ): + """ + :keyword start_date: Backup copies created after this time. + :paramtype start_date: ~datetime.datetime + :keyword end_date: Backup copies created before this time. + :paramtype end_date: ~datetime.datetime + :keyword restore_point_query_type: RestorePoint type. Possible values include: "Invalid", + "Full", "Log", "Differential", "FullAndDifferential", "All", "Incremental". + :paramtype restore_point_query_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointQueryType + :keyword extended_info: In Get Recovery Point, it tells whether extended information about + recovery point is asked. + :paramtype extended_info: bool + :keyword move_ready_rp_only: Whether the RP can be moved to another tier. + :paramtype move_ready_rp_only: bool + """ super(BMSRPQueryObject, self).__init__(**kwargs) self.start_date = kwargs.get('start_date', None) self.end_date = kwargs.get('end_date', None) @@ -7737,22 +10251,22 @@ def __init__( class BMSWorkloadItemQueryObject(msrest.serialization.Model): """Filters to list items that can be backed up. - :param backup_management_type: Backup management type. Possible values include: "Invalid", + :ivar backup_management_type: Backup management type. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param workload_item_type: Workload Item type. Possible values include: "Invalid", + :ivar workload_item_type: Workload Item type. Possible values include: "Invalid", "SQLInstance", "SQLDataBase", "SAPHanaSystem", "SAPHanaDatabase", "SAPAseSystem", "SAPAseDatabase". - :type workload_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType - :param workload_type: Workload type. Possible values include: "Invalid", "VM", "FileFolder", + :vartype workload_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType + :ivar workload_type: Workload type. 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.WorkloadType - :param protection_status: Backup status query parameter. Possible values include: "Invalid", + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar protection_status: Backup status query parameter. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :vartype protection_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus """ _attribute_map = { @@ -7766,6 +10280,25 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Backup management type. Possible values include: "Invalid", + "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", + "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword workload_item_type: Workload Item type. Possible values include: "Invalid", + "SQLInstance", "SQLDataBase", "SAPHanaSystem", "SAPHanaDatabase", "SAPAseSystem", + "SAPAseDatabase". + :paramtype workload_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType + :keyword workload_type: Workload type. Possible values include: "Invalid", "VM", "FileFolder", + "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", + "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword protection_status: Backup status query parameter. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ super(BMSWorkloadItemQueryObject, self).__init__(**kwargs) self.backup_management_type = kwargs.get('backup_management_type', None) self.workload_item_type = kwargs.get('workload_item_type', None) @@ -7776,14 +10309,14 @@ def __init__( class ClientDiscoveryDisplay(msrest.serialization.Model): """Localized display information of an operation. - :param provider: Name of the provider for display purposes. - :type provider: str - :param resource: ResourceType for which this Operation can be performed. - :type resource: str - :param operation: Operations Name itself. - :type operation: str - :param description: Description of the operation having details of what operation is about. - :type description: str + :ivar provider: Name of the provider for display purposes. + :vartype provider: str + :ivar resource: ResourceType for which this Operation can be performed. + :vartype resource: str + :ivar operation: Operations Name itself. + :vartype operation: str + :ivar description: Description of the operation having details of what operation is about. + :vartype description: str """ _attribute_map = { @@ -7797,6 +10330,16 @@ def __init__( self, **kwargs ): + """ + :keyword provider: Name of the provider for display purposes. + :paramtype provider: str + :keyword resource: ResourceType for which this Operation can be performed. + :paramtype resource: str + :keyword operation: Operations Name itself. + :paramtype operation: str + :keyword description: Description of the operation having details of what operation is about. + :paramtype description: str + """ super(ClientDiscoveryDisplay, self).__init__(**kwargs) self.provider = kwargs.get('provider', None) self.resource = kwargs.get('resource', None) @@ -7807,12 +10350,12 @@ def __init__( class ClientDiscoveryForLogSpecification(msrest.serialization.Model): """Class to represent shoebox log specification in json client discovery. - :param name: Name for shoebox log specification. - :type name: str - :param display_name: Localized display name. - :type display_name: str - :param blob_duration: blob duration of shoebox log specification. - :type blob_duration: str + :ivar name: Name for shoebox log specification. + :vartype name: str + :ivar display_name: Localized display name. + :vartype display_name: str + :ivar blob_duration: blob duration of shoebox log specification. + :vartype blob_duration: str """ _attribute_map = { @@ -7825,6 +10368,14 @@ def __init__( self, **kwargs ): + """ + :keyword name: Name for shoebox log specification. + :paramtype name: str + :keyword display_name: Localized display name. + :paramtype display_name: str + :keyword blob_duration: blob duration of shoebox log specification. + :paramtype blob_duration: str + """ super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.display_name = kwargs.get('display_name', None) @@ -7834,8 +10385,8 @@ def __init__( class ClientDiscoveryForProperties(msrest.serialization.Model): """Class to represent shoebox properties in json client discovery. - :param service_specification: Operation properties. - :type service_specification: + :ivar service_specification: Operation properties. + :vartype service_specification: ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification """ @@ -7847,6 +10398,11 @@ def __init__( self, **kwargs ): + """ + :keyword service_specification: Operation properties. + :paramtype service_specification: + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification + """ super(ClientDiscoveryForProperties, self).__init__(**kwargs) self.service_specification = kwargs.get('service_specification', None) @@ -7854,8 +10410,8 @@ def __init__( class ClientDiscoveryForServiceSpecification(msrest.serialization.Model): """Class to represent shoebox service specification in json client discovery. - :param log_specifications: List of log specifications of this operation. - :type log_specifications: + :ivar log_specifications: List of log specifications of this operation. + :vartype log_specifications: list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification] """ @@ -7867,6 +10423,11 @@ def __init__( self, **kwargs ): + """ + :keyword log_specifications: List of log specifications of this operation. + :paramtype log_specifications: + list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification] + """ super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) self.log_specifications = kwargs.get('log_specifications', None) @@ -7874,10 +10435,11 @@ def __init__( class ClientDiscoveryResponse(msrest.serialization.Model): """Operations List response which contains list of available APIs. - :param value: List of available operations. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApi] - :param next_link: Link to the next chunk of Response. - :type next_link: str + :ivar value: List of available operations. + :vartype value: + list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApi] + :ivar next_link: Link to the next chunk of Response. + :vartype next_link: str """ _attribute_map = { @@ -7889,6 +10451,13 @@ def __init__( self, **kwargs ): + """ + :keyword value: List of available operations. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApi] + :keyword next_link: Link to the next chunk of Response. + :paramtype next_link: str + """ super(ClientDiscoveryResponse, self).__init__(**kwargs) self.value = kwargs.get('value', None) self.next_link = kwargs.get('next_link', None) @@ -7897,15 +10466,15 @@ def __init__( class ClientDiscoveryValueForSingleApi(msrest.serialization.Model): """Available operation details. - :param name: Name of the Operation. - :type name: str - :param display: Contains the localized display information for this particular operation. - :type display: ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryDisplay - :param origin: The intended executor of the operation;governs the display of the operation in + :ivar name: Name of the Operation. + :vartype name: str + :ivar display: Contains the localized display information for this particular operation. + :vartype display: ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryDisplay + :ivar origin: The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX. - :type origin: str - :param properties: ShoeBox properties for the given operation. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForProperties + :vartype origin: str + :ivar properties: ShoeBox properties for the given operation. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForProperties """ _attribute_map = { @@ -7919,6 +10488,17 @@ def __init__( self, **kwargs ): + """ + :keyword name: Name of the Operation. + :paramtype name: str + :keyword display: Contains the localized display information for this particular operation. + :paramtype display: ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryDisplay + :keyword origin: The intended executor of the operation;governs the display of the operation in + the RBAC UX and the audit logs UX. + :paramtype origin: str + :keyword properties: ShoeBox properties for the given operation. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForProperties + """ super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.display = kwargs.get('display', None) @@ -7929,21 +10509,21 @@ def __init__( class ClientScriptForConnect(msrest.serialization.Model): """Client script details for file / folder restore. - :param script_content: File content of the client script for file / folder restore. - :type script_content: str - :param script_extension: File extension of the client script for file / folder restore - .ps1 , + :ivar script_content: File content of the client script for file / folder restore. + :vartype script_content: str + :ivar script_extension: File extension of the client script for file / folder restore - .ps1 , .sh , etc. - :type script_extension: str - :param os_type: OS type - Windows, Linux etc. for which this file / folder restore client - script works. - :type os_type: str - :param url: URL of Executable from where to source the content. If this is not null then + :vartype script_extension: str + :ivar os_type: OS type - Windows, Linux etc. for which this file / folder restore client script + works. + :vartype os_type: str + :ivar url: URL of Executable from where to source the content. If this is not null then ScriptContent should not be used. - :type url: str - :param script_name_suffix: Mandatory suffix that should be added to the name of script that is + :vartype url: str + :ivar script_name_suffix: Mandatory suffix that should be added to the name of script that is given for download to user. If its null or empty then , ignore it. - :type script_name_suffix: str + :vartype script_name_suffix: str """ _attribute_map = { @@ -7958,6 +10538,23 @@ def __init__( self, **kwargs ): + """ + :keyword script_content: File content of the client script for file / folder restore. + :paramtype script_content: str + :keyword script_extension: File extension of the client script for file / folder restore - .ps1 + , .sh , etc. + :paramtype script_extension: str + :keyword os_type: OS type - Windows, Linux etc. for which this file / folder restore client + script works. + :paramtype os_type: str + :keyword url: URL of Executable from where to source the content. If this is not null then + ScriptContent should not be used. + :paramtype url: str + :keyword script_name_suffix: Mandatory suffix that should be added to the name of script that + is given for download to user. + If its null or empty then , ignore it. + :paramtype script_name_suffix: str + """ super(ClientScriptForConnect, self).__init__(**kwargs) self.script_content = kwargs.get('script_content', None) self.script_extension = kwargs.get('script_extension', None) @@ -8006,6 +10603,8 @@ def __init__( self, **kwargs ): + """ + """ super(CloudErrorBody, self).__init__(**kwargs) self.code = None self.message = None @@ -8017,14 +10616,14 @@ 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 + :ivar unique_name: Unique name of the container. + :vartype unique_name: str + :ivar aad_tenant_id: Protection container identity - AAD Tenant. + :vartype aad_tenant_id: str + :ivar service_principal_client_id: Protection container identity - AAD Service Principal. + :vartype service_principal_client_id: str + :ivar audience: Protection container identity - Audience. + :vartype audience: str """ _attribute_map = { @@ -8038,6 +10637,16 @@ def __init__( self, **kwargs ): + """ + :keyword unique_name: Unique name of the container. + :paramtype unique_name: str + :keyword aad_tenant_id: Protection container identity - AAD Tenant. + :paramtype aad_tenant_id: str + :keyword service_principal_client_id: Protection container identity - AAD Service Principal. + :paramtype service_principal_client_id: str + :keyword audience: Protection container identity - Audience. + :paramtype audience: str + """ super(ContainerIdentityInfo, self).__init__(**kwargs) self.unique_name = kwargs.get('unique_name', None) self.aad_tenant_id = kwargs.get('aad_tenant_id', None) @@ -8045,332 +10654,11 @@ def __init__( 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. - - :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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'CrrJobRequest'}, - } - - def __init__( - self, - **kwargs - ): - super(CrrJobRequestResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - class DailyRetentionFormat(msrest.serialization.Model): """Daily retention format. - :param days_of_the_month: List of days of the month. - :type days_of_the_month: list[~azure.mgmt.recoveryservicesbackup.models.Day] + :ivar days_of_the_month: List of days of the month. + :vartype days_of_the_month: list[~azure.mgmt.recoveryservicesbackup.models.Day] """ _attribute_map = { @@ -8381,6 +10669,10 @@ def __init__( self, **kwargs ): + """ + :keyword days_of_the_month: List of days of the month. + :paramtype days_of_the_month: list[~azure.mgmt.recoveryservicesbackup.models.Day] + """ super(DailyRetentionFormat, self).__init__(**kwargs) self.days_of_the_month = kwargs.get('days_of_the_month', None) @@ -8388,10 +10680,10 @@ def __init__( class DailyRetentionSchedule(msrest.serialization.Model): """Daily retention schedule. - :param retention_times: Retention times of retention policy. - :type retention_times: list[~datetime.datetime] - :param retention_duration: Retention duration of retention Policy. - :type retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + :ivar retention_times: Retention times of retention policy. + :vartype retention_times: list[~datetime.datetime] + :ivar retention_duration: Retention duration of retention Policy. + :vartype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -8403,6 +10695,12 @@ def __init__( self, **kwargs ): + """ + :keyword retention_times: Retention times of retention policy. + :paramtype retention_times: list[~datetime.datetime] + :keyword retention_duration: Retention duration of retention Policy. + :paramtype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ super(DailyRetentionSchedule, self).__init__(**kwargs) self.retention_times = kwargs.get('retention_times', None) self.retention_duration = kwargs.get('retention_duration', None) @@ -8411,10 +10709,10 @@ def __init__( class Day(msrest.serialization.Model): """Day of the week. - :param date: Date of the month. - :type date: int - :param is_last: Whether Date is last date of month. - :type is_last: bool + :ivar date: Date of the month. + :vartype date: int + :ivar is_last: Whether Date is last date of month. + :vartype is_last: bool """ _attribute_map = { @@ -8426,6 +10724,12 @@ def __init__( self, **kwargs ): + """ + :keyword date: Date of the month. + :paramtype date: int + :keyword is_last: Whether Date is last date of month. + :paramtype is_last: bool + """ super(Day, self).__init__(**kwargs) self.date = kwargs.get('date', None) self.is_last = kwargs.get('is_last', None) @@ -8434,11 +10738,11 @@ def __init__( class DiskExclusionProperties(msrest.serialization.Model): """DiskExclusionProperties. - :param disk_lun_list: List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. - :type disk_lun_list: list[int] - :param is_inclusion_list: Flag to indicate whether DiskLunList is to be included/ excluded from + :ivar disk_lun_list: List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + :vartype disk_lun_list: list[int] + :ivar is_inclusion_list: Flag to indicate whether DiskLunList is to be included/ excluded from backup. - :type is_inclusion_list: bool + :vartype is_inclusion_list: bool """ _attribute_map = { @@ -8450,6 +10754,13 @@ def __init__( self, **kwargs ): + """ + :keyword disk_lun_list: List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + :paramtype disk_lun_list: list[int] + :keyword is_inclusion_list: Flag to indicate whether DiskLunList is to be included/ excluded + from backup. + :paramtype is_inclusion_list: bool + """ super(DiskExclusionProperties, self).__init__(**kwargs) self.disk_lun_list = kwargs.get('disk_lun_list', None) self.is_inclusion_list = kwargs.get('is_inclusion_list', None) @@ -8458,10 +10769,10 @@ def __init__( class DiskInformation(msrest.serialization.Model): """Disk information. - :param lun: - :type lun: int - :param name: - :type name: str + :ivar lun: + :vartype lun: int + :ivar name: + :vartype name: str """ _attribute_map = { @@ -8473,6 +10784,12 @@ def __init__( self, **kwargs ): + """ + :keyword lun: + :paramtype lun: int + :keyword name: + :paramtype name: str + """ super(DiskInformation, self).__init__(**kwargs) self.lun = kwargs.get('lun', None) self.name = kwargs.get('name', None) @@ -8481,13 +10798,13 @@ def __init__( class DistributedNodesInfo(msrest.serialization.Model): """This is used to represent the various nodes of the distributed container. - :param node_name: Name of the node under a distributed container. - :type node_name: str - :param status: Status of this Node. + :ivar node_name: Name of the node under a distributed container. + :vartype node_name: str + :ivar status: Status of this Node. Failed | Succeeded. - :type status: str - :param error_detail: Error Details if the Status is non-success. - :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :vartype status: str + :ivar error_detail: Error Details if the Status is non-success. + :vartype error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail """ _attribute_map = { @@ -8500,6 +10817,15 @@ def __init__( self, **kwargs ): + """ + :keyword node_name: Name of the node under a distributed container. + :paramtype node_name: str + :keyword status: Status of this Node. + Failed | Succeeded. + :paramtype status: str + :keyword error_detail: Error Details if the Status is non-success. + :paramtype error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + """ super(DistributedNodesInfo, self).__init__(**kwargs) self.node_name = kwargs.get('node_name', None) self.status = kwargs.get('status', None) @@ -8511,39 +10837,39 @@ class DpmBackupEngine(BackupEngineBase): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the backup engine. - :type friendly_name: str - :param backup_management_type: Type of backup management for the backup engine. Possible values + :ivar friendly_name: Friendly name of the backup engine. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the backup engine. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Registration status of the backup engine with the Recovery Services + :ivar registration_status: Registration status of the backup engine with the Recovery Services Vault. - :type registration_status: str - :param backup_engine_state: Status of the backup engine with the Recovery Services Vault. = + :vartype registration_status: str + :ivar backup_engine_state: Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed}. - :type backup_engine_state: str - :param health_status: Backup status of the backup engine. - :type health_status: str - :param backup_engine_type: Required. Type of the backup engine.Constant filled by server. + :vartype backup_engine_state: str + :ivar health_status: Backup status of the backup engine. + :vartype health_status: str + :ivar backup_engine_type: Required. Type of the backup engine.Constant filled by server. Possible values include: "Invalid", "DpmBackupEngine", "AzureBackupServerEngine". - :type backup_engine_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupEngineType - :param can_re_register: Flag indicating if the backup engine be registered, once already + :vartype backup_engine_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupEngineType + :ivar can_re_register: Flag indicating if the backup engine be registered, once already registered. - :type can_re_register: bool - :param backup_engine_id: ID of the backup engine. - :type backup_engine_id: str - :param dpm_version: Backup engine version. - :type dpm_version: str - :param azure_backup_agent_version: Backup agent version. - :type azure_backup_agent_version: str - :param is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. - :type is_azure_backup_agent_upgrade_available: bool - :param is_dpm_upgrade_available: To check if backup engine upgrade available. - :type is_dpm_upgrade_available: bool - :param extended_info: Extended info of the backupengine. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :vartype can_re_register: bool + :ivar backup_engine_id: ID of the backup engine. + :vartype backup_engine_id: str + :ivar dpm_version: Backup engine version. + :vartype dpm_version: str + :ivar azure_backup_agent_version: Backup agent version. + :vartype azure_backup_agent_version: str + :ivar is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. + :vartype is_azure_backup_agent_upgrade_available: bool + :ivar is_dpm_upgrade_available: To check if backup engine upgrade available. + :vartype is_dpm_upgrade_available: bool + :ivar extended_info: Extended info of the backupengine. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo """ _validation = { @@ -8570,6 +10896,38 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the backup engine. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the backup engine. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Registration status of the backup engine with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword backup_engine_state: Status of the backup engine with the Recovery Services Vault. = + {Active/Deleting/DeleteFailed}. + :paramtype backup_engine_state: str + :keyword health_status: Backup status of the backup engine. + :paramtype health_status: str + :keyword can_re_register: Flag indicating if the backup engine be registered, once already + registered. + :paramtype can_re_register: bool + :keyword backup_engine_id: ID of the backup engine. + :paramtype backup_engine_id: str + :keyword dpm_version: Backup engine version. + :paramtype dpm_version: str + :keyword azure_backup_agent_version: Backup agent version. + :paramtype azure_backup_agent_version: str + :keyword is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. + :paramtype is_azure_backup_agent_upgrade_available: bool + :keyword is_dpm_upgrade_available: To check if backup engine upgrade available. + :paramtype is_dpm_upgrade_available: bool + :keyword extended_info: Extended info of the backupengine. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + """ super(DpmBackupEngine, self).__init__(**kwargs) self.backup_engine_type = 'DpmBackupEngine' # type: str @@ -8577,8 +10935,8 @@ def __init__( class DPMContainerExtendedInfo(msrest.serialization.Model): """Additional information of the DPMContainer. - :param last_refreshed_at: Last refresh time of the DPMContainer. - :type last_refreshed_at: ~datetime.datetime + :ivar last_refreshed_at: Last refresh time of the DPMContainer. + :vartype last_refreshed_at: ~datetime.datetime """ _attribute_map = { @@ -8589,6 +10947,10 @@ def __init__( self, **kwargs ): + """ + :keyword last_refreshed_at: Last refresh time of the DPMContainer. + :paramtype last_refreshed_at: ~datetime.datetime + """ super(DPMContainerExtendedInfo, self).__init__(**kwargs) self.last_refreshed_at = kwargs.get('last_refreshed_at', None) @@ -8596,10 +10958,10 @@ def __init__( class DpmErrorInfo(msrest.serialization.Model): """DPM workload-specific error information. - :param error_string: Localized error string. - :type error_string: str - :param recommendations: List of localized recommendations for above error code. - :type recommendations: list[str] + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] """ _attribute_map = { @@ -8611,6 +10973,12 @@ def __init__( self, **kwargs ): + """ + :keyword error_string: Localized error string. + :paramtype error_string: str + :keyword recommendations: List of localized recommendations for above error code. + :paramtype recommendations: list[str] + """ super(DpmErrorInfo, self).__init__(**kwargs) self.error_string = kwargs.get('error_string', None) self.recommendations = kwargs.get('recommendations', None) @@ -8621,42 +10989,43 @@ class DpmJob(Job): All required parameters must be populated in order to send to Azure. - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param activity_id: ActivityId of job. - :type activity_id: str - :param job_type: Required. This property will be used as the discriminator for deciding the + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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 job_type: str - :param duration: Time elapsed for job. - :type duration: ~datetime.timedelta - :param dpm_server_name: DPM server name managing the backup item or backup job. - :type dpm_server_name: str - :param container_name: Name of cluster/server protecting current backup item, if any. - :type container_name: str - :param container_type: Type of container. - :type container_type: str - :param workload_type: Type of backup item. - :type workload_type: str - :param actions_info: The state/actions applicable on this job like cancel/retry. - :type actions_info: list[str or ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] - :param error_details: The errors. - :type error_details: list[~azure.mgmt.recoveryservicesbackup.models.DpmErrorInfo] - :param extended_info: Additional information for this job. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.DpmJobExtendedInfo + :vartype job_type: str + :ivar duration: Time elapsed for job. + :vartype duration: ~datetime.timedelta + :ivar dpm_server_name: DPM server name managing the backup item or backup job. + :vartype dpm_server_name: str + :ivar container_name: Name of cluster/server protecting current backup item, if any. + :vartype container_name: str + :ivar container_type: Type of container. + :vartype container_type: str + :ivar workload_type: Type of backup item. + :vartype workload_type: str + :ivar actions_info: The state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :ivar error_details: The errors. + :vartype error_details: list[~azure.mgmt.recoveryservicesbackup.models.DpmErrorInfo] + :ivar extended_info: Additional information for this job. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.DpmJobExtendedInfo """ _validation = { @@ -8686,6 +11055,43 @@ def __init__( self, **kwargs ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time elapsed for job. + :paramtype duration: ~datetime.timedelta + :keyword dpm_server_name: DPM server name managing the backup item or backup job. + :paramtype dpm_server_name: str + :keyword container_name: Name of cluster/server protecting current backup item, if any. + :paramtype container_name: str + :keyword container_type: Type of container. + :paramtype container_type: str + :keyword workload_type: Type of backup item. + :paramtype workload_type: str + :keyword actions_info: The state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :keyword error_details: The errors. + :paramtype error_details: list[~azure.mgmt.recoveryservicesbackup.models.DpmErrorInfo] + :keyword extended_info: Additional information for this job. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.DpmJobExtendedInfo + """ super(DpmJob, self).__init__(**kwargs) self.job_type = 'DpmJob' # type: str self.duration = kwargs.get('duration', None) @@ -8701,12 +11107,12 @@ def __init__( class DpmJobExtendedInfo(msrest.serialization.Model): """Additional information on the DPM workload-specific job. - :param tasks_list: List of tasks associated with this job. - :type tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.DpmJobTaskDetails] - :param property_bag: The job properties. - :type property_bag: dict[str, str] - :param dynamic_error_message: Non localized error message on job execution. - :type dynamic_error_message: str + :ivar tasks_list: List of tasks associated with this job. + :vartype tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.DpmJobTaskDetails] + :ivar property_bag: The job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str """ _attribute_map = { @@ -8719,6 +11125,14 @@ def __init__( self, **kwargs ): + """ + :keyword tasks_list: List of tasks associated with this job. + :paramtype tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.DpmJobTaskDetails] + :keyword property_bag: The job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ super(DpmJobExtendedInfo, self).__init__(**kwargs) self.tasks_list = kwargs.get('tasks_list', None) self.property_bag = kwargs.get('property_bag', None) @@ -8728,16 +11142,16 @@ def __init__( class DpmJobTaskDetails(msrest.serialization.Model): """DPM workload-specific job task details. - :param task_id: The task display name. - :type task_id: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param duration: Time elapsed for task. - :type duration: ~datetime.timedelta - :param status: The status. - :type status: str + :ivar task_id: The task display name. + :vartype task_id: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar duration: Time elapsed for task. + :vartype duration: ~datetime.timedelta + :ivar status: The status. + :vartype status: str """ _attribute_map = { @@ -8752,6 +11166,18 @@ def __init__( self, **kwargs ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword duration: Time elapsed for task. + :paramtype duration: ~datetime.timedelta + :keyword status: The status. + :paramtype status: str + """ super(DpmJobTaskDetails, self).__init__(**kwargs) self.task_id = kwargs.get('task_id', None) self.start_time = kwargs.get('start_time', None) @@ -8765,58 +11191,62 @@ class DPMProtectedItem(ProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 managed item. - :type friendly_name: str - :param backup_engine_name: Backup Management server protecting this backup item. - :type backup_engine_name: str - :param protection_state: Protection state of the backup engine. Possible values include: + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the managed item. + :vartype friendly_name: str + :ivar backup_engine_name: Backup Management server protecting this backup item. + :vartype backup_engine_name: str + :ivar protection_state: Protection state of the backup engine. Possible values include: "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState - :param extended_info: Extended info of the backup item. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMProtectedItemExtendedInfo + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState + :ivar extended_info: Extended info of the backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMProtectedItemExtendedInfo """ _validation = { @@ -8839,6 +11269,8 @@ class DPMProtectedItem(ProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, @@ -8849,6 +11281,65 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the managed item. + :paramtype friendly_name: str + :keyword backup_engine_name: Backup Management server protecting this backup item. + :paramtype backup_engine_name: str + :keyword protection_state: Protection state of the backup engine. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState + :keyword extended_info: Extended info of the backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DPMProtectedItemExtendedInfo + """ super(DPMProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'DPMProtectedItem' # type: str self.friendly_name = kwargs.get('friendly_name', None) @@ -8860,34 +11351,34 @@ def __init__( class DPMProtectedItemExtendedInfo(msrest.serialization.Model): """Additional information of DPM Protected item. - :param protectable_object_load_path: Attribute to provide information on various DBs. - :type protectable_object_load_path: dict[str, str] - :param protected: To check if backup item is disk protected. - :type protected: bool - :param is_present_on_cloud: To check if backup item is cloud protected. - :type is_present_on_cloud: bool - :param last_backup_status: Last backup status information on backup item. - :type last_backup_status: str - :param last_refreshed_at: Last refresh time on backup item. - :type last_refreshed_at: ~datetime.datetime - :param oldest_recovery_point: Oldest cloud recovery point time. - :type oldest_recovery_point: ~datetime.datetime - :param recovery_point_count: cloud recovery point count. - :type recovery_point_count: int - :param on_premise_oldest_recovery_point: Oldest disk recovery point time. - :type on_premise_oldest_recovery_point: ~datetime.datetime - :param on_premise_latest_recovery_point: latest disk recovery point time. - :type on_premise_latest_recovery_point: ~datetime.datetime - :param on_premise_recovery_point_count: disk recovery point count. - :type on_premise_recovery_point_count: int - :param is_collocated: To check if backup item is collocated. - :type is_collocated: bool - :param protection_group_name: Protection group name of the backup item. - :type protection_group_name: str - :param disk_storage_used_in_bytes: Used Disk storage in bytes. - :type disk_storage_used_in_bytes: str - :param total_disk_storage_size_in_bytes: total Disk storage in bytes. - :type total_disk_storage_size_in_bytes: str + :ivar protectable_object_load_path: Attribute to provide information on various DBs. + :vartype protectable_object_load_path: dict[str, str] + :ivar protected: To check if backup item is disk protected. + :vartype protected: bool + :ivar is_present_on_cloud: To check if backup item is cloud protected. + :vartype is_present_on_cloud: bool + :ivar last_backup_status: Last backup status information on backup item. + :vartype last_backup_status: str + :ivar last_refreshed_at: Last refresh time on backup item. + :vartype last_refreshed_at: ~datetime.datetime + :ivar oldest_recovery_point: Oldest cloud recovery point time. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: cloud recovery point count. + :vartype recovery_point_count: int + :ivar on_premise_oldest_recovery_point: Oldest disk recovery point time. + :vartype on_premise_oldest_recovery_point: ~datetime.datetime + :ivar on_premise_latest_recovery_point: latest disk recovery point time. + :vartype on_premise_latest_recovery_point: ~datetime.datetime + :ivar on_premise_recovery_point_count: disk recovery point count. + :vartype on_premise_recovery_point_count: int + :ivar is_collocated: To check if backup item is collocated. + :vartype is_collocated: bool + :ivar protection_group_name: Protection group name of the backup item. + :vartype protection_group_name: str + :ivar disk_storage_used_in_bytes: Used Disk storage in bytes. + :vartype disk_storage_used_in_bytes: str + :ivar total_disk_storage_size_in_bytes: total Disk storage in bytes. + :vartype total_disk_storage_size_in_bytes: str """ _attribute_map = { @@ -8911,6 +11402,36 @@ def __init__( self, **kwargs ): + """ + :keyword protectable_object_load_path: Attribute to provide information on various DBs. + :paramtype protectable_object_load_path: dict[str, str] + :keyword protected: To check if backup item is disk protected. + :paramtype protected: bool + :keyword is_present_on_cloud: To check if backup item is cloud protected. + :paramtype is_present_on_cloud: bool + :keyword last_backup_status: Last backup status information on backup item. + :paramtype last_backup_status: str + :keyword last_refreshed_at: Last refresh time on backup item. + :paramtype last_refreshed_at: ~datetime.datetime + :keyword oldest_recovery_point: Oldest cloud recovery point time. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: cloud recovery point count. + :paramtype recovery_point_count: int + :keyword on_premise_oldest_recovery_point: Oldest disk recovery point time. + :paramtype on_premise_oldest_recovery_point: ~datetime.datetime + :keyword on_premise_latest_recovery_point: latest disk recovery point time. + :paramtype on_premise_latest_recovery_point: ~datetime.datetime + :keyword on_premise_recovery_point_count: disk recovery point count. + :paramtype on_premise_recovery_point_count: int + :keyword is_collocated: To check if backup item is collocated. + :paramtype is_collocated: bool + :keyword protection_group_name: Protection group name of the backup item. + :paramtype protection_group_name: str + :keyword disk_storage_used_in_bytes: Used Disk storage in bytes. + :paramtype disk_storage_used_in_bytes: str + :keyword total_disk_storage_size_in_bytes: total Disk storage in bytes. + :paramtype total_disk_storage_size_in_bytes: str + """ super(DPMProtectedItemExtendedInfo, self).__init__(**kwargs) self.protectable_object_load_path = kwargs.get('protectable_object_load_path', None) self.protected = kwargs.get('protected', None) @@ -8931,17 +11452,17 @@ def __init__( class EncryptionDetails(msrest.serialization.Model): """Details needed if the VM was encrypted at the time of backup. - :param encryption_enabled: Identifies whether this backup copy represents an encrypted VM at - the time of backup. - :type encryption_enabled: bool - :param kek_url: Key Url. - :type kek_url: str - :param secret_key_url: Secret Url. - :type secret_key_url: str - :param kek_vault_id: ID of Key Vault where KEK is stored. - :type kek_vault_id: str - :param secret_key_vault_id: ID of Key Vault where Secret is stored. - :type secret_key_vault_id: str + :ivar encryption_enabled: Identifies whether this backup copy represents an encrypted VM at the + time of backup. + :vartype encryption_enabled: bool + :ivar kek_url: Key Url. + :vartype kek_url: str + :ivar secret_key_url: Secret Url. + :vartype secret_key_url: str + :ivar kek_vault_id: ID of Key Vault where KEK is stored. + :vartype kek_vault_id: str + :ivar secret_key_vault_id: ID of Key Vault where Secret is stored. + :vartype secret_key_vault_id: str """ _attribute_map = { @@ -8956,6 +11477,19 @@ def __init__( self, **kwargs ): + """ + :keyword encryption_enabled: Identifies whether this backup copy represents an encrypted VM at + the time of backup. + :paramtype encryption_enabled: bool + :keyword kek_url: Key Url. + :paramtype kek_url: str + :keyword secret_key_url: Secret Url. + :paramtype secret_key_url: str + :keyword kek_vault_id: ID of Key Vault where KEK is stored. + :paramtype kek_vault_id: str + :keyword secret_key_vault_id: ID of Key Vault where Secret is stored. + :paramtype secret_key_vault_id: str + """ super(EncryptionDetails, self).__init__(**kwargs) self.encryption_enabled = kwargs.get('encryption_enabled', None) self.kek_url = kwargs.get('kek_url', None) @@ -8989,6 +11523,8 @@ def __init__( self, **kwargs ): + """ + """ super(ErrorAdditionalInfo, self).__init__(**kwargs) self.type = None self.info = None @@ -9023,6 +11559,8 @@ def __init__( self, **kwargs ): + """ + """ super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None @@ -9037,9 +11575,9 @@ class OperationResultInfoBase(msrest.serialization.Model): 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 + :ivar 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 + :vartype object_type: str """ _validation = { @@ -9058,6 +11596,8 @@ def __init__( self, **kwargs ): + """ + """ super(OperationResultInfoBase, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -9067,17 +11607,17 @@ class ExportJobsOperationResultInfo(OperationResultInfoBase): 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 + :ivar 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 blob_url: URL of the blob into which the serialized string of list of jobs is exported. - :type blob_url: str - :param blob_sas_key: SAS key to access the blob. It expires in 15 mins. - :type blob_sas_key: str - :param excel_file_blob_url: URL of the blob into which the ExcelFile is uploaded. - :type excel_file_blob_url: str - :param excel_file_blob_sas_key: SAS key to access the blob. It expires in 15 mins. - :type excel_file_blob_sas_key: str + :vartype object_type: str + :ivar blob_url: URL of the blob into which the serialized string of list of jobs is exported. + :vartype blob_url: str + :ivar blob_sas_key: SAS key to access the blob. It expires in 15 mins. + :vartype blob_sas_key: str + :ivar excel_file_blob_url: URL of the blob into which the ExcelFile is uploaded. + :vartype excel_file_blob_url: str + :ivar excel_file_blob_sas_key: SAS key to access the blob. It expires in 15 mins. + :vartype excel_file_blob_sas_key: str """ _validation = { @@ -9096,6 +11636,17 @@ def __init__( self, **kwargs ): + """ + :keyword blob_url: URL of the blob into which the serialized string of list of jobs is + exported. + :paramtype blob_url: str + :keyword blob_sas_key: SAS key to access the blob. It expires in 15 mins. + :paramtype blob_sas_key: str + :keyword excel_file_blob_url: URL of the blob into which the ExcelFile is uploaded. + :paramtype excel_file_blob_url: str + :keyword excel_file_blob_sas_key: SAS key to access the blob. It expires in 15 mins. + :paramtype excel_file_blob_sas_key: str + """ super(ExportJobsOperationResultInfo, self).__init__(**kwargs) self.object_type = 'ExportJobsOperationResultInfo' # type: str self.blob_url = kwargs.get('blob_url', None) @@ -9107,21 +11658,32 @@ def __init__( class ExtendedProperties(msrest.serialization.Model): """Extended Properties for Azure IaasVM Backup. - :param disk_exclusion_properties: Extended Properties for Disk Exclusion. - :type disk_exclusion_properties: + :ivar disk_exclusion_properties: Extended Properties for Disk Exclusion. + :vartype disk_exclusion_properties: ~azure.mgmt.recoveryservicesbackup.models.DiskExclusionProperties + :ivar linux_vm_application_name: Linux VM name. + :vartype linux_vm_application_name: str """ _attribute_map = { 'disk_exclusion_properties': {'key': 'diskExclusionProperties', 'type': 'DiskExclusionProperties'}, + 'linux_vm_application_name': {'key': 'linuxVmApplicationName', 'type': 'str'}, } def __init__( self, **kwargs ): + """ + :keyword disk_exclusion_properties: Extended Properties for Disk Exclusion. + :paramtype disk_exclusion_properties: + ~azure.mgmt.recoveryservicesbackup.models.DiskExclusionProperties + :keyword linux_vm_application_name: Linux VM name. + :paramtype linux_vm_application_name: str + """ super(ExtendedProperties, self).__init__(**kwargs) self.disk_exclusion_properties = kwargs.get('disk_exclusion_properties', None) + self.linux_vm_application_name = kwargs.get('linux_vm_application_name', None) class GenericContainer(ProtectionContainer): @@ -9129,33 +11691,35 @@ class GenericContainer(ProtectionContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param fabric_name: Name of the container's fabric. - :type fabric_name: str - :param extended_information: Extended information (not returned in List container API calls). - :type extended_information: + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar fabric_name: Name of the container's fabric. + :vartype fabric_name: str + :ivar extended_information: Extended information (not returned in List container API calls). + :vartype extended_information: ~azure.mgmt.recoveryservicesbackup.models.GenericContainerExtendedInfo """ @@ -9169,6 +11733,7 @@ class GenericContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'fabric_name': {'key': 'fabricName', 'type': 'str'}, 'extended_information': {'key': 'extendedInformation', 'type': 'GenericContainerExtendedInfo'}, } @@ -9177,6 +11742,28 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword fabric_name: Name of the container's fabric. + :paramtype fabric_name: str + :keyword extended_information: Extended information (not returned in List container API calls). + :paramtype extended_information: + ~azure.mgmt.recoveryservicesbackup.models.GenericContainerExtendedInfo + """ super(GenericContainer, self).__init__(**kwargs) self.container_type = 'GenericContainer' # type: str self.fabric_name = kwargs.get('fabric_name', None) @@ -9186,12 +11773,13 @@ def __init__( class GenericContainerExtendedInfo(msrest.serialization.Model): """Container extended information. - :param raw_cert_data: Public key of container cert. - :type raw_cert_data: str - :param container_identity_info: Container identity information. - :type container_identity_info: ~azure.mgmt.recoveryservicesbackup.models.ContainerIdentityInfo - :param service_endpoints: Azure Backup Service Endpoints for the container. - :type service_endpoints: dict[str, str] + :ivar raw_cert_data: Public key of container cert. + :vartype raw_cert_data: str + :ivar container_identity_info: Container identity information. + :vartype container_identity_info: + ~azure.mgmt.recoveryservicesbackup.models.ContainerIdentityInfo + :ivar service_endpoints: Azure Backup Service Endpoints for the container. + :vartype service_endpoints: dict[str, str] """ _attribute_map = { @@ -9204,6 +11792,15 @@ def __init__( self, **kwargs ): + """ + :keyword raw_cert_data: Public key of container cert. + :paramtype raw_cert_data: str + :keyword container_identity_info: Container identity information. + :paramtype container_identity_info: + ~azure.mgmt.recoveryservicesbackup.models.ContainerIdentityInfo + :keyword service_endpoints: Azure Backup Service Endpoints for the container. + :paramtype service_endpoints: dict[str, str] + """ super(GenericContainerExtendedInfo, self).__init__(**kwargs) self.raw_cert_data = kwargs.get('raw_cert_data', None) self.container_identity_info = kwargs.get('container_identity_info', None) @@ -9215,63 +11812,67 @@ class GenericProtectedItem(ProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 container. - :type friendly_name: str - :param policy_state: Indicates consistency of policy object and policy applied to this backup + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar policy_state: Indicates consistency of policy object and policy applied to this backup item. - :type policy_state: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", + :vartype policy_state: str + :ivar 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 protected_item_id: Data Plane Service ID of the protected item. - :type protected_item_id: long - :param source_associations: Loosely coupled (type, value) associations (example - parent of a + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar protected_item_id: Data Plane Service ID of the protected item. + :vartype protected_item_id: long + :ivar source_associations: Loosely coupled (type, value) associations (example - parent of a protected item). - :type source_associations: dict[str, str] - :param fabric_name: Name of this backup item's fabric. - :type fabric_name: str + :vartype source_associations: dict[str, str] + :ivar fabric_name: Name of this backup item's fabric. + :vartype fabric_name: str """ _validation = { @@ -9294,6 +11895,8 @@ class GenericProtectedItem(ProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'policy_state': {'key': 'policyState', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, @@ -9306,6 +11909,69 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :paramtype policy_state: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword protected_item_id: Data Plane Service ID of the protected item. + :paramtype protected_item_id: long + :keyword source_associations: Loosely coupled (type, value) associations (example - parent of a + protected item). + :paramtype source_associations: dict[str, str] + :keyword fabric_name: Name of this backup item's fabric. + :paramtype fabric_name: str + """ super(GenericProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'GenericProtectedItem' # type: str self.friendly_name = kwargs.get('friendly_name', None) @@ -9321,22 +11987,22 @@ class GenericProtectionPolicy(ProtectionPolicy): All required parameters must be populated in order to send to Azure. - :param protected_items_count: Number of items associated with this policy. - :type protected_items_count: int - :param backup_management_type: Required. This property will be used as the discriminator for + :ivar protected_items_count: Number of items associated with this policy. + :vartype protected_items_count: int + :ivar backup_management_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 backup_management_type: str - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] - :param sub_protection_policy: List of sub-protection policies which includes schedule and + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + :ivar sub_protection_policy: List of sub-protection policies which includes schedule and retention. - :type sub_protection_policy: + :vartype sub_protection_policy: list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] - :param time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard + :ivar time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - :type time_zone: str - :param fabric_name: Name of this policy's fabric. - :type fabric_name: str + :vartype time_zone: str + :ivar fabric_name: Name of this policy's fabric. + :vartype fabric_name: str """ _validation = { @@ -9356,6 +12022,21 @@ def __init__( self, **kwargs ): + """ + :keyword protected_items_count: Number of items associated with this policy. + :paramtype protected_items_count: int + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + :keyword sub_protection_policy: List of sub-protection policies which includes schedule and + retention. + :paramtype sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] + :keyword time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific + Standard Time". + :paramtype time_zone: str + :keyword fabric_name: Name of this policy's fabric. + :paramtype fabric_name: str + """ super(GenericProtectionPolicy, self).__init__(**kwargs) self.backup_management_type = 'GenericProtectionPolicy' # type: str self.sub_protection_policy = kwargs.get('sub_protection_policy', None) @@ -9368,17 +12049,17 @@ class GenericRecoveryPoint(RecoveryPoint): 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 + :ivar 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 friendly_name: Friendly name of the backup copy. - :type friendly_name: str - :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 + :vartype object_type: str + :ivar friendly_name: Friendly name of the backup copy. + :vartype friendly_name: 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 """ _validation = { @@ -9397,6 +12078,17 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the backup copy. + :paramtype friendly_name: str + :keyword recovery_point_type: Type of the backup copy. + :paramtype recovery_point_type: str + :keyword recovery_point_time: Time at which this backup copy was created. + :paramtype recovery_point_time: ~datetime.datetime + :keyword recovery_point_additional_info: Additional information associated with this backup + copy. + :paramtype recovery_point_additional_info: str + """ super(GenericRecoveryPoint, self).__init__(**kwargs) self.object_type = 'GenericRecoveryPoint' # type: str self.friendly_name = kwargs.get('friendly_name', None) @@ -9408,8 +12100,8 @@ def __init__( class GetProtectedItemQueryObject(msrest.serialization.Model): """Filters to list backup items. - :param expand: Specifies if the additional information should be provided for this item. - :type expand: str + :ivar expand: Specifies if the additional information should be provided for this item. + :vartype expand: str """ _attribute_map = { @@ -9420,21 +12112,62 @@ def __init__( self, **kwargs ): + """ + :keyword expand: Specifies if the additional information should be provided for this item. + :paramtype expand: str + """ super(GetProtectedItemQueryObject, self).__init__(**kwargs) self.expand = kwargs.get('expand', None) +class HourlySchedule(msrest.serialization.Model): + """HourlySchedule. + + :ivar interval: Interval at which backup needs to be triggered. For hourly the value + can be 4/6/8/12. + :vartype interval: int + :ivar schedule_window_start_time: To specify start time of the backup window. + :vartype schedule_window_start_time: ~datetime.datetime + :ivar schedule_window_duration: To specify duration of the backup window. + :vartype schedule_window_duration: int + """ + + _attribute_map = { + 'interval': {'key': 'interval', 'type': 'int'}, + 'schedule_window_start_time': {'key': 'scheduleWindowStartTime', 'type': 'iso-8601'}, + 'schedule_window_duration': {'key': 'scheduleWindowDuration', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword interval: Interval at which backup needs to be triggered. For hourly the value + can be 4/6/8/12. + :paramtype interval: int + :keyword schedule_window_start_time: To specify start time of the backup window. + :paramtype schedule_window_start_time: ~datetime.datetime + :keyword schedule_window_duration: To specify duration of the backup window. + :paramtype schedule_window_duration: int + """ + super(HourlySchedule, self).__init__(**kwargs) + self.interval = kwargs.get('interval', None) + self.schedule_window_start_time = kwargs.get('schedule_window_start_time', None) + self.schedule_window_duration = kwargs.get('schedule_window_duration', None) + + class IaasVMBackupRequest(BackupRequest): """IaaS VM workload-specific backup 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 + :ivar 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_expiry_time_in_utc: Backup copy will expire after the time specified + :vartype object_type: str + :ivar recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified (UTC). - :type recovery_point_expiry_time_in_utc: ~datetime.datetime + :vartype recovery_point_expiry_time_in_utc: ~datetime.datetime """ _validation = { @@ -9450,6 +12183,11 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified + (UTC). + :paramtype recovery_point_expiry_time_in_utc: ~datetime.datetime + """ super(IaasVMBackupRequest, self).__init__(**kwargs) self.object_type = 'IaasVMBackupRequest' # type: str self.recovery_point_expiry_time_in_utc = kwargs.get('recovery_point_expiry_time_in_utc', None) @@ -9460,20 +12198,20 @@ class IaasVMILRRegistrationRequest(ILRRequest): 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 + :ivar 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 IaaS VM backup copy from where the files/folders have to be + :vartype object_type: str + :ivar recovery_point_id: ID of the IaaS VM backup copy from where the files/folders have to be restored. - :type recovery_point_id: str - :param virtual_machine_id: Fully qualified ARM ID of the virtual machine whose the files / + :vartype recovery_point_id: str + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored. - :type virtual_machine_id: str - :param initiator_name: iSCSI initiator name. - :type initiator_name: str - :param renew_existing_registration: Whether to renew existing registration with the iSCSI + :vartype virtual_machine_id: str + :ivar initiator_name: iSCSI initiator name. + :vartype initiator_name: str + :ivar renew_existing_registration: Whether to renew existing registration with the iSCSI server. - :type renew_existing_registration: bool + :vartype renew_existing_registration: bool """ _validation = { @@ -9484,125 +12222,43 @@ class IaasVMILRRegistrationRequest(ILRRequest): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, - 'initiator_name': {'key': 'initiatorName', 'type': 'str'}, - 'renew_existing_registration': {'key': 'renewExistingRegistration', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(IaasVMILRRegistrationRequest, self).__init__(**kwargs) - self.object_type = 'IaasVMILRRegistrationRequest' # type: str - self.recovery_point_id = kwargs.get('recovery_point_id', None) - self.virtual_machine_id = kwargs.get('virtual_machine_id', None) - self.initiator_name = kwargs.get('initiator_name', None) - self.renew_existing_registration = kwargs.get('renew_existing_registration', None) - - -class IaasVMRecoveryPoint(RecoveryPoint): - """IaaS VM workload specific backup copy. - - 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_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}'}, + 'initiator_name': {'key': 'initiatorName', 'type': 'str'}, + 'renew_existing_registration': {'key': 'renewExistingRegistration', 'type': 'bool'}, } 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) + """ + :keyword recovery_point_id: ID of the IaaS VM backup copy from where the files/folders have to + be restored. + :paramtype recovery_point_id: str + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine whose the files / + folders have to be restored. + :paramtype virtual_machine_id: str + :keyword initiator_name: iSCSI initiator name. + :paramtype initiator_name: str + :keyword renew_existing_registration: Whether to renew existing registration with the iSCSI + server. + :paramtype renew_existing_registration: bool + """ + super(IaasVMILRRegistrationRequest, self).__init__(**kwargs) + self.object_type = 'IaasVMILRRegistrationRequest' # type: str + self.recovery_point_id = kwargs.get('recovery_point_id', None) + self.virtual_machine_id = kwargs.get('virtual_machine_id', None) + self.initiator_name = kwargs.get('initiator_name', None) + self.renew_existing_registration = kwargs.get('renew_existing_registration', None) -class IaasVMRecoveryPointAutoGenerated(RecoveryPoint): +class IaasVMRecoveryPoint(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 + :ivar 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 + :vartype 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. @@ -9614,41 +12270,36 @@ class IaasVMRecoveryPointAutoGenerated(RecoveryPoint): :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 + :ivar 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 + :vartype key_and_secret: ~azure.mgmt.recoveryservicesbackup.models.KeyAndSecretDetails + :ivar 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: + :vartype is_instant_ilr_session_active: bool + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :ivar is_managed_virtual_machine: Whether VM is with Managed Disks. + :vartype is_managed_virtual_machine: bool + :ivar virtual_machine_size: Virtual Machine Size. + :vartype virtual_machine_size: str + :ivar original_storage_account_option: Original Storage Account Option. + :vartype original_storage_account_option: bool + :ivar os_type: OS type. + :vartype os_type: str + :ivar recovery_point_disk_configuration: Disk configuration. + :vartype 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 + :ivar 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, + :vartype zones: list[str] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype 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 = { @@ -9660,7 +12311,7 @@ class IaasVMRecoveryPointAutoGenerated(RecoveryPoint): '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]'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformationV2]'}, 'is_managed_virtual_machine': {'key': 'isManagedVirtualMachine', 'type': 'bool'}, 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, @@ -9674,13 +12325,53 @@ def __init__( self, **kwargs ): - super(IaasVMRecoveryPointAutoGenerated, self).__init__(**kwargs) + """ + :keyword recovery_point_type: Type of the backup copy. + :paramtype recovery_point_type: str + :keyword recovery_point_time: Time at which this backup copy was created. + :paramtype recovery_point_time: ~datetime.datetime + :keyword recovery_point_additional_info: Additional information associated with this backup + copy. + :paramtype recovery_point_additional_info: str + :keyword source_vm_storage_type: Storage type of the VM whose backup copy is created. + :paramtype source_vm_storage_type: str + :keyword is_source_vm_encrypted: Identifies whether the VM was encrypted when the backup copy + is created. + :paramtype is_source_vm_encrypted: bool + :keyword key_and_secret: Required details for recovering an encrypted VM. Applicable only when + IsSourceVMEncrypted is true. + :paramtype key_and_secret: ~azure.mgmt.recoveryservicesbackup.models.KeyAndSecretDetails + :keyword is_instant_ilr_session_active: Is the session to recover items from this backup copy + still active. + :paramtype is_instant_ilr_session_active: bool + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :keyword is_managed_virtual_machine: Whether VM is with Managed Disks. + :paramtype is_managed_virtual_machine: bool + :keyword virtual_machine_size: Virtual Machine Size. + :paramtype virtual_machine_size: str + :keyword original_storage_account_option: Original Storage Account Option. + :paramtype original_storage_account_option: bool + :keyword os_type: OS type. + :paramtype os_type: str + :keyword recovery_point_disk_configuration: Disk configuration. + :paramtype recovery_point_disk_configuration: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointDiskConfiguration + :keyword zones: Identifies the zone of the VM at the time of backup. Applicable only for + zone-pinned Vms. + :paramtype zones: list[str] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + """ + super(IaasVMRecoveryPoint, 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.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) @@ -9701,66 +12392,70 @@ class IaasVMRestoreRequest(RestoreRequest): 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 + :ivar 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", + :vartype object_type: str + :ivar recovery_point_id: ID of the backup copy to be recovered. + :vartype recovery_point_id: str + :ivar 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. + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM which is being recovered. + :vartype source_resource_id: str + :ivar 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 + :vartype target_virtual_machine_id: str + :ivar 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 + :vartype target_resource_group_id: str + :ivar 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 + :vartype storage_account_id: str + :ivar 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 + :vartype virtual_network_id: str + :ivar 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 + :vartype subnet_id: str + :ivar 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 + :vartype target_domain_name_id: str + :ivar region: Region in which the virtual machine is restored. + :vartype region: str + :ivar 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. + :vartype affinity_group: str + :ivar 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 + :vartype create_new_cloud_service: bool + :ivar original_storage_account_option: Original Storage Account Option. + :vartype original_storage_account_option: bool + :ivar encryption_details: Details needed if the VM was encrypted at the time of backup. + :vartype encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails + :ivar restore_disk_lun_list: List of Disk LUNs for partial restore. + :vartype restore_disk_lun_list: list[int] + :ivar 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 + :vartype restore_with_managed_disks: bool + :ivar 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 + :vartype disk_encryption_set_id: str + :ivar zones: Target zone where the VM and its disks should be restored. + :vartype zones: list[str] + :ivar identity_info: Managed Identity information required to access customer storage account. + :vartype identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo + :ivar identity_based_restore_details: IaaS VM workload specific restore details for restores + using managed identity. + :vartype identity_based_restore_details: + ~azure.mgmt.recoveryservicesbackup.models.IdentityBasedRestoreDetails """ _validation = { @@ -9788,6 +12483,7 @@ class IaasVMRestoreRequest(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 = { @@ -9798,6 +12494,70 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_point_id: ID of the backup copy to be recovered. + :paramtype recovery_point_id: str + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM which is being recovered. + :paramtype source_resource_id: str + :keyword 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}. + :paramtype target_virtual_machine_id: str + :keyword 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}. + :paramtype target_resource_group_id: str + :keyword storage_account_id: Fully qualified ARM ID of the storage account to which the VM has + to be restored. + :paramtype storage_account_id: str + :keyword 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. + :paramtype virtual_network_id: str + :keyword 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. + :paramtype subnet_id: str + :keyword 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. + :paramtype target_domain_name_id: str + :keyword region: Region in which the virtual machine is restored. + :paramtype region: str + :keyword affinity_group: Affinity group associated to VM to be restored. Used only for Classic + Compute Virtual Machines. + :paramtype affinity_group: str + :keyword 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. + :paramtype create_new_cloud_service: bool + :keyword original_storage_account_option: Original Storage Account Option. + :paramtype original_storage_account_option: bool + :keyword encryption_details: Details needed if the VM was encrypted at the time of backup. + :paramtype encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails + :keyword restore_disk_lun_list: List of Disk LUNs for partial restore. + :paramtype restore_disk_lun_list: list[int] + :keyword restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored + with Managed disks. + :paramtype restore_with_managed_disks: bool + :keyword disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be + encrypted at rest during restore with customer managed key. + :paramtype disk_encryption_set_id: str + :keyword zones: Target zone where the VM and its disks should be restored. + :paramtype zones: list[str] + :keyword identity_info: Managed Identity information required to access customer storage + account. + :paramtype identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo + :keyword identity_based_restore_details: IaaS VM workload specific restore details for restores + using managed identity. + :paramtype identity_based_restore_details: + ~azure.mgmt.recoveryservicesbackup.models.IdentityBasedRestoreDetails + """ super(IaasVMRestoreRequest, self).__init__(**kwargs) self.object_type = 'IaasVMRestoreRequest' # type: str self.recovery_point_id = kwargs.get('recovery_point_id', None) @@ -9819,132 +12579,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) - - -class IaasVMRestoreRequestAutoGenerated(RestoreRequest): - """IaaS VM workload-specific restore. - - 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 - :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 = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, - 'region': {'key': 'region', 'type': 'str'}, - 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, - 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, - 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, - 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, - 'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'}, - 'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'}, - 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'}, - 'identity_based_restore_details': {'key': 'identityBasedRestoreDetails', 'type': 'IdentityBasedRestoreDetails'}, - } - - def __init__( - self, - **kwargs - ): - super(IaasVMRestoreRequestAutoGenerated, 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) - 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.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) @@ -9953,68 +12587,72 @@ class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest): 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 + :ivar 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", + :vartype object_type: str + :ivar recovery_point_id: ID of the backup copy to be recovered. + :vartype recovery_point_id: str + :ivar 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. + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM which is being recovered. + :vartype source_resource_id: str + :ivar 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 + :vartype target_virtual_machine_id: str + :ivar 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 + :vartype target_resource_group_id: str + :ivar 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 + :vartype storage_account_id: str + :ivar 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 + :vartype virtual_network_id: str + :ivar 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 + :vartype subnet_id: str + :ivar 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 + :vartype target_domain_name_id: str + :ivar region: Region in which the virtual machine is restored. + :vartype region: str + :ivar 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. + :vartype affinity_group: str + :ivar 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 + :vartype create_new_cloud_service: bool + :ivar original_storage_account_option: Original Storage Account Option. + :vartype original_storage_account_option: bool + :ivar encryption_details: Details needed if the VM was encrypted at the time of backup. + :vartype encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails + :ivar restore_disk_lun_list: List of Disk LUNs for partial restore. + :vartype restore_disk_lun_list: list[int] + :ivar 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 + :vartype restore_with_managed_disks: bool + :ivar 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 - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: + :vartype disk_encryption_set_id: str + :ivar zones: Target zone where the VM and its disks should be restored. + :vartype zones: list[str] + :ivar identity_info: Managed Identity information required to access customer storage account. + :vartype identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo + :ivar identity_based_restore_details: IaaS VM workload specific restore details for restores + using managed identity. + :vartype identity_based_restore_details: + ~azure.mgmt.recoveryservicesbackup.models.IdentityBasedRestoreDetails + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo """ @@ -10043,6 +12681,7 @@ class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest): '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'}, 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, } @@ -10050,6 +12689,73 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_point_id: ID of the backup copy to be recovered. + :paramtype recovery_point_id: str + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM which is being recovered. + :paramtype source_resource_id: str + :keyword 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}. + :paramtype target_virtual_machine_id: str + :keyword 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}. + :paramtype target_resource_group_id: str + :keyword storage_account_id: Fully qualified ARM ID of the storage account to which the VM has + to be restored. + :paramtype storage_account_id: str + :keyword 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. + :paramtype virtual_network_id: str + :keyword 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. + :paramtype subnet_id: str + :keyword 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. + :paramtype target_domain_name_id: str + :keyword region: Region in which the virtual machine is restored. + :paramtype region: str + :keyword affinity_group: Affinity group associated to VM to be restored. Used only for Classic + Compute Virtual Machines. + :paramtype affinity_group: str + :keyword 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. + :paramtype create_new_cloud_service: bool + :keyword original_storage_account_option: Original Storage Account Option. + :paramtype original_storage_account_option: bool + :keyword encryption_details: Details needed if the VM was encrypted at the time of backup. + :paramtype encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails + :keyword restore_disk_lun_list: List of Disk LUNs for partial restore. + :paramtype restore_disk_lun_list: list[int] + :keyword restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored + with Managed disks. + :paramtype restore_with_managed_disks: bool + :keyword disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be + encrypted at rest during restore with customer managed key. + :paramtype disk_encryption_set_id: str + :keyword zones: Target zone where the VM and its disks should be restored. + :paramtype zones: list[str] + :keyword identity_info: Managed Identity information required to access customer storage + account. + :paramtype identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo + :keyword identity_based_restore_details: IaaS VM workload specific restore details for restores + using managed identity. + :paramtype identity_based_restore_details: + ~azure.mgmt.recoveryservicesbackup.models.IdentityBasedRestoreDetails + :keyword recovery_point_rehydration_info: RP Rehydration Info. + :paramtype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ super(IaasVMRestoreWithRehydrationRequest, self).__init__(**kwargs) self.object_type = 'IaasVMRestoreWithRehydrationRequest' # type: str self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) @@ -10058,10 +12764,10 @@ def __init__( 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 + :ivar object_type: Gets the class type. + :vartype object_type: str + :ivar target_storage_account_id: Fully qualified ARM ID of the target storage account. + :vartype target_storage_account_id: str """ _attribute_map = { @@ -10073,6 +12779,12 @@ def __init__( self, **kwargs ): + """ + :keyword object_type: Gets the class type. + :paramtype object_type: str + :keyword target_storage_account_id: Fully qualified ARM ID of the target storage account. + :paramtype target_storage_account_id: str + """ 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) @@ -10081,12 +12793,12 @@ def __init__( class IdentityInfo(msrest.serialization.Model): """Encapsulates Managed Identity related information. - :param is_system_assigned_identity: To differentiate if the managed identity is system assigned + :ivar is_system_assigned_identity: To differentiate if the managed identity is system assigned or user assigned. - :type is_system_assigned_identity: bool - :param managed_identity_resource_id: Managed Identity Resource Id + :vartype is_system_assigned_identity: bool + :ivar managed_identity_resource_id: Managed Identity Resource Id Optional: Might not be required in the case of system assigned managed identity. - :type managed_identity_resource_id: str + :vartype managed_identity_resource_id: str """ _attribute_map = { @@ -10098,6 +12810,14 @@ def __init__( self, **kwargs ): + """ + :keyword is_system_assigned_identity: To differentiate if the managed identity is system + assigned or user assigned. + :paramtype is_system_assigned_identity: bool + :keyword managed_identity_resource_id: Managed Identity Resource Id + Optional: Might not be required in the case of system assigned managed identity. + :paramtype managed_identity_resource_id: str + """ super(IdentityInfo, self).__init__(**kwargs) self.is_system_assigned_identity = kwargs.get('is_system_assigned_identity', None) self.managed_identity_resource_id = kwargs.get('managed_identity_resource_id', None) @@ -10115,14 +12835,14 @@ class ILRRequestResource(Resource): :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: ILRRequestResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ILRRequest + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ILRRequestResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ILRRequest """ _validation = { @@ -10145,6 +12865,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ILRRequestResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ILRRequest + """ super(ILRRequestResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -10152,14 +12882,15 @@ def __init__( class InquiryInfo(msrest.serialization.Model): """Details about inquired protectable items under a given container. - :param status: Inquiry Status for this container such as + :ivar status: Inquiry Status for this container such as InProgress | Failed | Succeeded. - :type status: str - :param error_detail: Error Details if the Status is non-success. - :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail - :param inquiry_details: Inquiry Details which will have workload specific details. + :vartype status: str + :ivar error_detail: Error Details if the Status is non-success. + :vartype error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :ivar inquiry_details: Inquiry Details which will have workload specific details. For e.g. - For SQL and oracle this will contain different details. - :type inquiry_details: list[~azure.mgmt.recoveryservicesbackup.models.WorkloadInquiryDetails] + :vartype inquiry_details: + list[~azure.mgmt.recoveryservicesbackup.models.WorkloadInquiryDetails] """ _attribute_map = { @@ -10172,6 +12903,17 @@ def __init__( self, **kwargs ): + """ + :keyword status: Inquiry Status for this container such as + InProgress | Failed | Succeeded. + :paramtype status: str + :keyword error_detail: Error Details if the Status is non-success. + :paramtype error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :keyword inquiry_details: Inquiry Details which will have workload specific details. + For e.g. - For SQL and oracle this will contain different details. + :paramtype inquiry_details: + list[~azure.mgmt.recoveryservicesbackup.models.WorkloadInquiryDetails] + """ super(InquiryInfo, self).__init__(**kwargs) self.status = kwargs.get('status', None) self.error_detail = kwargs.get('error_detail', None) @@ -10183,10 +12925,10 @@ class InquiryValidation(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param status: Status for the Inquiry Validation. - :type status: str - :param error_detail: Error Detail in case the status is non-success. - :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :ivar status: Status for the Inquiry Validation. + :vartype status: str + :ivar error_detail: Error Detail in case the status is non-success. + :vartype error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail :ivar additional_detail: Error Additional Detail in case the status is non-success. :vartype additional_detail: str """ @@ -10205,6 +12947,12 @@ def __init__( self, **kwargs ): + """ + :keyword status: Status for the Inquiry Validation. + :paramtype status: str + :keyword error_detail: Error Detail in case the status is non-success. + :paramtype error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + """ super(InquiryValidation, self).__init__(**kwargs) self.status = kwargs.get('status', None) self.error_detail = kwargs.get('error_detail', None) @@ -10214,8 +12962,8 @@ def __init__( class InstantItemRecoveryTarget(msrest.serialization.Model): """Target details for file / folder restore. - :param client_scripts: List of client scripts. - :type client_scripts: list[~azure.mgmt.recoveryservicesbackup.models.ClientScriptForConnect] + :ivar client_scripts: List of client scripts. + :vartype client_scripts: list[~azure.mgmt.recoveryservicesbackup.models.ClientScriptForConnect] """ _attribute_map = { @@ -10226,6 +12974,11 @@ def __init__( self, **kwargs ): + """ + :keyword client_scripts: List of client scripts. + :paramtype client_scripts: + list[~azure.mgmt.recoveryservicesbackup.models.ClientScriptForConnect] + """ super(InstantItemRecoveryTarget, self).__init__(**kwargs) self.client_scripts = kwargs.get('client_scripts', None) @@ -10233,10 +12986,10 @@ def __init__( class InstantRPAdditionalDetails(msrest.serialization.Model): """InstantRPAdditionalDetails. - :param azure_backup_rg_name_prefix: - :type azure_backup_rg_name_prefix: str - :param azure_backup_rg_name_suffix: - :type azure_backup_rg_name_suffix: str + :ivar azure_backup_rg_name_prefix: + :vartype azure_backup_rg_name_prefix: str + :ivar azure_backup_rg_name_suffix: + :vartype azure_backup_rg_name_suffix: str """ _attribute_map = { @@ -10248,6 +13001,12 @@ def __init__( self, **kwargs ): + """ + :keyword azure_backup_rg_name_prefix: + :paramtype azure_backup_rg_name_prefix: str + :keyword azure_backup_rg_name_suffix: + :paramtype azure_backup_rg_name_suffix: str + """ super(InstantRPAdditionalDetails, self).__init__(**kwargs) self.azure_backup_rg_name_prefix = kwargs.get('azure_backup_rg_name_prefix', None) self.azure_backup_rg_name_suffix = kwargs.get('azure_backup_rg_name_suffix', None) @@ -10256,24 +13015,24 @@ def __init__( class JobQueryObject(msrest.serialization.Model): """Filters to list the jobs. - :param status: Status of the job. Possible values include: "Invalid", "InProgress", - "Completed", "Failed", "CompletedWithWarnings", "Cancelled", "Cancelling". - :type status: str or ~azure.mgmt.recoveryservicesbackup.models.JobStatus - :param backup_management_type: Type of backup management for the job. Possible values include: + :ivar status: Status of the job. Possible values include: "Invalid", "InProgress", "Completed", + "Failed", "CompletedWithWarnings", "Cancelled", "Cancelling". + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.models.JobStatus + :ivar backup_management_type: Type of backup management for the job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: Type of operation. Possible values include: "Invalid", "Register", + :ivar operation: Type of operation. Possible values include: "Invalid", "Register", "UnRegister", "ConfigureBackup", "Backup", "Restore", "DisableBackup", "DeleteBackupData", "CrossRegionRestore", "Undelete", "UpdateCustomerManagedKey". - :type operation: str or ~azure.mgmt.recoveryservicesbackup.models.JobOperationType - :param job_id: JobID represents the job uniquely. - :type job_id: str - :param start_time: Job has started at this time. Value is in UTC. - :type start_time: ~datetime.datetime - :param end_time: Job has ended at this time. Value is in UTC. - :type end_time: ~datetime.datetime + :vartype operation: str or ~azure.mgmt.recoveryservicesbackup.models.JobOperationType + :ivar job_id: JobID represents the job uniquely. + :vartype job_id: str + :ivar start_time: Job has started at this time. Value is in UTC. + :vartype start_time: ~datetime.datetime + :ivar end_time: Job has ended at this time. Value is in UTC. + :vartype end_time: ~datetime.datetime """ _attribute_map = { @@ -10289,6 +13048,26 @@ def __init__( self, **kwargs ): + """ + :keyword status: Status of the job. Possible values include: "Invalid", "InProgress", + "Completed", "Failed", "CompletedWithWarnings", "Cancelled", "Cancelling". + :paramtype status: str or ~azure.mgmt.recoveryservicesbackup.models.JobStatus + :keyword backup_management_type: Type of backup management for the job. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: Type of operation. Possible values include: "Invalid", "Register", + "UnRegister", "ConfigureBackup", "Backup", "Restore", "DisableBackup", "DeleteBackupData", + "CrossRegionRestore", "Undelete", "UpdateCustomerManagedKey". + :paramtype operation: str or ~azure.mgmt.recoveryservicesbackup.models.JobOperationType + :keyword job_id: JobID represents the job uniquely. + :paramtype job_id: str + :keyword start_time: Job has started at this time. Value is in UTC. + :paramtype start_time: ~datetime.datetime + :keyword end_time: Job has ended at this time. Value is in UTC. + :paramtype end_time: ~datetime.datetime + """ super(JobQueryObject, self).__init__(**kwargs) self.status = kwargs.get('status', None) self.backup_management_type = kwargs.get('backup_management_type', None) @@ -10310,14 +13089,14 @@ class JobResource(Resource): :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: JobResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.Job + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: JobResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.Job """ _validation = { @@ -10340,6 +13119,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: JobResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.Job + """ super(JobResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -10347,11 +13136,11 @@ def __init__( class JobResourceList(ResourceList): """List of Job resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.JobResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.JobResource] """ _attribute_map = { @@ -10363,6 +13152,13 @@ def __init__( self, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.JobResource] + """ super(JobResourceList, self).__init__(**kwargs) self.value = kwargs.get('value', None) @@ -10370,12 +13166,12 @@ def __init__( class KEKDetails(msrest.serialization.Model): """KEK is encryption key for BEK. - :param key_url: Key is KEK. - :type key_url: str - :param key_vault_id: Key Vault ID where this Key is stored. - :type key_vault_id: str - :param key_backup_data: KEK data. - :type key_backup_data: str + :ivar key_url: Key is KEK. + :vartype key_url: str + :ivar key_vault_id: Key Vault ID where this Key is stored. + :vartype key_vault_id: str + :ivar key_backup_data: KEK data. + :vartype key_backup_data: str """ _attribute_map = { @@ -10388,6 +13184,14 @@ def __init__( self, **kwargs ): + """ + :keyword key_url: Key is KEK. + :paramtype key_url: str + :keyword key_vault_id: Key Vault ID where this Key is stored. + :paramtype key_vault_id: str + :keyword key_backup_data: KEK data. + :paramtype key_backup_data: str + """ super(KEKDetails, self).__init__(**kwargs) self.key_url = kwargs.get('key_url', None) self.key_vault_id = kwargs.get('key_vault_id', None) @@ -10405,12 +13209,12 @@ class KeyAndSecretDetails(msrest.serialization.Model): #. EncryptionMechanism BEK and KEK can potentially have different vault ids. - :param kek_details: KEK is encryption key for BEK. - :type kek_details: ~azure.mgmt.recoveryservicesbackup.models.KEKDetails - :param bek_details: BEK is bitlocker encryption key. - :type bek_details: ~azure.mgmt.recoveryservicesbackup.models.BEKDetails - :param encryption_mechanism: Encryption mechanism: None/ SinglePass/ DoublePass. - :type encryption_mechanism: str + :ivar kek_details: KEK is encryption key for BEK. + :vartype kek_details: ~azure.mgmt.recoveryservicesbackup.models.KEKDetails + :ivar bek_details: BEK is bitlocker encryption key. + :vartype bek_details: ~azure.mgmt.recoveryservicesbackup.models.BEKDetails + :ivar encryption_mechanism: Encryption mechanism: None/ SinglePass/ DoublePass. + :vartype encryption_mechanism: str """ _attribute_map = { @@ -10423,6 +13227,14 @@ def __init__( self, **kwargs ): + """ + :keyword kek_details: KEK is encryption key for BEK. + :paramtype kek_details: ~azure.mgmt.recoveryservicesbackup.models.KEKDetails + :keyword bek_details: BEK is bitlocker encryption key. + :paramtype bek_details: ~azure.mgmt.recoveryservicesbackup.models.BEKDetails + :keyword encryption_mechanism: Encryption mechanism: None/ SinglePass/ DoublePass. + :paramtype encryption_mechanism: str + """ super(KeyAndSecretDetails, self).__init__(**kwargs) self.kek_details = kwargs.get('kek_details', None) self.bek_details = kwargs.get('bek_details', None) @@ -10432,13 +13244,13 @@ def __init__( class KPIResourceHealthDetails(msrest.serialization.Model): """KPI Resource Health Details. - :param resource_health_status: Resource Health Status. Possible values include: "Healthy", + :ivar resource_health_status: Resource Health Status. Possible values include: "Healthy", "TransientDegraded", "PersistentDegraded", "TransientUnhealthy", "PersistentUnhealthy", "Invalid". - :type resource_health_status: str or + :vartype resource_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ResourceHealthStatus - :param resource_health_details: Resource Health Status. - :type resource_health_details: + :ivar resource_health_details: Resource Health Status. + :vartype resource_health_details: list[~azure.mgmt.recoveryservicesbackup.models.ResourceHealthDetails] """ @@ -10451,6 +13263,16 @@ def __init__( self, **kwargs ): + """ + :keyword resource_health_status: Resource Health Status. Possible values include: "Healthy", + "TransientDegraded", "PersistentDegraded", "TransientUnhealthy", "PersistentUnhealthy", + "Invalid". + :paramtype resource_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ResourceHealthStatus + :keyword resource_health_details: Resource Health Status. + :paramtype resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.models.ResourceHealthDetails] + """ super(KPIResourceHealthDetails, self).__init__(**kwargs) self.resource_health_status = kwargs.get('resource_health_status', None) self.resource_health_details = kwargs.get('resource_health_details', None) @@ -10459,10 +13281,10 @@ def __init__( class ListRecoveryPointsRecommendedForMoveRequest(msrest.serialization.Model): """ListRecoveryPointsRecommendedForMoveRequest Request. - :param object_type: Gets the class type. - :type object_type: str - :param excluded_rp_list: List of Recovery Points excluded from Move. - :type excluded_rp_list: list[str] + :ivar object_type: Gets the class type. + :vartype object_type: str + :ivar excluded_rp_list: List of Recovery Points excluded from Move. + :vartype excluded_rp_list: list[str] """ _attribute_map = { @@ -10474,6 +13296,12 @@ def __init__( self, **kwargs ): + """ + :keyword object_type: Gets the class type. + :paramtype object_type: str + :keyword excluded_rp_list: List of Recovery Points excluded from Move. + :paramtype excluded_rp_list: list[str] + """ super(ListRecoveryPointsRecommendedForMoveRequest, self).__init__(**kwargs) self.object_type = kwargs.get('object_type', None) self.excluded_rp_list = kwargs.get('excluded_rp_list', None) @@ -10487,9 +13315,9 @@ class SchedulePolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param schedule_policy_type: Required. This property will be used as the discriminator for + :ivar schedule_policy_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 schedule_policy_type: str + :vartype schedule_policy_type: str """ _validation = { @@ -10508,6 +13336,8 @@ def __init__( self, **kwargs ): + """ + """ super(SchedulePolicy, self).__init__(**kwargs) self.schedule_policy_type = None # type: Optional[str] @@ -10517,12 +13347,12 @@ class LogSchedulePolicy(SchedulePolicy): All required parameters must be populated in order to send to Azure. - :param schedule_policy_type: Required. This property will be used as the discriminator for + :ivar schedule_policy_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 schedule_policy_type: str - :param schedule_frequency_in_mins: Frequency of the log schedule operation of this policy in + :vartype schedule_policy_type: str + :ivar schedule_frequency_in_mins: Frequency of the log schedule operation of this policy in minutes. - :type schedule_frequency_in_mins: int + :vartype schedule_frequency_in_mins: int """ _validation = { @@ -10538,6 +13368,11 @@ def __init__( self, **kwargs ): + """ + :keyword schedule_frequency_in_mins: Frequency of the log schedule operation of this policy in + minutes. + :paramtype schedule_frequency_in_mins: int + """ super(LogSchedulePolicy, self).__init__(**kwargs) self.schedule_policy_type = 'LogSchedulePolicy' # type: str self.schedule_frequency_in_mins = kwargs.get('schedule_frequency_in_mins', None) @@ -10551,9 +13386,9 @@ class RetentionPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param retention_policy_type: Required. This property will be used as the discriminator for + :ivar retention_policy_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 retention_policy_type: str + :vartype retention_policy_type: str """ _validation = { @@ -10572,6 +13407,8 @@ def __init__( self, **kwargs ): + """ + """ super(RetentionPolicy, self).__init__(**kwargs) self.retention_policy_type = None # type: Optional[str] @@ -10581,17 +13418,17 @@ class LongTermRetentionPolicy(RetentionPolicy): All required parameters must be populated in order to send to Azure. - :param retention_policy_type: Required. This property will be used as the discriminator for + :ivar retention_policy_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 retention_policy_type: str - :param daily_schedule: Daily retention schedule of the protection policy. - :type daily_schedule: ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionSchedule - :param weekly_schedule: Weekly retention schedule of the protection policy. - :type weekly_schedule: ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionSchedule - :param monthly_schedule: Monthly retention schedule of the protection policy. - :type monthly_schedule: ~azure.mgmt.recoveryservicesbackup.models.MonthlyRetentionSchedule - :param yearly_schedule: Yearly retention schedule of the protection policy. - :type yearly_schedule: ~azure.mgmt.recoveryservicesbackup.models.YearlyRetentionSchedule + :vartype retention_policy_type: str + :ivar daily_schedule: Daily retention schedule of the protection policy. + :vartype daily_schedule: ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionSchedule + :ivar weekly_schedule: Weekly retention schedule of the protection policy. + :vartype weekly_schedule: ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionSchedule + :ivar monthly_schedule: Monthly retention schedule of the protection policy. + :vartype monthly_schedule: ~azure.mgmt.recoveryservicesbackup.models.MonthlyRetentionSchedule + :ivar yearly_schedule: Yearly retention schedule of the protection policy. + :vartype yearly_schedule: ~azure.mgmt.recoveryservicesbackup.models.YearlyRetentionSchedule """ _validation = { @@ -10610,6 +13447,16 @@ def __init__( self, **kwargs ): + """ + :keyword daily_schedule: Daily retention schedule of the protection policy. + :paramtype daily_schedule: ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionSchedule + :keyword weekly_schedule: Weekly retention schedule of the protection policy. + :paramtype weekly_schedule: ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionSchedule + :keyword monthly_schedule: Monthly retention schedule of the protection policy. + :paramtype monthly_schedule: ~azure.mgmt.recoveryservicesbackup.models.MonthlyRetentionSchedule + :keyword yearly_schedule: Yearly retention schedule of the protection policy. + :paramtype yearly_schedule: ~azure.mgmt.recoveryservicesbackup.models.YearlyRetentionSchedule + """ super(LongTermRetentionPolicy, self).__init__(**kwargs) self.retention_policy_type = 'LongTermRetentionPolicy' # type: str self.daily_schedule = kwargs.get('daily_schedule', None) @@ -10623,9 +13470,9 @@ class LongTermSchedulePolicy(SchedulePolicy): All required parameters must be populated in order to send to Azure. - :param schedule_policy_type: Required. This property will be used as the discriminator for + :ivar schedule_policy_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 schedule_policy_type: str + :vartype schedule_policy_type: str """ _validation = { @@ -10640,6 +13487,8 @@ def __init__( self, **kwargs ): + """ + """ super(LongTermSchedulePolicy, self).__init__(**kwargs) self.schedule_policy_type = 'LongTermSchedulePolicy' # type: str @@ -10649,44 +13498,46 @@ class MabContainer(ProtectionContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param can_re_register: Can the container be registered one more time. - :type can_re_register: bool - :param container_id: ContainerID represents the container. - :type container_id: long - :param protected_item_count: Number of items backed up in this container. - :type protected_item_count: long - :param agent_version: Agent version of this container. - :type agent_version: str - :param extended_info: Additional information for this container. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.MabContainerExtendedInfo - :param mab_container_health_details: Health details on this mab container. - :type mab_container_health_details: + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar can_re_register: Can the container be registered one more time. + :vartype can_re_register: bool + :ivar container_id: ContainerID represents the container. + :vartype container_id: long + :ivar protected_item_count: Number of items backed up in this container. + :vartype protected_item_count: long + :ivar agent_version: Agent version of this container. + :vartype agent_version: str + :ivar extended_info: Additional information for this container. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.MabContainerExtendedInfo + :ivar mab_container_health_details: Health details on this mab container. + :vartype mab_container_health_details: list[~azure.mgmt.recoveryservicesbackup.models.MABContainerHealthDetails] - :param container_health_state: Health state of mab container. - :type container_health_state: str + :ivar container_health_state: Health state of mab container. + :vartype container_health_state: str """ _validation = { @@ -10699,6 +13550,7 @@ class MabContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, 'container_id': {'key': 'containerId', 'type': 'long'}, 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, @@ -10712,6 +13564,38 @@ def __init__( self, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword can_re_register: Can the container be registered one more time. + :paramtype can_re_register: bool + :keyword container_id: ContainerID represents the container. + :paramtype container_id: long + :keyword protected_item_count: Number of items backed up in this container. + :paramtype protected_item_count: long + :keyword agent_version: Agent version of this container. + :paramtype agent_version: str + :keyword extended_info: Additional information for this container. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.MabContainerExtendedInfo + :keyword mab_container_health_details: Health details on this mab container. + :paramtype mab_container_health_details: + list[~azure.mgmt.recoveryservicesbackup.models.MABContainerHealthDetails] + :keyword container_health_state: Health state of mab container. + :paramtype container_health_state: str + """ super(MabContainer, self).__init__(**kwargs) self.container_type = 'Windows' # type: str self.can_re_register = kwargs.get('can_re_register', None) @@ -10726,19 +13610,19 @@ def __init__( class MabContainerExtendedInfo(msrest.serialization.Model): """Additional information of the container. - :param last_refreshed_at: Time stamp when this container was refreshed. - :type last_refreshed_at: ~datetime.datetime - :param backup_item_type: Type of backup items associated with this container. Possible values + :ivar last_refreshed_at: Time stamp when this container was refreshed. + :vartype last_refreshed_at: ~datetime.datetime + :ivar backup_item_type: Type of backup items associated with this container. Possible values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase". - :type backup_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupItemType - :param backup_items: List of backup items associated with this container. - :type backup_items: list[str] - :param policy_name: Backup policy associated with this container. - :type policy_name: str - :param last_backup_status: Latest backup status of this container. - :type last_backup_status: str + :vartype backup_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupItemType + :ivar backup_items: List of backup items associated with this container. + :vartype backup_items: list[str] + :ivar policy_name: Backup policy associated with this container. + :vartype policy_name: str + :ivar last_backup_status: Latest backup status of this container. + :vartype last_backup_status: str """ _attribute_map = { @@ -10753,6 +13637,21 @@ def __init__( self, **kwargs ): + """ + :keyword last_refreshed_at: Time stamp when this container was refreshed. + :paramtype last_refreshed_at: ~datetime.datetime + :keyword backup_item_type: Type of backup items associated with this container. Possible values + include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", + "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype backup_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupItemType + :keyword backup_items: List of backup items associated with this container. + :paramtype backup_items: list[str] + :keyword policy_name: Backup policy associated with this container. + :paramtype policy_name: str + :keyword last_backup_status: Latest backup status of this container. + :paramtype last_backup_status: str + """ super(MabContainerExtendedInfo, self).__init__(**kwargs) self.last_refreshed_at = kwargs.get('last_refreshed_at', None) self.backup_item_type = kwargs.get('backup_item_type', None) @@ -10764,14 +13663,14 @@ def __init__( class MABContainerHealthDetails(msrest.serialization.Model): """MAB workload-specific Health Details. - :param code: Health Code. - :type code: int - :param title: Health Title. - :type title: str - :param message: Health Message. - :type message: str - :param recommendations: Health Recommended Actions. - :type recommendations: list[str] + :ivar code: Health Code. + :vartype code: int + :ivar title: Health Title. + :vartype title: str + :ivar message: Health Message. + :vartype message: str + :ivar recommendations: Health Recommended Actions. + :vartype recommendations: list[str] """ _attribute_map = { @@ -10785,6 +13684,16 @@ def __init__( self, **kwargs ): + """ + :keyword code: Health Code. + :paramtype code: int + :keyword title: Health Title. + :paramtype title: str + :keyword message: Health Message. + :paramtype message: str + :keyword recommendations: Health Recommended Actions. + :paramtype recommendations: list[str] + """ super(MABContainerHealthDetails, self).__init__(**kwargs) self.code = kwargs.get('code', None) self.title = kwargs.get('title', None) @@ -10817,6 +13726,8 @@ def __init__( self, **kwargs ): + """ + """ super(MabErrorInfo, self).__init__(**kwargs) self.error_string = None self.recommendations = None @@ -10827,62 +13738,66 @@ class MabFileFolderProtectedItem(ProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 this backup item. - :type friendly_name: str - :param computer_name: Name of the computer associated with this backup item. - :type computer_name: str - :param last_backup_status: Status of last backup operation. - :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 protection_state: Protected, ProtectionStopped, IRPending or ProtectionError. - :type protection_state: str - :param deferred_delete_sync_time_in_utc: Sync time for deferred deletion in UTC. - :type deferred_delete_sync_time_in_utc: long - :param extended_info: Additional information with this backup item. - :type extended_info: + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of this backup item. + :vartype friendly_name: str + :ivar computer_name: Name of the computer associated with this backup item. + :vartype computer_name: str + :ivar last_backup_status: Status of last backup operation. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protection_state: Protected, ProtectionStopped, IRPending or ProtectionError. + :vartype protection_state: str + :ivar deferred_delete_sync_time_in_utc: Sync time for deferred deletion in UTC. + :vartype deferred_delete_sync_time_in_utc: long + :ivar extended_info: Additional information with this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.MabFileFolderProtectedItemExtendedInfo """ @@ -10906,6 +13821,8 @@ class MabFileFolderProtectedItem(ProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'computer_name': {'key': 'computerName', 'type': 'str'}, 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, @@ -10919,6 +13836,68 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of this backup item. + :paramtype friendly_name: str + :keyword computer_name: Name of the computer associated with this backup item. + :paramtype computer_name: str + :keyword last_backup_status: Status of last backup operation. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protection_state: Protected, ProtectionStopped, IRPending or ProtectionError. + :paramtype protection_state: str + :keyword deferred_delete_sync_time_in_utc: Sync time for deferred deletion in UTC. + :paramtype deferred_delete_sync_time_in_utc: long + :keyword extended_info: Additional information with this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.MabFileFolderProtectedItemExtendedInfo + """ super(MabFileFolderProtectedItem, self).__init__(**kwargs) self.protected_item_type = 'MabFileFolderProtectedItem' # type: str self.friendly_name = kwargs.get('friendly_name', None) @@ -10933,12 +13912,12 @@ def __init__( class MabFileFolderProtectedItemExtendedInfo(msrest.serialization.Model): """Additional information on the backed up item. - :param last_refreshed_at: Last time when the agent data synced to service. - :type last_refreshed_at: ~datetime.datetime - :param oldest_recovery_point: The oldest backup copy available. - :type oldest_recovery_point: ~datetime.datetime - :param recovery_point_count: Number of backup copies associated with the backup item. - :type recovery_point_count: int + :ivar last_refreshed_at: Last time when the agent data synced to service. + :vartype last_refreshed_at: ~datetime.datetime + :ivar oldest_recovery_point: The oldest backup copy available. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of backup copies associated with the backup item. + :vartype recovery_point_count: int """ _attribute_map = { @@ -10951,6 +13930,14 @@ def __init__( self, **kwargs ): + """ + :keyword last_refreshed_at: Last time when the agent data synced to service. + :paramtype last_refreshed_at: ~datetime.datetime + :keyword oldest_recovery_point: The oldest backup copy available. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of backup copies associated with the backup item. + :paramtype recovery_point_count: int + """ super(MabFileFolderProtectedItemExtendedInfo, self).__init__(**kwargs) self.last_refreshed_at = kwargs.get('last_refreshed_at', None) self.oldest_recovery_point = kwargs.get('oldest_recovery_point', None) @@ -10962,46 +13949,47 @@ class MabJob(Job): All required parameters must be populated in order to send to Azure. - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param activity_id: ActivityId of job. - :type activity_id: str - :param job_type: Required. This property will be used as the discriminator for deciding the + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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 job_type: str - :param duration: Time taken by job to run. - :type duration: ~datetime.timedelta - :param actions_info: The state/actions applicable on jobs like cancel/retry. - :type actions_info: list[str or ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] - :param mab_server_name: Name of server protecting the DS. - :type mab_server_name: str - :param mab_server_type: Server type of MAB container. Possible values include: "Invalid", + :vartype job_type: str + :ivar duration: Time taken by job to run. + :vartype duration: ~datetime.timedelta + :ivar actions_info: The state/actions applicable on jobs like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :ivar mab_server_name: Name of server protecting the DS. + :vartype mab_server_name: str + :ivar mab_server_type: Server type of MAB container. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type mab_server_type: str or ~azure.mgmt.recoveryservicesbackup.models.MabServerType - :param workload_type: Workload type of backup item. Possible values include: "Invalid", "VM", + :vartype mab_server_type: str or ~azure.mgmt.recoveryservicesbackup.models.MabServerType + :ivar workload_type: Workload type of backup item. 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.WorkloadType - :param error_details: The errors. - :type error_details: list[~azure.mgmt.recoveryservicesbackup.models.MabErrorInfo] - :param extended_info: Additional information on the job. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.MabJobExtendedInfo + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar error_details: The errors. + :vartype error_details: list[~azure.mgmt.recoveryservicesbackup.models.MabErrorInfo] + :ivar extended_info: Additional information on the job. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.MabJobExtendedInfo """ _validation = { @@ -11030,6 +14018,47 @@ def __init__( self, **kwargs ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time taken by job to run. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: The state/actions applicable on jobs like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :keyword mab_server_name: Name of server protecting the DS. + :paramtype mab_server_name: str + :keyword mab_server_type: Server type of MAB container. Possible values include: "Invalid", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :paramtype mab_server_type: str or ~azure.mgmt.recoveryservicesbackup.models.MabServerType + :keyword workload_type: Workload type of backup item. Possible values include: "Invalid", "VM", + "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", + "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", + "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword error_details: The errors. + :paramtype error_details: list[~azure.mgmt.recoveryservicesbackup.models.MabErrorInfo] + :keyword extended_info: Additional information on the job. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.MabJobExtendedInfo + """ super(MabJob, self).__init__(**kwargs) self.job_type = 'MabJob' # type: str self.duration = kwargs.get('duration', None) @@ -11044,12 +14073,12 @@ def __init__( class MabJobExtendedInfo(msrest.serialization.Model): """Additional information for the MAB workload-specific job. - :param tasks_list: List of tasks for this job. - :type tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.MabJobTaskDetails] - :param property_bag: The job properties. - :type property_bag: dict[str, str] - :param dynamic_error_message: Non localized error message specific to this job. - :type dynamic_error_message: str + :ivar tasks_list: List of tasks for this job. + :vartype tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.MabJobTaskDetails] + :ivar property_bag: The job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message specific to this job. + :vartype dynamic_error_message: str """ _attribute_map = { @@ -11062,6 +14091,14 @@ def __init__( self, **kwargs ): + """ + :keyword tasks_list: List of tasks for this job. + :paramtype tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.MabJobTaskDetails] + :keyword property_bag: The job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message specific to this job. + :paramtype dynamic_error_message: str + """ super(MabJobExtendedInfo, self).__init__(**kwargs) self.tasks_list = kwargs.get('tasks_list', None) self.property_bag = kwargs.get('property_bag', None) @@ -11071,16 +14108,16 @@ def __init__( class MabJobTaskDetails(msrest.serialization.Model): """MAB workload-specific job task details. - :param task_id: The task display name. - :type task_id: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param duration: Time elapsed for task. - :type duration: ~datetime.timedelta - :param status: The status. - :type status: str + :ivar task_id: The task display name. + :vartype task_id: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar duration: Time elapsed for task. + :vartype duration: ~datetime.timedelta + :ivar status: The status. + :vartype status: str """ _attribute_map = { @@ -11095,6 +14132,18 @@ def __init__( self, **kwargs ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword duration: Time elapsed for task. + :paramtype duration: ~datetime.timedelta + :keyword status: The status. + :paramtype status: str + """ super(MabJobTaskDetails, self).__init__(**kwargs) self.task_id = kwargs.get('task_id', None) self.start_time = kwargs.get('start_time', None) @@ -11108,17 +14157,17 @@ class MabProtectionPolicy(ProtectionPolicy): All required parameters must be populated in order to send to Azure. - :param protected_items_count: Number of items associated with this policy. - :type protected_items_count: int - :param backup_management_type: Required. This property will be used as the discriminator for + :ivar protected_items_count: Number of items associated with this policy. + :vartype protected_items_count: int + :ivar backup_management_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 backup_management_type: str - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] - :param schedule_policy: Backup schedule of backup policy. - :type schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy - :param retention_policy: Retention policy details. - :type retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + :ivar schedule_policy: Backup schedule of backup policy. + :vartype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :ivar retention_policy: Retention policy details. + :vartype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy """ _validation = { @@ -11137,6 +14186,16 @@ def __init__( self, **kwargs ): + """ + :keyword protected_items_count: Number of items associated with this policy. + :paramtype protected_items_count: int + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + :keyword schedule_policy: Backup schedule of backup policy. + :paramtype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :keyword retention_policy: Retention policy details. + :paramtype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + """ super(MabProtectionPolicy, self).__init__(**kwargs) self.backup_management_type = 'MAB' # type: str self.schedule_policy = kwargs.get('schedule_policy', None) @@ -11146,19 +14205,20 @@ def __init__( class MonthlyRetentionSchedule(msrest.serialization.Model): """Monthly retention schedule. - :param retention_schedule_format_type: Retention schedule format type for monthly retention + :ivar retention_schedule_format_type: Retention schedule format type for monthly retention policy. Possible values include: "Invalid", "Daily", "Weekly". - :type retention_schedule_format_type: str or + :vartype retention_schedule_format_type: str or ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat - :param retention_schedule_daily: Daily retention format for monthly retention policy. - :type retention_schedule_daily: ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat - :param retention_schedule_weekly: Weekly retention format for monthly retention policy. - :type retention_schedule_weekly: + :ivar retention_schedule_daily: Daily retention format for monthly retention policy. + :vartype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat + :ivar retention_schedule_weekly: Weekly retention format for monthly retention policy. + :vartype retention_schedule_weekly: ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat - :param retention_times: Retention times of retention policy. - :type retention_times: list[~datetime.datetime] - :param retention_duration: Retention duration of retention Policy. - :type retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + :ivar retention_times: Retention times of retention policy. + :vartype retention_times: list[~datetime.datetime] + :ivar retention_duration: Retention duration of retention Policy. + :vartype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -11173,6 +14233,22 @@ def __init__( self, **kwargs ): + """ + :keyword retention_schedule_format_type: Retention schedule format type for monthly retention + policy. Possible values include: "Invalid", "Daily", "Weekly". + :paramtype retention_schedule_format_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat + :keyword retention_schedule_daily: Daily retention format for monthly retention policy. + :paramtype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat + :keyword retention_schedule_weekly: Weekly retention format for monthly retention policy. + :paramtype retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat + :keyword retention_times: Retention times of retention policy. + :paramtype retention_times: list[~datetime.datetime] + :keyword retention_duration: Retention duration of retention Policy. + :paramtype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ super(MonthlyRetentionSchedule, self).__init__(**kwargs) self.retention_schedule_format_type = kwargs.get('retention_schedule_format_type', None) self.retention_schedule_daily = kwargs.get('retention_schedule_daily', None) @@ -11184,14 +14260,16 @@ def __init__( class MoveRPAcrossTiersRequest(msrest.serialization.Model): """MoveRPAcrossTiersRequest. - :param object_type: Gets the class type. - :type object_type: str - :param source_tier_type: Source tier from where RP needs to be moved. Possible values include: + :ivar object_type: Gets the class type. + :vartype object_type: str + :ivar source_tier_type: Source tier from where RP needs to be moved. Possible values include: "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". - :type source_tier_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType - :param target_tier_type: Target tier where RP needs to be moved. Possible values include: + :vartype source_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :ivar target_tier_type: Target tier where RP needs to be moved. Possible values include: "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". - :type target_tier_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :vartype target_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType """ _attribute_map = { @@ -11204,6 +14282,18 @@ def __init__( self, **kwargs ): + """ + :keyword object_type: Gets the class type. + :paramtype object_type: str + :keyword source_tier_type: Source tier from where RP needs to be moved. Possible values + include: "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". + :paramtype source_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :keyword target_tier_type: Target tier where RP needs to be moved. Possible values include: + "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". + :paramtype target_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + """ super(MoveRPAcrossTiersRequest, self).__init__(**kwargs) self.object_type = kwargs.get('object_type', None) self.source_tier_type = kwargs.get('source_tier_type', None) @@ -11213,10 +14303,10 @@ def __init__( class NameInfo(msrest.serialization.Model): """The name of usage. - :param value: Value of usage. - :type value: str - :param localized_value: Localized value of usage. - :type localized_value: str + :ivar value: Value of usage. + :vartype value: str + :ivar localized_value: Localized value of usage. + :vartype localized_value: str """ _attribute_map = { @@ -11228,6 +14318,12 @@ def __init__( self, **kwargs ): + """ + :keyword value: Value of usage. + :paramtype value: str + :keyword localized_value: Localized value of usage. + :paramtype localized_value: str + """ super(NameInfo, self).__init__(**kwargs) self.value = kwargs.get('value', None) self.localized_value = kwargs.get('localized_value', None) @@ -11236,8 +14332,8 @@ def __init__( class NewErrorResponse(msrest.serialization.Model): """The resource management error response. - :param error: The error object. - :type error: ~azure.mgmt.recoveryservicesbackup.models.NewErrorResponseError + :ivar error: The error object. + :vartype error: ~azure.mgmt.recoveryservicesbackup.models.NewErrorResponseError """ _attribute_map = { @@ -11248,29 +14344,14 @@ def __init__( self, **kwargs ): + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.recoveryservicesbackup.models.NewErrorResponseError + """ super(NewErrorResponse, self).__init__(**kwargs) 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. @@ -11308,6 +14389,8 @@ def __init__( self, **kwargs ): + """ + """ super(NewErrorResponseError, self).__init__(**kwargs) self.code = None self.message = None @@ -11316,61 +14399,16 @@ 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. 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 + :ivar 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 job_list: List of jobs created by this operation. - :type job_list: list[str] + :vartype object_type: str + :ivar job_list: List of jobs created by this operation. + :vartype job_list: list[str] """ _validation = { @@ -11386,6 +14424,10 @@ def __init__( self, **kwargs ): + """ + :keyword job_list: List of jobs created by this operation. + :paramtype job_list: list[str] + """ super(OperationResultInfo, self).__init__(**kwargs) self.object_type = 'OperationResultInfo' # type: str self.job_list = kwargs.get('job_list', None) @@ -11394,7 +14436,7 @@ def __init__( class OperationWorkerResponse(msrest.serialization.Model): """This is the base class for operation result responses. - :param status_code: HTTP Status Code of the operation. Possible values include: "Continue", + :ivar status_code: HTTP Status Code of the operation. Possible values include: "Continue", "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", @@ -11405,9 +14447,9 @@ class OperationWorkerResponse(msrest.serialization.Model): "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", "HttpVersionNotSupported". - :type status_code: str or ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode - :param headers: HTTP headers associated with this operation. - :type headers: dict[str, list[str]] + :vartype status_code: str or ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode + :ivar headers: HTTP headers associated with this operation. + :vartype headers: dict[str, list[str]] """ _attribute_map = { @@ -11419,6 +14461,22 @@ def __init__( self, **kwargs ): + """ + :keyword status_code: HTTP Status Code of the operation. Possible values include: "Continue", + "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", + "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", + "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", + "TemporaryRedirect", "RedirectKeepVerb", "BadRequest", "Unauthorized", "PaymentRequired", + "Forbidden", "NotFound", "MethodNotAllowed", "NotAcceptable", "ProxyAuthenticationRequired", + "RequestTimeout", "Conflict", "Gone", "LengthRequired", "PreconditionFailed", + "RequestEntityTooLarge", "RequestUriTooLong", "UnsupportedMediaType", + "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", + "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", + "HttpVersionNotSupported". + :paramtype status_code: str or ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode + :keyword headers: HTTP headers associated with this operation. + :paramtype headers: dict[str, list[str]] + """ super(OperationWorkerResponse, self).__init__(**kwargs) self.status_code = kwargs.get('status_code', None) self.headers = kwargs.get('headers', None) @@ -11427,7 +14485,7 @@ def __init__( class OperationResultInfoBaseResource(OperationWorkerResponse): """Base class for operation result info. - :param status_code: HTTP Status Code of the operation. Possible values include: "Continue", + :ivar status_code: HTTP Status Code of the operation. Possible values include: "Continue", "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", @@ -11438,11 +14496,11 @@ class OperationResultInfoBaseResource(OperationWorkerResponse): "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", "HttpVersionNotSupported". - :type status_code: str or ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode - :param headers: HTTP headers associated with this operation. - :type headers: dict[str, list[str]] - :param operation: OperationResultInfoBaseResource operation. - :type operation: ~azure.mgmt.recoveryservicesbackup.models.OperationResultInfoBase + :vartype status_code: str or ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode + :ivar headers: HTTP headers associated with this operation. + :vartype headers: dict[str, list[str]] + :ivar operation: OperationResultInfoBaseResource operation. + :vartype operation: ~azure.mgmt.recoveryservicesbackup.models.OperationResultInfoBase """ _attribute_map = { @@ -11455,6 +14513,24 @@ def __init__( self, **kwargs ): + """ + :keyword status_code: HTTP Status Code of the operation. Possible values include: "Continue", + "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", + "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", + "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", + "TemporaryRedirect", "RedirectKeepVerb", "BadRequest", "Unauthorized", "PaymentRequired", + "Forbidden", "NotFound", "MethodNotAllowed", "NotAcceptable", "ProxyAuthenticationRequired", + "RequestTimeout", "Conflict", "Gone", "LengthRequired", "PreconditionFailed", + "RequestEntityTooLarge", "RequestUriTooLong", "UnsupportedMediaType", + "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", + "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", + "HttpVersionNotSupported". + :paramtype status_code: str or ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode + :keyword headers: HTTP headers associated with this operation. + :paramtype headers: dict[str, list[str]] + :keyword operation: OperationResultInfoBaseResource operation. + :paramtype operation: ~azure.mgmt.recoveryservicesbackup.models.OperationResultInfoBase + """ super(OperationResultInfoBaseResource, self).__init__(**kwargs) self.operation = kwargs.get('operation', None) @@ -11462,21 +14538,21 @@ def __init__( class OperationStatus(msrest.serialization.Model): """Operation status. - :param id: ID of the operation. - :type id: str - :param name: Name of the operation. - :type name: str - :param status: Operation status. Possible values include: "Invalid", "InProgress", "Succeeded", + :ivar id: ID of the operation. + :vartype id: str + :ivar name: Name of the operation. + :vartype name: str + :ivar status: Operation status. Possible values include: "Invalid", "InProgress", "Succeeded", "Failed", "Canceled". - :type status: str or ~azure.mgmt.recoveryservicesbackup.models.OperationStatusValues - :param start_time: Operation start time. Format: ISO-8601. - :type start_time: ~datetime.datetime - :param end_time: Operation end time. Format: ISO-8601. - :type end_time: ~datetime.datetime - :param error: Error information related to this operation. - :type error: ~azure.mgmt.recoveryservicesbackup.models.OperationStatusError - :param properties: Additional information associated with this operation. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.OperationStatusExtendedInfo + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.models.OperationStatusValues + :ivar start_time: Operation start time. Format: ISO-8601. + :vartype start_time: ~datetime.datetime + :ivar end_time: Operation end time. Format: ISO-8601. + :vartype end_time: ~datetime.datetime + :ivar error: Error information related to this operation. + :vartype error: ~azure.mgmt.recoveryservicesbackup.models.OperationStatusError + :ivar properties: Additional information associated with this operation. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.OperationStatusExtendedInfo """ _attribute_map = { @@ -11493,6 +14569,23 @@ def __init__( self, **kwargs ): + """ + :keyword id: ID of the operation. + :paramtype id: str + :keyword name: Name of the operation. + :paramtype name: str + :keyword status: Operation status. Possible values include: "Invalid", "InProgress", + "Succeeded", "Failed", "Canceled". + :paramtype status: str or ~azure.mgmt.recoveryservicesbackup.models.OperationStatusValues + :keyword start_time: Operation start time. Format: ISO-8601. + :paramtype start_time: ~datetime.datetime + :keyword end_time: Operation end time. Format: ISO-8601. + :paramtype end_time: ~datetime.datetime + :keyword error: Error information related to this operation. + :paramtype error: ~azure.mgmt.recoveryservicesbackup.models.OperationStatusError + :keyword properties: Additional information associated with this operation. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.OperationStatusExtendedInfo + """ super(OperationStatus, self).__init__(**kwargs) self.id = kwargs.get('id', None) self.name = kwargs.get('name', None) @@ -11506,10 +14599,10 @@ def __init__( class OperationStatusError(msrest.serialization.Model): """Error information associated with operation status call. - :param code: Error code of the operation failure. - :type code: str - :param message: Error message displayed if the operation failure. - :type message: str + :ivar code: Error code of the operation failure. + :vartype code: str + :ivar message: Error message displayed if the operation failure. + :vartype message: str """ _attribute_map = { @@ -11521,6 +14614,12 @@ def __init__( self, **kwargs ): + """ + :keyword code: Error code of the operation failure. + :paramtype code: str + :keyword message: Error message displayed if the operation failure. + :paramtype message: str + """ super(OperationStatusError, self).__init__(**kwargs) self.code = kwargs.get('code', None) self.message = kwargs.get('message', None) @@ -11530,13 +14629,13 @@ 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, OperationStatusValidateOperationExtendedInfo. 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 + :ivar 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 + :vartype object_type: str """ _validation = { @@ -11548,13 +14647,15 @@ 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', 'OperationStatusValidateOperationExtendedInfo': 'OperationStatusValidateOperationExtendedInfo'} } def __init__( self, **kwargs ): + """ + """ super(OperationStatusExtendedInfo, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -11564,11 +14665,11 @@ class OperationStatusJobExtendedInfo(OperationStatusExtendedInfo): 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 + :ivar 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 job_id: ID of the job created for this protected item. - :type job_id: str + :vartype object_type: str + :ivar job_id: ID of the job created for this protected item. + :vartype job_id: str """ _validation = { @@ -11584,6 +14685,10 @@ def __init__( self, **kwargs ): + """ + :keyword job_id: ID of the job created for this protected item. + :paramtype job_id: str + """ super(OperationStatusJobExtendedInfo, self).__init__(**kwargs) self.object_type = 'OperationStatusJobExtendedInfo' # type: str self.job_id = kwargs.get('job_id', None) @@ -11594,13 +14699,13 @@ class OperationStatusJobsExtendedInfo(OperationStatusExtendedInfo): 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 + :ivar 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 job_ids: IDs of the jobs created for the protected item. - :type job_ids: list[str] - :param failed_jobs_error: Stores all the failed jobs along with the corresponding error codes. - :type failed_jobs_error: dict[str, str] + :vartype object_type: str + :ivar job_ids: IDs of the jobs created for the protected item. + :vartype job_ids: list[str] + :ivar failed_jobs_error: Stores all the failed jobs along with the corresponding error codes. + :vartype failed_jobs_error: dict[str, str] """ _validation = { @@ -11617,6 +14722,13 @@ def __init__( self, **kwargs ): + """ + :keyword job_ids: IDs of the jobs created for the protected item. + :paramtype job_ids: list[str] + :keyword failed_jobs_error: Stores all the failed jobs along with the corresponding error + codes. + :paramtype failed_jobs_error: dict[str, str] + """ super(OperationStatusJobsExtendedInfo, self).__init__(**kwargs) self.object_type = 'OperationStatusJobsExtendedInfo' # type: str self.job_ids = kwargs.get('job_ids', None) @@ -11628,11 +14740,11 @@ class OperationStatusProvisionILRExtendedInfo(OperationStatusExtendedInfo): 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 + :ivar 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_target: Target details for file / folder restore. - :type recovery_target: ~azure.mgmt.recoveryservicesbackup.models.InstantItemRecoveryTarget + :vartype object_type: str + :ivar recovery_target: Target details for file / folder restore. + :vartype recovery_target: ~azure.mgmt.recoveryservicesbackup.models.InstantItemRecoveryTarget """ _validation = { @@ -11648,24 +14760,26 @@ def __init__( self, **kwargs ): + """ + :keyword recovery_target: Target details for file / folder restore. + :paramtype recovery_target: ~azure.mgmt.recoveryservicesbackup.models.InstantItemRecoveryTarget + """ super(OperationStatusProvisionILRExtendedInfo, self).__init__(**kwargs) self.object_type = 'OperationStatusProvisionILRExtendedInfo' # type: str self.recovery_target = kwargs.get('recovery_target', None) -class OperationStatusRecoveryPointExtendedInfo(OperationStatusExtendedInfo): - """Operation status extended info for Updated Recovery Point. +class OperationStatusValidateOperationExtendedInfo(OperationStatusExtendedInfo): + """Operation status extended info for ValidateOperation action. 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 + :ivar 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 + :vartype object_type: str + :ivar validate_operation_response: Gets the validation operation response. + :vartype validate_operation_response: + ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationResponse """ _validation = { @@ -11674,27 +14788,30 @@ class OperationStatusRecoveryPointExtendedInfo(OperationStatusExtendedInfo): _attribute_map = { 'object_type': {'key': 'objectType', 'type': 'str'}, - 'updated_recovery_point': {'key': 'updatedRecoveryPoint', 'type': 'RecoveryPoint'}, - 'deleted_backup_item_version': {'key': 'deletedBackupItemVersion', 'type': 'str'}, + 'validate_operation_response': {'key': 'validateOperationResponse', 'type': 'ValidateOperationResponse'}, } 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) + """ + :keyword validate_operation_response: Gets the validation operation response. + :paramtype validate_operation_response: + ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationResponse + """ + super(OperationStatusValidateOperationExtendedInfo, self).__init__(**kwargs) + self.object_type = 'OperationStatusValidateOperationExtendedInfo' # type: str + self.validate_operation_response = kwargs.get('validate_operation_response', None) class PointInTimeRange(msrest.serialization.Model): """Provides details for log ranges. - :param start_time: Start time of the time range for log recovery. - :type start_time: ~datetime.datetime - :param end_time: End time of the time range for log recovery. - :type end_time: ~datetime.datetime + :ivar start_time: Start time of the time range for log recovery. + :vartype start_time: ~datetime.datetime + :ivar end_time: End time of the time range for log recovery. + :vartype end_time: ~datetime.datetime """ _attribute_map = { @@ -11706,6 +14823,12 @@ def __init__( self, **kwargs ): + """ + :keyword start_time: Start time of the time range for log recovery. + :paramtype start_time: ~datetime.datetime + :keyword end_time: End time of the time range for log recovery. + :paramtype end_time: ~datetime.datetime + """ super(PointInTimeRange, self).__init__(**kwargs) self.start_time = kwargs.get('start_time', None) self.end_time = kwargs.get('end_time', None) @@ -11714,13 +14837,13 @@ def __init__( class PreBackupValidation(msrest.serialization.Model): """Pre-backup validation for Azure VM Workload provider. - :param status: Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values + :ivar status: Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values include: "Invalid", "Success", "Failed". - :type status: str or ~azure.mgmt.recoveryservicesbackup.models.InquiryStatus - :param code: Error code of protectable item. - :type code: str - :param message: Message corresponding to the error code for the protectable item. - :type message: str + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.models.InquiryStatus + :ivar code: Error code of protectable item. + :vartype code: str + :ivar message: Message corresponding to the error code for the protectable item. + :vartype message: str """ _attribute_map = { @@ -11733,6 +14856,15 @@ def __init__( self, **kwargs ): + """ + :keyword status: Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values + include: "Invalid", "Success", "Failed". + :paramtype status: str or ~azure.mgmt.recoveryservicesbackup.models.InquiryStatus + :keyword code: Error code of protectable item. + :paramtype code: str + :keyword message: Message corresponding to the error code for the protectable item. + :paramtype message: str + """ super(PreBackupValidation, self).__init__(**kwargs) self.status = kwargs.get('status', None) self.code = kwargs.get('code', None) @@ -11744,18 +14876,18 @@ class PrepareDataMoveRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param target_resource_id: Required. ARM Id of target vault. - :type target_resource_id: str - :param target_region: Required. Target Region. - :type target_region: str - :param data_move_level: Required. DataMove Level. Possible values include: "Invalid", "Vault", + :ivar target_resource_id: Required. ARM Id of target vault. + :vartype target_resource_id: str + :ivar target_region: Required. Target Region. + :vartype target_region: str + :ivar data_move_level: Required. DataMove Level. Possible values include: "Invalid", "Vault", "Container". - :type data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel - :param source_container_arm_ids: Source Container ArmIds + :vartype data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel + :ivar source_container_arm_ids: Source Container ArmIds This needs to be populated only if DataMoveLevel is set to container. - :type source_container_arm_ids: list[str] - :param ignore_moved: Ignore the artifacts which are already moved. - :type ignore_moved: bool + :vartype source_container_arm_ids: list[str] + :ivar ignore_moved: Ignore the artifacts which are already moved. + :vartype ignore_moved: bool """ _validation = { @@ -11776,6 +14908,20 @@ def __init__( self, **kwargs ): + """ + :keyword target_resource_id: Required. ARM Id of target vault. + :paramtype target_resource_id: str + :keyword target_region: Required. Target Region. + :paramtype target_region: str + :keyword data_move_level: Required. DataMove Level. Possible values include: "Invalid", + "Vault", "Container". + :paramtype data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel + :keyword source_container_arm_ids: Source Container ArmIds + This needs to be populated only if DataMoveLevel is set to container. + :paramtype source_container_arm_ids: list[str] + :keyword ignore_moved: Ignore the artifacts which are already moved. + :paramtype ignore_moved: bool + """ super(PrepareDataMoveRequest, self).__init__(**kwargs) self.target_resource_id = kwargs['target_resource_id'] self.target_region = kwargs['target_region'] @@ -11792,9 +14938,9 @@ class VaultStorageConfigOperationResultResponse(msrest.serialization.Model): 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 + :ivar 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 + :vartype object_type: str """ _validation = { @@ -11813,6 +14959,8 @@ def __init__( self, **kwargs ): + """ + """ super(VaultStorageConfigOperationResultResponse, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -11822,13 +14970,13 @@ class PrepareDataMoveResponse(VaultStorageConfigOperationResultResponse): 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 + :ivar 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 correlation_id: Co-relationId for move operation. - :type correlation_id: str - :param source_vault_properties: Source Vault Properties. - :type source_vault_properties: dict[str, str] + :vartype object_type: str + :ivar correlation_id: Co-relationId for move operation. + :vartype correlation_id: str + :ivar source_vault_properties: Source Vault Properties. + :vartype source_vault_properties: dict[str, str] """ _validation = { @@ -11845,6 +14993,12 @@ def __init__( self, **kwargs ): + """ + :keyword correlation_id: Co-relationId for move operation. + :paramtype correlation_id: str + :keyword source_vault_properties: Source Vault Properties. + :paramtype source_vault_properties: dict[str, str] + """ super(PrepareDataMoveResponse, self).__init__(**kwargs) self.object_type = 'PrepareDataMoveResponse' # type: str self.correlation_id = kwargs.get('correlation_id', None) @@ -11860,17 +15014,17 @@ class PreValidateEnableBackupRequest(msrest.serialization.Model): #. VM is already protected #. Any VM related configuration passed in properties. - :param resource_type: ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. Possible values + :ivar resource_type: ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. Possible values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase". - :type resource_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType - :param resource_id: ARM Virtual Machine Id. - :type resource_id: str - :param vault_id: ARM id of the Recovery Services Vault. - :type vault_id: str - :param properties: Configuration of VM if any needs to be validated like OS type etc. - :type properties: str + :vartype resource_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar resource_id: ARM Virtual Machine Id. + :vartype resource_id: str + :ivar vault_id: ARM id of the Recovery Services Vault. + :vartype vault_id: str + :ivar properties: Configuration of VM if any needs to be validated like OS type etc. + :vartype properties: str """ _attribute_map = { @@ -11884,6 +15038,19 @@ def __init__( self, **kwargs ): + """ + :keyword resource_type: ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. Possible + values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", + "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype resource_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword resource_id: ARM Virtual Machine Id. + :paramtype resource_id: str + :keyword vault_id: ARM id of the Recovery Services Vault. + :paramtype vault_id: str + :keyword properties: Configuration of VM if any needs to be validated like OS type etc. + :paramtype properties: str + """ super(PreValidateEnableBackupRequest, self).__init__(**kwargs) self.resource_type = kwargs.get('resource_type', None) self.resource_id = kwargs.get('resource_id', None) @@ -11894,21 +15061,21 @@ def __init__( class PreValidateEnableBackupResponse(msrest.serialization.Model): """Response contract for enable backup validation request. - :param status: Validation Status. Possible values include: "Invalid", "Succeeded", "Failed". - :type status: str or ~azure.mgmt.recoveryservicesbackup.models.ValidationStatus - :param error_code: Response error code. - :type error_code: str - :param error_message: Response error message. - :type error_message: str - :param recommendation: Recommended action for user. - :type recommendation: str - :param container_name: Specifies the product specific container name. E.g. + :ivar status: Validation Status. Possible values include: "Invalid", "Succeeded", "Failed". + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.models.ValidationStatus + :ivar error_code: Response error code. + :vartype error_code: str + :ivar error_message: Response error message. + :vartype error_message: str + :ivar recommendation: Recommended action for user. + :vartype recommendation: str + :ivar container_name: Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required for portal. - :type container_name: str - :param protected_item_name: Specifies the product specific ds name. E.g. + :vartype container_name: str + :ivar protected_item_name: Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal. - :type protected_item_name: str + :vartype protected_item_name: str """ _attribute_map = { @@ -11924,6 +15091,23 @@ def __init__( self, **kwargs ): + """ + :keyword status: Validation Status. Possible values include: "Invalid", "Succeeded", "Failed". + :paramtype status: str or ~azure.mgmt.recoveryservicesbackup.models.ValidationStatus + :keyword error_code: Response error code. + :paramtype error_code: str + :keyword error_message: Response error message. + :paramtype error_message: str + :keyword recommendation: Recommended action for user. + :paramtype recommendation: str + :keyword container_name: Specifies the product specific container name. E.g. + iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required + for portal. + :paramtype container_name: str + :keyword protected_item_name: Specifies the product specific ds name. E.g. + vm;iaasvmcontainer;rgname;vmname. This is required for portal. + :paramtype protected_item_name: str + """ super(PreValidateEnableBackupResponse, self).__init__(**kwargs) self.status = kwargs.get('status', None) self.error_code = kwargs.get('error_code', None) @@ -11936,8 +15120,8 @@ def __init__( class PrivateEndpoint(msrest.serialization.Model): """The Private Endpoint network resource that is linked to the Private Endpoint connection. - :param id: Gets or sets id. - :type id: str + :ivar id: Gets or sets id. + :vartype id: str """ _attribute_map = { @@ -11948,6 +15132,10 @@ def __init__( self, **kwargs ): + """ + :keyword id: Gets or sets id. + :paramtype id: str + """ super(PrivateEndpoint, self).__init__(**kwargs) self.id = kwargs.get('id', None) @@ -11955,15 +15143,15 @@ def __init__( class PrivateEndpointConnection(msrest.serialization.Model): """Private Endpoint Connection Response Properties. - :param provisioning_state: Gets or sets provisioning state of the private endpoint connection. + :ivar provisioning_state: Gets or sets provisioning state of the private endpoint connection. Possible values include: "Succeeded", "Deleting", "Failed", "Pending". - :type provisioning_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProvisioningState - :param private_endpoint: Gets or sets private endpoint associated with the private endpoint + :vartype provisioning_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProvisioningState + :ivar private_endpoint: Gets or sets private endpoint associated with the private endpoint connection. - :type private_endpoint: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpoint - :param private_link_service_connection_state: Gets or sets private link service connection + :vartype private_endpoint: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpoint + :ivar private_link_service_connection_state: Gets or sets private link service connection state. - :type private_link_service_connection_state: + :vartype private_link_service_connection_state: ~azure.mgmt.recoveryservicesbackup.models.PrivateLinkServiceConnectionState """ @@ -11977,6 +15165,19 @@ def __init__( self, **kwargs ): + """ + :keyword provisioning_state: Gets or sets provisioning state of the private endpoint + connection. Possible values include: "Succeeded", "Deleting", "Failed", "Pending". + :paramtype provisioning_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProvisioningState + :keyword private_endpoint: Gets or sets private endpoint associated with the private endpoint + connection. + :paramtype private_endpoint: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpoint + :keyword private_link_service_connection_state: Gets or sets private link service connection + state. + :paramtype private_link_service_connection_state: + ~azure.mgmt.recoveryservicesbackup.models.PrivateLinkServiceConnectionState + """ super(PrivateEndpointConnection, self).__init__(**kwargs) self.provisioning_state = kwargs.get('provisioning_state', None) self.private_endpoint = kwargs.get('private_endpoint', None) @@ -11995,14 +15196,14 @@ class PrivateEndpointConnectionResource(Resource): :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: PrivateEndpointConnectionResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnection + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: PrivateEndpointConnectionResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnection """ _validation = { @@ -12025,6 +15226,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: PrivateEndpointConnectionResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnection + """ super(PrivateEndpointConnectionResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -12032,13 +15243,14 @@ def __init__( class PrivateLinkServiceConnectionState(msrest.serialization.Model): """Private Link Service Connection State. - :param status: Gets or sets the status. Possible values include: "Pending", "Approved", + :ivar status: Gets or sets the status. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". - :type status: str or ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionStatus - :param description: Gets or sets description. - :type description: str - :param action_required: Gets or sets actions required. - :type action_required: str + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionStatus + :ivar description: Gets or sets description. + :vartype description: str + :ivar action_required: Gets or sets actions required. + :vartype action_required: str """ _attribute_map = { @@ -12051,6 +15263,16 @@ def __init__( self, **kwargs ): + """ + :keyword status: Gets or sets the status. Possible values include: "Pending", "Approved", + "Rejected", "Disconnected". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionStatus + :keyword description: Gets or sets description. + :paramtype description: str + :keyword action_required: Gets or sets actions required. + :paramtype action_required: str + """ super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) self.status = kwargs.get('status', None) self.description = kwargs.get('description', None) @@ -12069,14 +15291,14 @@ class ProtectableContainerResource(Resource): :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: ProtectableContainerResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectableContainer + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ProtectableContainerResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectableContainer """ _validation = { @@ -12099,6 +15321,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ProtectableContainerResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectableContainer + """ super(ProtectableContainerResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -12106,11 +15338,11 @@ def __init__( class ProtectableContainerResourceList(ResourceList): """List of ProtectableContainer resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResource] """ _attribute_map = { @@ -12122,6 +15354,13 @@ def __init__( self, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResource] + """ super(ProtectableContainerResourceList, self).__init__(**kwargs) self.value = kwargs.get('value', None) @@ -12129,31 +15368,31 @@ def __init__( class ProtectedItemQueryObject(msrest.serialization.Model): """Filters to list backup items. - :param health_state: Health State for the backed up item. Possible values include: "Passed", + :ivar health_state: Health State for the backed up item. Possible values include: "Passed", "ActionRequired", "ActionSuggested", "Invalid". - :type health_state: str or ~azure.mgmt.recoveryservicesbackup.models.HealthState - :param backup_management_type: Backup management type for the backed up item. Possible values + :vartype health_state: str or ~azure.mgmt.recoveryservicesbackup.models.HealthState + :ivar 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 + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param item_type: Type of workload this item represents. Possible values include: "Invalid", + :ivar item_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 item_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType - :param policy_name: Backup policy name associated with the backup item. - :type policy_name: str - :param container_name: Name of the container. - :type container_name: str - :param backup_engine_name: Backup Engine name. - :type backup_engine_name: str - :param friendly_name: Friendly name of protected item. - :type friendly_name: str - :param fabric_name: Name of the fabric. - :type fabric_name: str - :param backup_set_name: Name of the backup set. - :type backup_set_name: str + :vartype item_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar policy_name: Backup policy name associated with the backup item. + :vartype policy_name: str + :ivar container_name: Name of the container. + :vartype container_name: str + :ivar backup_engine_name: Backup Engine name. + :vartype backup_engine_name: str + :ivar friendly_name: Friendly name of protected item. + :vartype friendly_name: str + :ivar fabric_name: Name of the fabric. + :vartype fabric_name: str + :ivar backup_set_name: Name of the backup set. + :vartype backup_set_name: str """ _attribute_map = { @@ -12172,6 +15411,33 @@ def __init__( self, **kwargs ): + """ + :keyword health_state: Health State for the backed up item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_state: str or ~azure.mgmt.recoveryservicesbackup.models.HealthState + :keyword backup_management_type: Backup management type for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword item_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". + :paramtype item_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword policy_name: Backup policy name associated with the backup item. + :paramtype policy_name: str + :keyword container_name: Name of the container. + :paramtype container_name: str + :keyword backup_engine_name: Backup Engine name. + :paramtype backup_engine_name: str + :keyword friendly_name: Friendly name of protected item. + :paramtype friendly_name: str + :keyword fabric_name: Name of the fabric. + :paramtype fabric_name: str + :keyword backup_set_name: Name of the backup set. + :paramtype backup_set_name: str + """ super(ProtectedItemQueryObject, self).__init__(**kwargs) self.health_state = kwargs.get('health_state', None) self.backup_management_type = kwargs.get('backup_management_type', None) @@ -12196,14 +15462,14 @@ class ProtectedItemResource(Resource): :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: ProtectedItemResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItem + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ProtectedItemResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItem """ _validation = { @@ -12226,6 +15492,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ProtectedItemResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItem + """ super(ProtectedItemResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -12233,11 +15509,11 @@ def __init__( class ProtectedItemResourceList(ResourceList): """List of ProtectedItem resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource] """ _attribute_map = { @@ -12249,6 +15525,13 @@ def __init__( self, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource] + """ super(ProtectedItemResourceList, self).__init__(**kwargs) self.value = kwargs.get('value', None) @@ -12265,14 +15548,14 @@ class ProtectionContainerResource(Resource): :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: ProtectionContainerResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainer + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ProtectionContainerResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainer """ _validation = { @@ -12295,6 +15578,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ProtectionContainerResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainer + """ super(ProtectionContainerResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -12302,11 +15595,11 @@ def __init__( class ProtectionContainerResourceList(ResourceList): """List of ProtectionContainer resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource] """ _attribute_map = { @@ -12318,6 +15611,13 @@ def __init__( self, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource] + """ super(ProtectionContainerResourceList, self).__init__(**kwargs) self.value = kwargs.get('value', None) @@ -12325,18 +15625,18 @@ def __init__( class ProtectionIntentQueryObject(msrest.serialization.Model): """Filters to list protection intent. - :param backup_management_type: Backup management type for the backed up item. Possible values + :ivar 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 + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param item_type: Type of workload this item represents. Possible values include: "Invalid", + :ivar item_type: Type of workload this item represents. Possible values include: "Invalid", "SQLInstance", "SQLAvailabilityGroupContainer". - :type item_type: str or ~azure.mgmt.recoveryservicesbackup.models.IntentItemType - :param parent_name: Parent name of the intent. - :type parent_name: str - :param item_name: Item name of the intent. - :type item_name: str + :vartype item_type: str or ~azure.mgmt.recoveryservicesbackup.models.IntentItemType + :ivar parent_name: Parent name of the intent. + :vartype parent_name: str + :ivar item_name: Item name of the intent. + :vartype item_name: str """ _attribute_map = { @@ -12350,6 +15650,20 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Backup management type for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword item_type: Type of workload this item represents. Possible values include: "Invalid", + "SQLInstance", "SQLAvailabilityGroupContainer". + :paramtype item_type: str or ~azure.mgmt.recoveryservicesbackup.models.IntentItemType + :keyword parent_name: Parent name of the intent. + :paramtype parent_name: str + :keyword item_name: Item name of the intent. + :paramtype item_name: str + """ super(ProtectionIntentQueryObject, self).__init__(**kwargs) self.backup_management_type = kwargs.get('backup_management_type', None) self.item_type = kwargs.get('item_type', None) @@ -12369,14 +15683,14 @@ class ProtectionIntentResource(Resource): :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: ProtectionIntentResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntent + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ProtectionIntentResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntent """ _validation = { @@ -12399,6 +15713,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ProtectionIntentResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntent + """ super(ProtectionIntentResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -12406,11 +15730,11 @@ def __init__( class ProtectionIntentResourceList(ResourceList): """List of ProtectionIntent resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource] """ _attribute_map = { @@ -12422,6 +15746,13 @@ def __init__( self, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource] + """ super(ProtectionIntentResourceList, self).__init__(**kwargs) self.value = kwargs.get('value', None) @@ -12429,18 +15760,18 @@ def __init__( class ProtectionPolicyQueryObject(msrest.serialization.Model): """Filters the list backup policies API. - :param backup_management_type: Backup management type for the backup policy. Possible values + :ivar backup_management_type: Backup management type for the backup policy. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param fabric_name: Fabric name for filter. - :type fabric_name: str - :param workload_type: Workload type for the backup policy. Possible values include: "Invalid", + :ivar fabric_name: Fabric name for filter. + :vartype fabric_name: str + :ivar workload_type: Workload type for the backup policy. 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.WorkloadType + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType """ _attribute_map = { @@ -12453,6 +15784,20 @@ def __init__( self, **kwargs ): + """ + :keyword backup_management_type: Backup management type for the backup policy. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword fabric_name: Fabric name for filter. + :paramtype fabric_name: str + :keyword workload_type: Workload type for the backup policy. Possible values include: + "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", + "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + """ super(ProtectionPolicyQueryObject, self).__init__(**kwargs) self.backup_management_type = kwargs.get('backup_management_type', None) self.fabric_name = kwargs.get('fabric_name', None) @@ -12471,14 +15816,14 @@ class ProtectionPolicyResource(Resource): :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: ProtectionPolicyResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicy + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ProtectionPolicyResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicy """ _validation = { @@ -12501,6 +15846,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ProtectionPolicyResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicy + """ super(ProtectionPolicyResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -12508,11 +15863,11 @@ def __init__( class ProtectionPolicyResourceList(ResourceList): """List of ProtectionPolicy resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource] """ _attribute_map = { @@ -12524,6 +15879,13 @@ def __init__( self, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource] + """ super(ProtectionPolicyResourceList, self).__init__(**kwargs) self.value = kwargs.get('value', None) @@ -12531,14 +15893,14 @@ def __init__( class RecoveryPointDiskConfiguration(msrest.serialization.Model): """Disk configuration. - :param number_of_disks_included_in_backup: Number of disks included in backup. - :type number_of_disks_included_in_backup: int - :param number_of_disks_attached_to_vm: Number of disks attached to the VM. - :type number_of_disks_attached_to_vm: int - :param included_disk_list: Information of disks included in backup. - :type included_disk_list: list[~azure.mgmt.recoveryservicesbackup.models.DiskInformation] - :param excluded_disk_list: Information of disks excluded from backup. - :type excluded_disk_list: list[~azure.mgmt.recoveryservicesbackup.models.DiskInformation] + :ivar number_of_disks_included_in_backup: Number of disks included in backup. + :vartype number_of_disks_included_in_backup: int + :ivar number_of_disks_attached_to_vm: Number of disks attached to the VM. + :vartype number_of_disks_attached_to_vm: int + :ivar included_disk_list: Information of disks included in backup. + :vartype included_disk_list: list[~azure.mgmt.recoveryservicesbackup.models.DiskInformation] + :ivar excluded_disk_list: Information of disks excluded from backup. + :vartype excluded_disk_list: list[~azure.mgmt.recoveryservicesbackup.models.DiskInformation] """ _attribute_map = { @@ -12552,6 +15914,16 @@ def __init__( self, **kwargs ): + """ + :keyword number_of_disks_included_in_backup: Number of disks included in backup. + :paramtype number_of_disks_included_in_backup: int + :keyword number_of_disks_attached_to_vm: Number of disks attached to the VM. + :paramtype number_of_disks_attached_to_vm: int + :keyword included_disk_list: Information of disks included in backup. + :paramtype included_disk_list: list[~azure.mgmt.recoveryservicesbackup.models.DiskInformation] + :keyword excluded_disk_list: Information of disks excluded from backup. + :paramtype excluded_disk_list: list[~azure.mgmt.recoveryservicesbackup.models.DiskInformation] + """ super(RecoveryPointDiskConfiguration, self).__init__(**kwargs) self.number_of_disks_included_in_backup = kwargs.get('number_of_disks_included_in_backup', None) self.number_of_disks_attached_to_vm = kwargs.get('number_of_disks_attached_to_vm', None) @@ -12562,10 +15934,10 @@ def __init__( class RecoveryPointMoveReadinessInfo(msrest.serialization.Model): """RecoveryPointMoveReadinessInfo. - :param is_ready_for_move: - :type is_ready_for_move: bool - :param additional_info: - :type additional_info: str + :ivar is_ready_for_move: + :vartype is_ready_for_move: bool + :ivar additional_info: + :vartype additional_info: str """ _attribute_map = { @@ -12577,6 +15949,12 @@ def __init__( self, **kwargs ): + """ + :keyword is_ready_for_move: + :paramtype is_ready_for_move: bool + :keyword additional_info: + :paramtype additional_info: str + """ super(RecoveryPointMoveReadinessInfo, self).__init__(**kwargs) self.is_ready_for_move = kwargs.get('is_ready_for_move', None) self.additional_info = kwargs.get('additional_info', None) @@ -12585,11 +15963,11 @@ def __init__( class RecoveryPointRehydrationInfo(msrest.serialization.Model): """RP Rehydration Info. - :param rehydration_retention_duration: How long the rehydrated RP should be kept + :ivar rehydration_retention_duration: How long the rehydrated RP should be kept Should be ISO8601 Duration format e.g. "P7D". - :type rehydration_retention_duration: str - :param rehydration_priority: Rehydration Priority. Possible values include: "Standard", "High". - :type rehydration_priority: str or + :vartype rehydration_retention_duration: str + :ivar rehydration_priority: Rehydration Priority. Possible values include: "Standard", "High". + :vartype rehydration_priority: str or ~azure.mgmt.recoveryservicesbackup.models.RehydrationPriority """ @@ -12602,6 +15980,15 @@ def __init__( self, **kwargs ): + """ + :keyword rehydration_retention_duration: How long the rehydrated RP should be kept + Should be ISO8601 Duration format e.g. "P7D". + :paramtype rehydration_retention_duration: str + :keyword rehydration_priority: Rehydration Priority. Possible values include: "Standard", + "High". + :paramtype rehydration_priority: str or + ~azure.mgmt.recoveryservicesbackup.models.RehydrationPriority + """ super(RecoveryPointRehydrationInfo, self).__init__(**kwargs) self.rehydration_retention_duration = kwargs.get('rehydration_retention_duration', None) self.rehydration_priority = kwargs.get('rehydration_priority', None) @@ -12619,14 +16006,14 @@ class RecoveryPointResource(Resource): :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: RecoveryPointResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPoint + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: RecoveryPointResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPoint """ _validation = { @@ -12649,6 +16036,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: RecoveryPointResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPoint + """ super(RecoveryPointResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -12656,11 +16053,11 @@ def __init__( class RecoveryPointResourceList(ResourceList): """List of RecoveryPoint resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource] """ _attribute_map = { @@ -12672,6 +16069,13 @@ def __init__( self, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource] + """ super(RecoveryPointResourceList, self).__init__(**kwargs) self.value = kwargs.get('value', None) @@ -12679,14 +16083,14 @@ def __init__( class RecoveryPointTierInformation(msrest.serialization.Model): """Recovery point tier information. - :param type: Recovery point tier type. Possible values include: "Invalid", "InstantRP", + :ivar type: Recovery point tier type. Possible values include: "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". - :type type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType - :param status: Recovery point tier status. Possible values include: "Invalid", "Valid", + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :ivar status: Recovery point tier status. Possible values include: "Invalid", "Valid", "Disabled", "Deleted", "Rehydrated". - :type status: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus - :param extended_info: Recovery point tier status. - :type extended_info: dict[str, str] + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus + :ivar extended_info: Recovery point tier status. + :vartype extended_info: dict[str, str] """ _attribute_map = { @@ -12699,19 +16103,65 @@ def __init__( self, **kwargs ): + """ + :keyword type: Recovery point tier type. Possible values include: "Invalid", "InstantRP", + "HardenedRP", "ArchivedRP". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :keyword status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :paramtype status: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus + :keyword extended_info: Recovery point tier status. + :paramtype extended_info: dict[str, str] + """ super(RecoveryPointTierInformation, self).__init__(**kwargs) self.type = kwargs.get('type', None) self.status = kwargs.get('status', None) self.extended_info = kwargs.get('extended_info', None) +class RecoveryPointTierInformationV2(RecoveryPointTierInformation): + """RecoveryPoint Tier Information V2. + + :ivar type: Recovery point tier type. Possible values include: "Invalid", "InstantRP", + "HardenedRP", "ArchivedRP". + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :ivar status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus + :ivar extended_info: Recovery point tier status. + :vartype extended_info: dict[str, str] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword type: Recovery point tier type. Possible values include: "Invalid", "InstantRP", + "HardenedRP", "ArchivedRP". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :keyword status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :paramtype status: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus + :keyword extended_info: Recovery point tier status. + :paramtype extended_info: dict[str, str] + """ + super(RecoveryPointTierInformationV2, self).__init__(**kwargs) + + class ResourceGuardOperationDetail(msrest.serialization.Model): """ResourceGuardOperationDetail. - :param vault_critical_operation: - :type vault_critical_operation: str - :param default_resource_request: - :type default_resource_request: str + :ivar vault_critical_operation: + :vartype vault_critical_operation: str + :ivar default_resource_request: + :vartype default_resource_request: str """ _attribute_map = { @@ -12723,6 +16173,12 @@ def __init__( self, **kwargs ): + """ + :keyword vault_critical_operation: + :paramtype vault_critical_operation: str + :keyword default_resource_request: + :paramtype default_resource_request: str + """ super(ResourceGuardOperationDetail, self).__init__(**kwargs) self.vault_critical_operation = kwargs.get('vault_critical_operation', None) self.default_resource_request = kwargs.get('default_resource_request', None) @@ -12731,15 +16187,15 @@ def __init__( class ResourceGuardProxyBase(msrest.serialization.Model): """ResourceGuardProxyBase. - :param resource_guard_resource_id: - :type resource_guard_resource_id: str - :param resource_guard_operation_details: - :type resource_guard_operation_details: + :ivar resource_guard_resource_id: + :vartype resource_guard_resource_id: str + :ivar resource_guard_operation_details: + :vartype resource_guard_operation_details: list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardOperationDetail] - :param last_updated_time: - :type last_updated_time: str - :param description: - :type description: str + :ivar last_updated_time: + :vartype last_updated_time: str + :ivar description: + :vartype description: str """ _attribute_map = { @@ -12753,6 +16209,17 @@ def __init__( self, **kwargs ): + """ + :keyword resource_guard_resource_id: + :paramtype resource_guard_resource_id: str + :keyword resource_guard_operation_details: + :paramtype resource_guard_operation_details: + list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardOperationDetail] + :keyword last_updated_time: + :paramtype last_updated_time: str + :keyword description: + :paramtype description: str + """ super(ResourceGuardProxyBase, self).__init__(**kwargs) self.resource_guard_resource_id = kwargs.get('resource_guard_resource_id', None) self.resource_guard_operation_details = kwargs.get('resource_guard_operation_details', None) @@ -12772,14 +16239,14 @@ class ResourceGuardProxyBaseResource(Resource): :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: ResourceGuardProxyBaseResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBase + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ResourceGuardProxyBaseResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBase """ _validation = { @@ -12802,6 +16269,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ResourceGuardProxyBaseResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBase + """ super(ResourceGuardProxyBaseResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -12809,11 +16286,11 @@ def __init__( class ResourceGuardProxyBaseResourceList(ResourceList): """List of ResourceGuardProxyBase resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource] """ _attribute_map = { @@ -12825,6 +16302,14 @@ def __init__( self, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource] + """ super(ResourceGuardProxyBaseResourceList, self).__init__(**kwargs) self.value = kwargs.get('value', None) @@ -12832,12 +16317,12 @@ def __init__( class RestoreFileSpecs(msrest.serialization.Model): """Restore file specs like file path, type and target folder path info. - :param path: Source File/Folder path. - :type path: str - :param file_spec_type: Indicates what the Path variable stands for. - :type file_spec_type: str - :param target_folder_path: Destination folder path in target FileShare. - :type target_folder_path: str + :ivar path: Source File/Folder path. + :vartype path: str + :ivar file_spec_type: Indicates what the Path variable stands for. + :vartype file_spec_type: str + :ivar target_folder_path: Destination folder path in target FileShare. + :vartype target_folder_path: str """ _attribute_map = { @@ -12850,6 +16335,14 @@ def __init__( self, **kwargs ): + """ + :keyword path: Source File/Folder path. + :paramtype path: str + :keyword file_spec_type: Indicates what the Path variable stands for. + :paramtype file_spec_type: str + :keyword target_folder_path: Destination folder path in target FileShare. + :paramtype target_folder_path: str + """ super(RestoreFileSpecs, self).__init__(**kwargs) self.path = kwargs.get('path', None) self.file_spec_type = kwargs.get('file_spec_type', None) @@ -12868,14 +16361,14 @@ class RestoreRequestResource(Resource): :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: RestoreRequestResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: RestoreRequestResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest """ _validation = { @@ -12898,6 +16391,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: RestoreRequestResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + """ super(RestoreRequestResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -12905,13 +16408,13 @@ def __init__( class RetentionDuration(msrest.serialization.Model): """Retention duration. - :param count: Count of duration types. Retention duration is obtained by the counting the + :ivar count: Count of duration types. Retention duration is obtained by the counting the duration type Count times. For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. - :type count: int - :param duration_type: Retention duration type of retention policy. Possible values include: + :vartype count: int + :ivar duration_type: Retention duration type of retention policy. Possible values include: "Invalid", "Days", "Weeks", "Months", "Years". - :type duration_type: str or ~azure.mgmt.recoveryservicesbackup.models.RetentionDurationType + :vartype duration_type: str or ~azure.mgmt.recoveryservicesbackup.models.RetentionDurationType """ _attribute_map = { @@ -12923,6 +16426,16 @@ def __init__( self, **kwargs ): + """ + :keyword count: Count of duration types. Retention duration is obtained by the counting the + duration type Count times. + For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + :paramtype count: int + :keyword duration_type: Retention duration type of retention policy. Possible values include: + "Invalid", "Days", "Weeks", "Months", "Years". + :paramtype duration_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RetentionDurationType + """ super(RetentionDuration, self).__init__(**kwargs) self.count = kwargs.get('count', None) self.duration_type = kwargs.get('duration_type', None) @@ -12931,8 +16444,8 @@ def __init__( class SecurityPinBase(msrest.serialization.Model): """Base class for get security pin request body. - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] """ _attribute_map = { @@ -12943,6 +16456,10 @@ def __init__( self, **kwargs ): + """ + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + """ super(SecurityPinBase, self).__init__(**kwargs) self.resource_guard_operation_requests = kwargs.get('resource_guard_operation_requests', None) @@ -12950,15 +16467,14 @@ def __init__( class Settings(msrest.serialization.Model): """Common settings field for backup management. - :param time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard + :ivar time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - :type time_zone: str - :param issqlcompression: SQL compression flag. - :type issqlcompression: bool - :param is_compression: Workload compression flag. This has been added so that - 'isSqlCompression' + :vartype time_zone: str + :ivar issqlcompression: SQL compression flag. + :vartype issqlcompression: bool + :ivar is_compression: Workload compression flag. This has been added so that 'isSqlCompression' will be deprecated once clients upgrade to consider this flag. - :type is_compression: bool + :vartype is_compression: bool """ _attribute_map = { @@ -12971,6 +16487,17 @@ def __init__( self, **kwargs ): + """ + :keyword time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific + Standard Time". + :paramtype time_zone: str + :keyword issqlcompression: SQL compression flag. + :paramtype issqlcompression: bool + :keyword is_compression: Workload compression flag. This has been added so that + 'isSqlCompression' + will be deprecated once clients upgrade to consider this flag. + :paramtype is_compression: bool + """ super(Settings, self).__init__(**kwargs) self.time_zone = kwargs.get('time_zone', None) self.issqlcompression = kwargs.get('issqlcompression', None) @@ -12982,11 +16509,11 @@ class SimpleRetentionPolicy(RetentionPolicy): All required parameters must be populated in order to send to Azure. - :param retention_policy_type: Required. This property will be used as the discriminator for + :ivar retention_policy_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 retention_policy_type: str - :param retention_duration: Retention duration of the protection policy. - :type retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + :vartype retention_policy_type: str + :ivar retention_duration: Retention duration of the protection policy. + :vartype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _validation = { @@ -13002,6 +16529,10 @@ def __init__( self, **kwargs ): + """ + :keyword retention_duration: Retention duration of the protection policy. + :paramtype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ super(SimpleRetentionPolicy, self).__init__(**kwargs) self.retention_policy_type = 'SimpleRetentionPolicy' # type: str self.retention_duration = kwargs.get('retention_duration', None) @@ -13012,18 +16543,21 @@ class SimpleSchedulePolicy(SchedulePolicy): All required parameters must be populated in order to send to Azure. - :param schedule_policy_type: Required. This property will be used as the discriminator for + :ivar schedule_policy_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 schedule_policy_type: str - :param schedule_run_frequency: Frequency of the schedule operation of this policy. Possible - values include: "Invalid", "Daily", "Weekly". - :type schedule_run_frequency: str or ~azure.mgmt.recoveryservicesbackup.models.ScheduleRunType - :param schedule_run_days: List of days of week this schedule has to be run. - :type schedule_run_days: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] - :param schedule_run_times: List of times of day this schedule has to be run. - :type schedule_run_times: list[~datetime.datetime] - :param schedule_weekly_frequency: At every number weeks this schedule has to be run. - :type schedule_weekly_frequency: int + :vartype schedule_policy_type: str + :ivar schedule_run_frequency: Frequency of the schedule operation of this policy. Possible + values include: "Invalid", "Daily", "Weekly", "Hourly". + :vartype schedule_run_frequency: str or + ~azure.mgmt.recoveryservicesbackup.models.ScheduleRunType + :ivar schedule_run_days: List of days of week this schedule has to be run. + :vartype schedule_run_days: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :ivar schedule_run_times: List of times of day this schedule has to be run. + :vartype schedule_run_times: list[~datetime.datetime] + :ivar hourly_schedule: Hourly Schedule of this Policy. + :vartype hourly_schedule: ~azure.mgmt.recoveryservicesbackup.models.HourlySchedule + :ivar schedule_weekly_frequency: At every number weeks this schedule has to be run. + :vartype schedule_weekly_frequency: int """ _validation = { @@ -13035,6 +16569,7 @@ class SimpleSchedulePolicy(SchedulePolicy): 'schedule_run_frequency': {'key': 'scheduleRunFrequency', 'type': 'str'}, 'schedule_run_days': {'key': 'scheduleRunDays', 'type': '[str]'}, 'schedule_run_times': {'key': 'scheduleRunTimes', 'type': '[iso-8601]'}, + 'hourly_schedule': {'key': 'hourlySchedule', 'type': 'HourlySchedule'}, 'schedule_weekly_frequency': {'key': 'scheduleWeeklyFrequency', 'type': 'int'}, } @@ -13042,23 +16577,38 @@ def __init__( self, **kwargs ): + """ + :keyword schedule_run_frequency: Frequency of the schedule operation of this policy. Possible + values include: "Invalid", "Daily", "Weekly", "Hourly". + :paramtype schedule_run_frequency: str or + ~azure.mgmt.recoveryservicesbackup.models.ScheduleRunType + :keyword schedule_run_days: List of days of week this schedule has to be run. + :paramtype schedule_run_days: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :keyword schedule_run_times: List of times of day this schedule has to be run. + :paramtype schedule_run_times: list[~datetime.datetime] + :keyword hourly_schedule: Hourly Schedule of this Policy. + :paramtype hourly_schedule: ~azure.mgmt.recoveryservicesbackup.models.HourlySchedule + :keyword schedule_weekly_frequency: At every number weeks this schedule has to be run. + :paramtype schedule_weekly_frequency: int + """ super(SimpleSchedulePolicy, self).__init__(**kwargs) self.schedule_policy_type = 'SimpleSchedulePolicy' # type: str self.schedule_run_frequency = kwargs.get('schedule_run_frequency', None) self.schedule_run_days = kwargs.get('schedule_run_days', None) self.schedule_run_times = kwargs.get('schedule_run_times', None) + self.hourly_schedule = kwargs.get('hourly_schedule', None) self.schedule_weekly_frequency = kwargs.get('schedule_weekly_frequency', None) class SQLDataDirectory(msrest.serialization.Model): """SQLDataDirectory info. - :param type: Type of data directory mapping. Possible values include: "Invalid", "Data", "Log". - :type type: str or ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType - :param path: File path. - :type path: str - :param logical_name: Logical name of the file. - :type logical_name: str + :ivar type: Type of data directory mapping. Possible values include: "Invalid", "Data", "Log". + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :ivar path: File path. + :vartype path: str + :ivar logical_name: Logical name of the file. + :vartype logical_name: str """ _attribute_map = { @@ -13071,6 +16621,15 @@ def __init__( self, **kwargs ): + """ + :keyword type: Type of data directory mapping. Possible values include: "Invalid", "Data", + "Log". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :keyword path: File path. + :paramtype path: str + :keyword logical_name: Logical name of the file. + :paramtype logical_name: str + """ super(SQLDataDirectory, self).__init__(**kwargs) self.type = kwargs.get('type', None) self.path = kwargs.get('path', None) @@ -13080,15 +16639,15 @@ def __init__( class SQLDataDirectoryMapping(msrest.serialization.Model): """Encapsulates information regarding data directory. - :param mapping_type: Type of data directory mapping. Possible values include: "Invalid", - "Data", "Log". - :type mapping_type: str or ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType - :param source_logical_name: Restore source logical name path. - :type source_logical_name: str - :param source_path: Restore source path. - :type source_path: str - :param target_path: Target path. - :type target_path: str + :ivar mapping_type: Type of data directory mapping. Possible values include: "Invalid", "Data", + "Log". + :vartype mapping_type: str or ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :ivar source_logical_name: Restore source logical name path. + :vartype source_logical_name: str + :ivar source_path: Restore source path. + :vartype source_path: str + :ivar target_path: Target path. + :vartype target_path: str """ _attribute_map = { @@ -13102,6 +16661,17 @@ def __init__( self, **kwargs ): + """ + :keyword mapping_type: Type of data directory mapping. Possible values include: "Invalid", + "Data", "Log". + :paramtype mapping_type: str or ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :keyword source_logical_name: Restore source logical name path. + :paramtype source_logical_name: str + :keyword source_path: Restore source path. + :paramtype source_path: str + :keyword target_path: Target path. + :paramtype target_path: str + """ super(SQLDataDirectoryMapping, self).__init__(**kwargs) self.mapping_type = kwargs.get('mapping_type', None) self.source_logical_name = kwargs.get('source_logical_name', None) @@ -13112,13 +16682,13 @@ def __init__( class SubProtectionPolicy(msrest.serialization.Model): """Sub-protection policy which includes schedule and retention. - :param policy_type: Type of backup policy type. Possible values include: "Invalid", "Full", + :ivar policy_type: Type of backup policy type. Possible values include: "Invalid", "Full", "Differential", "Log", "CopyOnlyFull", "Incremental". - :type policy_type: str or ~azure.mgmt.recoveryservicesbackup.models.PolicyType - :param schedule_policy: Backup schedule specified as part of backup policy. - :type schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy - :param retention_policy: Retention policy with the details on backup copy retention ranges. - :type retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :vartype policy_type: str or ~azure.mgmt.recoveryservicesbackup.models.PolicyType + :ivar schedule_policy: Backup schedule specified as part of backup policy. + :vartype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :ivar retention_policy: Retention policy with the details on backup copy retention ranges. + :vartype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy """ _attribute_map = { @@ -13131,6 +16701,15 @@ def __init__( self, **kwargs ): + """ + :keyword policy_type: Type of backup policy type. Possible values include: "Invalid", "Full", + "Differential", "Log", "CopyOnlyFull", "Incremental". + :paramtype policy_type: str or ~azure.mgmt.recoveryservicesbackup.models.PolicyType + :keyword schedule_policy: Backup schedule specified as part of backup policy. + :paramtype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :keyword retention_policy: Retention policy with the details on backup copy retention ranges. + :paramtype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + """ super(SubProtectionPolicy, self).__init__(**kwargs) self.policy_type = kwargs.get('policy_type', None) self.schedule_policy = kwargs.get('schedule_policy', None) @@ -13140,10 +16719,10 @@ def __init__( class TargetAFSRestoreInfo(msrest.serialization.Model): """Target Azure File Share Info. - :param name: File share name. - :type name: str - :param target_resource_id: Target file share resource ARM ID. - :type target_resource_id: str + :ivar name: File share name. + :vartype name: str + :ivar target_resource_id: Target file share resource ARM ID. + :vartype target_resource_id: str """ _attribute_map = { @@ -13155,6 +16734,12 @@ def __init__( self, **kwargs ): + """ + :keyword name: File share name. + :paramtype name: str + :keyword target_resource_id: Target file share resource ARM ID. + :paramtype target_resource_id: str + """ super(TargetAFSRestoreInfo, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.target_resource_id = kwargs.get('target_resource_id', None) @@ -13163,16 +16748,16 @@ def __init__( class TargetRestoreInfo(msrest.serialization.Model): """Details about target workload during restore operation. - :param overwrite_option: Can Overwrite if Target DataBase already exists. Possible values + :ivar overwrite_option: Can Overwrite if Target DataBase already exists. Possible values include: "Invalid", "FailOnConflict", "Overwrite". - :type overwrite_option: str or ~azure.mgmt.recoveryservicesbackup.models.OverwriteOptions - :param container_id: Resource Id name of the container in which Target DataBase resides. - :type container_id: str - :param database_name: Database name InstanceName/DataBaseName for SQL or System/DbName for SAP + :vartype overwrite_option: str or ~azure.mgmt.recoveryservicesbackup.models.OverwriteOptions + :ivar container_id: Resource Id name of the container in which Target DataBase resides. + :vartype container_id: str + :ivar database_name: Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana. - :type database_name: str - :param target_directory_for_file_restore: Target directory location for restore as files. - :type target_directory_for_file_restore: str + :vartype database_name: str + :ivar target_directory_for_file_restore: Target directory location for restore as files. + :vartype target_directory_for_file_restore: str """ _attribute_map = { @@ -13186,6 +16771,18 @@ def __init__( self, **kwargs ): + """ + :keyword overwrite_option: Can Overwrite if Target DataBase already exists. Possible values + include: "Invalid", "FailOnConflict", "Overwrite". + :paramtype overwrite_option: str or ~azure.mgmt.recoveryservicesbackup.models.OverwriteOptions + :keyword container_id: Resource Id name of the container in which Target DataBase resides. + :paramtype container_id: str + :keyword database_name: Database name InstanceName/DataBaseName for SQL or System/DbName for + SAP Hana. + :paramtype database_name: str + :keyword target_directory_for_file_restore: Target directory location for restore as files. + :paramtype target_directory_for_file_restore: str + """ super(TargetRestoreInfo, self).__init__(**kwargs) self.overwrite_option = kwargs.get('overwrite_option', None) self.container_id = kwargs.get('container_id', None) @@ -13196,12 +16793,12 @@ def __init__( class TokenInformation(msrest.serialization.Model): """The token information details. - :param token: Token value. - :type token: str - :param expiry_time_in_utc_ticks: Expiry time of token. - :type expiry_time_in_utc_ticks: long - :param security_pin: Security PIN. - :type security_pin: str + :ivar token: Token value. + :vartype token: str + :ivar expiry_time_in_utc_ticks: Expiry time of token. + :vartype expiry_time_in_utc_ticks: long + :ivar security_pin: Security PIN. + :vartype security_pin: str """ _attribute_map = { @@ -13214,6 +16811,14 @@ def __init__( self, **kwargs ): + """ + :keyword token: Token value. + :paramtype token: str + :keyword expiry_time_in_utc_ticks: Expiry time of token. + :paramtype expiry_time_in_utc_ticks: long + :keyword security_pin: Security PIN. + :paramtype security_pin: str + """ super(TokenInformation, self).__init__(**kwargs) self.token = kwargs.get('token', None) self.expiry_time_in_utc_ticks = kwargs.get('expiry_time_in_utc_ticks', None) @@ -13225,19 +16830,19 @@ class TriggerDataMoveRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param source_resource_id: Required. ARM Id of source vault. - :type source_resource_id: str - :param source_region: Required. Source Region. - :type source_region: str - :param data_move_level: Required. DataMove Level. Possible values include: "Invalid", "Vault", + :ivar source_resource_id: Required. ARM Id of source vault. + :vartype source_resource_id: str + :ivar source_region: Required. Source Region. + :vartype source_region: str + :ivar data_move_level: Required. DataMove Level. Possible values include: "Invalid", "Vault", "Container". - :type data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel - :param correlation_id: Required. Correlation Id. - :type correlation_id: str - :param source_container_arm_ids: Source Container ArmIds. - :type source_container_arm_ids: list[str] - :param pause_gc: Pause GC. - :type pause_gc: bool + :vartype data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel + :ivar correlation_id: Required. Correlation Id. + :vartype correlation_id: str + :ivar source_container_arm_ids: Source Container ArmIds. + :vartype source_container_arm_ids: list[str] + :ivar pause_gc: Pause GC. + :vartype pause_gc: bool """ _validation = { @@ -13260,6 +16865,21 @@ def __init__( self, **kwargs ): + """ + :keyword source_resource_id: Required. ARM Id of source vault. + :paramtype source_resource_id: str + :keyword source_region: Required. Source Region. + :paramtype source_region: str + :keyword data_move_level: Required. DataMove Level. Possible values include: "Invalid", + "Vault", "Container". + :paramtype data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel + :keyword correlation_id: Required. Correlation Id. + :paramtype correlation_id: str + :keyword source_container_arm_ids: Source Container ArmIds. + :paramtype source_container_arm_ids: list[str] + :keyword pause_gc: Pause GC. + :paramtype pause_gc: bool + """ super(TriggerDataMoveRequest, self).__init__(**kwargs) self.source_resource_id = kwargs['source_resource_id'] self.source_region = kwargs['source_region'] @@ -13272,10 +16892,10 @@ def __init__( class UnlockDeleteRequest(msrest.serialization.Model): """Request body of unlock delete API. - :param resource_guard_operation_requests: - :type resource_guard_operation_requests: list[str] - :param resource_to_be_deleted: - :type resource_to_be_deleted: str + :ivar resource_guard_operation_requests: + :vartype resource_guard_operation_requests: list[str] + :ivar resource_to_be_deleted: + :vartype resource_to_be_deleted: str """ _attribute_map = { @@ -13287,6 +16907,12 @@ def __init__( self, **kwargs ): + """ + :keyword resource_guard_operation_requests: + :paramtype resource_guard_operation_requests: list[str] + :keyword resource_to_be_deleted: + :paramtype resource_to_be_deleted: str + """ super(UnlockDeleteRequest, self).__init__(**kwargs) self.resource_guard_operation_requests = kwargs.get('resource_guard_operation_requests', None) self.resource_to_be_deleted = kwargs.get('resource_to_be_deleted', None) @@ -13295,9 +16921,9 @@ def __init__( class UnlockDeleteResponse(msrest.serialization.Model): """Response of Unlock Delete API. - :param unlock_delete_expiry_time: This is the time when unlock delete privileges will get + :ivar unlock_delete_expiry_time: This is the time when unlock delete privileges will get expired. - :type unlock_delete_expiry_time: str + :vartype unlock_delete_expiry_time: str """ _attribute_map = { @@ -13308,6 +16934,11 @@ def __init__( self, **kwargs ): + """ + :keyword unlock_delete_expiry_time: This is the time when unlock delete privileges will get + expired. + :paramtype unlock_delete_expiry_time: str + """ super(UnlockDeleteResponse, self).__init__(**kwargs) self.unlock_delete_expiry_time = kwargs.get('unlock_delete_expiry_time', None) @@ -13320,9 +16951,9 @@ class ValidateOperationRequest(msrest.serialization.Model): 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 + :ivar 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 + :vartype object_type: str """ _validation = { @@ -13341,6 +16972,8 @@ def __init__( self, **kwargs ): + """ + """ super(ValidateOperationRequest, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -13353,11 +16986,11 @@ class ValidateRestoreOperationRequest(ValidateOperationRequest): 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 + :ivar 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 restore_request: Sets restore request to be validated. - :type restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + :vartype object_type: str + :ivar restore_request: Sets restore request to be validated. + :vartype restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest """ _validation = { @@ -13377,6 +17010,10 @@ def __init__( self, **kwargs ): + """ + :keyword restore_request: Sets restore request to be validated. + :paramtype restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + """ super(ValidateRestoreOperationRequest, self).__init__(**kwargs) self.object_type = 'ValidateRestoreOperationRequest' # type: str self.restore_request = kwargs.get('restore_request', None) @@ -13387,11 +17024,11 @@ class ValidateIaasVMRestoreOperationRequest(ValidateRestoreOperationRequest): 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 + :ivar 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 restore_request: Sets restore request to be validated. - :type restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + :vartype object_type: str + :ivar restore_request: Sets restore request to be validated. + :vartype restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest """ _validation = { @@ -13407,6 +17044,10 @@ def __init__( self, **kwargs ): + """ + :keyword restore_request: Sets restore request to be validated. + :paramtype restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + """ super(ValidateIaasVMRestoreOperationRequest, self).__init__(**kwargs) self.object_type = 'ValidateIaasVMRestoreOperationRequest' # type: str @@ -13414,8 +17055,8 @@ def __init__( class ValidateOperationResponse(msrest.serialization.Model): """Base class for validate operation response. - :param validation_results: Gets the validation result. - :type validation_results: list[~azure.mgmt.recoveryservicesbackup.models.ErrorDetail] + :ivar validation_results: Gets the validation result. + :vartype validation_results: list[~azure.mgmt.recoveryservicesbackup.models.ErrorDetail] """ _attribute_map = { @@ -13426,6 +17067,10 @@ def __init__( self, **kwargs ): + """ + :keyword validation_results: Gets the validation result. + :paramtype validation_results: list[~azure.mgmt.recoveryservicesbackup.models.ErrorDetail] + """ super(ValidateOperationResponse, self).__init__(**kwargs) self.validation_results = kwargs.get('validation_results', None) @@ -13433,8 +17078,8 @@ def __init__( class ValidateOperationsResponse(msrest.serialization.Model): """ValidateOperationsResponse. - :param validate_operation_response: Base class for validate operation response. - :type validate_operation_response: + :ivar validate_operation_response: Base class for validate operation response. + :vartype validate_operation_response: ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationResponse """ @@ -13446,6 +17091,11 @@ def __init__( self, **kwargs ): + """ + :keyword validate_operation_response: Base class for validate operation response. + :paramtype validate_operation_response: + ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationResponse + """ super(ValidateOperationsResponse, self).__init__(**kwargs) self.validate_operation_response = kwargs.get('validate_operation_response', None) @@ -13455,34 +17105,35 @@ class VaultJob(Job): All required parameters must be populated in order to send to Azure. - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param activity_id: ActivityId of job. - :type activity_id: str - :param job_type: Required. This property will be used as the discriminator for deciding the + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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 job_type: str - :param duration: Time elapsed during the execution of this job. - :type duration: ~datetime.timedelta - :param actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. - :type actions_info: list[str or ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] - :param error_details: Error details on execution of this job. - :type error_details: list[~azure.mgmt.recoveryservicesbackup.models.VaultJobErrorInfo] - :param extended_info: Additional information about the job. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.VaultJobExtendedInfo + :vartype job_type: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: list[~azure.mgmt.recoveryservicesbackup.models.VaultJobErrorInfo] + :ivar extended_info: Additional information about the job. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.VaultJobExtendedInfo """ _validation = { @@ -13508,6 +17159,35 @@ def __init__( self, **kwargs ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: list[~azure.mgmt.recoveryservicesbackup.models.VaultJobErrorInfo] + :keyword extended_info: Additional information about the job. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.VaultJobExtendedInfo + """ super(VaultJob, self).__init__(**kwargs) self.job_type = 'VaultJob' # type: str self.duration = kwargs.get('duration', None) @@ -13519,12 +17199,12 @@ def __init__( class VaultJobErrorInfo(msrest.serialization.Model): """Vault Job specific error information. - :param error_code: Error code. - :type error_code: int - :param error_string: Localized error string. - :type error_string: str - :param recommendations: List of localized recommendations for above error code. - :type recommendations: list[str] + :ivar error_code: Error code. + :vartype error_code: int + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] """ _attribute_map = { @@ -13537,6 +17217,14 @@ def __init__( self, **kwargs ): + """ + :keyword error_code: Error code. + :paramtype error_code: int + :keyword error_string: Localized error string. + :paramtype error_string: str + :keyword recommendations: List of localized recommendations for above error code. + :paramtype recommendations: list[str] + """ super(VaultJobErrorInfo, self).__init__(**kwargs) self.error_code = kwargs.get('error_code', None) self.error_string = kwargs.get('error_string', None) @@ -13546,8 +17234,8 @@ def __init__( class VaultJobExtendedInfo(msrest.serialization.Model): """Vault Job for CMK - has CMK specific info. - :param property_bag: Job properties. - :type property_bag: dict[str, str] + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] """ _attribute_map = { @@ -13558,6 +17246,10 @@ def __init__( self, **kwargs ): + """ + :keyword property_bag: Job properties. + :paramtype property_bag: dict[str, str] + """ super(VaultJobExtendedInfo, self).__init__(**kwargs) self.property_bag = kwargs.get('property_bag', None) @@ -13565,10 +17257,10 @@ def __init__( class WeeklyRetentionFormat(msrest.serialization.Model): """Weekly retention format. - :param days_of_the_week: List of days of the week. - :type days_of_the_week: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] - :param weeks_of_the_month: List of weeks of month. - :type weeks_of_the_month: list[str or ~azure.mgmt.recoveryservicesbackup.models.WeekOfMonth] + :ivar days_of_the_week: List of days of the week. + :vartype days_of_the_week: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :ivar weeks_of_the_month: List of weeks of month. + :vartype weeks_of_the_month: list[str or ~azure.mgmt.recoveryservicesbackup.models.WeekOfMonth] """ _attribute_map = { @@ -13580,6 +17272,13 @@ def __init__( self, **kwargs ): + """ + :keyword days_of_the_week: List of days of the week. + :paramtype days_of_the_week: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :keyword weeks_of_the_month: List of weeks of month. + :paramtype weeks_of_the_month: list[str or + ~azure.mgmt.recoveryservicesbackup.models.WeekOfMonth] + """ super(WeeklyRetentionFormat, self).__init__(**kwargs) self.days_of_the_week = kwargs.get('days_of_the_week', None) self.weeks_of_the_month = kwargs.get('weeks_of_the_month', None) @@ -13588,12 +17287,12 @@ def __init__( class WeeklyRetentionSchedule(msrest.serialization.Model): """Weekly retention schedule. - :param days_of_the_week: List of days of week for weekly retention policy. - :type days_of_the_week: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] - :param retention_times: Retention times of retention policy. - :type retention_times: list[~datetime.datetime] - :param retention_duration: Retention duration of retention Policy. - :type retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + :ivar days_of_the_week: List of days of week for weekly retention policy. + :vartype days_of_the_week: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :ivar retention_times: Retention times of retention policy. + :vartype retention_times: list[~datetime.datetime] + :ivar retention_duration: Retention duration of retention Policy. + :vartype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -13606,161 +17305,29 @@ def __init__( self, **kwargs ): + """ + :keyword days_of_the_week: List of days of week for weekly retention policy. + :paramtype days_of_the_week: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :keyword retention_times: Retention times of retention policy. + :paramtype retention_times: list[~datetime.datetime] + :keyword retention_duration: Retention duration of retention Policy. + :paramtype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ super(WeeklyRetentionSchedule, self).__init__(**kwargs) self.days_of_the_week = kwargs.get('days_of_the_week', None) self.retention_times = kwargs.get('retention_times', None) 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. - :param type: Type of the Workload such as SQL, Oracle etc. - :type type: str - :param item_count: Contains the protectable item Count inside this Container. - :type item_count: long - :param inquiry_validation: Inquiry validation such as permissions and other backup validations. - :type inquiry_validation: ~azure.mgmt.recoveryservicesbackup.models.InquiryValidation + :ivar type: Type of the Workload such as SQL, Oracle etc. + :vartype type: str + :ivar item_count: Contains the protectable item Count inside this Container. + :vartype item_count: long + :ivar inquiry_validation: Inquiry validation such as permissions and other backup validations. + :vartype inquiry_validation: ~azure.mgmt.recoveryservicesbackup.models.InquiryValidation """ _attribute_map = { @@ -13773,6 +17340,15 @@ def __init__( self, **kwargs ): + """ + :keyword type: Type of the Workload such as SQL, Oracle etc. + :paramtype type: str + :keyword item_count: Contains the protectable item Count inside this Container. + :paramtype item_count: long + :keyword inquiry_validation: Inquiry validation such as permissions and other backup + validations. + :paramtype inquiry_validation: ~azure.mgmt.recoveryservicesbackup.models.InquiryValidation + """ super(WorkloadInquiryDetails, self).__init__(**kwargs) self.type = kwargs.get('type', None) self.item_count = kwargs.get('item_count', None) @@ -13791,14 +17367,14 @@ class WorkloadItemResource(Resource): :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: WorkloadItemResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadItem + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: WorkloadItemResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadItem """ _validation = { @@ -13821,6 +17397,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: WorkloadItemResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadItem + """ super(WorkloadItemResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -13828,11 +17414,11 @@ def __init__( class WorkloadItemResourceList(ResourceList): """List of WorkloadItem resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResource] """ _attribute_map = { @@ -13844,6 +17430,13 @@ def __init__( self, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResource] + """ super(WorkloadItemResourceList, self).__init__(**kwargs) self.value = kwargs.get('value', None) @@ -13860,14 +17453,14 @@ class WorkloadProtectableItemResource(Resource): :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: WorkloadProtectableItemResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItem + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: WorkloadProtectableItemResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItem """ _validation = { @@ -13890,6 +17483,16 @@ def __init__( self, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: WorkloadProtectableItemResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItem + """ super(WorkloadProtectableItemResource, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) @@ -13897,11 +17500,11 @@ def __init__( class WorkloadProtectableItemResourceList(ResourceList): """List of WorkloadProtectableItem resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResource] """ _attribute_map = { @@ -13913,6 +17516,14 @@ def __init__( self, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResource] + """ super(WorkloadProtectableItemResourceList, self).__init__(**kwargs) self.value = kwargs.get('value', None) @@ -13920,21 +17531,22 @@ def __init__( class YearlyRetentionSchedule(msrest.serialization.Model): """Yearly retention schedule. - :param retention_schedule_format_type: Retention schedule format for yearly retention policy. + :ivar retention_schedule_format_type: Retention schedule format for yearly retention policy. Possible values include: "Invalid", "Daily", "Weekly". - :type retention_schedule_format_type: str or + :vartype retention_schedule_format_type: str or ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat - :param months_of_year: List of months of year of yearly retention policy. - :type months_of_year: list[str or ~azure.mgmt.recoveryservicesbackup.models.MonthOfYear] - :param retention_schedule_daily: Daily retention format for yearly retention policy. - :type retention_schedule_daily: ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat - :param retention_schedule_weekly: Weekly retention format for yearly retention policy. - :type retention_schedule_weekly: + :ivar months_of_year: List of months of year of yearly retention policy. + :vartype months_of_year: list[str or ~azure.mgmt.recoveryservicesbackup.models.MonthOfYear] + :ivar retention_schedule_daily: Daily retention format for yearly retention policy. + :vartype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat + :ivar retention_schedule_weekly: Weekly retention format for yearly retention policy. + :vartype retention_schedule_weekly: ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat - :param retention_times: Retention times of retention policy. - :type retention_times: list[~datetime.datetime] - :param retention_duration: Retention duration of retention Policy. - :type retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + :ivar retention_times: Retention times of retention policy. + :vartype retention_times: list[~datetime.datetime] + :ivar retention_duration: Retention duration of retention Policy. + :vartype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -13950,6 +17562,24 @@ def __init__( self, **kwargs ): + """ + :keyword retention_schedule_format_type: Retention schedule format for yearly retention policy. + Possible values include: "Invalid", "Daily", "Weekly". + :paramtype retention_schedule_format_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat + :keyword months_of_year: List of months of year of yearly retention policy. + :paramtype months_of_year: list[str or ~azure.mgmt.recoveryservicesbackup.models.MonthOfYear] + :keyword retention_schedule_daily: Daily retention format for yearly retention policy. + :paramtype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat + :keyword retention_schedule_weekly: Weekly retention format for yearly retention policy. + :paramtype retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat + :keyword retention_times: Retention times of retention policy. + :paramtype retention_times: list[~datetime.datetime] + :keyword retention_duration: Retention duration of retention Policy. + :paramtype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ super(YearlyRetentionSchedule, self).__init__(**kwargs) self.retention_schedule_format_type = kwargs.get('retention_schedule_format_type', None) self.months_of_year = kwargs.get('months_of_year', None) 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..9cd8867c9ab2 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. @@ -167,8 +23,8 @@ class FeatureSupportRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param feature_type: Required. backup support feature type.Constant filled by server. - :type feature_type: str + :ivar feature_type: Required. backup support feature type.Constant filled by server. + :vartype feature_type: str """ _validation = { @@ -187,6 +43,8 @@ def __init__( self, **kwargs ): + """ + """ super(FeatureSupportRequest, self).__init__(**kwargs) self.feature_type = None # type: Optional[str] @@ -196,8 +54,8 @@ class AzureBackupGoalFeatureSupportRequest(FeatureSupportRequest): All required parameters must be populated in order to send to Azure. - :param feature_type: Required. backup support feature type.Constant filled by server. - :type feature_type: str + :ivar feature_type: Required. backup support feature type.Constant filled by server. + :vartype feature_type: str """ _validation = { @@ -212,6 +70,8 @@ def __init__( self, **kwargs ): + """ + """ super(AzureBackupGoalFeatureSupportRequest, self).__init__(**kwargs) self.feature_type = 'AzureBackupGoals' # type: str @@ -224,29 +84,31 @@ class ProtectionContainer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str """ _validation = { @@ -259,6 +121,7 @@ class ProtectionContainer(msrest.serialization.Model): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, } _subtype_map = { @@ -272,14 +135,33 @@ def __init__( backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, registration_status: Optional[str] = None, health_status: Optional[str] = None, - **kwargs - ): + protectable_object_type: Optional[str] = None, + **kwargs + ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + """ super(ProtectionContainer, self).__init__(**kwargs) self.friendly_name = friendly_name self.backup_management_type = backup_management_type self.registration_status = registration_status self.health_status = health_status self.container_type = None # type: Optional[str] + self.protectable_object_type = protectable_object_type class DpmContainer(ProtectionContainer): @@ -290,45 +172,47 @@ class DpmContainer(ProtectionContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param can_re_register: Specifies whether the container is re-registrable. - :type can_re_register: bool - :param container_id: ID of container. - :type container_id: str - :param protected_item_count: Number of protected items in the BackupEngine. - :type protected_item_count: long - :param dpm_agent_version: Backup engine Agent version. - :type dpm_agent_version: str - :param dpm_servers: List of BackupEngines protecting the container. - :type dpm_servers: list[str] - :param upgrade_available: To check if upgrade available. - :type upgrade_available: bool - :param protection_status: Protection status of the container. - :type protection_status: str - :param extended_info: Extended Info of the container. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar can_re_register: Specifies whether the container is re-registrable. + :vartype can_re_register: bool + :ivar container_id: ID of container. + :vartype container_id: str + :ivar protected_item_count: Number of protected items in the BackupEngine. + :vartype protected_item_count: long + :ivar dpm_agent_version: Backup engine Agent version. + :vartype dpm_agent_version: str + :ivar dpm_servers: List of BackupEngines protecting the container. + :vartype dpm_servers: list[str] + :ivar upgrade_available: To check if upgrade available. + :vartype upgrade_available: bool + :ivar protection_status: Protection status of the container. + :vartype protection_status: str + :ivar extended_info: Extended Info of the container. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo """ _validation = { @@ -341,6 +225,7 @@ class DpmContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, 'container_id': {'key': 'containerId', 'type': 'str'}, 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, @@ -362,6 +247,7 @@ def __init__( backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, registration_status: Optional[str] = None, health_status: Optional[str] = None, + protectable_object_type: Optional[str] = None, can_re_register: Optional[bool] = None, container_id: Optional[str] = None, protected_item_count: Optional[int] = None, @@ -372,7 +258,40 @@ def __init__( extended_info: Optional["DPMContainerExtendedInfo"] = None, **kwargs ): - super(DpmContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword can_re_register: Specifies whether the container is re-registrable. + :paramtype can_re_register: bool + :keyword container_id: ID of container. + :paramtype container_id: str + :keyword protected_item_count: Number of protected items in the BackupEngine. + :paramtype protected_item_count: long + :keyword dpm_agent_version: Backup engine Agent version. + :paramtype dpm_agent_version: str + :keyword dpm_servers: List of BackupEngines protecting the container. + :paramtype dpm_servers: list[str] + :keyword upgrade_available: To check if upgrade available. + :paramtype upgrade_available: bool + :keyword protection_status: Protection status of the container. + :paramtype protection_status: str + :keyword extended_info: Extended Info of the container. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo + """ + super(DpmContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, protectable_object_type=protectable_object_type, **kwargs) self.container_type = 'DPMContainer' # type: str self.can_re_register = can_re_register self.container_id = container_id @@ -389,45 +308,47 @@ class AzureBackupServerContainer(DpmContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param can_re_register: Specifies whether the container is re-registrable. - :type can_re_register: bool - :param container_id: ID of container. - :type container_id: str - :param protected_item_count: Number of protected items in the BackupEngine. - :type protected_item_count: long - :param dpm_agent_version: Backup engine Agent version. - :type dpm_agent_version: str - :param dpm_servers: List of BackupEngines protecting the container. - :type dpm_servers: list[str] - :param upgrade_available: To check if upgrade available. - :type upgrade_available: bool - :param protection_status: Protection status of the container. - :type protection_status: str - :param extended_info: Extended Info of the container. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar can_re_register: Specifies whether the container is re-registrable. + :vartype can_re_register: bool + :ivar container_id: ID of container. + :vartype container_id: str + :ivar protected_item_count: Number of protected items in the BackupEngine. + :vartype protected_item_count: long + :ivar dpm_agent_version: Backup engine Agent version. + :vartype dpm_agent_version: str + :ivar dpm_servers: List of BackupEngines protecting the container. + :vartype dpm_servers: list[str] + :ivar upgrade_available: To check if upgrade available. + :vartype upgrade_available: bool + :ivar protection_status: Protection status of the container. + :vartype protection_status: str + :ivar extended_info: Extended Info of the container. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo """ _validation = { @@ -440,6 +361,7 @@ class AzureBackupServerContainer(DpmContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, 'container_id': {'key': 'containerId', 'type': 'str'}, 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, @@ -457,6 +379,7 @@ def __init__( backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, registration_status: Optional[str] = None, health_status: Optional[str] = None, + protectable_object_type: Optional[str] = None, can_re_register: Optional[bool] = None, container_id: Optional[str] = None, protected_item_count: Optional[int] = None, @@ -467,7 +390,40 @@ def __init__( extended_info: Optional["DPMContainerExtendedInfo"] = None, **kwargs ): - super(AzureBackupServerContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, can_re_register=can_re_register, container_id=container_id, protected_item_count=protected_item_count, dpm_agent_version=dpm_agent_version, dpm_servers=dpm_servers, upgrade_available=upgrade_available, protection_status=protection_status, extended_info=extended_info, **kwargs) + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword can_re_register: Specifies whether the container is re-registrable. + :paramtype can_re_register: bool + :keyword container_id: ID of container. + :paramtype container_id: str + :keyword protected_item_count: Number of protected items in the BackupEngine. + :paramtype protected_item_count: long + :keyword dpm_agent_version: Backup engine Agent version. + :paramtype dpm_agent_version: str + :keyword dpm_servers: List of BackupEngines protecting the container. + :paramtype dpm_servers: list[str] + :keyword upgrade_available: To check if upgrade available. + :paramtype upgrade_available: bool + :keyword protection_status: Protection status of the container. + :paramtype protection_status: str + :keyword extended_info: Extended Info of the container. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo + """ + super(AzureBackupServerContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, protectable_object_type=protectable_object_type, can_re_register=can_re_register, container_id=container_id, protected_item_count=protected_item_count, dpm_agent_version=dpm_agent_version, dpm_servers=dpm_servers, upgrade_available=upgrade_available, protection_status=protection_status, extended_info=extended_info, **kwargs) self.container_type = 'AzureBackupServerContainer' # type: str @@ -479,39 +435,39 @@ class BackupEngineBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the backup engine. - :type friendly_name: str - :param backup_management_type: Type of backup management for the backup engine. Possible values + :ivar friendly_name: Friendly name of the backup engine. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the backup engine. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Registration status of the backup engine with the Recovery Services + :ivar registration_status: Registration status of the backup engine with the Recovery Services Vault. - :type registration_status: str - :param backup_engine_state: Status of the backup engine with the Recovery Services Vault. = + :vartype registration_status: str + :ivar backup_engine_state: Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed}. - :type backup_engine_state: str - :param health_status: Backup status of the backup engine. - :type health_status: str - :param backup_engine_type: Required. Type of the backup engine.Constant filled by server. + :vartype backup_engine_state: str + :ivar health_status: Backup status of the backup engine. + :vartype health_status: str + :ivar backup_engine_type: Required. Type of the backup engine.Constant filled by server. Possible values include: "Invalid", "DpmBackupEngine", "AzureBackupServerEngine". - :type backup_engine_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupEngineType - :param can_re_register: Flag indicating if the backup engine be registered, once already + :vartype backup_engine_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupEngineType + :ivar can_re_register: Flag indicating if the backup engine be registered, once already registered. - :type can_re_register: bool - :param backup_engine_id: ID of the backup engine. - :type backup_engine_id: str - :param dpm_version: Backup engine version. - :type dpm_version: str - :param azure_backup_agent_version: Backup agent version. - :type azure_backup_agent_version: str - :param is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. - :type is_azure_backup_agent_upgrade_available: bool - :param is_dpm_upgrade_available: To check if backup engine upgrade available. - :type is_dpm_upgrade_available: bool - :param extended_info: Extended info of the backupengine. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :vartype can_re_register: bool + :ivar backup_engine_id: ID of the backup engine. + :vartype backup_engine_id: str + :ivar dpm_version: Backup engine version. + :vartype dpm_version: str + :ivar azure_backup_agent_version: Backup agent version. + :vartype azure_backup_agent_version: str + :ivar is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. + :vartype is_azure_backup_agent_upgrade_available: bool + :ivar is_dpm_upgrade_available: To check if backup engine upgrade available. + :vartype is_dpm_upgrade_available: bool + :ivar extended_info: Extended info of the backupengine. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo """ _validation = { @@ -555,6 +511,38 @@ def __init__( extended_info: Optional["BackupEngineExtendedInfo"] = None, **kwargs ): + """ + :keyword friendly_name: Friendly name of the backup engine. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the backup engine. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Registration status of the backup engine with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword backup_engine_state: Status of the backup engine with the Recovery Services Vault. = + {Active/Deleting/DeleteFailed}. + :paramtype backup_engine_state: str + :keyword health_status: Backup status of the backup engine. + :paramtype health_status: str + :keyword can_re_register: Flag indicating if the backup engine be registered, once already + registered. + :paramtype can_re_register: bool + :keyword backup_engine_id: ID of the backup engine. + :paramtype backup_engine_id: str + :keyword dpm_version: Backup engine version. + :paramtype dpm_version: str + :keyword azure_backup_agent_version: Backup agent version. + :paramtype azure_backup_agent_version: str + :keyword is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. + :paramtype is_azure_backup_agent_upgrade_available: bool + :keyword is_dpm_upgrade_available: To check if backup engine upgrade available. + :paramtype is_dpm_upgrade_available: bool + :keyword extended_info: Extended info of the backupengine. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + """ super(BackupEngineBase, self).__init__(**kwargs) self.friendly_name = friendly_name self.backup_management_type = backup_management_type @@ -576,39 +564,39 @@ class AzureBackupServerEngine(BackupEngineBase): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the backup engine. - :type friendly_name: str - :param backup_management_type: Type of backup management for the backup engine. Possible values + :ivar friendly_name: Friendly name of the backup engine. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the backup engine. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Registration status of the backup engine with the Recovery Services + :ivar registration_status: Registration status of the backup engine with the Recovery Services Vault. - :type registration_status: str - :param backup_engine_state: Status of the backup engine with the Recovery Services Vault. = + :vartype registration_status: str + :ivar backup_engine_state: Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed}. - :type backup_engine_state: str - :param health_status: Backup status of the backup engine. - :type health_status: str - :param backup_engine_type: Required. Type of the backup engine.Constant filled by server. + :vartype backup_engine_state: str + :ivar health_status: Backup status of the backup engine. + :vartype health_status: str + :ivar backup_engine_type: Required. Type of the backup engine.Constant filled by server. Possible values include: "Invalid", "DpmBackupEngine", "AzureBackupServerEngine". - :type backup_engine_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupEngineType - :param can_re_register: Flag indicating if the backup engine be registered, once already + :vartype backup_engine_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupEngineType + :ivar can_re_register: Flag indicating if the backup engine be registered, once already registered. - :type can_re_register: bool - :param backup_engine_id: ID of the backup engine. - :type backup_engine_id: str - :param dpm_version: Backup engine version. - :type dpm_version: str - :param azure_backup_agent_version: Backup agent version. - :type azure_backup_agent_version: str - :param is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. - :type is_azure_backup_agent_upgrade_available: bool - :param is_dpm_upgrade_available: To check if backup engine upgrade available. - :type is_dpm_upgrade_available: bool - :param extended_info: Extended info of the backupengine. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :vartype can_re_register: bool + :ivar backup_engine_id: ID of the backup engine. + :vartype backup_engine_id: str + :ivar dpm_version: Backup engine version. + :vartype dpm_version: str + :ivar azure_backup_agent_version: Backup agent version. + :vartype azure_backup_agent_version: str + :ivar is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. + :vartype is_azure_backup_agent_upgrade_available: bool + :ivar is_dpm_upgrade_available: To check if backup engine upgrade available. + :vartype is_dpm_upgrade_available: bool + :ivar extended_info: Extended info of the backupengine. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo """ _validation = { @@ -648,6 +636,38 @@ def __init__( extended_info: Optional["BackupEngineExtendedInfo"] = None, **kwargs ): + """ + :keyword friendly_name: Friendly name of the backup engine. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the backup engine. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Registration status of the backup engine with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword backup_engine_state: Status of the backup engine with the Recovery Services Vault. = + {Active/Deleting/DeleteFailed}. + :paramtype backup_engine_state: str + :keyword health_status: Backup status of the backup engine. + :paramtype health_status: str + :keyword can_re_register: Flag indicating if the backup engine be registered, once already + registered. + :paramtype can_re_register: bool + :keyword backup_engine_id: ID of the backup engine. + :paramtype backup_engine_id: str + :keyword dpm_version: Backup engine version. + :paramtype dpm_version: str + :keyword azure_backup_agent_version: Backup agent version. + :paramtype azure_backup_agent_version: str + :keyword is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. + :paramtype is_azure_backup_agent_upgrade_available: bool + :keyword is_dpm_upgrade_available: To check if backup engine upgrade available. + :paramtype is_dpm_upgrade_available: bool + :keyword extended_info: Extended info of the backupengine. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + """ super(AzureBackupServerEngine, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, backup_engine_state=backup_engine_state, health_status=health_status, can_re_register=can_re_register, backup_engine_id=backup_engine_id, dpm_version=dpm_version, azure_backup_agent_version=azure_backup_agent_version, is_azure_backup_agent_upgrade_available=is_azure_backup_agent_upgrade_available, is_dpm_upgrade_available=is_dpm_upgrade_available, extended_info=extended_info, **kwargs) self.backup_engine_type = 'AzureBackupServerEngine' # type: str @@ -660,9 +680,9 @@ class BackupRequest(msrest.serialization.Model): 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 + :ivar 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 + :vartype object_type: str """ _validation = { @@ -681,6 +701,8 @@ def __init__( self, **kwargs ): + """ + """ super(BackupRequest, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -690,12 +712,12 @@ class AzureFileShareBackupRequest(BackupRequest): 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 + :ivar 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_expiry_time_in_utc: Backup copy will expire after the time specified + :vartype object_type: str + :ivar recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified (UTC). - :type recovery_point_expiry_time_in_utc: ~datetime.datetime + :vartype recovery_point_expiry_time_in_utc: ~datetime.datetime """ _validation = { @@ -713,6 +735,11 @@ def __init__( recovery_point_expiry_time_in_utc: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified + (UTC). + :paramtype recovery_point_expiry_time_in_utc: ~datetime.datetime + """ super(AzureFileShareBackupRequest, self).__init__(**kwargs) self.object_type = 'AzureFileShareBackupRequest' # type: str self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc @@ -726,17 +753,17 @@ class WorkloadProtectableItem(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus """ _validation = { @@ -764,6 +791,17 @@ def __init__( protection_state: Optional[Union[str, "ProtectionStatus"]] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ super(WorkloadProtectableItem, self).__init__(**kwargs) self.backup_management_type = backup_management_type self.workload_type = workload_type @@ -777,26 +815,26 @@ class AzureFileShareProtectableItem(WorkloadProtectableItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_container_fabric_id: Full Fabric ID of container to which this protectable item + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_container_fabric_id: Full Fabric ID of container to which this protectable item belongs. For example, ARM ID. - :type parent_container_fabric_id: str - :param parent_container_friendly_name: Friendly name of container to which this protectable - item belongs. - :type parent_container_friendly_name: str - :param azure_file_share_type: File Share type XSync or XSMB. Possible values include: - "Invalid", "XSMB", "XSync". - :type azure_file_share_type: str or + :vartype parent_container_fabric_id: str + :ivar parent_container_friendly_name: Friendly name of container to which this protectable item + belongs. + :vartype parent_container_friendly_name: str + :ivar azure_file_share_type: File Share type XSync or XSMB. Possible values include: "Invalid", + "XSMB", "XSync". + :vartype azure_file_share_type: str or ~azure.mgmt.recoveryservicesbackup.models.AzureFileShareType """ @@ -827,6 +865,27 @@ def __init__( azure_file_share_type: Optional[Union[str, "AzureFileShareType"]] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_container_fabric_id: Full Fabric ID of container to which this protectable item + belongs. For example, ARM ID. + :paramtype parent_container_fabric_id: str + :keyword parent_container_friendly_name: Friendly name of container to which this protectable + item belongs. + :paramtype parent_container_friendly_name: str + :keyword azure_file_share_type: File Share type XSync or XSMB. Possible values include: + "Invalid", "XSMB", "XSync". + :paramtype azure_file_share_type: str or + ~azure.mgmt.recoveryservicesbackup.models.AzureFileShareType + """ super(AzureFileShareProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, **kwargs) self.protectable_item_type = 'AzureFileShare' # type: str self.parent_container_fabric_id = parent_container_fabric_id @@ -838,52 +897,56 @@ 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. - :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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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] + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str """ _validation = { @@ -906,10 +969,12 @@ class ProtectedItem(msrest.serialization.Model): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, } _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__( @@ -929,8 +994,57 @@ def __init__( is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, resource_guard_operation_requests: Optional[List[str]] = None, + is_archive_enabled: Optional[bool] = None, + policy_name: Optional[str] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + """ super(ProtectedItem, self).__init__(**kwargs) self.protected_item_type = None # type: Optional[str] self.backup_management_type = backup_management_type @@ -947,6 +1061,8 @@ def __init__( self.is_deferred_delete_schedule_upcoming = is_deferred_delete_schedule_upcoming self.is_rehydrate = is_rehydrate self.resource_guard_operation_requests = resource_guard_operation_requests + self.is_archive_enabled = is_archive_enabled + self.policy_name = policy_name class AzureFileshareProtectedItem(ProtectedItem): @@ -954,199 +1070,68 @@ class AzureFileshareProtectedItem(ProtectedItem): 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 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'}, - '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, - 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(AzureFileshareProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, 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.last_backup_status = last_backup_status - self.last_backup_time = last_backup_time - self.kpis_healths = kpis_healths - 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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", + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the fileshare represented by this backup item. + :vartype friendly_name: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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, + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param extended_info: Additional information with this backup item. - :type extended_info: + :ivar extended_info: Additional information with this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo """ @@ -1170,10 +1155,11 @@ class AzureFileshareProtectedItemAutoGenerated(ProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', '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}'}, @@ -1197,22 +1183,87 @@ def __init__( is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, resource_guard_operation_requests: Optional[List[str]] = None, + is_archive_enabled: Optional[bool] = None, + policy_name: Optional[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) + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the fileshare represented by this backup item. + :paramtype friendly_name: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + :keyword extended_info: Additional information with this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo + """ + super(AzureFileshareProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, is_archive_enabled=is_archive_enabled, policy_name=policy_name, **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 @@ -1224,14 +1275,13 @@ class AzureFileshareProtectedItemExtendedInfo(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param oldest_recovery_point: The oldest backup copy available for this item in the service. - :type oldest_recovery_point: ~datetime.datetime - :param recovery_point_count: Number of available backup copies associated with this backup - item. - :type recovery_point_count: int - :param policy_state: Indicates consistency of policy object and policy applied to this backup + :ivar oldest_recovery_point: The oldest backup copy available for this item in the service. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of available backup copies associated with this backup item. + :vartype recovery_point_count: int + :ivar policy_state: Indicates consistency of policy object and policy applied to this backup item. - :type policy_state: str + :vartype policy_state: str :ivar resource_state: Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted}. :vartype resource_state: str @@ -1260,6 +1310,16 @@ def __init__( policy_state: Optional[str] = None, **kwargs ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this item in the service. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of available backup copies associated with this backup + item. + :paramtype recovery_point_count: int + :keyword policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :paramtype policy_state: str + """ super(AzureFileshareProtectedItemExtendedInfo, self).__init__(**kwargs) self.oldest_recovery_point = oldest_recovery_point self.recovery_point_count = recovery_point_count @@ -1276,13 +1336,13 @@ class ProtectionPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param protected_items_count: Number of items associated with this policy. - :type protected_items_count: int - :param backup_management_type: Required. This property will be used as the discriminator for + :ivar protected_items_count: Number of items associated with this policy. + :vartype protected_items_count: int + :ivar backup_management_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 backup_management_type: str - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] """ _validation = { @@ -1306,6 +1366,12 @@ def __init__( resource_guard_operation_requests: Optional[List[str]] = None, **kwargs ): + """ + :keyword protected_items_count: Number of items associated with this policy. + :paramtype protected_items_count: int + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + """ super(ProtectionPolicy, self).__init__(**kwargs) self.protected_items_count = protected_items_count self.backup_management_type = None # type: Optional[str] @@ -1317,25 +1383,25 @@ class AzureFileShareProtectionPolicy(ProtectionPolicy): All required parameters must be populated in order to send to Azure. - :param protected_items_count: Number of items associated with this policy. - :type protected_items_count: int - :param backup_management_type: Required. This property will be used as the discriminator for + :ivar protected_items_count: Number of items associated with this policy. + :vartype protected_items_count: int + :ivar backup_management_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 backup_management_type: str - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] - :param work_load_type: Type of workload for the backup management. Possible values include: + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + :ivar work_load_type: Type of workload for the backup management. Possible values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase". - :type work_load_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType - :param schedule_policy: Backup schedule specified as part of backup policy. - :type schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy - :param retention_policy: Retention policy with the details on backup copy retention ranges. - :type retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy - :param time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard + :vartype work_load_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar schedule_policy: Backup schedule specified as part of backup policy. + :vartype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :ivar retention_policy: Retention policy with the details on backup copy retention ranges. + :vartype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :ivar time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - :type time_zone: str + :vartype time_zone: str """ _validation = { @@ -1363,6 +1429,24 @@ def __init__( time_zone: Optional[str] = None, **kwargs ): + """ + :keyword protected_items_count: Number of items associated with this policy. + :paramtype protected_items_count: int + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + :keyword work_load_type: Type of workload for the backup management. Possible values include: + "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", + "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype work_load_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword schedule_policy: Backup schedule specified as part of backup policy. + :paramtype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :keyword retention_policy: Retention policy with the details on backup copy retention ranges. + :paramtype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :keyword time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific + Standard Time". + :paramtype time_zone: str + """ super(AzureFileShareProtectionPolicy, self).__init__(protected_items_count=protected_items_count, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.backup_management_type = 'AzureStorage' # type: str self.work_load_type = work_load_type @@ -1379,9 +1463,9 @@ class ILRRequest(msrest.serialization.Model): 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 + :ivar 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 + :vartype object_type: str """ _validation = { @@ -1400,6 +1484,8 @@ def __init__( self, **kwargs ): + """ + """ super(ILRRequest, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -1409,13 +1495,13 @@ class AzureFileShareProvisionILRRequest(ILRRequest): 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 + :ivar 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: Recovery point ID. - :type recovery_point_id: str - :param source_resource_id: Source Storage account ARM Id. - :type source_resource_id: str + :vartype object_type: str + :ivar recovery_point_id: Recovery point ID. + :vartype recovery_point_id: str + :ivar source_resource_id: Source Storage account ARM Id. + :vartype source_resource_id: str """ _validation = { @@ -1435,6 +1521,12 @@ def __init__( source_resource_id: Optional[str] = None, **kwargs ): + """ + :keyword recovery_point_id: Recovery point ID. + :paramtype recovery_point_id: str + :keyword source_resource_id: Source Storage account ARM Id. + :paramtype source_resource_id: str + """ super(AzureFileShareProvisionILRRequest, self).__init__(**kwargs) self.object_type = 'AzureFileShareProvisionILRRequest' # type: str self.recovery_point_id = recovery_point_id @@ -1445,13 +1537,13 @@ 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. - :param object_type: Required. This property will be used as the discriminator for deciding the + :ivar 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 + :vartype object_type: str """ _validation = { @@ -1463,13 +1555,15 @@ 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__( self, **kwargs ): + """ + """ super(RecoveryPoint, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -1479,18 +1573,18 @@ class AzureFileShareRecoveryPoint(RecoveryPoint): 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 + :ivar 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_type: Type of the backup copy. Specifies whether it is a crash consistent + :vartype object_type: str + :ivar recovery_point_type: Type of the backup copy. Specifies whether it is a crash consistent backup or app consistent. - :type recovery_point_type: str - :param recovery_point_time: Time at which this backup copy was created. - :type recovery_point_time: ~datetime.datetime - :param file_share_snapshot_uri: Contains Url to the snapshot of fileshare, if applicable. - :type file_share_snapshot_uri: str - :param recovery_point_size_in_gb: Contains recovery point size. - :type recovery_point_size_in_gb: int + :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 = { @@ -1514,6 +1608,17 @@ def __init__( recovery_point_size_in_gb: Optional[int] = None, **kwargs ): + """ + :keyword recovery_point_type: Type of the backup copy. Specifies whether it is a crash + consistent backup or app consistent. + :paramtype recovery_point_type: str + :keyword recovery_point_time: Time at which this backup copy was created. + :paramtype recovery_point_time: ~datetime.datetime + :keyword file_share_snapshot_uri: Contains Url to the snapshot of fileshare, if applicable. + :paramtype file_share_snapshot_uri: str + :keyword recovery_point_size_in_gb: Contains recovery point size. + :paramtype recovery_point_size_in_gb: int + """ super(AzureFileShareRecoveryPoint, self).__init__(**kwargs) self.object_type = 'AzureFileShareRecoveryPoint' # type: str self.recovery_point_type = recovery_point_type @@ -1522,112 +1627,66 @@ 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. + 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. - :param object_type: Required. This property will be used as the discriminator for deciding the + :ivar 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 + :vartype object_type: str """ _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'}, + } + + _subtype_map = { + 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequest'} } 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 - + """ + """ + super(RestoreRequest, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] -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. +class AzureFileShareRestoreRequest(RestoreRequest): + """AzureFileShare Restore 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 + :ivar 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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - } - - _subtype_map = { - 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequestAutoGenerated'} - } - - def __init__( - self, - **kwargs - ): - super(RestoreRequest, self).__init__(**kwargs) - self.object_type = None # type: Optional[str] - - -class AzureFileShareRestoreRequest(RestoreRequest): - """AzureFileShare Restore 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 - :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: Source storage account ARM Id. - :type source_resource_id: str - :param copy_options: Options to resolve copy conflicts. Possible values include: "Invalid", - "CreateCopy", "Skip", "Overwrite", "FailOnConflict". - :type copy_options: str or ~azure.mgmt.recoveryservicesbackup.models.CopyOptions - :param restore_request_type: Restore Type (FullShareRestore or ItemLevelRestore). Possible - values include: "Invalid", "FullShareRestore", "ItemLevelRestore". - :type restore_request_type: str or ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestType - :param restore_file_specs: List of Source Files/Folders(which need to recover) and - TargetFolderPath details. - :type restore_file_specs: list[~azure.mgmt.recoveryservicesbackup.models.RestoreFileSpecs] - :param target_details: Target File Share Details. - :type target_details: ~azure.mgmt.recoveryservicesbackup.models.TargetAFSRestoreInfo + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Source storage account ARM Id. + :vartype source_resource_id: str + :ivar copy_options: Options to resolve copy conflicts. Possible values include: "Invalid", + "CreateCopy", "Skip", "Overwrite", "FailOnConflict". + :vartype copy_options: str or ~azure.mgmt.recoveryservicesbackup.models.CopyOptions + :ivar restore_request_type: Restore Type (FullShareRestore or ItemLevelRestore). Possible + values include: "Invalid", "FullShareRestore", "ItemLevelRestore". + :vartype restore_request_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestType + :ivar restore_file_specs: List of Source Files/Folders(which need to recover) and + TargetFolderPath details. + :vartype restore_file_specs: list[~azure.mgmt.recoveryservicesbackup.models.RestoreFileSpecs] + :ivar target_details: Target File Share Details. + :vartype target_details: ~azure.mgmt.recoveryservicesbackup.models.TargetAFSRestoreInfo """ _validation = { @@ -1655,6 +1714,25 @@ def __init__( target_details: Optional["TargetAFSRestoreInfo"] = None, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Source storage account ARM Id. + :paramtype source_resource_id: str + :keyword copy_options: Options to resolve copy conflicts. Possible values include: "Invalid", + "CreateCopy", "Skip", "Overwrite", "FailOnConflict". + :paramtype copy_options: str or ~azure.mgmt.recoveryservicesbackup.models.CopyOptions + :keyword restore_request_type: Restore Type (FullShareRestore or ItemLevelRestore). Possible + values include: "Invalid", "FullShareRestore", "ItemLevelRestore". + :paramtype restore_request_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestType + :keyword restore_file_specs: List of Source Files/Folders(which need to recover) and + TargetFolderPath details. + :paramtype restore_file_specs: list[~azure.mgmt.recoveryservicesbackup.models.RestoreFileSpecs] + :keyword target_details: Target File Share Details. + :paramtype target_details: ~azure.mgmt.recoveryservicesbackup.models.TargetAFSRestoreInfo + """ super(AzureFileShareRestoreRequest, self).__init__(**kwargs) self.object_type = 'AzureFileShareRestoreRequest' # type: str self.recovery_type = recovery_type @@ -1673,37 +1751,39 @@ class IaaSVMContainer(ProtectionContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. - :type virtual_machine_id: str - :param virtual_machine_version: Specifies whether the container represents a Classic or an - Azure Resource Manager VM. - :type virtual_machine_version: str - :param resource_group: Resource group name of Recovery Services Vault. - :type resource_group: str + :vartype virtual_machine_id: str + :ivar virtual_machine_version: Specifies whether the container represents a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar resource_group: Resource group name of Recovery Services Vault. + :vartype resource_group: str """ _validation = { @@ -1716,6 +1796,7 @@ class IaaSVMContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, @@ -1732,12 +1813,38 @@ def __init__( backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, registration_status: Optional[str] = None, health_status: Optional[str] = None, + protectable_object_type: Optional[str] = None, virtual_machine_id: Optional[str] = None, virtual_machine_version: Optional[str] = None, resource_group: Optional[str] = None, **kwargs ): - super(IaaSVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this + Azure IaaS VM container. + :paramtype virtual_machine_id: str + :keyword virtual_machine_version: Specifies whether the container represents a Classic or an + Azure Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword resource_group: Resource group name of Recovery Services Vault. + :paramtype resource_group: str + """ + super(IaaSVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, protectable_object_type=protectable_object_type, **kwargs) self.container_type = 'IaaSVMContainer' # type: str self.virtual_machine_id = virtual_machine_id self.virtual_machine_version = virtual_machine_version @@ -1749,37 +1856,39 @@ class AzureIaaSClassicComputeVMContainer(IaaSVMContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. - :type virtual_machine_id: str - :param virtual_machine_version: Specifies whether the container represents a Classic or an - Azure Resource Manager VM. - :type virtual_machine_version: str - :param resource_group: Resource group name of Recovery Services Vault. - :type resource_group: str + :vartype virtual_machine_id: str + :ivar virtual_machine_version: Specifies whether the container represents a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar resource_group: Resource group name of Recovery Services Vault. + :vartype resource_group: str """ _validation = { @@ -1792,6 +1901,7 @@ class AzureIaaSClassicComputeVMContainer(IaaSVMContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, @@ -1804,12 +1914,38 @@ def __init__( backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, registration_status: Optional[str] = None, health_status: Optional[str] = None, + protectable_object_type: Optional[str] = None, virtual_machine_id: Optional[str] = None, virtual_machine_version: Optional[str] = None, resource_group: Optional[str] = None, **kwargs ): - super(AzureIaaSClassicComputeVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, virtual_machine_id=virtual_machine_id, virtual_machine_version=virtual_machine_version, resource_group=resource_group, **kwargs) + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this + Azure IaaS VM container. + :paramtype virtual_machine_id: str + :keyword virtual_machine_version: Specifies whether the container represents a Classic or an + Azure Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword resource_group: Resource group name of Recovery Services Vault. + :paramtype resource_group: str + """ + super(AzureIaaSClassicComputeVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, protectable_object_type=protectable_object_type, virtual_machine_id=virtual_machine_id, virtual_machine_version=virtual_machine_version, resource_group=resource_group, **kwargs) self.container_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str @@ -1821,19 +1957,24 @@ class IaaSVMProtectableItem(WorkloadProtectableItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. - :type virtual_machine_id: str + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :vartype virtual_machine_id: str + :ivar virtual_machine_version: Specifies whether the container represents a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar resource_group: Resource group name of Recovery Services Vault. + :vartype resource_group: str """ _validation = { @@ -1847,6 +1988,8 @@ class IaaSVMProtectableItem(WorkloadProtectableItem): 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, } _subtype_map = { @@ -1861,11 +2004,33 @@ def __init__( friendly_name: Optional[str] = None, protection_state: Optional[Union[str, "ProtectionStatus"]] = None, virtual_machine_id: Optional[str] = None, + virtual_machine_version: Optional[str] = None, + resource_group: Optional[str] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :paramtype virtual_machine_id: str + :keyword virtual_machine_version: Specifies whether the container represents a Classic or an + Azure Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword resource_group: Resource group name of Recovery Services Vault. + :paramtype resource_group: str + """ super(IaaSVMProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, **kwargs) self.protectable_item_type = 'IaaSVMProtectableItem' # type: str self.virtual_machine_id = virtual_machine_id + self.virtual_machine_version = virtual_machine_version + self.resource_group = resource_group class AzureIaaSClassicComputeVMProtectableItem(IaaSVMProtectableItem): @@ -1873,19 +2038,24 @@ class AzureIaaSClassicComputeVMProtectableItem(IaaSVMProtectableItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. - :type virtual_machine_id: str + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :vartype virtual_machine_id: str + :ivar virtual_machine_version: Specifies whether the container represents a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar resource_group: Resource group name of Recovery Services Vault. + :vartype resource_group: str """ _validation = { @@ -1899,6 +2069,8 @@ class AzureIaaSClassicComputeVMProtectableItem(IaaSVMProtectableItem): 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, } def __init__( @@ -1909,9 +2081,29 @@ def __init__( friendly_name: Optional[str] = None, protection_state: Optional[Union[str, "ProtectionStatus"]] = None, virtual_machine_id: Optional[str] = None, + virtual_machine_version: Optional[str] = None, + resource_group: Optional[str] = None, **kwargs ): - super(AzureIaaSClassicComputeVMProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, virtual_machine_id=virtual_machine_id, **kwargs) + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :paramtype virtual_machine_id: str + :keyword virtual_machine_version: Specifies whether the container represents a Classic or an + Azure Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword resource_group: Resource group name of Recovery Services Vault. + :paramtype resource_group: str + """ + super(AzureIaaSClassicComputeVMProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, virtual_machine_id=virtual_machine_id, virtual_machine_version=virtual_machine_version, resource_group=resource_group, **kwargs) self.protectable_item_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str @@ -1923,77 +2115,82 @@ class AzureIaaSVMProtectedItem(ProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 VM represented by this backup item. - :type friendly_name: str - :param virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this item. - :type virtual_machine_id: 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", + :vartype virtual_machine_id: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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: Health status of protected item. Possible values include: "Passed", + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar health_status: Health status of protected item. Possible values include: "Passed", "ActionRequired", "ActionSuggested", "Invalid". - :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, + :vartype health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param last_backup_status: Last backup operation status. - :type last_backup_status: str - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param protected_item_data_id: Data ID of the protected item. - :type protected_item_data_id: str - :param extended_info: Additional information for this backup item. - :type extended_info: + :ivar last_backup_status: Last backup operation status. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protected_item_data_id: Data ID of the protected item. + :vartype protected_item_data_id: str + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo - :param extended_properties: Extended Properties for Azure IaasVM Backup. - :type extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties """ _validation = { @@ -2016,6 +2213,8 @@ class AzureIaaSVMProtectedItem(ProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, @@ -2051,6 +2250,8 @@ def __init__( is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, resource_guard_operation_requests: Optional[List[str]] = None, + is_archive_enabled: Optional[bool] = None, + policy_name: Optional[str] = None, friendly_name: Optional[str] = None, virtual_machine_id: Optional[str] = None, protection_status: Optional[str] = None, @@ -2065,7 +2266,85 @@ def __init__( extended_properties: Optional["ExtendedProperties"] = None, **kwargs ): - super(AzureIaaSVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the VM represented by this backup item. + :paramtype friendly_name: str + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :paramtype virtual_machine_id: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + :keyword last_backup_status: Last backup operation status. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protected_item_data_id: Data ID of the protected item. + :paramtype protected_item_data_id: str + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties + """ + super(AzureIaaSVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, is_archive_enabled=is_archive_enabled, policy_name=policy_name, **kwargs) self.protected_item_type = 'AzureIaaSVMProtectedItem' # type: str self.friendly_name = friendly_name self.virtual_machine_id = virtual_machine_id @@ -2086,77 +2365,82 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 VM represented by this backup item. - :type friendly_name: str - :param virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this item. - :type virtual_machine_id: 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", + :vartype virtual_machine_id: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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: Health status of protected item. Possible values include: "Passed", + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar health_status: Health status of protected item. Possible values include: "Passed", "ActionRequired", "ActionSuggested", "Invalid". - :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, + :vartype health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param last_backup_status: Last backup operation status. - :type last_backup_status: str - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param protected_item_data_id: Data ID of the protected item. - :type protected_item_data_id: str - :param extended_info: Additional information for this backup item. - :type extended_info: + :ivar last_backup_status: Last backup operation status. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protected_item_data_id: Data ID of the protected item. + :vartype protected_item_data_id: str + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo - :param extended_properties: Extended Properties for Azure IaasVM Backup. - :type extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties """ _validation = { @@ -2179,6 +2463,8 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, @@ -2210,6 +2496,8 @@ def __init__( is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, resource_guard_operation_requests: Optional[List[str]] = None, + is_archive_enabled: Optional[bool] = None, + policy_name: Optional[str] = None, friendly_name: Optional[str] = None, virtual_machine_id: Optional[str] = None, protection_status: Optional[str] = None, @@ -2224,7 +2512,85 @@ def __init__( extended_properties: Optional["ExtendedProperties"] = None, **kwargs ): - super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, kpis_healths=kpis_healths, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, extended_properties=extended_properties, **kwargs) + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the VM represented by this backup item. + :paramtype friendly_name: str + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :paramtype virtual_machine_id: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + :keyword last_backup_status: Last backup operation status. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protected_item_data_id: Data ID of the protected item. + :paramtype protected_item_data_id: str + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties + """ + super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, is_archive_enabled=is_archive_enabled, policy_name=policy_name, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, kpis_healths=kpis_healths, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, extended_properties=extended_properties, **kwargs) self.protected_item_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str @@ -2233,37 +2599,39 @@ class AzureIaaSComputeVMContainer(IaaSVMContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. - :type virtual_machine_id: str - :param virtual_machine_version: Specifies whether the container represents a Classic or an - Azure Resource Manager VM. - :type virtual_machine_version: str - :param resource_group: Resource group name of Recovery Services Vault. - :type resource_group: str + :vartype virtual_machine_id: str + :ivar virtual_machine_version: Specifies whether the container represents a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar resource_group: Resource group name of Recovery Services Vault. + :vartype resource_group: str """ _validation = { @@ -2276,6 +2644,7 @@ class AzureIaaSComputeVMContainer(IaaSVMContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, @@ -2288,12 +2657,38 @@ def __init__( backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, registration_status: Optional[str] = None, health_status: Optional[str] = None, + protectable_object_type: Optional[str] = None, virtual_machine_id: Optional[str] = None, virtual_machine_version: Optional[str] = None, resource_group: Optional[str] = None, **kwargs ): - super(AzureIaaSComputeVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, virtual_machine_id=virtual_machine_id, virtual_machine_version=virtual_machine_version, resource_group=resource_group, **kwargs) + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword virtual_machine_id: Fully qualified ARM url of the virtual machine represented by this + Azure IaaS VM container. + :paramtype virtual_machine_id: str + :keyword virtual_machine_version: Specifies whether the container represents a Classic or an + Azure Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword resource_group: Resource group name of Recovery Services Vault. + :paramtype resource_group: str + """ + super(AzureIaaSComputeVMContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, protectable_object_type=protectable_object_type, virtual_machine_id=virtual_machine_id, virtual_machine_version=virtual_machine_version, resource_group=resource_group, **kwargs) self.container_type = 'Microsoft.Compute/virtualMachines' # type: str @@ -2302,19 +2697,24 @@ class AzureIaaSComputeVMProtectableItem(IaaSVMProtectableItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param virtual_machine_id: Fully qualified ARM ID of the virtual machine. - :type virtual_machine_id: str + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :vartype virtual_machine_id: str + :ivar virtual_machine_version: Specifies whether the container represents a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar resource_group: Resource group name of Recovery Services Vault. + :vartype resource_group: str """ _validation = { @@ -2328,6 +2728,8 @@ class AzureIaaSComputeVMProtectableItem(IaaSVMProtectableItem): 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, } def __init__( @@ -2338,9 +2740,29 @@ def __init__( friendly_name: Optional[str] = None, protection_state: Optional[Union[str, "ProtectionStatus"]] = None, virtual_machine_id: Optional[str] = None, + virtual_machine_version: Optional[str] = None, + resource_group: Optional[str] = None, **kwargs ): - super(AzureIaaSComputeVMProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, virtual_machine_id=virtual_machine_id, **kwargs) + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine. + :paramtype virtual_machine_id: str + :keyword virtual_machine_version: Specifies whether the container represents a Classic or an + Azure Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword resource_group: Resource group name of Recovery Services Vault. + :paramtype resource_group: str + """ + super(AzureIaaSComputeVMProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, virtual_machine_id=virtual_machine_id, virtual_machine_version=virtual_machine_version, resource_group=resource_group, **kwargs) self.protectable_item_type = 'Microsoft.Compute/virtualMachines' # type: str @@ -2349,77 +2771,82 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 VM represented by this backup item. - :type friendly_name: str - :param virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this item. - :type virtual_machine_id: 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", + :vartype virtual_machine_id: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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: Health status of protected item. Possible values include: "Passed", + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar health_status: Health status of protected item. Possible values include: "Passed", "ActionRequired", "ActionSuggested", "Invalid". - :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, + :vartype health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param last_backup_status: Last backup operation status. - :type last_backup_status: str - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param protected_item_data_id: Data ID of the protected item. - :type protected_item_data_id: str - :param extended_info: Additional information for this backup item. - :type extended_info: + :ivar last_backup_status: Last backup operation status. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protected_item_data_id: Data ID of the protected item. + :vartype protected_item_data_id: str + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo - :param extended_properties: Extended Properties for Azure IaasVM Backup. - :type extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties """ _validation = { @@ -2442,6 +2869,8 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, @@ -2473,6 +2902,8 @@ def __init__( is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, resource_guard_operation_requests: Optional[List[str]] = None, + is_archive_enabled: Optional[bool] = None, + policy_name: Optional[str] = None, friendly_name: Optional[str] = None, virtual_machine_id: Optional[str] = None, protection_status: Optional[str] = None, @@ -2487,7 +2918,85 @@ def __init__( extended_properties: Optional["ExtendedProperties"] = None, **kwargs ): - super(AzureIaaSComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, kpis_healths=kpis_healths, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, extended_properties=extended_properties, **kwargs) + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the VM represented by this backup item. + :paramtype friendly_name: str + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this + item. + :paramtype virtual_machine_id: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword health_status: Health status of protected item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + :keyword last_backup_status: Last backup operation status. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protected_item_data_id: Data ID of the protected item. + :paramtype protected_item_data_id: str + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: ~azure.mgmt.recoveryservicesbackup.models.ExtendedProperties + """ + super(AzureIaaSComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, is_archive_enabled=is_archive_enabled, policy_name=policy_name, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, kpis_healths=kpis_healths, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, extended_properties=extended_properties, **kwargs) self.protected_item_type = 'Microsoft.Compute/virtualMachines' # type: str @@ -2524,6 +3033,8 @@ def __init__( self, **kwargs ): + """ + """ super(AzureIaaSVMErrorInfo, self).__init__(**kwargs) self.error_code = None self.error_title = None @@ -2564,6 +3075,8 @@ def __init__( self, **kwargs ): + """ + """ super(ResourceHealthDetails, self).__init__(**kwargs) self.code = None self.title = None @@ -2604,6 +3117,8 @@ def __init__( self, **kwargs ): + """ + """ super(AzureIaaSVMHealthDetails, self).__init__(**kwargs) @@ -2611,30 +3126,30 @@ class Job(msrest.serialization.Model): """Defines workload agnostic properties for a job. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureIaaSVMJob, AzureStorageJob, AzureWorkloadJob, DpmJob, MabJob, VaultJob. + sub-classes are: AzureIaaSVMJob, AzureIaaSVMJobV2, AzureStorageJob, AzureWorkloadJob, DpmJob, MabJob, VaultJob. All required parameters must be populated in order to send to Azure. - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param activity_id: ActivityId of job. - :type activity_id: str - :param job_type: Required. This property will be used as the discriminator for deciding the + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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 job_type: str + :vartype job_type: str """ _validation = { @@ -2653,7 +3168,7 @@ class Job(msrest.serialization.Model): } _subtype_map = { - 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob', 'VaultJob': 'VaultJob'} + 'job_type': {'AzureIaaSVMJob': 'AzureIaaSVMJob', 'AzureIaaSVMJobV2': 'AzureIaaSVMJobV2', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob', 'VaultJob': 'VaultJob'} } def __init__( @@ -2668,6 +3183,26 @@ def __init__( activity_id: Optional[str] = None, **kwargs ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + """ super(Job, self).__init__(**kwargs) self.entity_friendly_name = entity_friendly_name self.backup_management_type = backup_management_type @@ -2684,37 +3219,42 @@ class AzureIaaSVMJob(Job): All required parameters must be populated in order to send to Azure. - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param activity_id: ActivityId of job. - :type activity_id: str - :param job_type: Required. This property will be used as the discriminator for deciding the + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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 job_type: str - :param duration: Time elapsed during the execution of this job. - :type duration: ~datetime.timedelta - :param actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. - :type actions_info: list[str or ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] - :param error_details: Error details on execution of this job. - :type error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMErrorInfo] - :param virtual_machine_version: Specifies whether the backup item is a Classic or an Azure + :vartype job_type: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMErrorInfo] + :ivar virtual_machine_version: Specifies whether the backup item is a Classic or an Azure Resource Manager VM. - :type virtual_machine_version: str - :param extended_info: Additional information for this job. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobExtendedInfo + :vartype virtual_machine_version: str + :ivar extended_info: Additional information for this job. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobExtendedInfo + :ivar container_name: Container name of the entity on which the current job is executing. + :vartype container_name: str + :ivar is_user_triggered: Indicated that whether the job is adhoc(true) or scheduled(false). + :vartype is_user_triggered: bool """ _validation = { @@ -2735,6 +3275,8 @@ class AzureIaaSVMJob(Job): 'error_details': {'key': 'errorDetails', 'type': '[AzureIaaSVMErrorInfo]'}, 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMJobExtendedInfo'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'is_user_triggered': {'key': 'isUserTriggered', 'type': 'bool'}, } def __init__( @@ -2752,8 +3294,46 @@ def __init__( error_details: Optional[List["AzureIaaSVMErrorInfo"]] = None, virtual_machine_version: Optional[str] = None, extended_info: Optional["AzureIaaSVMJobExtendedInfo"] = None, - **kwargs - ): + container_name: Optional[str] = None, + is_user_triggered: Optional[bool] = None, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMErrorInfo] + :keyword virtual_machine_version: Specifies whether the backup item is a Classic or an Azure + Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword extended_info: Additional information for this job. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobExtendedInfo + :keyword container_name: Container name of the entity on which the current job is executing. + :paramtype container_name: str + :keyword is_user_triggered: Indicated that whether the job is adhoc(true) or scheduled(false). + :paramtype is_user_triggered: bool + """ super(AzureIaaSVMJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) self.job_type = 'AzureIaaSVMJob' # type: str self.duration = duration @@ -2761,24 +3341,26 @@ def __init__( self.error_details = error_details self.virtual_machine_version = virtual_machine_version self.extended_info = extended_info + self.container_name = container_name + self.is_user_triggered = is_user_triggered class AzureIaaSVMJobExtendedInfo(msrest.serialization.Model): """Azure IaaS VM workload-specific additional information for job. - :param tasks_list: List of tasks associated with this job. - :type tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobTaskDetails] - :param property_bag: Job properties. - :type property_bag: dict[str, str] - :param internal_property_bag: Job internal properties. - :type internal_property_bag: dict[str, str] - :param progress_percentage: Indicates progress of the job. Null if it has not started or + :ivar tasks_list: List of tasks associated with this job. + :vartype tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobTaskDetails] + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] + :ivar internal_property_bag: Job internal properties. + :vartype internal_property_bag: dict[str, str] + :ivar progress_percentage: Indicates progress of the job. Null if it has not started or completed. - :type progress_percentage: float - :param estimated_remaining_duration: Time remaining for execution of this job. - :type estimated_remaining_duration: str - :param dynamic_error_message: Non localized error message on job execution. - :type dynamic_error_message: str + :vartype progress_percentage: float + :ivar estimated_remaining_duration: Time remaining for execution of this job. + :vartype estimated_remaining_duration: str + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str """ _attribute_map = { @@ -2801,6 +3383,22 @@ def __init__( dynamic_error_message: Optional[str] = None, **kwargs ): + """ + :keyword tasks_list: List of tasks associated with this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobTaskDetails] + :keyword property_bag: Job properties. + :paramtype property_bag: dict[str, str] + :keyword internal_property_bag: Job internal properties. + :paramtype internal_property_bag: dict[str, str] + :keyword progress_percentage: Indicates progress of the job. Null if it has not started or + completed. + :paramtype progress_percentage: float + :keyword estimated_remaining_duration: Time remaining for execution of this job. + :paramtype estimated_remaining_duration: str + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ super(AzureIaaSVMJobExtendedInfo, self).__init__(**kwargs) self.tasks_list = tasks_list self.property_bag = property_bag @@ -2813,23 +3411,23 @@ def __init__( class AzureIaaSVMJobTaskDetails(msrest.serialization.Model): """Azure IaaS VM workload-specific job task details. - :param task_id: The task display name. - :type task_id: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param instance_id: The instanceId. - :type instance_id: str - :param duration: Time elapsed for task. - :type duration: ~datetime.timedelta - :param status: The status. - :type status: str - :param progress_percentage: Progress of the task. - :type progress_percentage: float - :param task_execution_details: Details about execution of the task. + :ivar task_id: The task display name. + :vartype task_id: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar instance_id: The instanceId. + :vartype instance_id: str + :ivar duration: Time elapsed for task. + :vartype duration: ~datetime.timedelta + :ivar status: The status. + :vartype status: str + :ivar progress_percentage: Progress of the task. + :vartype progress_percentage: float + :ivar task_execution_details: Details about execution of the task. eg: number of bytes transferred etc. - :type task_execution_details: str + :vartype task_execution_details: str """ _attribute_map = { @@ -2856,6 +3454,25 @@ def __init__( task_execution_details: Optional[str] = None, **kwargs ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword instance_id: The instanceId. + :paramtype instance_id: str + :keyword duration: Time elapsed for task. + :paramtype duration: ~datetime.timedelta + :keyword status: The status. + :paramtype status: str + :keyword progress_percentage: Progress of the task. + :paramtype progress_percentage: float + :keyword task_execution_details: Details about execution of the task. + eg: number of bytes transferred etc. + :paramtype task_execution_details: str + """ super(AzureIaaSVMJobTaskDetails, self).__init__(**kwargs) self.task_id = task_id self.start_time = start_time @@ -2867,16 +3484,140 @@ def __init__( self.task_execution_details = task_execution_details +class AzureIaaSVMJobV2(Job): + """Azure IaaS VM workload-specific job object. + + All required parameters must be populated in order to send to Azure. + + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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. + :vartype job_type: str + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :ivar container_name: Container name of the entity on which the current job is executing. + :vartype container_name: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar error_details: Error details on execution of this job. + :vartype error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMErrorInfo] + :ivar virtual_machine_version: Specifies whether the backup item is a Classic or an Azure + Resource Manager VM. + :vartype virtual_machine_version: str + :ivar extended_info: Additional information for this job. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[str]'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'error_details': {'key': 'errorDetails', 'type': '[AzureIaaSVMErrorInfo]'}, + 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AzureIaaSVMJobExtendedInfo'}, + } + + def __init__( + self, + *, + entity_friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + operation: Optional[str] = None, + status: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + activity_id: Optional[str] = None, + actions_info: Optional[List[Union[str, "JobSupportedAction"]]] = None, + container_name: Optional[str] = None, + duration: Optional[datetime.timedelta] = None, + error_details: Optional[List["AzureIaaSVMErrorInfo"]] = None, + virtual_machine_version: Optional[str] = None, + extended_info: Optional["AzureIaaSVMJobExtendedInfo"] = None, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :keyword container_name: Container name of the entity on which the current job is executing. + :paramtype container_name: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword error_details: Error details on execution of this job. + :paramtype error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMErrorInfo] + :keyword virtual_machine_version: Specifies whether the backup item is a Classic or an Azure + Resource Manager VM. + :paramtype virtual_machine_version: str + :keyword extended_info: Additional information for this job. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMJobExtendedInfo + """ + super(AzureIaaSVMJobV2, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) + self.job_type = 'AzureIaaSVMJobV2' # type: str + self.actions_info = actions_info + self.container_name = container_name + self.duration = duration + self.error_details = error_details + self.virtual_machine_version = virtual_machine_version + self.extended_info = extended_info + + class AzureIaaSVMProtectedItemExtendedInfo(msrest.serialization.Model): """Additional information on Azure IaaS VM specific backup item. - :param oldest_recovery_point: The oldest backup copy available for this backup item. - :type oldest_recovery_point: ~datetime.datetime - :param recovery_point_count: Number of backup copies available for this backup item. - :type recovery_point_count: int - :param policy_inconsistent: Specifies if backup policy associated with the backup item is + :ivar oldest_recovery_point: The oldest backup copy available for this backup item. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of backup copies available for this backup item. + :vartype recovery_point_count: int + :ivar policy_inconsistent: Specifies if backup policy associated with the backup item is inconsistent. - :type policy_inconsistent: bool + :vartype policy_inconsistent: bool """ _attribute_map = { @@ -2893,6 +3634,15 @@ def __init__( policy_inconsistent: Optional[bool] = None, **kwargs ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this backup item. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of backup copies available for this backup item. + :paramtype recovery_point_count: int + :keyword policy_inconsistent: Specifies if backup policy associated with the backup item is + inconsistent. + :paramtype policy_inconsistent: bool + """ super(AzureIaaSVMProtectedItemExtendedInfo, self).__init__(**kwargs) self.oldest_recovery_point = oldest_recovery_point self.recovery_point_count = recovery_point_count @@ -2904,24 +3654,25 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy): All required parameters must be populated in order to send to Azure. - :param protected_items_count: Number of items associated with this policy. - :type protected_items_count: int - :param backup_management_type: Required. This property will be used as the discriminator for + :ivar protected_items_count: Number of items associated with this policy. + :vartype protected_items_count: int + :ivar backup_management_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 backup_management_type: str - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] - :param instant_rp_details: - :type instant_rp_details: ~azure.mgmt.recoveryservicesbackup.models.InstantRPAdditionalDetails - :param schedule_policy: Backup schedule specified as part of backup policy. - :type schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy - :param retention_policy: Retention policy with the details on backup copy retention ranges. - :type retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy - :param instant_rp_retention_range_in_days: Instant RP retention policy range in days. - :type instant_rp_retention_range_in_days: int - :param time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + :ivar instant_rp_details: + :vartype instant_rp_details: + ~azure.mgmt.recoveryservicesbackup.models.InstantRPAdditionalDetails + :ivar schedule_policy: Backup schedule specified as part of backup policy. + :vartype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :ivar retention_policy: Retention policy with the details on backup copy retention ranges. + :vartype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :ivar instant_rp_retention_range_in_days: Instant RP retention policy range in days. + :vartype instant_rp_retention_range_in_days: int + :ivar time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - :type time_zone: str + :vartype time_zone: str """ _validation = { @@ -2951,6 +3702,24 @@ def __init__( time_zone: Optional[str] = None, **kwargs ): + """ + :keyword protected_items_count: Number of items associated with this policy. + :paramtype protected_items_count: int + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + :keyword instant_rp_details: + :paramtype instant_rp_details: + ~azure.mgmt.recoveryservicesbackup.models.InstantRPAdditionalDetails + :keyword schedule_policy: Backup schedule specified as part of backup policy. + :paramtype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :keyword retention_policy: Retention policy with the details on backup copy retention ranges. + :paramtype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :keyword instant_rp_retention_range_in_days: Instant RP retention policy range in days. + :paramtype instant_rp_retention_range_in_days: int + :keyword time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific + Standard Time". + :paramtype time_zone: str + """ super(AzureIaaSVMProtectionPolicy, self).__init__(protected_items_count=protected_items_count, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.backup_management_type = 'AzureIaasVM' # type: str self.instant_rp_details = instant_rp_details @@ -2964,28 +3733,30 @@ class ProtectionIntent(msrest.serialization.Model): """Base class for backup ProtectionIntent. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureResourceProtectionIntent, AzureRecoveryServiceVaultProtectionIntent. + sub-classes are: AzureResourceProtectionIntent, AzureWorkloadContainerAutoProtectionIntent, AzureRecoveryServiceVaultProtectionIntent. All required parameters must be populated in order to send to Azure. - :param protection_intent_item_type: Required. backup protectionIntent type.Constant filled by - server. - :type protection_intent_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", + :ivar protection_intent_item_type: Required. backup protectionIntent type.Constant filled by + server. Possible values include: "Invalid", "AzureResourceItem", "RecoveryServiceVaultItem", + "AzureWorkloadContainerAutoProtectionIntent". + :vartype protection_intent_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentItemType + :ivar 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 + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param source_resource_id: ARM ID of the resource to be backed up. - :type source_resource_id: str - :param item_id: ID of the item which is getting protected, In case of Azure Vm , it is + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar item_id: ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId. - :type item_id: str - :param policy_id: ID of the backup policy with which this item is backed up. - :type policy_id: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", + :vartype item_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus """ _validation = { @@ -3002,7 +3773,7 @@ class ProtectionIntent(msrest.serialization.Model): } _subtype_map = { - 'protection_intent_item_type': {'AzureResourceItem': 'AzureResourceProtectionIntent', 'RecoveryServiceVaultItem': 'AzureRecoveryServiceVaultProtectionIntent'} + 'protection_intent_item_type': {'AzureResourceItem': 'AzureResourceProtectionIntent', 'AzureWorkloadContainerAutoProtectionIntent': 'AzureWorkloadContainerAutoProtectionIntent', 'RecoveryServiceVaultItem': 'AzureRecoveryServiceVaultProtectionIntent'} } def __init__( @@ -3015,6 +3786,23 @@ def __init__( protection_state: Optional[Union[str, "ProtectionStatus"]] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword item_id: ID of the item which is getting protected, In case of Azure Vm , it is + ProtectedItemId. + :paramtype item_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ super(ProtectionIntent, self).__init__(**kwargs) self.protection_intent_item_type = None # type: Optional[str] self.backup_management_type = backup_management_type @@ -3032,24 +3820,26 @@ class AzureRecoveryServiceVaultProtectionIntent(ProtectionIntent): All required parameters must be populated in order to send to Azure. - :param protection_intent_item_type: Required. backup protectionIntent type.Constant filled by - server. - :type protection_intent_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", + :ivar protection_intent_item_type: Required. backup protectionIntent type.Constant filled by + server. Possible values include: "Invalid", "AzureResourceItem", "RecoveryServiceVaultItem", + "AzureWorkloadContainerAutoProtectionIntent". + :vartype protection_intent_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentItemType + :ivar 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 + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param source_resource_id: ARM ID of the resource to be backed up. - :type source_resource_id: str - :param item_id: ID of the item which is getting protected, In case of Azure Vm , it is + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar item_id: ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId. - :type item_id: str - :param policy_id: ID of the backup policy with which this item is backed up. - :type policy_id: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", + :vartype item_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus """ _validation = { @@ -3079,6 +3869,23 @@ def __init__( protection_state: Optional[Union[str, "ProtectionStatus"]] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword item_id: ID of the item which is getting protected, In case of Azure Vm , it is + ProtectedItemId. + :paramtype item_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ super(AzureRecoveryServiceVaultProtectionIntent, self).__init__(backup_management_type=backup_management_type, source_resource_id=source_resource_id, item_id=item_id, policy_id=policy_id, protection_state=protection_state, **kwargs) self.protection_intent_item_type = 'RecoveryServiceVaultItem' # type: str @@ -3088,26 +3895,28 @@ class AzureResourceProtectionIntent(ProtectionIntent): All required parameters must be populated in order to send to Azure. - :param protection_intent_item_type: Required. backup protectionIntent type.Constant filled by - server. - :type protection_intent_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", + :ivar protection_intent_item_type: Required. backup protectionIntent type.Constant filled by + server. Possible values include: "Invalid", "AzureResourceItem", "RecoveryServiceVaultItem", + "AzureWorkloadContainerAutoProtectionIntent". + :vartype protection_intent_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentItemType + :ivar 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 + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param source_resource_id: ARM ID of the resource to be backed up. - :type source_resource_id: str - :param item_id: ID of the item which is getting protected, In case of Azure Vm , it is + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar item_id: ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId. - :type item_id: str - :param policy_id: ID of the backup policy with which this item is backed up. - :type policy_id: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", + :vartype item_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param friendly_name: Friendly name of the VM represented by this backup item. - :type friendly_name: str + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str """ _validation = { @@ -3135,6 +3944,25 @@ def __init__( friendly_name: Optional[str] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword item_id: ID of the item which is getting protected, In case of Azure Vm , it is + ProtectedItemId. + :paramtype item_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword friendly_name: Friendly name of the VM represented by this backup item. + :paramtype friendly_name: str + """ super(AzureResourceProtectionIntent, self).__init__(backup_management_type=backup_management_type, source_resource_id=source_resource_id, item_id=item_id, policy_id=policy_id, protection_state=protection_state, **kwargs) self.protection_intent_item_type = 'AzureResourceItem' # type: str self.friendly_name = friendly_name @@ -3148,45 +3976,47 @@ class AzureWorkloadContainer(ProtectionContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param source_resource_id: ARM ID of the virtual machine represented by this Azure Workload + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar source_resource_id: ARM ID of the virtual machine represented by this Azure Workload Container. - :type source_resource_id: str - :param last_updated_time: Time stamp when this container was updated. - :type last_updated_time: ~datetime.datetime - :param extended_info: Additional details of a workload container. - :type extended_info: + :vartype source_resource_id: str + :ivar last_updated_time: Time stamp when this container was updated. + :vartype last_updated_time: ~datetime.datetime + :ivar extended_info: Additional details of a workload container. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo - :param workload_type: Workload type for which registration was sent. Possible values include: + :ivar workload_type: Workload type for which registration was sent. 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.WorkloadType - :param operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", "Reregister". - :type operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType + :vartype operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType """ _validation = { @@ -3199,6 +4029,7 @@ class AzureWorkloadContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, @@ -3217,6 +4048,7 @@ def __init__( backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, registration_status: Optional[str] = None, health_status: Optional[str] = None, + protectable_object_type: Optional[str] = None, source_resource_id: Optional[str] = None, last_updated_time: Optional[datetime.datetime] = None, extended_info: Optional["AzureWorkloadContainerExtendedInfo"] = None, @@ -3224,7 +4056,40 @@ def __init__( operation_type: Optional[Union[str, "OperationType"]] = None, **kwargs ): - super(AzureWorkloadContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword source_resource_id: ARM ID of the virtual machine represented by this Azure Workload + Container. + :paramtype source_resource_id: str + :keyword last_updated_time: Time stamp when this container was updated. + :paramtype last_updated_time: ~datetime.datetime + :keyword extended_info: Additional details of a workload container. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + :keyword workload_type: Workload type for which registration was sent. Possible values include: + "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", + "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :paramtype operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType + """ + super(AzureWorkloadContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, protectable_object_type=protectable_object_type, **kwargs) self.container_type = 'AzureWorkloadContainer' # type: str self.source_resource_id = source_resource_id self.last_updated_time = last_updated_time @@ -3238,45 +4103,47 @@ class AzureSQLAGWorkloadContainerProtectionContainer(AzureWorkloadContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param source_resource_id: ARM ID of the virtual machine represented by this Azure Workload + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar source_resource_id: ARM ID of the virtual machine represented by this Azure Workload Container. - :type source_resource_id: str - :param last_updated_time: Time stamp when this container was updated. - :type last_updated_time: ~datetime.datetime - :param extended_info: Additional details of a workload container. - :type extended_info: + :vartype source_resource_id: str + :ivar last_updated_time: Time stamp when this container was updated. + :vartype last_updated_time: ~datetime.datetime + :ivar extended_info: Additional details of a workload container. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo - :param workload_type: Workload type for which registration was sent. Possible values include: + :ivar workload_type: Workload type for which registration was sent. 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.WorkloadType - :param operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", "Reregister". - :type operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType + :vartype operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType """ _validation = { @@ -3289,6 +4156,7 @@ class AzureSQLAGWorkloadContainerProtectionContainer(AzureWorkloadContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, @@ -3303,6 +4171,7 @@ def __init__( backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, registration_status: Optional[str] = None, health_status: Optional[str] = None, + protectable_object_type: Optional[str] = None, source_resource_id: Optional[str] = None, last_updated_time: Optional[datetime.datetime] = None, extended_info: Optional["AzureWorkloadContainerExtendedInfo"] = None, @@ -3310,7 +4179,40 @@ def __init__( operation_type: Optional[Union[str, "OperationType"]] = None, **kwargs ): - super(AzureSQLAGWorkloadContainerProtectionContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, source_resource_id=source_resource_id, last_updated_time=last_updated_time, extended_info=extended_info, workload_type=workload_type, operation_type=operation_type, **kwargs) + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword source_resource_id: ARM ID of the virtual machine represented by this Azure Workload + Container. + :paramtype source_resource_id: str + :keyword last_updated_time: Time stamp when this container was updated. + :paramtype last_updated_time: ~datetime.datetime + :keyword extended_info: Additional details of a workload container. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + :keyword workload_type: Workload type for which registration was sent. Possible values include: + "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", + "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :paramtype operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType + """ + super(AzureSQLAGWorkloadContainerProtectionContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, protectable_object_type=protectable_object_type, source_resource_id=source_resource_id, last_updated_time=last_updated_time, extended_info=extended_info, workload_type=workload_type, operation_type=operation_type, **kwargs) self.container_type = 'SQLAGWorkLoadContainer' # type: str @@ -3319,29 +4221,31 @@ class AzureSqlContainer(ProtectionContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str """ _validation = { @@ -3354,6 +4258,7 @@ class AzureSqlContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, } def __init__( @@ -3363,9 +4268,27 @@ def __init__( backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, registration_status: Optional[str] = None, health_status: Optional[str] = None, - **kwargs - ): - super(AzureSqlContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + protectable_object_type: Optional[str] = None, + **kwargs + ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + """ + super(AzureSqlContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, protectable_object_type=protectable_object_type, **kwargs) self.container_type = 'AzureSqlContainer' # type: str @@ -3374,57 +4297,60 @@ class AzureSqlProtectedItem(ProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 protected_item_data_id: Internal ID of a backup item. Used by Azure SQL Backup engine to + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar protected_item_data_id: Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. - :type protected_item_data_id: str - :param protection_state: Backup state of the backed up item. Possible values include: - "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", - "ProtectionPaused". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState - :param extended_info: Additional information for this backup item. - :type extended_info: + :vartype protected_item_data_id: str + :ivar protection_state: Backup state of the backed up item. Possible values include: "Invalid", + "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureSqlProtectedItemExtendedInfo """ @@ -3448,6 +4374,8 @@ class AzureSqlProtectedItem(ProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureSqlProtectedItemExtendedInfo'}, @@ -3470,12 +4398,72 @@ def __init__( is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, resource_guard_operation_requests: Optional[List[str]] = None, + is_archive_enabled: Optional[bool] = None, + policy_name: Optional[str] = None, protected_item_data_id: Optional[str] = None, protection_state: Optional[Union[str, "ProtectedItemState"]] = None, extended_info: Optional["AzureSqlProtectedItemExtendedInfo"] = None, **kwargs ): - super(AzureSqlProtectedItem, 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) + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword protected_item_data_id: Internal ID of a backup item. Used by Azure SQL Backup engine + to contact Recovery Services. + :paramtype protected_item_data_id: str + :keyword protection_state: Backup state of the backed up item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureSqlProtectedItemExtendedInfo + """ + super(AzureSqlProtectedItem, 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, is_archive_enabled=is_archive_enabled, policy_name=policy_name, **kwargs) self.protected_item_type = 'Microsoft.Sql/servers/databases' # type: str self.protected_item_data_id = protected_item_data_id self.protection_state = protection_state @@ -3485,13 +4473,12 @@ def __init__( class AzureSqlProtectedItemExtendedInfo(msrest.serialization.Model): """Additional information on Azure Sql specific protected item. - :param oldest_recovery_point: The oldest backup copy available for this item in the service. - :type oldest_recovery_point: ~datetime.datetime - :param recovery_point_count: Number of available backup copies associated with this backup - item. - :type recovery_point_count: int - :param policy_state: State of the backup policy associated with this backup item. - :type policy_state: str + :ivar oldest_recovery_point: The oldest backup copy available for this item in the service. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of available backup copies associated with this backup item. + :vartype recovery_point_count: int + :ivar policy_state: State of the backup policy associated with this backup item. + :vartype policy_state: str """ _attribute_map = { @@ -3508,6 +4495,15 @@ def __init__( policy_state: Optional[str] = None, **kwargs ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this item in the service. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of available backup copies associated with this backup + item. + :paramtype recovery_point_count: int + :keyword policy_state: State of the backup policy associated with this backup item. + :paramtype policy_state: str + """ super(AzureSqlProtectedItemExtendedInfo, self).__init__(**kwargs) self.oldest_recovery_point = oldest_recovery_point self.recovery_point_count = recovery_point_count @@ -3519,15 +4515,15 @@ class AzureSqlProtectionPolicy(ProtectionPolicy): All required parameters must be populated in order to send to Azure. - :param protected_items_count: Number of items associated with this policy. - :type protected_items_count: int - :param backup_management_type: Required. This property will be used as the discriminator for + :ivar protected_items_count: Number of items associated with this policy. + :vartype protected_items_count: int + :ivar backup_management_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 backup_management_type: str - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] - :param retention_policy: Retention policy details. - :type retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + :ivar retention_policy: Retention policy details. + :vartype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy """ _validation = { @@ -3549,6 +4545,14 @@ def __init__( retention_policy: Optional["RetentionPolicy"] = None, **kwargs ): + """ + :keyword protected_items_count: Number of items associated with this policy. + :paramtype protected_items_count: int + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + :keyword retention_policy: Retention policy details. + :paramtype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + """ super(AzureSqlProtectionPolicy, self).__init__(protected_items_count=protected_items_count, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.backup_management_type = 'AzureSql' # type: str self.retention_policy = retention_policy @@ -3559,37 +4563,43 @@ class AzureStorageContainer(ProtectionContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param source_resource_id: Fully qualified ARM url. - :type source_resource_id: str - :param storage_account_version: Storage account version. - :type storage_account_version: str - :param resource_group: Resource group name of Recovery Services Vault. - :type resource_group: str - :param protected_item_count: Number of items backed up in this container. - :type protected_item_count: long + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar source_resource_id: Fully qualified ARM url. + :vartype source_resource_id: str + :ivar storage_account_version: Storage account version. + :vartype storage_account_version: str + :ivar resource_group: Resource group name of Recovery Services Vault. + :vartype resource_group: str + :ivar protected_item_count: Number of items backed up in this container. + :vartype protected_item_count: long + :ivar acquire_storage_account_lock: Whether storage account lock is to be acquired for this + container or not. Possible values include: "Acquire", "NotAcquire". + :vartype acquire_storage_account_lock: str or + ~azure.mgmt.recoveryservicesbackup.models.AcquireStorageAccountLock """ _validation = { @@ -3602,10 +4612,12 @@ class AzureStorageContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'storage_account_version': {'key': 'storageAccountVersion', 'type': 'str'}, 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, + 'acquire_storage_account_lock': {'key': 'acquireStorageAccountLock', 'type': 'str'}, } def __init__( @@ -3615,29 +4627,61 @@ def __init__( backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, registration_status: Optional[str] = None, health_status: Optional[str] = None, + protectable_object_type: Optional[str] = None, source_resource_id: Optional[str] = None, storage_account_version: Optional[str] = None, resource_group: Optional[str] = None, protected_item_count: Optional[int] = None, - **kwargs - ): - super(AzureStorageContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + acquire_storage_account_lock: Optional[Union[str, "AcquireStorageAccountLock"]] = None, + **kwargs + ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword source_resource_id: Fully qualified ARM url. + :paramtype source_resource_id: str + :keyword storage_account_version: Storage account version. + :paramtype storage_account_version: str + :keyword resource_group: Resource group name of Recovery Services Vault. + :paramtype resource_group: str + :keyword protected_item_count: Number of items backed up in this container. + :paramtype protected_item_count: long + :keyword acquire_storage_account_lock: Whether storage account lock is to be acquired for this + container or not. Possible values include: "Acquire", "NotAcquire". + :paramtype acquire_storage_account_lock: str or + ~azure.mgmt.recoveryservicesbackup.models.AcquireStorageAccountLock + """ + super(AzureStorageContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, protectable_object_type=protectable_object_type, **kwargs) self.container_type = 'StorageContainer' # type: str self.source_resource_id = source_resource_id self.storage_account_version = storage_account_version self.resource_group = resource_group self.protected_item_count = protected_item_count + self.acquire_storage_account_lock = acquire_storage_account_lock class AzureStorageErrorInfo(msrest.serialization.Model): """Azure storage specific error information. - :param error_code: Error code. - :type error_code: int - :param error_string: Localized error string. - :type error_string: str - :param recommendations: List of localized recommendations for above error code. - :type recommendations: list[str] + :ivar error_code: Error code. + :vartype error_code: int + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] """ _attribute_map = { @@ -3654,6 +4698,14 @@ def __init__( recommendations: Optional[List[str]] = None, **kwargs ): + """ + :keyword error_code: Error code. + :paramtype error_code: int + :keyword error_string: Localized error string. + :paramtype error_string: str + :keyword recommendations: List of localized recommendations for above error code. + :paramtype recommendations: list[str] + """ super(AzureStorageErrorInfo, self).__init__(**kwargs) self.error_code = error_code self.error_string = error_string @@ -3665,39 +4717,42 @@ class AzureStorageJob(Job): All required parameters must be populated in order to send to Azure. - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param activity_id: ActivityId of job. - :type activity_id: str - :param job_type: Required. This property will be used as the discriminator for deciding the + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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 job_type: str - :param duration: Time elapsed during the execution of this job. - :type duration: ~datetime.timedelta - :param actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. - :type actions_info: list[str or ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] - :param error_details: Error details on execution of this job. - :type error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageErrorInfo] - :param storage_account_name: Specifies friendly name of the storage account. - :type storage_account_name: str - :param storage_account_version: Specifies whether the Storage account is a Classic or an Azure + :vartype job_type: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageErrorInfo] + :ivar storage_account_name: Specifies friendly name of the storage account. + :vartype storage_account_name: str + :ivar storage_account_version: Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account. - :type storage_account_version: str - :param extended_info: Additional information about the job. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobExtendedInfo + :vartype storage_account_version: str + :ivar extended_info: Additional information about the job. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobExtendedInfo + :ivar is_user_triggered: Indicated that whether the job is adhoc(true) or scheduled(false). + :vartype is_user_triggered: bool """ _validation = { @@ -3719,6 +4774,7 @@ class AzureStorageJob(Job): 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, 'storage_account_version': {'key': 'storageAccountVersion', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureStorageJobExtendedInfo'}, + 'is_user_triggered': {'key': 'isUserTriggered', 'type': 'bool'}, } def __init__( @@ -3737,8 +4793,45 @@ def __init__( storage_account_name: Optional[str] = None, storage_account_version: Optional[str] = None, extended_info: Optional["AzureStorageJobExtendedInfo"] = None, - **kwargs - ): + is_user_triggered: Optional[bool] = None, + **kwargs + ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageErrorInfo] + :keyword storage_account_name: Specifies friendly name of the storage account. + :paramtype storage_account_name: str + :keyword storage_account_version: Specifies whether the Storage account is a Classic or an + Azure Resource Manager Storage account. + :paramtype storage_account_version: str + :keyword extended_info: Additional information about the job. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobExtendedInfo + :keyword is_user_triggered: Indicated that whether the job is adhoc(true) or scheduled(false). + :paramtype is_user_triggered: bool + """ super(AzureStorageJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) self.job_type = 'AzureStorageJob' # type: str self.duration = duration @@ -3747,17 +4840,18 @@ def __init__( self.storage_account_name = storage_account_name self.storage_account_version = storage_account_version self.extended_info = extended_info + self.is_user_triggered = is_user_triggered class AzureStorageJobExtendedInfo(msrest.serialization.Model): """Azure Storage workload-specific additional information for job. - :param tasks_list: List of tasks for this job. - :type tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobTaskDetails] - :param property_bag: Job properties. - :type property_bag: dict[str, str] - :param dynamic_error_message: Non localized error message on job execution. - :type dynamic_error_message: str + :ivar tasks_list: List of tasks for this job. + :vartype tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobTaskDetails] + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str """ _attribute_map = { @@ -3774,6 +4868,15 @@ def __init__( dynamic_error_message: Optional[str] = None, **kwargs ): + """ + :keyword tasks_list: List of tasks for this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureStorageJobTaskDetails] + :keyword property_bag: Job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ super(AzureStorageJobExtendedInfo, self).__init__(**kwargs) self.tasks_list = tasks_list self.property_bag = property_bag @@ -3783,10 +4886,10 @@ def __init__( class AzureStorageJobTaskDetails(msrest.serialization.Model): """Azure storage workload specific job task details. - :param task_id: The task display name. - :type task_id: str - :param status: The status. - :type status: str + :ivar task_id: The task display name. + :vartype task_id: str + :ivar status: The status. + :vartype status: str """ _attribute_map = { @@ -3801,6 +4904,12 @@ def __init__( status: Optional[str] = None, **kwargs ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword status: The status. + :paramtype status: str + """ super(AzureStorageJobTaskDetails, self).__init__(**kwargs) self.task_id = task_id self.status = status @@ -3814,29 +4923,29 @@ class ProtectableContainer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param protectable_container_type: Required. Type of the container. The value of this property + :ivar protectable_container_type: Required. Type of the container. The value of this property for #. Compute Azure VM is Microsoft.Compute/virtualMachines #. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines.Constant filled by - server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", + server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type protectable_container_type: str or + :vartype protectable_container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param health_status: Status of health of the container. - :type health_status: str - :param container_id: Fabric Id of the container such as ARM Id. - :type container_id: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_id: Fabric Id of the container such as ARM Id. + :vartype container_id: str """ _validation = { @@ -3864,6 +4973,19 @@ def __init__( container_id: Optional[str] = None, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword container_id: Fabric Id of the container such as ARM Id. + :paramtype container_id: str + """ super(ProtectableContainer, self).__init__(**kwargs) self.friendly_name = friendly_name self.backup_management_type = backup_management_type @@ -3877,29 +4999,29 @@ class AzureStorageProtectableContainer(ProtectableContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param protectable_container_type: Required. Type of the container. The value of this property + :ivar protectable_container_type: Required. Type of the container. The value of this property for #. Compute Azure VM is Microsoft.Compute/virtualMachines #. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines.Constant filled by - server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", + server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type protectable_container_type: str or + :vartype protectable_container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param health_status: Status of health of the container. - :type health_status: str - :param container_id: Fabric Id of the container such as ARM Id. - :type container_id: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_id: Fabric Id of the container such as ARM Id. + :vartype container_id: str """ _validation = { @@ -3923,6 +5045,19 @@ def __init__( container_id: Optional[str] = None, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword container_id: Fabric Id of the container such as ARM Id. + :paramtype container_id: str + """ super(AzureStorageProtectableContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, health_status=health_status, container_id=container_id, **kwargs) self.protectable_container_type = 'StorageContainer' # type: str @@ -3932,29 +5067,29 @@ class AzureVMAppContainerProtectableContainer(ProtectableContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param protectable_container_type: Required. Type of the container. The value of this property + :ivar protectable_container_type: Required. Type of the container. The value of this property for #. Compute Azure VM is Microsoft.Compute/virtualMachines #. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines.Constant filled by - server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", + server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type protectable_container_type: str or + :vartype protectable_container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param health_status: Status of health of the container. - :type health_status: str - :param container_id: Fabric Id of the container such as ARM Id. - :type container_id: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_id: Fabric Id of the container such as ARM Id. + :vartype container_id: str """ _validation = { @@ -3978,6 +5113,19 @@ def __init__( container_id: Optional[str] = None, **kwargs ): + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword container_id: Fabric Id of the container such as ARM Id. + :paramtype container_id: str + """ super(AzureVMAppContainerProtectableContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, health_status=health_status, container_id=container_id, **kwargs) self.protectable_container_type = 'VMAppContainer' # type: str @@ -3987,45 +5135,47 @@ class AzureVMAppContainerProtectionContainer(AzureWorkloadContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param source_resource_id: ARM ID of the virtual machine represented by this Azure Workload + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar source_resource_id: ARM ID of the virtual machine represented by this Azure Workload Container. - :type source_resource_id: str - :param last_updated_time: Time stamp when this container was updated. - :type last_updated_time: ~datetime.datetime - :param extended_info: Additional details of a workload container. - :type extended_info: + :vartype source_resource_id: str + :ivar last_updated_time: Time stamp when this container was updated. + :vartype last_updated_time: ~datetime.datetime + :ivar extended_info: Additional details of a workload container. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo - :param workload_type: Workload type for which registration was sent. Possible values include: + :ivar workload_type: Workload type for which registration was sent. 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.WorkloadType - :param operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", "Reregister". - :type operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType + :vartype operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType """ _validation = { @@ -4038,6 +5188,7 @@ class AzureVMAppContainerProtectionContainer(AzureWorkloadContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, @@ -4052,6 +5203,7 @@ def __init__( backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, registration_status: Optional[str] = None, health_status: Optional[str] = None, + protectable_object_type: Optional[str] = None, source_resource_id: Optional[str] = None, last_updated_time: Optional[datetime.datetime] = None, extended_info: Optional["AzureWorkloadContainerExtendedInfo"] = None, @@ -4059,7 +5211,40 @@ def __init__( operation_type: Optional[Union[str, "OperationType"]] = None, **kwargs ): - super(AzureVMAppContainerProtectionContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, source_resource_id=source_resource_id, last_updated_time=last_updated_time, extended_info=extended_info, workload_type=workload_type, operation_type=operation_type, **kwargs) + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword source_resource_id: ARM ID of the virtual machine represented by this Azure Workload + Container. + :paramtype source_resource_id: str + :keyword last_updated_time: Time stamp when this container was updated. + :paramtype last_updated_time: ~datetime.datetime + :keyword extended_info: Additional details of a workload container. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo + :keyword workload_type: Workload type for which registration was sent. Possible values include: + "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", + "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :paramtype operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType + """ + super(AzureVMAppContainerProtectionContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, protectable_object_type=protectable_object_type, source_resource_id=source_resource_id, last_updated_time=last_updated_time, extended_info=extended_info, workload_type=workload_type, operation_type=operation_type, **kwargs) self.container_type = 'VMAppContainer' # type: str @@ -4068,12 +5253,12 @@ class AzureVMResourceFeatureSupportRequest(FeatureSupportRequest): All required parameters must be populated in order to send to Azure. - :param feature_type: Required. backup support feature type.Constant filled by server. - :type feature_type: str - :param vm_size: Size of the resource: VM size(A/D series etc) in case of IaasVM. - :type vm_size: str - :param vm_sku: SKUs (Premium/Managed etc) in case of IaasVM. - :type vm_sku: str + :ivar feature_type: Required. backup support feature type.Constant filled by server. + :vartype feature_type: str + :ivar vm_size: Size of the resource: VM size(A/D series etc) in case of IaasVM. + :vartype vm_size: str + :ivar vm_sku: SKUs (Premium/Managed etc) in case of IaasVM. + :vartype vm_sku: str """ _validation = { @@ -4093,6 +5278,12 @@ def __init__( vm_sku: Optional[str] = None, **kwargs ): + """ + :keyword vm_size: Size of the resource: VM size(A/D series etc) in case of IaasVM. + :paramtype vm_size: str + :keyword vm_sku: SKUs (Premium/Managed etc) in case of IaasVM. + :paramtype vm_sku: str + """ super(AzureVMResourceFeatureSupportRequest, self).__init__(**kwargs) self.feature_type = 'AzureVMResourceBackup' # type: str self.vm_size = vm_size @@ -4102,9 +5293,9 @@ def __init__( class AzureVMResourceFeatureSupportResponse(msrest.serialization.Model): """Response for feature support requests for Azure IaasVm. - :param support_status: Support status of feature. Possible values include: "Invalid", + :ivar support_status: Support status of feature. Possible values include: "Invalid", "Supported", "DefaultOFF", "DefaultON", "NotSupported". - :type support_status: str or ~azure.mgmt.recoveryservicesbackup.models.SupportStatus + :vartype support_status: str or ~azure.mgmt.recoveryservicesbackup.models.SupportStatus """ _attribute_map = { @@ -4117,6 +5308,11 @@ def __init__( support_status: Optional[Union[str, "SupportStatus"]] = None, **kwargs ): + """ + :keyword support_status: Support status of feature. Possible values include: "Invalid", + "Supported", "DefaultOFF", "DefaultON", "NotSupported". + :paramtype support_status: str or ~azure.mgmt.recoveryservicesbackup.models.SupportStatus + """ super(AzureVMResourceFeatureSupportResponse, self).__init__(**kwargs) self.support_status = support_status @@ -4129,17 +5325,17 @@ class WorkloadItem(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus """ _validation = { @@ -4167,6 +5363,17 @@ def __init__( protection_state: Optional[Union[str, "ProtectionStatus"]] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ super(WorkloadItem, self).__init__(**kwargs) self.backup_management_type = backup_management_type self.workload_type = workload_type @@ -4183,27 +5390,27 @@ class AzureVmWorkloadItem(WorkloadItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if workload item is auto-protectable. - :type is_auto_protectable: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. - :type sub_workload_item_count: int + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if workload item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :vartype sub_workload_item_count: int """ _validation = { @@ -4241,6 +5448,27 @@ def __init__( sub_workload_item_count: Optional[int] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if workload item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :paramtype sub_workload_item_count: int + """ super(AzureVmWorkloadItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, **kwargs) self.workload_item_type = 'AzureVmWorkloadItem' # type: str self.parent_name = parent_name @@ -4258,35 +5486,35 @@ class AzureVmWorkloadProtectableItem(WorkloadProtectableItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param parent_unique_name: Parent Unique Name is added to provide the service formatted URI - Name of the Parent + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar parent_unique_name: Parent Unique Name is added to provide the service formatted URI Name + of the Parent Only Applicable for data bases where the parent would be either Instance or a SQL AG. - :type parent_unique_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if protectable item is auto-protectable. - :type is_auto_protectable: bool - :param is_auto_protected: Indicates if protectable item is auto-protected. - :type is_auto_protected: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. - :type subprotectableitemcount: int - :param prebackupvalidation: Pre-backup validation for protectable objects. - :type prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + :vartype parent_unique_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if protectable item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar is_auto_protected: Indicates if protectable item is auto-protected. + :vartype is_auto_protected: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :vartype subprotectableitemcount: int + :ivar prebackupvalidation: Pre-backup validation for protectable objects. + :vartype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation """ _validation = { @@ -4330,6 +5558,35 @@ def __init__( prebackupvalidation: Optional["PreBackupValidation"] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword parent_unique_name: Parent Unique Name is added to provide the service formatted URI + Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG. + :paramtype parent_unique_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if protectable item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword is_auto_protected: Indicates if protectable item is auto-protected. + :paramtype is_auto_protected: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :paramtype subprotectableitemcount: int + :keyword prebackupvalidation: Pre-backup validation for protectable objects. + :paramtype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ super(AzureVmWorkloadProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, **kwargs) self.protectable_item_type = 'AzureVmWorkloadProtectableItem' # type: str self.parent_name = parent_name @@ -4350,81 +5607,85 @@ class AzureVmWorkloadProtectedItem(ProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 DB represented by this backup item. - :type friendly_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param parent_name: Parent name of the DB such as Instance or Availability Group. - :type parent_name: str - :param parent_type: Parent type of protected item, example: for a DB, standalone server or + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or distributed. - :type parent_type: 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", + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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 last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". - :type last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param last_backup_error_detail: Error details in last backup. - :type last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail - :param protected_item_data_source_id: Data ID of the protected item. - :type protected_item_data_source_id: str - :param protected_item_health_status: Health status of the backup item, evaluated based on last + :vartype last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", "IRPending". - :type protected_item_health_status: str or + :vartype protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ @@ -4448,6 +5709,8 @@ class AzureVmWorkloadProtectedItem(ProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -4484,6 +5747,8 @@ def __init__( is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, resource_guard_operation_requests: Optional[List[str]] = None, + is_archive_enabled: Optional[bool] = None, + policy_name: Optional[str] = None, friendly_name: Optional[str] = None, server_name: Optional[str] = None, parent_name: Optional[str] = None, @@ -4499,7 +5764,90 @@ def __init__( kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, **kwargs ): - super(AzureVmWorkloadProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, is_archive_enabled=is_archive_enabled, policy_name=policy_name, **kwargs) self.protected_item_type = 'AzureVmWorkloadProtectedItem' # type: str self.friendly_name = friendly_name self.server_name = server_name @@ -4519,19 +5867,23 @@ def __init__( class AzureVmWorkloadProtectedItemExtendedInfo(msrest.serialization.Model): """Additional information on Azure Workload for SQL specific backup item. - :param oldest_recovery_point: The oldest backup copy available for this backup item. - :type oldest_recovery_point: ~datetime.datetime - :param recovery_point_count: Number of backup copies available for this backup item. - :type recovery_point_count: int - :param policy_state: Indicates consistency of policy object and policy applied to this backup + :ivar oldest_recovery_point: The oldest backup copy available for this backup item. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of backup copies available for this backup item. + :vartype recovery_point_count: int + :ivar policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :vartype policy_state: str + :ivar recovery_model: Indicates consistency of policy object and policy applied to this backup item. - :type policy_state: str + :vartype recovery_model: str """ _attribute_map = { 'oldest_recovery_point': {'key': 'oldestRecoveryPoint', 'type': 'iso-8601'}, 'recovery_point_count': {'key': 'recoveryPointCount', 'type': 'int'}, 'policy_state': {'key': 'policyState', 'type': 'str'}, + 'recovery_model': {'key': 'recoveryModel', 'type': 'str'}, } def __init__( @@ -4540,12 +5892,26 @@ def __init__( oldest_recovery_point: Optional[datetime.datetime] = None, recovery_point_count: Optional[int] = None, policy_state: Optional[str] = None, - **kwargs - ): + recovery_model: Optional[str] = None, + **kwargs + ): + """ + :keyword oldest_recovery_point: The oldest backup copy available for this backup item. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of backup copies available for this backup item. + :paramtype recovery_point_count: int + :keyword policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :paramtype policy_state: str + :keyword recovery_model: Indicates consistency of policy object and policy applied to this + backup item. + :paramtype recovery_model: str + """ super(AzureVmWorkloadProtectedItemExtendedInfo, self).__init__(**kwargs) self.oldest_recovery_point = oldest_recovery_point self.recovery_point_count = recovery_point_count self.policy_state = policy_state + self.recovery_model = recovery_model class AzureVmWorkloadProtectionPolicy(ProtectionPolicy): @@ -4553,26 +5919,26 @@ class AzureVmWorkloadProtectionPolicy(ProtectionPolicy): All required parameters must be populated in order to send to Azure. - :param protected_items_count: Number of items associated with this policy. - :type protected_items_count: int - :param backup_management_type: Required. This property will be used as the discriminator for + :ivar protected_items_count: Number of items associated with this policy. + :vartype protected_items_count: int + :ivar backup_management_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 backup_management_type: str - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] - :param work_load_type: Type of workload for the backup management. Possible values include: + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + :ivar work_load_type: Type of workload for the backup management. Possible values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase". - :type work_load_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType - :param settings: Common settings for the backup management. - :type settings: ~azure.mgmt.recoveryservicesbackup.models.Settings - :param sub_protection_policy: List of sub-protection policies which includes schedule and + :vartype work_load_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar settings: Common settings for the backup management. + :vartype settings: ~azure.mgmt.recoveryservicesbackup.models.Settings + :ivar sub_protection_policy: List of sub-protection policies which includes schedule and retention. - :type sub_protection_policy: + :vartype sub_protection_policy: list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] - :param make_policy_consistent: Fix the policy inconsistency. - :type make_policy_consistent: bool + :ivar make_policy_consistent: Fix the policy inconsistency. + :vartype make_policy_consistent: bool """ _validation = { @@ -4600,6 +5966,25 @@ def __init__( make_policy_consistent: Optional[bool] = None, **kwargs ): + """ + :keyword protected_items_count: Number of items associated with this policy. + :paramtype protected_items_count: int + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + :keyword work_load_type: Type of workload for the backup management. Possible values include: + "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", + "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype work_load_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword settings: Common settings for the backup management. + :paramtype settings: ~azure.mgmt.recoveryservicesbackup.models.Settings + :keyword sub_protection_policy: List of sub-protection policies which includes schedule and + retention. + :paramtype sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] + :keyword make_policy_consistent: Fix the policy inconsistency. + :paramtype make_policy_consistent: bool + """ super(AzureVmWorkloadProtectionPolicy, self).__init__(protected_items_count=protected_items_count, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.backup_management_type = 'AzureWorkload' # type: str self.work_load_type = work_load_type @@ -4613,81 +5998,85 @@ class AzureVmWorkloadSAPAseDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 DB represented by this backup item. - :type friendly_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param parent_name: Parent name of the DB such as Instance or Availability Group. - :type parent_name: str - :param parent_type: Parent type of protected item, example: for a DB, standalone server or + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or distributed. - :type parent_type: 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", + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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 last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". - :type last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param last_backup_error_detail: Error details in last backup. - :type last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail - :param protected_item_data_source_id: Data ID of the protected item. - :type protected_item_data_source_id: str - :param protected_item_health_status: Health status of the backup item, evaluated based on last + :vartype last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", "IRPending". - :type protected_item_health_status: str or + :vartype protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ @@ -4711,6 +6100,8 @@ class AzureVmWorkloadSAPAseDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -4743,6 +6134,8 @@ def __init__( is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, resource_guard_operation_requests: Optional[List[str]] = None, + is_archive_enabled: Optional[bool] = None, + policy_name: Optional[str] = None, friendly_name: Optional[str] = None, server_name: Optional[str] = None, parent_name: Optional[str] = None, @@ -4758,7 +6151,90 @@ def __init__( kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, **kwargs ): - super(AzureVmWorkloadSAPAseDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadSAPAseDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, is_archive_enabled=is_archive_enabled, policy_name=policy_name, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) self.protected_item_type = 'AzureVmWorkloadSAPAseDatabase' # type: str @@ -4767,27 +6243,27 @@ class AzureVmWorkloadSAPAseDatabaseWorkloadItem(AzureVmWorkloadItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if workload item is auto-protectable. - :type is_auto_protectable: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. - :type sub_workload_item_count: int + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if workload item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :vartype sub_workload_item_count: int """ _validation = { @@ -4821,6 +6297,27 @@ def __init__( sub_workload_item_count: Optional[int] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if workload item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :paramtype sub_workload_item_count: int + """ super(AzureVmWorkloadSAPAseDatabaseWorkloadItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, sub_workload_item_count=sub_workload_item_count, **kwargs) self.workload_item_type = 'SAPAseDatabase' # type: str @@ -4830,35 +6327,35 @@ class AzureVmWorkloadSAPAseSystemProtectableItem(AzureVmWorkloadProtectableItem) All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param parent_unique_name: Parent Unique Name is added to provide the service formatted URI - Name of the Parent + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar parent_unique_name: Parent Unique Name is added to provide the service formatted URI Name + of the Parent Only Applicable for data bases where the parent would be either Instance or a SQL AG. - :type parent_unique_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if protectable item is auto-protectable. - :type is_auto_protectable: bool - :param is_auto_protected: Indicates if protectable item is auto-protected. - :type is_auto_protected: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. - :type subprotectableitemcount: int - :param prebackupvalidation: Pre-backup validation for protectable objects. - :type prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + :vartype parent_unique_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if protectable item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar is_auto_protected: Indicates if protectable item is auto-protected. + :vartype is_auto_protected: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :vartype subprotectableitemcount: int + :ivar prebackupvalidation: Pre-backup validation for protectable objects. + :vartype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation """ _validation = { @@ -4898,6 +6395,35 @@ def __init__( prebackupvalidation: Optional["PreBackupValidation"] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword parent_unique_name: Parent Unique Name is added to provide the service formatted URI + Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG. + :paramtype parent_unique_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if protectable item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword is_auto_protected: Indicates if protectable item is auto-protected. + :paramtype is_auto_protected: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :paramtype subprotectableitemcount: int + :keyword prebackupvalidation: Pre-backup validation for protectable objects. + :paramtype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ super(AzureVmWorkloadSAPAseSystemProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, parent_unique_name=parent_unique_name, server_name=server_name, is_auto_protectable=is_auto_protectable, is_auto_protected=is_auto_protected, subinquireditemcount=subinquireditemcount, subprotectableitemcount=subprotectableitemcount, prebackupvalidation=prebackupvalidation, **kwargs) self.protectable_item_type = 'SAPAseSystem' # type: str @@ -4907,27 +6433,27 @@ class AzureVmWorkloadSAPAseSystemWorkloadItem(AzureVmWorkloadItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if workload item is auto-protectable. - :type is_auto_protectable: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. - :type sub_workload_item_count: int + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if workload item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :vartype sub_workload_item_count: int """ _validation = { @@ -4961,6 +6487,27 @@ def __init__( sub_workload_item_count: Optional[int] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if workload item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :paramtype sub_workload_item_count: int + """ super(AzureVmWorkloadSAPAseSystemWorkloadItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, sub_workload_item_count=sub_workload_item_count, **kwargs) self.workload_item_type = 'SAPAseSystem' # type: str @@ -4970,35 +6517,35 @@ class AzureVmWorkloadSAPHanaDatabaseProtectableItem(AzureVmWorkloadProtectableIt All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param parent_unique_name: Parent Unique Name is added to provide the service formatted URI - Name of the Parent + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar parent_unique_name: Parent Unique Name is added to provide the service formatted URI Name + of the Parent Only Applicable for data bases where the parent would be either Instance or a SQL AG. - :type parent_unique_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if protectable item is auto-protectable. - :type is_auto_protectable: bool - :param is_auto_protected: Indicates if protectable item is auto-protected. - :type is_auto_protected: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. - :type subprotectableitemcount: int - :param prebackupvalidation: Pre-backup validation for protectable objects. - :type prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + :vartype parent_unique_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if protectable item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar is_auto_protected: Indicates if protectable item is auto-protected. + :vartype is_auto_protected: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :vartype subprotectableitemcount: int + :ivar prebackupvalidation: Pre-backup validation for protectable objects. + :vartype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation """ _validation = { @@ -5038,6 +6585,35 @@ def __init__( prebackupvalidation: Optional["PreBackupValidation"] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword parent_unique_name: Parent Unique Name is added to provide the service formatted URI + Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG. + :paramtype parent_unique_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if protectable item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword is_auto_protected: Indicates if protectable item is auto-protected. + :paramtype is_auto_protected: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :paramtype subprotectableitemcount: int + :keyword prebackupvalidation: Pre-backup validation for protectable objects. + :paramtype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ super(AzureVmWorkloadSAPHanaDatabaseProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, parent_unique_name=parent_unique_name, server_name=server_name, is_auto_protectable=is_auto_protectable, is_auto_protected=is_auto_protected, subinquireditemcount=subinquireditemcount, subprotectableitemcount=subprotectableitemcount, prebackupvalidation=prebackupvalidation, **kwargs) self.protectable_item_type = 'SAPHanaDatabase' # type: str @@ -5047,81 +6623,85 @@ class AzureVmWorkloadSAPHanaDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 DB represented by this backup item. - :type friendly_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param parent_name: Parent name of the DB such as Instance or Availability Group. - :type parent_name: str - :param parent_type: Parent type of protected item, example: for a DB, standalone server or + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or distributed. - :type parent_type: 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", + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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 last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". - :type last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param last_backup_error_detail: Error details in last backup. - :type last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail - :param protected_item_data_source_id: Data ID of the protected item. - :type protected_item_data_source_id: str - :param protected_item_health_status: Health status of the backup item, evaluated based on last + :vartype last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", "IRPending". - :type protected_item_health_status: str or + :vartype protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ @@ -5145,6 +6725,8 @@ class AzureVmWorkloadSAPHanaDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -5177,6 +6759,8 @@ def __init__( is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, resource_guard_operation_requests: Optional[List[str]] = None, + is_archive_enabled: Optional[bool] = None, + policy_name: Optional[str] = None, friendly_name: Optional[str] = None, server_name: Optional[str] = None, parent_name: Optional[str] = None, @@ -5192,7 +6776,90 @@ def __init__( kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, **kwargs ): - super(AzureVmWorkloadSAPHanaDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadSAPHanaDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, is_archive_enabled=is_archive_enabled, policy_name=policy_name, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) self.protected_item_type = 'AzureVmWorkloadSAPHanaDatabase' # type: str @@ -5201,27 +6868,27 @@ class AzureVmWorkloadSAPHanaDatabaseWorkloadItem(AzureVmWorkloadItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if workload item is auto-protectable. - :type is_auto_protectable: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. - :type sub_workload_item_count: int + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if workload item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :vartype sub_workload_item_count: int """ _validation = { @@ -5255,6 +6922,27 @@ def __init__( sub_workload_item_count: Optional[int] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if workload item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :paramtype sub_workload_item_count: int + """ super(AzureVmWorkloadSAPHanaDatabaseWorkloadItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, sub_workload_item_count=sub_workload_item_count, **kwargs) self.workload_item_type = 'SAPHanaDatabase' # type: str @@ -5264,35 +6952,35 @@ class AzureVmWorkloadSAPHanaSystemProtectableItem(AzureVmWorkloadProtectableItem All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param parent_unique_name: Parent Unique Name is added to provide the service formatted URI - Name of the Parent + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar parent_unique_name: Parent Unique Name is added to provide the service formatted URI Name + of the Parent Only Applicable for data bases where the parent would be either Instance or a SQL AG. - :type parent_unique_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if protectable item is auto-protectable. - :type is_auto_protectable: bool - :param is_auto_protected: Indicates if protectable item is auto-protected. - :type is_auto_protected: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. - :type subprotectableitemcount: int - :param prebackupvalidation: Pre-backup validation for protectable objects. - :type prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + :vartype parent_unique_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if protectable item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar is_auto_protected: Indicates if protectable item is auto-protected. + :vartype is_auto_protected: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :vartype subprotectableitemcount: int + :ivar prebackupvalidation: Pre-backup validation for protectable objects. + :vartype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation """ _validation = { @@ -5332,6 +7020,35 @@ def __init__( prebackupvalidation: Optional["PreBackupValidation"] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword parent_unique_name: Parent Unique Name is added to provide the service formatted URI + Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG. + :paramtype parent_unique_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if protectable item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword is_auto_protected: Indicates if protectable item is auto-protected. + :paramtype is_auto_protected: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :paramtype subprotectableitemcount: int + :keyword prebackupvalidation: Pre-backup validation for protectable objects. + :paramtype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ super(AzureVmWorkloadSAPHanaSystemProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, parent_unique_name=parent_unique_name, server_name=server_name, is_auto_protectable=is_auto_protectable, is_auto_protected=is_auto_protected, subinquireditemcount=subinquireditemcount, subprotectableitemcount=subprotectableitemcount, prebackupvalidation=prebackupvalidation, **kwargs) self.protectable_item_type = 'SAPHanaSystem' # type: str @@ -5341,27 +7058,27 @@ class AzureVmWorkloadSAPHanaSystemWorkloadItem(AzureVmWorkloadItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if workload item is auto-protectable. - :type is_auto_protectable: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. - :type sub_workload_item_count: int + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if workload item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :vartype sub_workload_item_count: int """ _validation = { @@ -5395,6 +7112,27 @@ def __init__( sub_workload_item_count: Optional[int] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if workload item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :paramtype sub_workload_item_count: int + """ super(AzureVmWorkloadSAPHanaSystemWorkloadItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, sub_workload_item_count=sub_workload_item_count, **kwargs) self.workload_item_type = 'SAPHanaSystem' # type: str @@ -5404,35 +7142,35 @@ class AzureVmWorkloadSQLAvailabilityGroupProtectableItem(AzureVmWorkloadProtecta All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param parent_unique_name: Parent Unique Name is added to provide the service formatted URI - Name of the Parent + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar parent_unique_name: Parent Unique Name is added to provide the service formatted URI Name + of the Parent Only Applicable for data bases where the parent would be either Instance or a SQL AG. - :type parent_unique_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if protectable item is auto-protectable. - :type is_auto_protectable: bool - :param is_auto_protected: Indicates if protectable item is auto-protected. - :type is_auto_protected: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. - :type subprotectableitemcount: int - :param prebackupvalidation: Pre-backup validation for protectable objects. - :type prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + :vartype parent_unique_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if protectable item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar is_auto_protected: Indicates if protectable item is auto-protected. + :vartype is_auto_protected: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :vartype subprotectableitemcount: int + :ivar prebackupvalidation: Pre-backup validation for protectable objects. + :vartype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation """ _validation = { @@ -5472,6 +7210,35 @@ def __init__( prebackupvalidation: Optional["PreBackupValidation"] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword parent_unique_name: Parent Unique Name is added to provide the service formatted URI + Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG. + :paramtype parent_unique_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if protectable item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword is_auto_protected: Indicates if protectable item is auto-protected. + :paramtype is_auto_protected: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :paramtype subprotectableitemcount: int + :keyword prebackupvalidation: Pre-backup validation for protectable objects. + :paramtype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ super(AzureVmWorkloadSQLAvailabilityGroupProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, parent_unique_name=parent_unique_name, server_name=server_name, is_auto_protectable=is_auto_protectable, is_auto_protected=is_auto_protected, subinquireditemcount=subinquireditemcount, subprotectableitemcount=subprotectableitemcount, prebackupvalidation=prebackupvalidation, **kwargs) self.protectable_item_type = 'SQLAvailabilityGroupContainer' # type: str @@ -5481,35 +7248,35 @@ class AzureVmWorkloadSQLDatabaseProtectableItem(AzureVmWorkloadProtectableItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param parent_unique_name: Parent Unique Name is added to provide the service formatted URI - Name of the Parent + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar parent_unique_name: Parent Unique Name is added to provide the service formatted URI Name + of the Parent Only Applicable for data bases where the parent would be either Instance or a SQL AG. - :type parent_unique_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if protectable item is auto-protectable. - :type is_auto_protectable: bool - :param is_auto_protected: Indicates if protectable item is auto-protected. - :type is_auto_protected: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. - :type subprotectableitemcount: int - :param prebackupvalidation: Pre-backup validation for protectable objects. - :type prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + :vartype parent_unique_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if protectable item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar is_auto_protected: Indicates if protectable item is auto-protected. + :vartype is_auto_protected: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :vartype subprotectableitemcount: int + :ivar prebackupvalidation: Pre-backup validation for protectable objects. + :vartype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation """ _validation = { @@ -5549,6 +7316,35 @@ def __init__( prebackupvalidation: Optional["PreBackupValidation"] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword parent_unique_name: Parent Unique Name is added to provide the service formatted URI + Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG. + :paramtype parent_unique_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if protectable item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword is_auto_protected: Indicates if protectable item is auto-protected. + :paramtype is_auto_protected: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :paramtype subprotectableitemcount: int + :keyword prebackupvalidation: Pre-backup validation for protectable objects. + :paramtype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ super(AzureVmWorkloadSQLDatabaseProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, parent_unique_name=parent_unique_name, server_name=server_name, is_auto_protectable=is_auto_protectable, is_auto_protected=is_auto_protected, subinquireditemcount=subinquireditemcount, subprotectableitemcount=subprotectableitemcount, prebackupvalidation=prebackupvalidation, **kwargs) self.protectable_item_type = 'SQLDataBase' # type: str @@ -5558,81 +7354,85 @@ class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 DB represented by this backup item. - :type friendly_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param parent_name: Parent name of the DB such as Instance or Availability Group. - :type parent_name: str - :param parent_type: Parent type of protected item, example: for a DB, standalone server or + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the DB represented by this backup item. + :vartype friendly_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar parent_name: Parent name of the DB such as Instance or Availability Group. + :vartype parent_name: str + :ivar parent_type: Parent type of protected item, example: for a DB, standalone server or distributed. - :type parent_type: 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", + :vartype parent_type: str + :ivar protection_status: Backup status of this backup item. + :vartype protection_status: str + :ivar 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 last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". - :type last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param last_backup_error_detail: Error details in last backup. - :type last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail - :param protected_item_data_source_id: Data ID of the protected item. - :type protected_item_data_source_id: str - :param protected_item_health_status: Health status of the backup item, evaluated based on last + :vartype last_backup_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar last_backup_error_detail: Error details in last backup. + :vartype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :ivar protected_item_data_source_id: Data ID of the protected item. + :vartype protected_item_data_source_id: str + :ivar protected_item_health_status: Health status of the backup item, evaluated based on last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", "IRPending". - :type protected_item_health_status: str or + :vartype protected_item_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] """ @@ -5656,6 +7456,8 @@ class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -5688,6 +7490,8 @@ def __init__( is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, resource_guard_operation_requests: Optional[List[str]] = None, + is_archive_enabled: Optional[bool] = None, + policy_name: Optional[str] = None, friendly_name: Optional[str] = None, server_name: Optional[str] = None, parent_name: Optional[str] = None, @@ -5703,7 +7507,90 @@ def __init__( kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, **kwargs ): - super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the DB represented by this backup item. + :paramtype friendly_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword parent_name: Parent name of the DB such as Instance or Availability Group. + :paramtype parent_name: str + :keyword parent_type: Parent type of protected item, example: for a DB, standalone server or + distributed. + :paramtype parent_type: str + :keyword protection_status: Backup status of this backup item. + :paramtype protection_status: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. + Possible values include: "Invalid", "Healthy", "Unhealthy", "IRPending". + :paramtype last_backup_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastBackupStatus + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword last_backup_error_detail: Error details in last backup. + :paramtype last_backup_error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :keyword protected_item_data_source_id: Data ID of the protected item. + :paramtype protected_item_data_source_id: str + :keyword protected_item_health_status: Health status of the backup item, evaluated based on + last heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", + "NotReachable", "IRPending". + :paramtype protected_item_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, is_archive_enabled=is_archive_enabled, policy_name=policy_name, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) self.protected_item_type = 'AzureVmWorkloadSQLDatabase' # type: str @@ -5712,27 +7599,27 @@ class AzureVmWorkloadSQLDatabaseWorkloadItem(AzureVmWorkloadItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if workload item is auto-protectable. - :type is_auto_protectable: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. - :type sub_workload_item_count: int + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if workload item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :vartype sub_workload_item_count: int """ _validation = { @@ -5766,6 +7653,27 @@ def __init__( sub_workload_item_count: Optional[int] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if workload item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :paramtype sub_workload_item_count: int + """ super(AzureVmWorkloadSQLDatabaseWorkloadItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, sub_workload_item_count=sub_workload_item_count, **kwargs) self.workload_item_type = 'SQLDataBase' # type: str @@ -5775,35 +7683,35 @@ class AzureVmWorkloadSQLInstanceProtectableItem(AzureVmWorkloadProtectableItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param protectable_item_type: Required. Type of the backup item.Constant filled by server. - :type protectable_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar protectable_item_type: Required. Type of the backup item.Constant filled by server. + :vartype protectable_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param parent_unique_name: Parent Unique Name is added to provide the service formatted URI - Name of the Parent + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar parent_unique_name: Parent Unique Name is added to provide the service formatted URI Name + of the Parent Only Applicable for data bases where the parent would be either Instance or a SQL AG. - :type parent_unique_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if protectable item is auto-protectable. - :type is_auto_protectable: bool - :param is_auto_protected: Indicates if protectable item is auto-protected. - :type is_auto_protected: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. - :type subprotectableitemcount: int - :param prebackupvalidation: Pre-backup validation for protectable objects. - :type prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + :vartype parent_unique_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if protectable item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar is_auto_protected: Indicates if protectable item is auto-protected. + :vartype is_auto_protected: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :vartype subprotectableitemcount: int + :ivar prebackupvalidation: Pre-backup validation for protectable objects. + :vartype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation """ _validation = { @@ -5843,6 +7751,35 @@ def __init__( prebackupvalidation: Optional["PreBackupValidation"] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword parent_unique_name: Parent Unique Name is added to provide the service formatted URI + Name of the Parent + Only Applicable for data bases where the parent would be either Instance or a SQL AG. + :paramtype parent_unique_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if protectable item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword is_auto_protected: Indicates if protectable item is auto-protected. + :paramtype is_auto_protected: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword subprotectableitemcount: For instance or AG, indicates number of DB's to be protected. + :paramtype subprotectableitemcount: int + :keyword prebackupvalidation: Pre-backup validation for protectable objects. + :paramtype prebackupvalidation: ~azure.mgmt.recoveryservicesbackup.models.PreBackupValidation + """ super(AzureVmWorkloadSQLInstanceProtectableItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, parent_unique_name=parent_unique_name, server_name=server_name, is_auto_protectable=is_auto_protectable, is_auto_protected=is_auto_protected, subinquireditemcount=subinquireditemcount, subprotectableitemcount=subprotectableitemcount, prebackupvalidation=prebackupvalidation, **kwargs) self.protectable_item_type = 'SQLInstance' # type: str @@ -5852,29 +7789,29 @@ class AzureVmWorkloadSQLInstanceWorkloadItem(AzureVmWorkloadItem): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Type of backup management to backup an item. - :type backup_management_type: str - :param workload_type: Type of workload for the backup management. - :type workload_type: str - :param workload_item_type: Required. Type of the backup item.Constant filled by server. - :type workload_item_type: str - :param friendly_name: Friendly name of the backup item. - :type friendly_name: str - :param protection_state: State of the back up item. Possible values include: "Invalid", + :ivar backup_management_type: Type of backup management to backup an item. + :vartype backup_management_type: str + :ivar workload_type: Type of workload for the backup management. + :vartype workload_type: str + :ivar workload_item_type: Required. Type of the backup item.Constant filled by server. + :vartype workload_item_type: str + :ivar friendly_name: Friendly name of the backup item. + :vartype friendly_name: str + :ivar protection_state: State of the back up item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param parent_name: Name for instance or AG. - :type parent_name: str - :param server_name: Host/Cluster Name for instance or AG. - :type server_name: str - :param is_auto_protectable: Indicates if workload item is auto-protectable. - :type is_auto_protectable: bool - :param subinquireditemcount: For instance or AG, indicates number of DB's present. - :type subinquireditemcount: int - :param sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. - :type sub_workload_item_count: int - :param data_directory_paths: Data Directory Paths for default directories. - :type data_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar parent_name: Name for instance or AG. + :vartype parent_name: str + :ivar server_name: Host/Cluster Name for instance or AG. + :vartype server_name: str + :ivar is_auto_protectable: Indicates if workload item is auto-protectable. + :vartype is_auto_protectable: bool + :ivar subinquireditemcount: For instance or AG, indicates number of DB's present. + :vartype subinquireditemcount: int + :ivar sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :vartype sub_workload_item_count: int + :ivar data_directory_paths: Data Directory Paths for default directories. + :vartype data_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] """ _validation = { @@ -5910,6 +7847,30 @@ def __init__( data_directory_paths: Optional[List["SQLDataDirectory"]] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management to backup an item. + :paramtype backup_management_type: str + :keyword workload_type: Type of workload for the backup management. + :paramtype workload_type: str + :keyword friendly_name: Friendly name of the backup item. + :paramtype friendly_name: str + :keyword protection_state: State of the back up item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword parent_name: Name for instance or AG. + :paramtype parent_name: str + :keyword server_name: Host/Cluster Name for instance or AG. + :paramtype server_name: str + :keyword is_auto_protectable: Indicates if workload item is auto-protectable. + :paramtype is_auto_protectable: bool + :keyword subinquireditemcount: For instance or AG, indicates number of DB's present. + :paramtype subinquireditemcount: int + :keyword sub_workload_item_count: For instance or AG, indicates number of DB's to be protected. + :paramtype sub_workload_item_count: int + :keyword data_directory_paths: Data Directory Paths for default directories. + :paramtype data_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + """ super(AzureVmWorkloadSQLInstanceWorkloadItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, friendly_name=friendly_name, protection_state=protection_state, parent_name=parent_name, server_name=server_name, is_auto_protectable=is_auto_protectable, subinquireditemcount=subinquireditemcount, sub_workload_item_count=sub_workload_item_count, **kwargs) self.workload_item_type = 'SQLInstance' # type: str self.data_directory_paths = data_directory_paths @@ -5923,24 +7884,26 @@ class AzureWorkloadAutoProtectionIntent(AzureRecoveryServiceVaultProtectionInten All required parameters must be populated in order to send to Azure. - :param protection_intent_item_type: Required. backup protectionIntent type.Constant filled by - server. - :type protection_intent_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", + :ivar protection_intent_item_type: Required. backup protectionIntent type.Constant filled by + server. Possible values include: "Invalid", "AzureResourceItem", "RecoveryServiceVaultItem", + "AzureWorkloadContainerAutoProtectionIntent". + :vartype protection_intent_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentItemType + :ivar 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 + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param source_resource_id: ARM ID of the resource to be backed up. - :type source_resource_id: str - :param item_id: ID of the item which is getting protected, In case of Azure Vm , it is + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar item_id: ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId. - :type item_id: str - :param policy_id: ID of the backup policy with which this item is backed up. - :type policy_id: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", + :vartype item_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus """ _validation = { @@ -5970,6 +7933,23 @@ def __init__( protection_state: Optional[Union[str, "ProtectionStatus"]] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword item_id: ID of the item which is getting protected, In case of Azure Vm , it is + ProtectedItemId. + :paramtype item_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ super(AzureWorkloadAutoProtectionIntent, self).__init__(backup_management_type=backup_management_type, source_resource_id=source_resource_id, item_id=item_id, policy_id=policy_id, protection_state=protection_state, **kwargs) self.protection_intent_item_type = 'AzureWorkloadAutoProtectionIntent' # type: str @@ -5979,17 +7959,17 @@ class AzureWorkloadBackupRequest(BackupRequest): 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 + :ivar 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 backup_type: Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible + :vartype object_type: str + :ivar backup_type: Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible values include: "Invalid", "Full", "Differential", "Log", "CopyOnlyFull", "Incremental". - :type backup_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupType - :param enable_compression: Bool for Compression setting. - :type enable_compression: bool - :param recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified + :vartype backup_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupType + :ivar enable_compression: Bool for Compression setting. + :vartype enable_compression: bool + :ivar recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified (UTC). - :type recovery_point_expiry_time_in_utc: ~datetime.datetime + :vartype recovery_point_expiry_time_in_utc: ~datetime.datetime """ _validation = { @@ -6011,6 +7991,16 @@ def __init__( recovery_point_expiry_time_in_utc: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword backup_type: Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible + values include: "Invalid", "Full", "Differential", "Log", "CopyOnlyFull", "Incremental". + :paramtype backup_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupType + :keyword enable_compression: Bool for Compression setting. + :paramtype enable_compression: bool + :keyword recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified + (UTC). + :paramtype recovery_point_expiry_time_in_utc: ~datetime.datetime + """ super(AzureWorkloadBackupRequest, self).__init__(**kwargs) self.object_type = 'AzureWorkloadBackupRequest' # type: str self.backup_type = backup_type @@ -6018,34 +8008,114 @@ def __init__( self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc -class AzureWorkloadContainerExtendedInfo(msrest.serialization.Model): - """Extended information of the container. +class AzureWorkloadContainerAutoProtectionIntent(ProtectionIntent): + """Azure workload specific protection intent item. - :param host_server_name: Host Os Name in case of Stand Alone and Cluster Name in case of - distributed container. - :type host_server_name: str - :param inquiry_info: Inquiry Status for the container. - :type inquiry_info: ~azure.mgmt.recoveryservicesbackup.models.InquiryInfo - :param nodes_list: List of the nodes in case of distributed container. - :type nodes_list: list[~azure.mgmt.recoveryservicesbackup.models.DistributedNodesInfo] + All required parameters must be populated in order to send to Azure. + + :ivar protection_intent_item_type: Required. backup protectionIntent type.Constant filled by + server. Possible values include: "Invalid", "AzureResourceItem", "RecoveryServiceVaultItem", + "AzureWorkloadContainerAutoProtectionIntent". + :vartype protection_intent_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentItemType + :ivar backup_management_type: Type of backup management for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar item_id: ID of the item which is getting protected, In case of Azure Vm , it is + ProtectedItemId. + :vartype item_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus """ + _validation = { + 'protection_intent_item_type': {'required': True}, + } + _attribute_map = { - 'host_server_name': {'key': 'hostServerName', 'type': 'str'}, - 'inquiry_info': {'key': 'inquiryInfo', 'type': 'InquiryInfo'}, - 'nodes_list': {'key': 'nodesList', 'type': '[DistributedNodesInfo]'}, + 'protection_intent_item_type': {'key': 'protectionIntentItemType', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, } def __init__( self, *, - host_server_name: Optional[str] = None, - inquiry_info: Optional["InquiryInfo"] = None, - nodes_list: Optional[List["DistributedNodesInfo"]] = None, - **kwargs - ): - super(AzureWorkloadContainerExtendedInfo, self).__init__(**kwargs) - self.host_server_name = host_server_name + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + source_resource_id: Optional[str] = None, + item_id: Optional[str] = None, + policy_id: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + **kwargs + ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword item_id: ID of the item which is getting protected, In case of Azure Vm , it is + ProtectedItemId. + :paramtype item_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ + super(AzureWorkloadContainerAutoProtectionIntent, self).__init__(backup_management_type=backup_management_type, source_resource_id=source_resource_id, item_id=item_id, policy_id=policy_id, protection_state=protection_state, **kwargs) + self.protection_intent_item_type = 'AzureWorkloadContainerAutoProtectionIntent' # type: str + + +class AzureWorkloadContainerExtendedInfo(msrest.serialization.Model): + """Extended information of the container. + + :ivar host_server_name: Host Os Name in case of Stand Alone and Cluster Name in case of + distributed container. + :vartype host_server_name: str + :ivar inquiry_info: Inquiry Status for the container. + :vartype inquiry_info: ~azure.mgmt.recoveryservicesbackup.models.InquiryInfo + :ivar nodes_list: List of the nodes in case of distributed container. + :vartype nodes_list: list[~azure.mgmt.recoveryservicesbackup.models.DistributedNodesInfo] + """ + + _attribute_map = { + 'host_server_name': {'key': 'hostServerName', 'type': 'str'}, + 'inquiry_info': {'key': 'inquiryInfo', 'type': 'InquiryInfo'}, + 'nodes_list': {'key': 'nodesList', 'type': '[DistributedNodesInfo]'}, + } + + def __init__( + self, + *, + host_server_name: Optional[str] = None, + inquiry_info: Optional["InquiryInfo"] = None, + nodes_list: Optional[List["DistributedNodesInfo"]] = None, + **kwargs + ): + """ + :keyword host_server_name: Host Os Name in case of Stand Alone and Cluster Name in case of + distributed container. + :paramtype host_server_name: str + :keyword inquiry_info: Inquiry Status for the container. + :paramtype inquiry_info: ~azure.mgmt.recoveryservicesbackup.models.InquiryInfo + :keyword nodes_list: List of the nodes in case of distributed container. + :paramtype nodes_list: list[~azure.mgmt.recoveryservicesbackup.models.DistributedNodesInfo] + """ + super(AzureWorkloadContainerExtendedInfo, self).__init__(**kwargs) + self.host_server_name = host_server_name self.inquiry_info = inquiry_info self.nodes_list = nodes_list @@ -6053,16 +8123,16 @@ def __init__( class AzureWorkloadErrorInfo(msrest.serialization.Model): """Azure storage specific error information. - :param error_code: Error code. - :type error_code: int - :param error_string: Localized error string. - :type error_string: str - :param error_title: Title: Typically, the entity that the error pertains to. - :type error_title: str - :param recommendations: List of localized recommendations for above error code. - :type recommendations: list[str] - :param additional_details: Additional details for above error code. - :type additional_details: str + :ivar error_code: Error code. + :vartype error_code: int + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar error_title: Title: Typically, the entity that the error pertains to. + :vartype error_title: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] + :ivar additional_details: Additional details for above error code. + :vartype additional_details: str """ _attribute_map = { @@ -6083,6 +8153,18 @@ def __init__( additional_details: Optional[str] = None, **kwargs ): + """ + :keyword error_code: Error code. + :paramtype error_code: int + :keyword error_string: Localized error string. + :paramtype error_string: str + :keyword error_title: Title: Typically, the entity that the error pertains to. + :paramtype error_title: str + :keyword recommendations: List of localized recommendations for above error code. + :paramtype recommendations: list[str] + :keyword additional_details: Additional details for above error code. + :paramtype additional_details: str + """ super(AzureWorkloadErrorInfo, self).__init__(**kwargs) self.error_code = error_code self.error_string = error_string @@ -6096,36 +8178,37 @@ class AzureWorkloadJob(Job): All required parameters must be populated in order to send to Azure. - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param activity_id: ActivityId of job. - :type activity_id: str - :param job_type: Required. This property will be used as the discriminator for deciding the + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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 job_type: str - :param workload_type: Workload type of the job. - :type workload_type: str - :param duration: Time elapsed during the execution of this job. - :type duration: ~datetime.timedelta - :param actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. - :type actions_info: list[str or ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] - :param error_details: Error details on execution of this job. - :type error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadErrorInfo] - :param extended_info: Additional information about the job. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobExtendedInfo + :vartype job_type: str + :ivar workload_type: Workload type of the job. + :vartype workload_type: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadErrorInfo] + :ivar extended_info: Additional information about the job. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobExtendedInfo """ _validation = { @@ -6165,6 +8248,39 @@ def __init__( extended_info: Optional["AzureWorkloadJobExtendedInfo"] = None, **kwargs ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword workload_type: Workload type of the job. + :paramtype workload_type: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadErrorInfo] + :keyword extended_info: Additional information about the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobExtendedInfo + """ super(AzureWorkloadJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) self.job_type = 'AzureWorkloadJob' # type: str self.workload_type = workload_type @@ -6177,12 +8293,13 @@ def __init__( class AzureWorkloadJobExtendedInfo(msrest.serialization.Model): """Azure VM workload-specific additional information for job. - :param tasks_list: List of tasks for this job. - :type tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobTaskDetails] - :param property_bag: Job properties. - :type property_bag: dict[str, str] - :param dynamic_error_message: Non localized error message on job execution. - :type dynamic_error_message: str + :ivar tasks_list: List of tasks for this job. + :vartype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobTaskDetails] + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str """ _attribute_map = { @@ -6199,6 +8316,15 @@ def __init__( dynamic_error_message: Optional[str] = None, **kwargs ): + """ + :keyword tasks_list: List of tasks for this job. + :paramtype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadJobTaskDetails] + :keyword property_bag: Job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ super(AzureWorkloadJobExtendedInfo, self).__init__(**kwargs) self.tasks_list = tasks_list self.property_bag = property_bag @@ -6208,10 +8334,10 @@ def __init__( class AzureWorkloadJobTaskDetails(msrest.serialization.Model): """Azure VM workload specific job task details. - :param task_id: The task display name. - :type task_id: str - :param status: The status. - :type status: str + :ivar task_id: The task display name. + :vartype task_id: str + :ivar status: The status. + :vartype status: str """ _attribute_map = { @@ -6226,6 +8352,12 @@ def __init__( status: Optional[str] = None, **kwargs ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword status: The status. + :paramtype status: str + """ super(AzureWorkloadJobTaskDetails, self).__init__(**kwargs) self.task_id = task_id self.status = status @@ -6239,19 +8371,19 @@ class AzureWorkloadRecoveryPoint(RecoveryPoint): 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 + :ivar 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_time_in_utc: UTC time at which recovery point was created. - :type recovery_point_time_in_utc: ~datetime.datetime - :param type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + :vartype 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". - :type 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, + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] """ @@ -6263,7 +8395,7 @@ class AzureWorkloadRecoveryPoint(RecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformationV2]'}, 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, } @@ -6276,10 +8408,23 @@ def __init__( *, recovery_point_time_in_utc: Optional[datetime.datetime] = None, type: Optional[Union[str, "RestorePointType"]] = None, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, + recovery_point_tier_details: Optional[List["RecoveryPointTierInformationV2"]] = None, recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, **kwargs ): + """ + :keyword recovery_point_time_in_utc: UTC time at which recovery point was created. + :paramtype recovery_point_time_in_utc: ~datetime.datetime + :keyword type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + "Differential", "Incremental". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + """ super(AzureWorkloadRecoveryPoint, self).__init__(**kwargs) self.object_type = 'AzureWorkloadRecoveryPoint' # type: str self.recovery_point_time_in_utc = recovery_point_time_in_utc @@ -6296,171 +8441,67 @@ class AzureWorkloadPointInTimeRecoveryPoint(AzureWorkloadRecoveryPoint): 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_time_in_utc: UTC time at which recovery point was created. - :type recovery_point_time_in_utc: ~datetime.datetime - :param type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :type 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}, - } - - _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': 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint'} - } - - def __init__( - self, - *, - recovery_point_time_in_utc: Optional[datetime.datetime] = None, - type: Optional[Union[str, "RestorePointType"]] = None, - 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(AzureWorkloadPointInTimeRecoveryPoint, self).__init__(recovery_point_time_in_utc=recovery_point_time_in_utc, type=type, 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 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 + :ivar 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 + :vartype 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, + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype 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] + :ivar time_ranges: List of log ranges. + :vartype 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_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformationV2]'}, 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, } _subtype_map = { - 'object_type': {'AzureWorkloadSAPHanaPointInTimeRecoveryPoint': 'AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated'} + 'object_type': {'AzureWorkloadSAPHanaPointInTimeRecoveryPoint': 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint'} } def __init__( self, *, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, + recovery_point_time_in_utc: Optional[datetime.datetime] = None, + type: Optional[Union[str, "RestorePointType"]] = None, + recovery_point_tier_details: Optional[List["RecoveryPointTierInformationV2"]] = 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) + """ + :keyword recovery_point_time_in_utc: UTC time at which recovery point was created. + :paramtype recovery_point_time_in_utc: ~datetime.datetime + :keyword type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + "Differential", "Incremental". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] + """ + super(AzureWorkloadPointInTimeRecoveryPoint, self).__init__(recovery_point_time_in_utc=recovery_point_time_in_utc, type=type, 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 @@ -6473,26 +8514,26 @@ class AzureWorkloadRestoreRequest(RestoreRequest): 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str + :vartype target_virtual_machine_id: str """ _validation = { @@ -6524,6 +8565,25 @@ def __init__( target_virtual_machine_id: Optional[str] = None, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + """ super(AzureWorkloadRestoreRequest, self).__init__(**kwargs) self.object_type = 'AzureWorkloadRestoreRequest' # type: str self.recovery_type = recovery_type @@ -6539,28 +8599,28 @@ class AzureWorkloadPointInTimeRestoreRequest(AzureWorkloadRestoreRequest): 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param point_in_time: PointInTime value. - :type point_in_time: ~datetime.datetime + :vartype target_virtual_machine_id: str + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime """ _validation = { @@ -6590,6 +8650,27 @@ def __init__( point_in_time: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + """ super(AzureWorkloadPointInTimeRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, **kwargs) self.object_type = 'AzureWorkloadPointInTimeRestoreRequest' # type: str self.point_in_time = point_in_time @@ -6600,87 +8681,33 @@ class AzureWorkloadSAPHanaPointInTimeRecoveryPoint(AzureWorkloadPointInTimeRecov 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 + :ivar 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_time_in_utc: UTC time at which recovery point was created. - :type recovery_point_time_in_utc: ~datetime.datetime - :param type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :type 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}, - } - - _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_time_in_utc: Optional[datetime.datetime] = None, - type: Optional[Union[str, "RestorePointType"]] = None, - 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(AzureWorkloadSAPHanaPointInTimeRecoveryPoint, self).__init__(recovery_point_time_in_utc=recovery_point_time_in_utc, type=type, 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 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 + :vartype 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, + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype 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] + :ivar time_ranges: List of log ranges. + :vartype 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_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformationV2]'}, 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, } @@ -6688,12 +8715,29 @@ class AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated(AzureWorkloadPoi def __init__( self, *, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, + recovery_point_time_in_utc: Optional[datetime.datetime] = None, + type: Optional[Union[str, "RestorePointType"]] = None, + recovery_point_tier_details: Optional[List["RecoveryPointTierInformationV2"]] = 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) + """ + :keyword recovery_point_time_in_utc: UTC time at which recovery point was created. + :paramtype recovery_point_time_in_utc: ~datetime.datetime + :keyword type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + "Differential", "Incremental". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] + """ + super(AzureWorkloadSAPHanaPointInTimeRecoveryPoint, self).__init__(recovery_point_time_in_utc=recovery_point_time_in_utc, type=type, 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 @@ -6705,26 +8749,26 @@ class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str + :vartype target_virtual_machine_id: str """ _validation = { @@ -6756,6 +8800,25 @@ def __init__( target_virtual_machine_id: Optional[str] = None, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + """ super(AzureWorkloadSAPHanaRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, **kwargs) self.object_type = 'AzureWorkloadSAPHanaRestoreRequest' # type: str @@ -6768,28 +8831,28 @@ class AzureWorkloadSAPHanaPointInTimeRestoreRequest(AzureWorkloadSAPHanaRestoreR 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param point_in_time: PointInTime value. - :type point_in_time: ~datetime.datetime + :vartype target_virtual_machine_id: str + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime """ _validation = { @@ -6823,6 +8886,27 @@ def __init__( point_in_time: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + """ super(AzureWorkloadSAPHanaPointInTimeRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, **kwargs) self.object_type = 'AzureWorkloadSAPHanaPointInTimeRestoreRequest' # type: str self.point_in_time = point_in_time @@ -6833,30 +8917,30 @@ class AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSA 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param point_in_time: PointInTime value. - :type point_in_time: ~datetime.datetime - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: + :vartype target_virtual_machine_id: str + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo """ @@ -6889,6 +8973,30 @@ def __init__( recovery_point_rehydration_info: Optional["RecoveryPointRehydrationInfo"] = None, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + :keyword recovery_point_rehydration_info: RP Rehydration Info. + :paramtype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ super(AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, point_in_time=point_in_time, **kwargs) self.object_type = 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest' # type: str self.recovery_point_rehydration_info = recovery_point_rehydration_info @@ -6899,92 +9007,57 @@ class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): 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_time_in_utc: UTC time at which recovery point was created. - :type recovery_point_time_in_utc: ~datetime.datetime - :param type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :type 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}, - } - - _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_time_in_utc: Optional[datetime.datetime] = None, - type: Optional[Union[str, "RestorePointType"]] = None, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, - recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, - **kwargs - ): - super(AzureWorkloadSAPHanaRecoveryPoint, self).__init__(recovery_point_time_in_utc=recovery_point_time_in_utc, type=type, 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 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 + :ivar 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 + :vartype 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, + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype 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_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformationV2]'}, 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, } def __init__( self, *, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, + recovery_point_time_in_utc: Optional[datetime.datetime] = None, + type: Optional[Union[str, "RestorePointType"]] = None, + recovery_point_tier_details: Optional[List["RecoveryPointTierInformationV2"]] = 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) + """ + :keyword recovery_point_time_in_utc: UTC time at which recovery point was created. + :paramtype recovery_point_time_in_utc: ~datetime.datetime + :keyword type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + "Differential", "Incremental". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + """ + super(AzureWorkloadSAPHanaRecoveryPoint, self).__init__(recovery_point_time_in_utc=recovery_point_time_in_utc, type=type, 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 @@ -6993,28 +9066,28 @@ class AzureWorkloadSAPHanaRestoreWithRehydrateRequest(AzureWorkloadSAPHanaRestor 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: + :vartype target_virtual_machine_id: str + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo """ @@ -7045,6 +9118,28 @@ def __init__( recovery_point_rehydration_info: Optional["RecoveryPointRehydrationInfo"] = None, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword recovery_point_rehydration_info: RP Rehydration Info. + :paramtype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ super(AzureWorkloadSAPHanaRestoreWithRehydrateRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, **kwargs) self.object_type = 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest' # type: str self.recovery_point_rehydration_info = recovery_point_rehydration_info @@ -7055,28 +9150,30 @@ class AzureWorkloadSQLAutoProtectionIntent(AzureWorkloadAutoProtectionIntent): All required parameters must be populated in order to send to Azure. - :param protection_intent_item_type: Required. backup protectionIntent type.Constant filled by - server. - :type protection_intent_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", + :ivar protection_intent_item_type: Required. backup protectionIntent type.Constant filled by + server. Possible values include: "Invalid", "AzureResourceItem", "RecoveryServiceVaultItem", + "AzureWorkloadContainerAutoProtectionIntent". + :vartype protection_intent_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentItemType + :ivar 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 + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param source_resource_id: ARM ID of the resource to be backed up. - :type source_resource_id: str - :param item_id: ID of the item which is getting protected, In case of Azure Vm , it is + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar item_id: ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId. - :type item_id: str - :param policy_id: ID of the backup policy with which this item is backed up. - :type policy_id: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", + :vartype item_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar protection_state: Backup state of this backup item. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param workload_item_type: Workload item type of the item for which intent is to be set. + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar workload_item_type: Workload item type of the item for which intent is to be set. Possible values include: "Invalid", "SQLInstance", "SQLDataBase", "SAPHanaSystem", "SAPHanaDatabase", "SAPAseSystem", "SAPAseDatabase". - :type workload_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType + :vartype workload_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType """ _validation = { @@ -7104,6 +9201,28 @@ def __init__( workload_item_type: Optional[Union[str, "WorkloadItemType"]] = None, **kwargs ): + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword item_id: ID of the item which is getting protected, In case of Azure Vm , it is + ProtectedItemId. + :paramtype item_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword workload_item_type: Workload item type of the item for which intent is to be set. + Possible values include: "Invalid", "SQLInstance", "SQLDataBase", "SAPHanaSystem", + "SAPHanaDatabase", "SAPAseSystem", "SAPAseDatabase". + :paramtype workload_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType + """ super(AzureWorkloadSQLAutoProtectionIntent, self).__init__(backup_management_type=backup_management_type, source_resource_id=source_resource_id, item_id=item_id, policy_id=policy_id, protection_state=protection_state, **kwargs) self.protection_intent_item_type = 'AzureWorkloadSQLAutoProtectionIntent' # type: str self.workload_item_type = workload_item_type @@ -7117,25 +9236,25 @@ class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): 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 + :ivar 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_time_in_utc: UTC time at which recovery point was created. - :type recovery_point_time_in_utc: ~datetime.datetime - :param type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + :vartype 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". - :type 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, + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype 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 + :ivar 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: + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo """ @@ -7147,7 +9266,7 @@ class AzureWorkloadSQLRecoveryPoint(AzureWorkloadRecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformationV2]'}, 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, } @@ -7161,11 +9280,30 @@ def __init__( *, recovery_point_time_in_utc: Optional[datetime.datetime] = None, type: Optional[Union[str, "RestorePointType"]] = None, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, + recovery_point_tier_details: Optional[List["RecoveryPointTierInformationV2"]] = None, recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, extended_info: Optional["AzureWorkloadSQLRecoveryPointExtendedInfo"] = None, **kwargs ): + """ + :keyword recovery_point_time_in_utc: UTC time at which recovery point was created. + :paramtype recovery_point_time_in_utc: ~datetime.datetime + :keyword type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + "Differential", "Incremental". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + :keyword 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. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo + """ super(AzureWorkloadSQLRecoveryPoint, self).__init__(recovery_point_time_in_utc=recovery_point_time_in_utc, type=type, 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 @@ -7176,28 +9314,28 @@ class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): 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 + :ivar 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_time_in_utc: UTC time at which recovery point was created. - :type recovery_point_time_in_utc: ~datetime.datetime - :param type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + :vartype 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". - :type 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, + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype 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 + :ivar 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: + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo - :param time_ranges: List of log ranges. - :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] + :ivar time_ranges: List of log ranges. + :vartype time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] """ _validation = { @@ -7208,7 +9346,7 @@ class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): 'object_type': {'key': 'objectType', 'type': 'str'}, 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, + 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformationV2]'}, 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfo'}, 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, @@ -7219,142 +9357,38 @@ def __init__( *, recovery_point_time_in_utc: Optional[datetime.datetime] = None, type: Optional[Union[str, "RestorePointType"]] = None, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, + recovery_point_tier_details: Optional[List["RecoveryPointTierInformationV2"]] = None, recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, extended_info: Optional["AzureWorkloadSQLRecoveryPointExtendedInfo"] = None, time_ranges: Optional[List["PointInTimeRange"]] = None, **kwargs ): + """ + :keyword recovery_point_time_in_utc: UTC time at which recovery point was created. + :paramtype recovery_point_time_in_utc: ~datetime.datetime + :keyword type: Type of restore point. Possible values include: "Invalid", "Full", "Log", + "Differential", "Incremental". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + :keyword 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. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] + """ super(AzureWorkloadSQLPointInTimeRecoveryPoint, self).__init__(recovery_point_time_in_utc=recovery_point_time_in_utc, type=type, 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 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. @@ -7363,34 +9397,34 @@ class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param should_use_alternate_target_location: Default option set to true. If this is set to + :vartype target_virtual_machine_id: str + :ivar should_use_alternate_target_location: Default option set to true. If this is set to false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when + :vartype should_use_alternate_target_location: bool + :ivar is_non_recoverable: SQL specific property where user can chose to set no-recovery when restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: + :vartype is_non_recoverable: bool + :ivar alternate_directory_paths: Data directory details. + :vartype alternate_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] """ @@ -7429,6 +9463,34 @@ def __init__( alternate_directory_paths: Optional[List["SQLDataDirectoryMapping"]] = None, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :paramtype should_use_alternate_target_location: bool + :keyword is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :paramtype is_non_recoverable: bool + :keyword alternate_directory_paths: Data directory details. + :paramtype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + """ super(AzureWorkloadSQLRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, **kwargs) self.object_type = 'AzureWorkloadSQLRestoreRequest' # type: str self.should_use_alternate_target_location = should_use_alternate_target_location @@ -7444,37 +9506,37 @@ class AzureWorkloadSQLPointInTimeRestoreRequest(AzureWorkloadSQLRestoreRequest): 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param should_use_alternate_target_location: Default option set to true. If this is set to + :vartype target_virtual_machine_id: str + :ivar should_use_alternate_target_location: Default option set to true. If this is set to false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when + :vartype should_use_alternate_target_location: bool + :ivar is_non_recoverable: SQL specific property where user can chose to set no-recovery when restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: + :vartype is_non_recoverable: bool + :ivar alternate_directory_paths: Data directory details. + :vartype alternate_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] - :param point_in_time: PointInTime value. - :type point_in_time: ~datetime.datetime + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime """ _validation = { @@ -7514,6 +9576,36 @@ def __init__( point_in_time: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :paramtype should_use_alternate_target_location: bool + :keyword is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :paramtype is_non_recoverable: bool + :keyword alternate_directory_paths: Data directory details. + :paramtype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + """ super(AzureWorkloadSQLPointInTimeRestoreRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, should_use_alternate_target_location=should_use_alternate_target_location, is_non_recoverable=is_non_recoverable, alternate_directory_paths=alternate_directory_paths, **kwargs) self.object_type = 'AzureWorkloadSQLPointInTimeRestoreRequest' # type: str self.point_in_time = point_in_time @@ -7524,39 +9616,39 @@ class AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSQLPoi 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param should_use_alternate_target_location: Default option set to true. If this is set to + :vartype target_virtual_machine_id: str + :ivar should_use_alternate_target_location: Default option set to true. If this is set to false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when + :vartype should_use_alternate_target_location: bool + :ivar is_non_recoverable: SQL specific property where user can chose to set no-recovery when restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: + :vartype is_non_recoverable: bool + :ivar alternate_directory_paths: Data directory details. + :vartype alternate_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] - :param point_in_time: PointInTime value. - :type point_in_time: ~datetime.datetime - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: + :ivar point_in_time: PointInTime value. + :vartype point_in_time: ~datetime.datetime + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo """ @@ -7595,6 +9687,39 @@ def __init__( recovery_point_rehydration_info: Optional["RecoveryPointRehydrationInfo"] = None, **kwargs ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :paramtype should_use_alternate_target_location: bool + :keyword is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :paramtype is_non_recoverable: bool + :keyword alternate_directory_paths: Data directory details. + :paramtype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + :keyword point_in_time: PointInTime value. + :paramtype point_in_time: ~datetime.datetime + :keyword recovery_point_rehydration_info: RP Rehydration Info. + :paramtype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ super(AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, self).__init__(recovery_type=recovery_type, source_resource_id=source_resource_id, property_bag=property_bag, target_info=target_info, recovery_mode=recovery_mode, target_virtual_machine_id=target_virtual_machine_id, should_use_alternate_target_location=should_use_alternate_target_location, is_non_recoverable=is_non_recoverable, alternate_directory_paths=alternate_directory_paths, point_in_time=point_in_time, **kwargs) self.object_type = 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest' # type: str self.recovery_point_rehydration_info = recovery_point_rehydration_info @@ -7603,10 +9728,10 @@ def __init__( class AzureWorkloadSQLRecoveryPointExtendedInfo(msrest.serialization.Model): """Extended info class details. - :param data_directory_time_in_utc: UTC time at which data directory info was captured. - :type data_directory_time_in_utc: ~datetime.datetime - :param data_directory_paths: List of data directory paths during restore operation. - :type data_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + :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] """ _attribute_map = { @@ -7621,77 +9746,54 @@ def __init__( data_directory_paths: Optional[List["SQLDataDirectory"]] = None, **kwargs ): + """ + :keyword data_directory_time_in_utc: UTC time at which data directory info was captured. + :paramtype data_directory_time_in_utc: ~datetime.datetime + :keyword data_directory_paths: List of data directory paths during restore operation. + :paramtype data_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectory] + """ super(AzureWorkloadSQLRecoveryPointExtendedInfo, self).__init__(**kwargs) self.data_directory_time_in_utc = data_directory_time_in_utc 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. 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 + :ivar 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_type: Type of this recovery. Possible values include: "Invalid", + :vartype object_type: str + :ivar recovery_type: Type of this recovery. Possible values include: "Invalid", "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM on which workload that was running + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM on which workload that was running is being recovered. - :type source_resource_id: str - :param property_bag: Workload specific property bag. - :type property_bag: dict[str, str] - :param target_info: Details of target database. - :type target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo - :param recovery_mode: Defines whether the current recovery mode is file restore or database + :vartype source_resource_id: str + :ivar property_bag: Workload specific property bag. + :vartype property_bag: dict[str, str] + :ivar target_info: Details of target database. + :vartype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :ivar recovery_mode: Defines whether the current recovery mode is file restore or database restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". - :type recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode - :param target_virtual_machine_id: This is the complete ARM Id of the target VM + :vartype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :ivar target_virtual_machine_id: This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param should_use_alternate_target_location: Default option set to true. If this is set to + :vartype target_virtual_machine_id: str + :ivar should_use_alternate_target_location: Default option set to true. If this is set to false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when + :vartype should_use_alternate_target_location: bool + :ivar is_non_recoverable: SQL specific property where user can chose to set no-recovery when restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: + :vartype is_non_recoverable: bool + :ivar alternate_directory_paths: Data directory details. + :vartype alternate_directory_paths: list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo """ @@ -7716,21 +9818,112 @@ class AzureWorkloadSQLRestoreWithRehydrateRequest(AzureWorkloadSQLRestoreRequest def __init__( self, *, - recovery_type: Optional[Union[str, "RecoveryType"]] = None, - source_resource_id: Optional[str] = None, - property_bag: Optional[Dict[str, str]] = None, - target_info: Optional["TargetRestoreInfo"] = None, - recovery_mode: Optional[Union[str, "RecoveryMode"]] = None, - target_virtual_machine_id: Optional[str] = None, - should_use_alternate_target_location: Optional[bool] = None, - is_non_recoverable: Optional[bool] = None, - alternate_directory_paths: Optional[List["SQLDataDirectoryMapping"]] = None, - recovery_point_rehydration_info: Optional["RecoveryPointRehydrationInfo"] = None, + recovery_type: Optional[Union[str, "RecoveryType"]] = None, + source_resource_id: Optional[str] = None, + property_bag: Optional[Dict[str, str]] = None, + target_info: Optional["TargetRestoreInfo"] = None, + recovery_mode: Optional[Union[str, "RecoveryMode"]] = None, + target_virtual_machine_id: Optional[str] = None, + should_use_alternate_target_location: Optional[bool] = None, + is_non_recoverable: Optional[bool] = None, + alternate_directory_paths: Optional[List["SQLDataDirectoryMapping"]] = None, + recovery_point_rehydration_info: Optional["RecoveryPointRehydrationInfo"] = None, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM on which workload that was + running is being recovered. + :paramtype source_resource_id: str + :keyword property_bag: Workload specific property bag. + :paramtype property_bag: dict[str, str] + :keyword target_info: Details of target database. + :paramtype target_info: ~azure.mgmt.recoveryservicesbackup.models.TargetRestoreInfo + :keyword recovery_mode: Defines whether the current recovery mode is file restore or database + restore. Possible values include: "Invalid", "FileRecovery", "WorkloadRecovery". + :paramtype recovery_mode: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryMode + :keyword target_virtual_machine_id: This is the complete ARM Id of the target VM + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :paramtype target_virtual_machine_id: str + :keyword should_use_alternate_target_location: Default option set to true. If this is set to + false, alternate data directory must be provided. + :paramtype should_use_alternate_target_location: bool + :keyword is_non_recoverable: SQL specific property where user can chose to set no-recovery when + restore operation is tried. + :paramtype is_non_recoverable: bool + :keyword alternate_directory_paths: Data directory details. + :paramtype alternate_directory_paths: + list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] + :keyword recovery_point_rehydration_info: RP Rehydration Info. + :paramtype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ + 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 + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype 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(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 + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + """ + 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): @@ -7745,14 +9938,14 @@ class BackupEngineBaseResource(Resource): :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: BackupEngineBaseResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBase + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: BackupEngineBaseResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBase """ _validation = { @@ -7780,6 +9973,16 @@ def __init__( properties: Optional["BackupEngineBase"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: BackupEngineBaseResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBase + """ super(BackupEngineBaseResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -7787,9 +9990,9 @@ def __init__( class ResourceList(msrest.serialization.Model): """Base for all lists of resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str """ _attribute_map = { @@ -7802,6 +10005,11 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + """ super(ResourceList, self).__init__(**kwargs) self.next_link = next_link @@ -7809,11 +10017,11 @@ def __init__( class BackupEngineBaseResourceList(ResourceList): """List of BackupEngineBase resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResource] """ _attribute_map = { @@ -7828,6 +10036,13 @@ def __init__( value: Optional[List["BackupEngineBaseResource"]] = None, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResource] + """ super(BackupEngineBaseResourceList, self).__init__(next_link=next_link, **kwargs) self.value = value @@ -7835,22 +10050,22 @@ def __init__( class BackupEngineExtendedInfo(msrest.serialization.Model): """Additional information on backup engine. - :param database_name: Database name of backup engine. - :type database_name: str - :param protected_items_count: Number of protected items in the backup engine. - :type protected_items_count: int - :param protected_servers_count: Number of protected servers in the backup engine. - :type protected_servers_count: int - :param disk_count: Number of disks in the backup engine. - :type disk_count: int - :param used_disk_space: Disk space used in the backup engine. - :type used_disk_space: float - :param available_disk_space: Disk space currently available in the backup engine. - :type available_disk_space: float - :param refreshed_at: Last refresh time in the backup engine. - :type refreshed_at: ~datetime.datetime - :param azure_protected_instances: Protected instances in the backup engine. - :type azure_protected_instances: int + :ivar database_name: Database name of backup engine. + :vartype database_name: str + :ivar protected_items_count: Number of protected items in the backup engine. + :vartype protected_items_count: int + :ivar protected_servers_count: Number of protected servers in the backup engine. + :vartype protected_servers_count: int + :ivar disk_count: Number of disks in the backup engine. + :vartype disk_count: int + :ivar used_disk_space: Disk space used in the backup engine. + :vartype used_disk_space: float + :ivar available_disk_space: Disk space currently available in the backup engine. + :vartype available_disk_space: float + :ivar refreshed_at: Last refresh time in the backup engine. + :vartype refreshed_at: ~datetime.datetime + :ivar azure_protected_instances: Protected instances in the backup engine. + :vartype azure_protected_instances: int """ _attribute_map = { @@ -7877,6 +10092,24 @@ def __init__( azure_protected_instances: Optional[int] = None, **kwargs ): + """ + :keyword database_name: Database name of backup engine. + :paramtype database_name: str + :keyword protected_items_count: Number of protected items in the backup engine. + :paramtype protected_items_count: int + :keyword protected_servers_count: Number of protected servers in the backup engine. + :paramtype protected_servers_count: int + :keyword disk_count: Number of disks in the backup engine. + :paramtype disk_count: int + :keyword used_disk_space: Disk space used in the backup engine. + :paramtype used_disk_space: float + :keyword available_disk_space: Disk space currently available in the backup engine. + :paramtype available_disk_space: float + :keyword refreshed_at: Last refresh time in the backup engine. + :paramtype refreshed_at: ~datetime.datetime + :keyword azure_protected_instances: Protected instances in the backup engine. + :paramtype azure_protected_instances: int + """ super(BackupEngineExtendedInfo, self).__init__(**kwargs) self.database_name = database_name self.protected_items_count = protected_items_count @@ -7891,19 +10124,19 @@ def __init__( class BackupManagementUsage(msrest.serialization.Model): """Backup management usages of a vault. - :param unit: Unit of the usage. Possible values include: "Count", "Bytes", "Seconds", - "Percent", "CountPerSecond", "BytesPerSecond". - :type unit: str or ~azure.mgmt.recoveryservicesbackup.models.UsagesUnit - :param quota_period: Quota period of usage. - :type quota_period: str - :param next_reset_time: Next reset time of usage. - :type next_reset_time: ~datetime.datetime - :param current_value: Current value of usage. - :type current_value: long - :param limit: Limit of usage. - :type limit: long - :param name: Name of usage. - :type name: ~azure.mgmt.recoveryservicesbackup.models.NameInfo + :ivar unit: Unit of the usage. Possible values include: "Count", "Bytes", "Seconds", "Percent", + "CountPerSecond", "BytesPerSecond". + :vartype unit: str or ~azure.mgmt.recoveryservicesbackup.models.UsagesUnit + :ivar quota_period: Quota period of usage. + :vartype quota_period: str + :ivar next_reset_time: Next reset time of usage. + :vartype next_reset_time: ~datetime.datetime + :ivar current_value: Current value of usage. + :vartype current_value: long + :ivar limit: Limit of usage. + :vartype limit: long + :ivar name: Name of usage. + :vartype name: ~azure.mgmt.recoveryservicesbackup.models.NameInfo """ _attribute_map = { @@ -7926,6 +10159,21 @@ def __init__( name: Optional["NameInfo"] = None, **kwargs ): + """ + :keyword unit: Unit of the usage. Possible values include: "Count", "Bytes", "Seconds", + "Percent", "CountPerSecond", "BytesPerSecond". + :paramtype unit: str or ~azure.mgmt.recoveryservicesbackup.models.UsagesUnit + :keyword quota_period: Quota period of usage. + :paramtype quota_period: str + :keyword next_reset_time: Next reset time of usage. + :paramtype next_reset_time: ~datetime.datetime + :keyword current_value: Current value of usage. + :paramtype current_value: long + :keyword limit: Limit of usage. + :paramtype limit: long + :keyword name: Name of usage. + :paramtype name: ~azure.mgmt.recoveryservicesbackup.models.NameInfo + """ super(BackupManagementUsage, self).__init__(**kwargs) self.unit = unit self.quota_period = quota_period @@ -7938,8 +10186,8 @@ def __init__( class BackupManagementUsageList(msrest.serialization.Model): """Backup management usage for vault. - :param value: The list of backup management usages for the given vault. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsage] + :ivar value: The list of backup management usages for the given vault. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsage] """ _attribute_map = { @@ -7952,6 +10200,10 @@ def __init__( value: Optional[List["BackupManagementUsage"]] = None, **kwargs ): + """ + :keyword value: The list of backup management usages for the given vault. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsage] + """ super(BackupManagementUsageList, self).__init__(**kwargs) self.value = value @@ -7968,14 +10220,14 @@ class BackupRequestResource(Resource): :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: BackupRequestResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupRequest + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: BackupRequestResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupRequest """ _validation = { @@ -8003,6 +10255,16 @@ def __init__( properties: Optional["BackupRequest"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: BackupRequestResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupRequest + """ super(BackupRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -8010,18 +10272,24 @@ def __init__( class BackupResourceConfig(msrest.serialization.Model): """The resource storage details. - :param storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + :ivar storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". - :type storage_model_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType - :param storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + :vartype storage_model_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :ivar storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". - :type storage_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType - :param storage_type_state: Locked or Unlocked. Once a machine is registered against a resource, + :vartype storage_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :ivar storage_type_state: Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: "Invalid", "Locked", "Unlocked". - :type storage_type_state: str or ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState - :param cross_region_restore_flag: Opt in details of Cross Region Restore feature. - :type cross_region_restore_flag: bool + :vartype storage_type_state: str or ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState + :ivar cross_region_restore_flag: Opt in details of Cross Region Restore feature. + :vartype cross_region_restore_flag: bool + :ivar dedup_state: Vault Dedup state. Possible values include: "Invalid", "Enabled", + "Disabled". + :vartype dedup_state: str or ~azure.mgmt.recoveryservicesbackup.models.DedupState + :ivar xcool_state: Vault x-cool state. Possible values include: "Invalid", "Enabled", + "Disabled". + :vartype xcool_state: str or ~azure.mgmt.recoveryservicesbackup.models.XcoolState """ _attribute_map = { @@ -8029,6 +10297,8 @@ class BackupResourceConfig(msrest.serialization.Model): 'storage_type': {'key': 'storageType', 'type': 'str'}, 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, 'cross_region_restore_flag': {'key': 'crossRegionRestoreFlag', 'type': 'bool'}, + 'dedup_state': {'key': 'dedupState', 'type': 'str'}, + 'xcool_state': {'key': 'xcoolState', 'type': 'str'}, } def __init__( @@ -8038,13 +10308,38 @@ def __init__( storage_type: Optional[Union[str, "StorageType"]] = None, storage_type_state: Optional[Union[str, "StorageTypeState"]] = None, cross_region_restore_flag: Optional[bool] = None, - **kwargs - ): + dedup_state: Optional[Union[str, "DedupState"]] = None, + xcool_state: Optional[Union[str, "XcoolState"]] = None, + **kwargs + ): + """ + :keyword storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_model_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :keyword storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :keyword storage_type_state: Locked or Unlocked. Once a machine is registered against a + resource, the storageTypeState is always Locked. Possible values include: "Invalid", "Locked", + "Unlocked". + :paramtype storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState + :keyword cross_region_restore_flag: Opt in details of Cross Region Restore feature. + :paramtype cross_region_restore_flag: bool + :keyword dedup_state: Vault Dedup state. Possible values include: "Invalid", "Enabled", + "Disabled". + :paramtype dedup_state: str or ~azure.mgmt.recoveryservicesbackup.models.DedupState + :keyword xcool_state: Vault x-cool state. Possible values include: "Invalid", "Enabled", + "Disabled". + :paramtype xcool_state: str or ~azure.mgmt.recoveryservicesbackup.models.XcoolState + """ super(BackupResourceConfig, self).__init__(**kwargs) self.storage_model_type = storage_model_type self.storage_type = storage_type self.storage_type_state = storage_type_state self.cross_region_restore_flag = cross_region_restore_flag + self.dedup_state = dedup_state + self.xcool_state = xcool_state class BackupResourceConfigResource(Resource): @@ -8059,14 +10354,14 @@ class BackupResourceConfigResource(Resource): :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: BackupResourceConfigResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfig + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: BackupResourceConfigResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfig """ _validation = { @@ -8094,6 +10389,16 @@ def __init__( properties: Optional["BackupResourceConfig"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: BackupResourceConfigResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfig + """ super(BackupResourceConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -8101,21 +10406,21 @@ def __init__( class BackupResourceEncryptionConfig(msrest.serialization.Model): """BackupResourceEncryptionConfig. - :param encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", + :ivar encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", "MicrosoftManaged", "CustomerManaged". - :type encryption_at_rest_type: str or + :vartype encryption_at_rest_type: str or ~azure.mgmt.recoveryservicesbackup.models.EncryptionAtRestType - :param key_uri: Key Vault Key URI. - :type key_uri: str - :param subscription_id: Key Vault Subscription Id. - :type subscription_id: str - :param last_update_status: Possible values include: "Invalid", "NotEnabled", + :ivar key_uri: Key Vault Key URI. + :vartype key_uri: str + :ivar subscription_id: Key Vault Subscription Id. + :vartype subscription_id: str + :ivar last_update_status: Possible values include: "Invalid", "NotEnabled", "PartiallySucceeded", "PartiallyFailed", "Failed", "Succeeded", "Initialized", "FirstInitialization". - :type last_update_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastUpdateStatus - :param infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + :vartype last_update_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastUpdateStatus + :ivar infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", "Enabled". - :type infrastructure_encryption_state: str or + :vartype infrastructure_encryption_state: str or ~azure.mgmt.recoveryservicesbackup.models.InfrastructureEncryptionState """ @@ -8137,6 +10442,25 @@ def __init__( infrastructure_encryption_state: Optional[Union[str, "InfrastructureEncryptionState"]] = None, **kwargs ): + """ + :keyword encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", + "MicrosoftManaged", "CustomerManaged". + :paramtype encryption_at_rest_type: str or + ~azure.mgmt.recoveryservicesbackup.models.EncryptionAtRestType + :keyword key_uri: Key Vault Key URI. + :paramtype key_uri: str + :keyword subscription_id: Key Vault Subscription Id. + :paramtype subscription_id: str + :keyword last_update_status: Possible values include: "Invalid", "NotEnabled", + "PartiallySucceeded", "PartiallyFailed", "Failed", "Succeeded", "Initialized", + "FirstInitialization". + :paramtype last_update_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastUpdateStatus + :keyword infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + "Enabled". + :paramtype infrastructure_encryption_state: str or + ~azure.mgmt.recoveryservicesbackup.models.InfrastructureEncryptionState + """ super(BackupResourceEncryptionConfig, self).__init__(**kwargs) self.encryption_at_rest_type = encryption_at_rest_type self.key_uri = key_uri @@ -8148,27 +10472,27 @@ def __init__( class BackupResourceEncryptionConfigExtended(BackupResourceEncryptionConfig): """BackupResourceEncryptionConfigExtended. - :param encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", + :ivar encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", "MicrosoftManaged", "CustomerManaged". - :type encryption_at_rest_type: str or + :vartype encryption_at_rest_type: str or ~azure.mgmt.recoveryservicesbackup.models.EncryptionAtRestType - :param key_uri: Key Vault Key URI. - :type key_uri: str - :param subscription_id: Key Vault Subscription Id. - :type subscription_id: str - :param last_update_status: Possible values include: "Invalid", "NotEnabled", + :ivar key_uri: Key Vault Key URI. + :vartype key_uri: str + :ivar subscription_id: Key Vault Subscription Id. + :vartype subscription_id: str + :ivar last_update_status: Possible values include: "Invalid", "NotEnabled", "PartiallySucceeded", "PartiallyFailed", "Failed", "Succeeded", "Initialized", "FirstInitialization". - :type last_update_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastUpdateStatus - :param infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + :vartype last_update_status: str or ~azure.mgmt.recoveryservicesbackup.models.LastUpdateStatus + :ivar infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", "Enabled". - :type infrastructure_encryption_state: str or + :vartype infrastructure_encryption_state: str or ~azure.mgmt.recoveryservicesbackup.models.InfrastructureEncryptionState - :param user_assigned_identity: User Assigned Identity Id. - :type user_assigned_identity: str - :param use_system_assigned_identity: bool to indicate whether to use system Assigned Identity - or not. - :type use_system_assigned_identity: bool + :ivar user_assigned_identity: User Assigned Identity Id. + :vartype user_assigned_identity: str + :ivar use_system_assigned_identity: bool to indicate whether to use system Assigned Identity or + not. + :vartype use_system_assigned_identity: bool """ _attribute_map = { @@ -8193,6 +10517,30 @@ def __init__( use_system_assigned_identity: Optional[bool] = None, **kwargs ): + """ + :keyword encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", + "MicrosoftManaged", "CustomerManaged". + :paramtype encryption_at_rest_type: str or + ~azure.mgmt.recoveryservicesbackup.models.EncryptionAtRestType + :keyword key_uri: Key Vault Key URI. + :paramtype key_uri: str + :keyword subscription_id: Key Vault Subscription Id. + :paramtype subscription_id: str + :keyword last_update_status: Possible values include: "Invalid", "NotEnabled", + "PartiallySucceeded", "PartiallyFailed", "Failed", "Succeeded", "Initialized", + "FirstInitialization". + :paramtype last_update_status: str or + ~azure.mgmt.recoveryservicesbackup.models.LastUpdateStatus + :keyword infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + "Enabled". + :paramtype infrastructure_encryption_state: str or + ~azure.mgmt.recoveryservicesbackup.models.InfrastructureEncryptionState + :keyword user_assigned_identity: User Assigned Identity Id. + :paramtype user_assigned_identity: str + :keyword use_system_assigned_identity: bool to indicate whether to use system Assigned Identity + or not. + :paramtype use_system_assigned_identity: bool + """ super(BackupResourceEncryptionConfigExtended, self).__init__(encryption_at_rest_type=encryption_at_rest_type, key_uri=key_uri, subscription_id=subscription_id, last_update_status=last_update_status, infrastructure_encryption_state=infrastructure_encryption_state, **kwargs) self.user_assigned_identity = user_assigned_identity self.use_system_assigned_identity = use_system_assigned_identity @@ -8210,14 +10558,14 @@ class BackupResourceEncryptionConfigExtendedResource(Resource): :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: BackupResourceEncryptionConfigExtendedResource properties. - :type properties: + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: BackupResourceEncryptionConfigExtendedResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtended """ @@ -8246,6 +10594,17 @@ def __init__( properties: Optional["BackupResourceEncryptionConfigExtended"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: BackupResourceEncryptionConfigExtendedResource properties. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtended + """ super(BackupResourceEncryptionConfigExtendedResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -8262,14 +10621,14 @@ class BackupResourceEncryptionConfigResource(Resource): :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: BackupResourceEncryptionConfigResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfig + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: BackupResourceEncryptionConfigResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfig """ _validation = { @@ -8297,6 +10656,16 @@ def __init__( properties: Optional["BackupResourceEncryptionConfig"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: BackupResourceEncryptionConfigResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfig + """ super(BackupResourceEncryptionConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -8304,26 +10673,28 @@ def __init__( class BackupResourceVaultConfig(msrest.serialization.Model): """Backup resource vault config details. - :param storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + :ivar storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". - :type storage_model_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType - :param storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + :vartype storage_model_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :ivar storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". - :type storage_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType - :param storage_type_state: Locked or Unlocked. Once a machine is registered against a resource, + :vartype storage_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :ivar storage_type_state: Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: "Invalid", "Locked", "Unlocked". - :type storage_type_state: str or ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState - :param enhanced_security_state: Enabled or Disabled. Possible values include: "Invalid", + :vartype storage_type_state: str or ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState + :ivar enhanced_security_state: Enabled or Disabled. Possible values include: "Invalid", "Enabled", "Disabled". - :type enhanced_security_state: str or + :vartype enhanced_security_state: str or ~azure.mgmt.recoveryservicesbackup.models.EnhancedSecurityState - :param soft_delete_feature_state: Soft Delete feature state. Possible values include: - "Invalid", "Enabled", "Disabled". - :type soft_delete_feature_state: str or + :ivar soft_delete_feature_state: Soft Delete feature state. Possible values include: "Invalid", + "Enabled", "Disabled". + :vartype soft_delete_feature_state: str or ~azure.mgmt.recoveryservicesbackup.models.SoftDeleteFeatureState - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + :ivar is_soft_delete_feature_state_editable: Is soft delete feature state editable. + :vartype is_soft_delete_feature_state_editable: bool """ _attribute_map = { @@ -8333,6 +10704,7 @@ class BackupResourceVaultConfig(msrest.serialization.Model): 'enhanced_security_state': {'key': 'enhancedSecurityState', 'type': 'str'}, 'soft_delete_feature_state': {'key': 'softDeleteFeatureState', 'type': 'str'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_soft_delete_feature_state_editable': {'key': 'isSoftDeleteFeatureStateEditable', 'type': 'bool'}, } def __init__( @@ -8344,8 +10716,34 @@ def __init__( enhanced_security_state: Optional[Union[str, "EnhancedSecurityState"]] = None, soft_delete_feature_state: Optional[Union[str, "SoftDeleteFeatureState"]] = None, resource_guard_operation_requests: Optional[List[str]] = None, - **kwargs - ): + is_soft_delete_feature_state_editable: Optional[bool] = None, + **kwargs + ): + """ + :keyword storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_model_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :keyword storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_type: str or ~azure.mgmt.recoveryservicesbackup.models.StorageType + :keyword storage_type_state: Locked or Unlocked. Once a machine is registered against a + resource, the storageTypeState is always Locked. Possible values include: "Invalid", "Locked", + "Unlocked". + :paramtype storage_type_state: str or + ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState + :keyword enhanced_security_state: Enabled or Disabled. Possible values include: "Invalid", + "Enabled", "Disabled". + :paramtype enhanced_security_state: str or + ~azure.mgmt.recoveryservicesbackup.models.EnhancedSecurityState + :keyword soft_delete_feature_state: Soft Delete feature state. Possible values include: + "Invalid", "Enabled", "Disabled". + :paramtype soft_delete_feature_state: str or + ~azure.mgmt.recoveryservicesbackup.models.SoftDeleteFeatureState + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_soft_delete_feature_state_editable: Is soft delete feature state editable. + :paramtype is_soft_delete_feature_state_editable: bool + """ super(BackupResourceVaultConfig, self).__init__(**kwargs) self.storage_model_type = storage_model_type self.storage_type = storage_type @@ -8353,6 +10751,7 @@ def __init__( self.enhanced_security_state = enhanced_security_state self.soft_delete_feature_state = soft_delete_feature_state self.resource_guard_operation_requests = resource_guard_operation_requests + self.is_soft_delete_feature_state_editable = is_soft_delete_feature_state_editable class BackupResourceVaultConfigResource(Resource): @@ -8367,14 +10766,14 @@ class BackupResourceVaultConfigResource(Resource): :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: BackupResourceVaultConfigResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfig + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: BackupResourceVaultConfigResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfig """ _validation = { @@ -8402,6 +10801,16 @@ def __init__( properties: Optional["BackupResourceVaultConfig"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: BackupResourceVaultConfigResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfig + """ super(BackupResourceVaultConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -8409,15 +10818,15 @@ def __init__( class BackupStatusRequest(msrest.serialization.Model): """BackupStatus request. - :param resource_type: Container Type - VM, SQLPaaS, DPM, AzureFileShare... Possible values + :ivar resource_type: Container Type - VM, SQLPaaS, DPM, AzureFileShare... Possible values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase". - :type resource_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType - :param resource_id: Entire ARM resource id of the resource. - :type resource_id: str - :param po_logical_name: Protectable Item Logical Name. - :type po_logical_name: str + :vartype resource_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar resource_id: Entire ARM resource id of the resource. + :vartype resource_id: str + :ivar po_logical_name: Protectable Item Logical Name. + :vartype po_logical_name: str """ _attribute_map = { @@ -8434,6 +10843,17 @@ def __init__( po_logical_name: Optional[str] = None, **kwargs ): + """ + :keyword resource_type: Container Type - VM, SQLPaaS, DPM, AzureFileShare... Possible values + include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", + "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype resource_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword resource_id: Entire ARM resource id of the resource. + :paramtype resource_id: str + :keyword po_logical_name: Protectable Item Logical Name. + :paramtype po_logical_name: str + """ super(BackupStatusRequest, self).__init__(**kwargs) self.resource_type = resource_type self.resource_id = resource_id @@ -8443,28 +10863,28 @@ def __init__( class BackupStatusResponse(msrest.serialization.Model): """BackupStatus response. - :param protection_status: Specifies whether the container is registered or not. Possible values + :ivar protection_status: Specifies whether the container is registered or not. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - :param vault_id: Specifies the arm resource id of the vault. - :type vault_id: str - :param fabric_name: Specifies the fabric name - Azure or AD. Possible values include: - "Invalid", "Azure". - :type fabric_name: str or ~azure.mgmt.recoveryservicesbackup.models.FabricName - :param container_name: Specifies the product specific container name. E.g. + :vartype protection_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :ivar vault_id: Specifies the arm resource id of the vault. + :vartype vault_id: str + :ivar fabric_name: Specifies the fabric name - Azure or AD. Possible values include: "Invalid", + "Azure". + :vartype fabric_name: str or ~azure.mgmt.recoveryservicesbackup.models.FabricName + :ivar container_name: Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname. - :type container_name: str - :param protected_item_name: Specifies the product specific ds name. E.g. + :vartype container_name: str + :ivar protected_item_name: Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. - :type protected_item_name: str - :param error_code: ErrorCode in case of intent failed. - :type error_code: str - :param error_message: ErrorMessage in case of intent failed. - :type error_message: str - :param policy_name: Specifies the policy name which is used for protection. - :type policy_name: str - :param registration_status: Container registration status. - :type registration_status: str + :vartype protected_item_name: str + :ivar error_code: ErrorCode in case of intent failed. + :vartype error_code: str + :ivar error_message: ErrorMessage in case of intent failed. + :vartype error_message: str + :ivar policy_name: Specifies the policy name which is used for protection. + :vartype policy_name: str + :ivar registration_status: Container registration status. + :vartype registration_status: str """ _attribute_map = { @@ -8493,6 +10913,30 @@ def __init__( registration_status: Optional[str] = None, **kwargs ): + """ + :keyword protection_status: Specifies whether the container is registered or not. Possible + values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :keyword vault_id: Specifies the arm resource id of the vault. + :paramtype vault_id: str + :keyword fabric_name: Specifies the fabric name - Azure or AD. Possible values include: + "Invalid", "Azure". + :paramtype fabric_name: str or ~azure.mgmt.recoveryservicesbackup.models.FabricName + :keyword container_name: Specifies the product specific container name. E.g. + iaasvmcontainer;iaasvmcontainer;csname;vmname. + :paramtype container_name: str + :keyword protected_item_name: Specifies the product specific ds name. E.g. + vm;iaasvmcontainer;csname;vmname. + :paramtype protected_item_name: str + :keyword error_code: ErrorCode in case of intent failed. + :paramtype error_code: str + :keyword error_message: ErrorMessage in case of intent failed. + :paramtype error_message: str + :keyword policy_name: Specifies the policy name which is used for protection. + :paramtype policy_name: str + :keyword registration_status: Container registration status. + :paramtype registration_status: str + """ super(BackupStatusResponse, self).__init__(**kwargs) self.protection_status = protection_status self.vault_id = vault_id @@ -8508,12 +10952,12 @@ def __init__( class BEKDetails(msrest.serialization.Model): """BEK is bitlocker encryption key. - :param secret_url: Secret is BEK. - :type secret_url: str - :param secret_vault_id: ID of the Key Vault where this Secret is stored. - :type secret_vault_id: str - :param secret_data: BEK data. - :type secret_data: str + :ivar secret_url: Secret is BEK. + :vartype secret_url: str + :ivar secret_vault_id: ID of the Key Vault where this Secret is stored. + :vartype secret_vault_id: str + :ivar secret_data: BEK data. + :vartype secret_data: str """ _attribute_map = { @@ -8530,41 +10974,25 @@ def __init__( secret_data: Optional[str] = None, **kwargs ): + """ + :keyword secret_url: Secret is BEK. + :paramtype secret_url: str + :keyword secret_vault_id: ID of the Key Vault where this Secret is stored. + :paramtype secret_vault_id: str + :keyword secret_data: BEK data. + :paramtype secret_data: str + """ super(BEKDetails, self).__init__(**kwargs) self.secret_url = secret_url self.secret_vault_id = secret_vault_id 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. - :param expand: attribute to add extended info. - :type expand: str + :ivar expand: attribute to add extended info. + :vartype expand: str """ _attribute_map = { @@ -8577,6 +11005,10 @@ def __init__( expand: Optional[str] = None, **kwargs ): + """ + :keyword expand: attribute to add extended info. + :paramtype expand: str + """ super(BMSBackupEngineQueryObject, self).__init__(**kwargs) self.expand = expand @@ -8584,15 +11016,15 @@ def __init__( class BMSBackupEnginesQueryObject(msrest.serialization.Model): """Query parameters to fetch list of backup engines. - :param backup_management_type: Backup management type for the backup engine. Possible values + :ivar backup_management_type: Backup management type for the backup engine. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param friendly_name: Friendly name of the backup engine. - :type friendly_name: str - :param expand: Attribute to add extended info. - :type expand: str + :ivar friendly_name: Friendly name of the backup engine. + :vartype friendly_name: str + :ivar expand: Attribute to add extended info. + :vartype expand: str """ _attribute_map = { @@ -8609,6 +11041,17 @@ def __init__( expand: Optional[str] = None, **kwargs ): + """ + :keyword backup_management_type: Backup management type for the backup engine. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword friendly_name: Friendly name of the backup engine. + :paramtype friendly_name: str + :keyword expand: Attribute to add extended info. + :paramtype expand: str + """ super(BMSBackupEnginesQueryObject, self).__init__(**kwargs) self.backup_management_type = backup_management_type self.friendly_name = friendly_name @@ -8618,9 +11061,9 @@ def __init__( class BMSBackupSummariesQueryObject(msrest.serialization.Model): """Query parameters to fetch backup summaries. - :param type: Backup management type for this container. Possible values include: "Invalid", + :ivar type: Backup management type for this container. Possible values include: "Invalid", "BackupProtectedItemCountSummary", "BackupProtectionContainerCountSummary". - :type type: str or ~azure.mgmt.recoveryservicesbackup.models.Type + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.Type """ _attribute_map = { @@ -8633,6 +11076,11 @@ def __init__( type: Optional[Union[str, "Type"]] = None, **kwargs ): + """ + :keyword type: Backup management type for this container. Possible values include: "Invalid", + "BackupProtectedItemCountSummary", "BackupProtectionContainerCountSummary". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.Type + """ super(BMSBackupSummariesQueryObject, self).__init__(**kwargs) self.type = type @@ -8642,24 +11090,24 @@ class BMSContainerQueryObject(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param backup_management_type: Required. Backup management type for this container. Possible + :ivar backup_management_type: Required. Backup management type for this container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param container_type: Type of container for filter. Possible values include: "Invalid", + :ivar container_type: Type of container for filter. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param backup_engine_name: Backup engine name. - :type backup_engine_name: str - :param fabric_name: Fabric name for filter. - :type fabric_name: str - :param status: Status of registration of this container with the Recovery Services Vault. - :type status: str - :param friendly_name: Friendly name of this container. - :type friendly_name: str + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar backup_engine_name: Backup engine name. + :vartype backup_engine_name: str + :ivar fabric_name: Fabric name for filter. + :vartype fabric_name: str + :ivar status: Status of registration of this container with the Recovery Services Vault. + :vartype status: str + :ivar friendly_name: Friendly name of this container. + :vartype friendly_name: str """ _validation = { @@ -8686,6 +11134,26 @@ def __init__( friendly_name: Optional[str] = None, **kwargs ): + """ + :keyword backup_management_type: Required. Backup management type for this container. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword container_type: Type of container for filter. Possible values include: "Invalid", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :paramtype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :keyword backup_engine_name: Backup engine name. + :paramtype backup_engine_name: str + :keyword fabric_name: Fabric name for filter. + :paramtype fabric_name: str + :keyword status: Status of registration of this container with the Recovery Services Vault. + :paramtype status: str + :keyword friendly_name: Friendly name of this container. + :paramtype friendly_name: str + """ super(BMSContainerQueryObject, self).__init__(**kwargs) self.backup_management_type = backup_management_type self.container_type = container_type @@ -8698,16 +11166,16 @@ def __init__( class BMSContainersInquiryQueryObject(msrest.serialization.Model): """The query filters that can be used with the inquire container API. - :param backup_management_type: Backup management type for this container. Possible values + :ivar backup_management_type: Backup management type for this container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param workload_type: Workload type for this container. Possible values include: "Invalid", + :ivar workload_type: Workload type for this container. 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.WorkloadType + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType """ _attribute_map = { @@ -8722,6 +11190,18 @@ def __init__( workload_type: Optional[Union[str, "WorkloadType"]] = None, **kwargs ): + """ + :keyword backup_management_type: Backup management type for this container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword workload_type: Workload type for this container. Possible values include: "Invalid", + "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", + "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", + "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + """ super(BMSContainersInquiryQueryObject, self).__init__(**kwargs) self.backup_management_type = backup_management_type self.workload_type = workload_type @@ -8730,21 +11210,21 @@ def __init__( class BMSPOQueryObject(msrest.serialization.Model): """Filters to list items that can be backed up. - :param backup_management_type: Backup management type. Possible values include: "Invalid", + :ivar backup_management_type: Backup management type. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param workload_type: Workload type. Possible values include: "Invalid", "VM", "FileFolder", + :ivar workload_type: Workload type. 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.WorkloadType - :param container_name: Full name of the container whose Protectable Objects should be returned. - :type container_name: str - :param status: Backup status query parameter. - :type status: str - :param friendly_name: Friendly name. - :type friendly_name: str + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar container_name: Full name of the container whose Protectable Objects should be returned. + :vartype container_name: str + :ivar status: Backup status query parameter. + :vartype status: str + :ivar friendly_name: Friendly name. + :vartype friendly_name: str """ _attribute_map = { @@ -8765,6 +11245,24 @@ def __init__( friendly_name: Optional[str] = None, **kwargs ): + """ + :keyword backup_management_type: Backup management type. Possible values include: "Invalid", + "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", + "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword workload_type: Workload type. Possible values include: "Invalid", "VM", "FileFolder", + "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", + "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword container_name: Full name of the container whose Protectable Objects should be + returned. + :paramtype container_name: str + :keyword status: Backup status query parameter. + :paramtype status: str + :keyword friendly_name: Friendly name. + :paramtype friendly_name: str + """ super(BMSPOQueryObject, self).__init__(**kwargs) self.backup_management_type = backup_management_type self.workload_type = workload_type @@ -8776,10 +11274,10 @@ def __init__( class BMSRefreshContainersQueryObject(msrest.serialization.Model): """The query filters that can be used with the refresh container API. - :param backup_management_type: Backup management type for this container. Possible values + :ivar backup_management_type: Backup management type for this container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType """ @@ -8793,6 +11291,13 @@ def __init__( backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, **kwargs ): + """ + :keyword backup_management_type: Backup management type for this container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + """ super(BMSRefreshContainersQueryObject, self).__init__(**kwargs) self.backup_management_type = backup_management_type @@ -8800,19 +11305,19 @@ def __init__( class BMSRPQueryObject(msrest.serialization.Model): """Filters to list backup copies. - :param start_date: Backup copies created after this time. - :type start_date: ~datetime.datetime - :param end_date: Backup copies created before this time. - :type end_date: ~datetime.datetime - :param restore_point_query_type: RestorePoint type. Possible values include: "Invalid", "Full", + :ivar start_date: Backup copies created after this time. + :vartype start_date: ~datetime.datetime + :ivar end_date: Backup copies created before this time. + :vartype end_date: ~datetime.datetime + :ivar restore_point_query_type: RestorePoint type. Possible values include: "Invalid", "Full", "Log", "Differential", "FullAndDifferential", "All", "Incremental". - :type restore_point_query_type: str or + :vartype restore_point_query_type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointQueryType - :param extended_info: In Get Recovery Point, it tells whether extended information about + :ivar extended_info: In Get Recovery Point, it tells whether extended information about recovery point is asked. - :type extended_info: bool - :param move_ready_rp_only: Whether the RP can be moved to another tier. - :type move_ready_rp_only: bool + :vartype extended_info: bool + :ivar move_ready_rp_only: Whether the RP can be moved to another tier. + :vartype move_ready_rp_only: bool """ _attribute_map = { @@ -8833,6 +11338,21 @@ def __init__( move_ready_rp_only: Optional[bool] = None, **kwargs ): + """ + :keyword start_date: Backup copies created after this time. + :paramtype start_date: ~datetime.datetime + :keyword end_date: Backup copies created before this time. + :paramtype end_date: ~datetime.datetime + :keyword restore_point_query_type: RestorePoint type. Possible values include: "Invalid", + "Full", "Log", "Differential", "FullAndDifferential", "All", "Incremental". + :paramtype restore_point_query_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RestorePointQueryType + :keyword extended_info: In Get Recovery Point, it tells whether extended information about + recovery point is asked. + :paramtype extended_info: bool + :keyword move_ready_rp_only: Whether the RP can be moved to another tier. + :paramtype move_ready_rp_only: bool + """ super(BMSRPQueryObject, self).__init__(**kwargs) self.start_date = start_date self.end_date = end_date @@ -8844,22 +11364,22 @@ def __init__( class BMSWorkloadItemQueryObject(msrest.serialization.Model): """Filters to list items that can be backed up. - :param backup_management_type: Backup management type. Possible values include: "Invalid", + :ivar backup_management_type: Backup management type. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param workload_item_type: Workload Item type. Possible values include: "Invalid", + :ivar workload_item_type: Workload Item type. Possible values include: "Invalid", "SQLInstance", "SQLDataBase", "SAPHanaSystem", "SAPHanaDatabase", "SAPAseSystem", "SAPAseDatabase". - :type workload_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType - :param workload_type: Workload type. Possible values include: "Invalid", "VM", "FileFolder", + :vartype workload_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType + :ivar workload_type: Workload type. 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.WorkloadType - :param protection_status: Backup status query parameter. Possible values include: "Invalid", + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar protection_status: Backup status query parameter. Possible values include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + :vartype protection_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus """ _attribute_map = { @@ -8878,6 +11398,25 @@ def __init__( protection_status: Optional[Union[str, "ProtectionStatus"]] = None, **kwargs ): + """ + :keyword backup_management_type: Backup management type. Possible values include: "Invalid", + "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", + "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword workload_item_type: Workload Item type. Possible values include: "Invalid", + "SQLInstance", "SQLDataBase", "SAPHanaSystem", "SAPHanaDatabase", "SAPAseSystem", + "SAPAseDatabase". + :paramtype workload_item_type: str or + ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType + :keyword workload_type: Workload type. Possible values include: "Invalid", "VM", "FileFolder", + "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", + "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword protection_status: Backup status query parameter. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :paramtype protection_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus + """ super(BMSWorkloadItemQueryObject, self).__init__(**kwargs) self.backup_management_type = backup_management_type self.workload_item_type = workload_item_type @@ -8888,14 +11427,14 @@ def __init__( class ClientDiscoveryDisplay(msrest.serialization.Model): """Localized display information of an operation. - :param provider: Name of the provider for display purposes. - :type provider: str - :param resource: ResourceType for which this Operation can be performed. - :type resource: str - :param operation: Operations Name itself. - :type operation: str - :param description: Description of the operation having details of what operation is about. - :type description: str + :ivar provider: Name of the provider for display purposes. + :vartype provider: str + :ivar resource: ResourceType for which this Operation can be performed. + :vartype resource: str + :ivar operation: Operations Name itself. + :vartype operation: str + :ivar description: Description of the operation having details of what operation is about. + :vartype description: str """ _attribute_map = { @@ -8914,6 +11453,16 @@ def __init__( description: Optional[str] = None, **kwargs ): + """ + :keyword provider: Name of the provider for display purposes. + :paramtype provider: str + :keyword resource: ResourceType for which this Operation can be performed. + :paramtype resource: str + :keyword operation: Operations Name itself. + :paramtype operation: str + :keyword description: Description of the operation having details of what operation is about. + :paramtype description: str + """ super(ClientDiscoveryDisplay, self).__init__(**kwargs) self.provider = provider self.resource = resource @@ -8924,12 +11473,12 @@ def __init__( class ClientDiscoveryForLogSpecification(msrest.serialization.Model): """Class to represent shoebox log specification in json client discovery. - :param name: Name for shoebox log specification. - :type name: str - :param display_name: Localized display name. - :type display_name: str - :param blob_duration: blob duration of shoebox log specification. - :type blob_duration: str + :ivar name: Name for shoebox log specification. + :vartype name: str + :ivar display_name: Localized display name. + :vartype display_name: str + :ivar blob_duration: blob duration of shoebox log specification. + :vartype blob_duration: str """ _attribute_map = { @@ -8946,6 +11495,14 @@ def __init__( blob_duration: Optional[str] = None, **kwargs ): + """ + :keyword name: Name for shoebox log specification. + :paramtype name: str + :keyword display_name: Localized display name. + :paramtype display_name: str + :keyword blob_duration: blob duration of shoebox log specification. + :paramtype blob_duration: str + """ super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) self.name = name self.display_name = display_name @@ -8955,8 +11512,8 @@ def __init__( class ClientDiscoveryForProperties(msrest.serialization.Model): """Class to represent shoebox properties in json client discovery. - :param service_specification: Operation properties. - :type service_specification: + :ivar service_specification: Operation properties. + :vartype service_specification: ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification """ @@ -8970,6 +11527,11 @@ def __init__( service_specification: Optional["ClientDiscoveryForServiceSpecification"] = None, **kwargs ): + """ + :keyword service_specification: Operation properties. + :paramtype service_specification: + ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification + """ super(ClientDiscoveryForProperties, self).__init__(**kwargs) self.service_specification = service_specification @@ -8977,8 +11539,8 @@ def __init__( class ClientDiscoveryForServiceSpecification(msrest.serialization.Model): """Class to represent shoebox service specification in json client discovery. - :param log_specifications: List of log specifications of this operation. - :type log_specifications: + :ivar log_specifications: List of log specifications of this operation. + :vartype log_specifications: list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification] """ @@ -8992,6 +11554,11 @@ def __init__( log_specifications: Optional[List["ClientDiscoveryForLogSpecification"]] = None, **kwargs ): + """ + :keyword log_specifications: List of log specifications of this operation. + :paramtype log_specifications: + list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification] + """ super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) self.log_specifications = log_specifications @@ -8999,10 +11566,11 @@ def __init__( class ClientDiscoveryResponse(msrest.serialization.Model): """Operations List response which contains list of available APIs. - :param value: List of available operations. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApi] - :param next_link: Link to the next chunk of Response. - :type next_link: str + :ivar value: List of available operations. + :vartype value: + list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApi] + :ivar next_link: Link to the next chunk of Response. + :vartype next_link: str """ _attribute_map = { @@ -9017,6 +11585,13 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: List of available operations. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApi] + :keyword next_link: Link to the next chunk of Response. + :paramtype next_link: str + """ super(ClientDiscoveryResponse, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -9025,15 +11600,15 @@ def __init__( class ClientDiscoveryValueForSingleApi(msrest.serialization.Model): """Available operation details. - :param name: Name of the Operation. - :type name: str - :param display: Contains the localized display information for this particular operation. - :type display: ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryDisplay - :param origin: The intended executor of the operation;governs the display of the operation in + :ivar name: Name of the Operation. + :vartype name: str + :ivar display: Contains the localized display information for this particular operation. + :vartype display: ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryDisplay + :ivar origin: The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX. - :type origin: str - :param properties: ShoeBox properties for the given operation. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForProperties + :vartype origin: str + :ivar properties: ShoeBox properties for the given operation. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForProperties """ _attribute_map = { @@ -9052,6 +11627,17 @@ def __init__( properties: Optional["ClientDiscoveryForProperties"] = None, **kwargs ): + """ + :keyword name: Name of the Operation. + :paramtype name: str + :keyword display: Contains the localized display information for this particular operation. + :paramtype display: ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryDisplay + :keyword origin: The intended executor of the operation;governs the display of the operation in + the RBAC UX and the audit logs UX. + :paramtype origin: str + :keyword properties: ShoeBox properties for the given operation. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForProperties + """ super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) self.name = name self.display = display @@ -9062,21 +11648,21 @@ def __init__( class ClientScriptForConnect(msrest.serialization.Model): """Client script details for file / folder restore. - :param script_content: File content of the client script for file / folder restore. - :type script_content: str - :param script_extension: File extension of the client script for file / folder restore - .ps1 , + :ivar script_content: File content of the client script for file / folder restore. + :vartype script_content: str + :ivar script_extension: File extension of the client script for file / folder restore - .ps1 , .sh , etc. - :type script_extension: str - :param os_type: OS type - Windows, Linux etc. for which this file / folder restore client - script works. - :type os_type: str - :param url: URL of Executable from where to source the content. If this is not null then + :vartype script_extension: str + :ivar os_type: OS type - Windows, Linux etc. for which this file / folder restore client script + works. + :vartype os_type: str + :ivar url: URL of Executable from where to source the content. If this is not null then ScriptContent should not be used. - :type url: str - :param script_name_suffix: Mandatory suffix that should be added to the name of script that is + :vartype url: str + :ivar script_name_suffix: Mandatory suffix that should be added to the name of script that is given for download to user. If its null or empty then , ignore it. - :type script_name_suffix: str + :vartype script_name_suffix: str """ _attribute_map = { @@ -9097,6 +11683,23 @@ def __init__( script_name_suffix: Optional[str] = None, **kwargs ): + """ + :keyword script_content: File content of the client script for file / folder restore. + :paramtype script_content: str + :keyword script_extension: File extension of the client script for file / folder restore - .ps1 + , .sh , etc. + :paramtype script_extension: str + :keyword os_type: OS type - Windows, Linux etc. for which this file / folder restore client + script works. + :paramtype os_type: str + :keyword url: URL of Executable from where to source the content. If this is not null then + ScriptContent should not be used. + :paramtype url: str + :keyword script_name_suffix: Mandatory suffix that should be added to the name of script that + is given for download to user. + If its null or empty then , ignore it. + :paramtype script_name_suffix: str + """ super(ClientScriptForConnect, self).__init__(**kwargs) self.script_content = script_content self.script_extension = script_extension @@ -9145,6 +11748,8 @@ def __init__( self, **kwargs ): + """ + """ super(CloudErrorBody, self).__init__(**kwargs) self.code = None self.message = None @@ -9154,414 +11759,56 @@ 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, - *, - 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } + """Container identity information. + + :ivar unique_name: Unique name of the container. + :vartype unique_name: str + :ivar aad_tenant_id: Protection container identity - AAD Tenant. + :vartype aad_tenant_id: str + :ivar service_principal_client_id: Protection container identity - AAD Service Principal. + :vartype service_principal_client_id: str + :ivar audience: Protection container identity - Audience. + :vartype audience: str + """ _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 + """ + :keyword unique_name: Unique name of the container. + :paramtype unique_name: str + :keyword aad_tenant_id: Protection container identity - AAD Tenant. + :paramtype aad_tenant_id: str + :keyword service_principal_client_id: Protection container identity - AAD Service Principal. + :paramtype service_principal_client_id: str + :keyword audience: Protection container identity - Audience. + :paramtype audience: str + """ + 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): """Daily retention format. - :param days_of_the_month: List of days of the month. - :type days_of_the_month: list[~azure.mgmt.recoveryservicesbackup.models.Day] + :ivar days_of_the_month: List of days of the month. + :vartype days_of_the_month: list[~azure.mgmt.recoveryservicesbackup.models.Day] """ _attribute_map = { @@ -9574,6 +11821,10 @@ def __init__( days_of_the_month: Optional[List["Day"]] = None, **kwargs ): + """ + :keyword days_of_the_month: List of days of the month. + :paramtype days_of_the_month: list[~azure.mgmt.recoveryservicesbackup.models.Day] + """ super(DailyRetentionFormat, self).__init__(**kwargs) self.days_of_the_month = days_of_the_month @@ -9581,10 +11832,10 @@ def __init__( class DailyRetentionSchedule(msrest.serialization.Model): """Daily retention schedule. - :param retention_times: Retention times of retention policy. - :type retention_times: list[~datetime.datetime] - :param retention_duration: Retention duration of retention Policy. - :type retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + :ivar retention_times: Retention times of retention policy. + :vartype retention_times: list[~datetime.datetime] + :ivar retention_duration: Retention duration of retention Policy. + :vartype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -9599,6 +11850,12 @@ def __init__( retention_duration: Optional["RetentionDuration"] = None, **kwargs ): + """ + :keyword retention_times: Retention times of retention policy. + :paramtype retention_times: list[~datetime.datetime] + :keyword retention_duration: Retention duration of retention Policy. + :paramtype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ super(DailyRetentionSchedule, self).__init__(**kwargs) self.retention_times = retention_times self.retention_duration = retention_duration @@ -9607,10 +11864,10 @@ def __init__( class Day(msrest.serialization.Model): """Day of the week. - :param date: Date of the month. - :type date: int - :param is_last: Whether Date is last date of month. - :type is_last: bool + :ivar date: Date of the month. + :vartype date: int + :ivar is_last: Whether Date is last date of month. + :vartype is_last: bool """ _attribute_map = { @@ -9625,6 +11882,12 @@ def __init__( is_last: Optional[bool] = None, **kwargs ): + """ + :keyword date: Date of the month. + :paramtype date: int + :keyword is_last: Whether Date is last date of month. + :paramtype is_last: bool + """ super(Day, self).__init__(**kwargs) self.date = date self.is_last = is_last @@ -9633,11 +11896,11 @@ def __init__( class DiskExclusionProperties(msrest.serialization.Model): """DiskExclusionProperties. - :param disk_lun_list: List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. - :type disk_lun_list: list[int] - :param is_inclusion_list: Flag to indicate whether DiskLunList is to be included/ excluded from + :ivar disk_lun_list: List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + :vartype disk_lun_list: list[int] + :ivar is_inclusion_list: Flag to indicate whether DiskLunList is to be included/ excluded from backup. - :type is_inclusion_list: bool + :vartype is_inclusion_list: bool """ _attribute_map = { @@ -9652,6 +11915,13 @@ def __init__( is_inclusion_list: Optional[bool] = None, **kwargs ): + """ + :keyword disk_lun_list: List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + :paramtype disk_lun_list: list[int] + :keyword is_inclusion_list: Flag to indicate whether DiskLunList is to be included/ excluded + from backup. + :paramtype is_inclusion_list: bool + """ super(DiskExclusionProperties, self).__init__(**kwargs) self.disk_lun_list = disk_lun_list self.is_inclusion_list = is_inclusion_list @@ -9660,10 +11930,10 @@ def __init__( class DiskInformation(msrest.serialization.Model): """Disk information. - :param lun: - :type lun: int - :param name: - :type name: str + :ivar lun: + :vartype lun: int + :ivar name: + :vartype name: str """ _attribute_map = { @@ -9678,6 +11948,12 @@ def __init__( name: Optional[str] = None, **kwargs ): + """ + :keyword lun: + :paramtype lun: int + :keyword name: + :paramtype name: str + """ super(DiskInformation, self).__init__(**kwargs) self.lun = lun self.name = name @@ -9686,13 +11962,13 @@ def __init__( class DistributedNodesInfo(msrest.serialization.Model): """This is used to represent the various nodes of the distributed container. - :param node_name: Name of the node under a distributed container. - :type node_name: str - :param status: Status of this Node. + :ivar node_name: Name of the node under a distributed container. + :vartype node_name: str + :ivar status: Status of this Node. Failed | Succeeded. - :type status: str - :param error_detail: Error Details if the Status is non-success. - :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :vartype status: str + :ivar error_detail: Error Details if the Status is non-success. + :vartype error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail """ _attribute_map = { @@ -9709,6 +11985,15 @@ def __init__( error_detail: Optional["ErrorDetail"] = None, **kwargs ): + """ + :keyword node_name: Name of the node under a distributed container. + :paramtype node_name: str + :keyword status: Status of this Node. + Failed | Succeeded. + :paramtype status: str + :keyword error_detail: Error Details if the Status is non-success. + :paramtype error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + """ super(DistributedNodesInfo, self).__init__(**kwargs) self.node_name = node_name self.status = status @@ -9720,39 +12005,39 @@ class DpmBackupEngine(BackupEngineBase): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the backup engine. - :type friendly_name: str - :param backup_management_type: Type of backup management for the backup engine. Possible values + :ivar friendly_name: Friendly name of the backup engine. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the backup engine. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Registration status of the backup engine with the Recovery Services + :ivar registration_status: Registration status of the backup engine with the Recovery Services Vault. - :type registration_status: str - :param backup_engine_state: Status of the backup engine with the Recovery Services Vault. = + :vartype registration_status: str + :ivar backup_engine_state: Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed}. - :type backup_engine_state: str - :param health_status: Backup status of the backup engine. - :type health_status: str - :param backup_engine_type: Required. Type of the backup engine.Constant filled by server. + :vartype backup_engine_state: str + :ivar health_status: Backup status of the backup engine. + :vartype health_status: str + :ivar backup_engine_type: Required. Type of the backup engine.Constant filled by server. Possible values include: "Invalid", "DpmBackupEngine", "AzureBackupServerEngine". - :type backup_engine_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupEngineType - :param can_re_register: Flag indicating if the backup engine be registered, once already + :vartype backup_engine_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupEngineType + :ivar can_re_register: Flag indicating if the backup engine be registered, once already registered. - :type can_re_register: bool - :param backup_engine_id: ID of the backup engine. - :type backup_engine_id: str - :param dpm_version: Backup engine version. - :type dpm_version: str - :param azure_backup_agent_version: Backup agent version. - :type azure_backup_agent_version: str - :param is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. - :type is_azure_backup_agent_upgrade_available: bool - :param is_dpm_upgrade_available: To check if backup engine upgrade available. - :type is_dpm_upgrade_available: bool - :param extended_info: Extended info of the backupengine. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + :vartype can_re_register: bool + :ivar backup_engine_id: ID of the backup engine. + :vartype backup_engine_id: str + :ivar dpm_version: Backup engine version. + :vartype dpm_version: str + :ivar azure_backup_agent_version: Backup agent version. + :vartype azure_backup_agent_version: str + :ivar is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. + :vartype is_azure_backup_agent_upgrade_available: bool + :ivar is_dpm_upgrade_available: To check if backup engine upgrade available. + :vartype is_dpm_upgrade_available: bool + :ivar extended_info: Extended info of the backupengine. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo """ _validation = { @@ -9792,6 +12077,38 @@ def __init__( extended_info: Optional["BackupEngineExtendedInfo"] = None, **kwargs ): + """ + :keyword friendly_name: Friendly name of the backup engine. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the backup engine. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Registration status of the backup engine with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword backup_engine_state: Status of the backup engine with the Recovery Services Vault. = + {Active/Deleting/DeleteFailed}. + :paramtype backup_engine_state: str + :keyword health_status: Backup status of the backup engine. + :paramtype health_status: str + :keyword can_re_register: Flag indicating if the backup engine be registered, once already + registered. + :paramtype can_re_register: bool + :keyword backup_engine_id: ID of the backup engine. + :paramtype backup_engine_id: str + :keyword dpm_version: Backup engine version. + :paramtype dpm_version: str + :keyword azure_backup_agent_version: Backup agent version. + :paramtype azure_backup_agent_version: str + :keyword is_azure_backup_agent_upgrade_available: To check if backup agent upgrade available. + :paramtype is_azure_backup_agent_upgrade_available: bool + :keyword is_dpm_upgrade_available: To check if backup engine upgrade available. + :paramtype is_dpm_upgrade_available: bool + :keyword extended_info: Extended info of the backupengine. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo + """ super(DpmBackupEngine, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, backup_engine_state=backup_engine_state, health_status=health_status, can_re_register=can_re_register, backup_engine_id=backup_engine_id, dpm_version=dpm_version, azure_backup_agent_version=azure_backup_agent_version, is_azure_backup_agent_upgrade_available=is_azure_backup_agent_upgrade_available, is_dpm_upgrade_available=is_dpm_upgrade_available, extended_info=extended_info, **kwargs) self.backup_engine_type = 'DpmBackupEngine' # type: str @@ -9799,8 +12116,8 @@ def __init__( class DPMContainerExtendedInfo(msrest.serialization.Model): """Additional information of the DPMContainer. - :param last_refreshed_at: Last refresh time of the DPMContainer. - :type last_refreshed_at: ~datetime.datetime + :ivar last_refreshed_at: Last refresh time of the DPMContainer. + :vartype last_refreshed_at: ~datetime.datetime """ _attribute_map = { @@ -9813,6 +12130,10 @@ def __init__( last_refreshed_at: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword last_refreshed_at: Last refresh time of the DPMContainer. + :paramtype last_refreshed_at: ~datetime.datetime + """ super(DPMContainerExtendedInfo, self).__init__(**kwargs) self.last_refreshed_at = last_refreshed_at @@ -9820,10 +12141,10 @@ def __init__( class DpmErrorInfo(msrest.serialization.Model): """DPM workload-specific error information. - :param error_string: Localized error string. - :type error_string: str - :param recommendations: List of localized recommendations for above error code. - :type recommendations: list[str] + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] """ _attribute_map = { @@ -9838,6 +12159,12 @@ def __init__( recommendations: Optional[List[str]] = None, **kwargs ): + """ + :keyword error_string: Localized error string. + :paramtype error_string: str + :keyword recommendations: List of localized recommendations for above error code. + :paramtype recommendations: list[str] + """ super(DpmErrorInfo, self).__init__(**kwargs) self.error_string = error_string self.recommendations = recommendations @@ -9848,42 +12175,43 @@ class DpmJob(Job): All required parameters must be populated in order to send to Azure. - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param activity_id: ActivityId of job. - :type activity_id: str - :param job_type: Required. This property will be used as the discriminator for deciding the + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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 job_type: str - :param duration: Time elapsed for job. - :type duration: ~datetime.timedelta - :param dpm_server_name: DPM server name managing the backup item or backup job. - :type dpm_server_name: str - :param container_name: Name of cluster/server protecting current backup item, if any. - :type container_name: str - :param container_type: Type of container. - :type container_type: str - :param workload_type: Type of backup item. - :type workload_type: str - :param actions_info: The state/actions applicable on this job like cancel/retry. - :type actions_info: list[str or ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] - :param error_details: The errors. - :type error_details: list[~azure.mgmt.recoveryservicesbackup.models.DpmErrorInfo] - :param extended_info: Additional information for this job. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.DpmJobExtendedInfo + :vartype job_type: str + :ivar duration: Time elapsed for job. + :vartype duration: ~datetime.timedelta + :ivar dpm_server_name: DPM server name managing the backup item or backup job. + :vartype dpm_server_name: str + :ivar container_name: Name of cluster/server protecting current backup item, if any. + :vartype container_name: str + :ivar container_type: Type of container. + :vartype container_type: str + :ivar workload_type: Type of backup item. + :vartype workload_type: str + :ivar actions_info: The state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :ivar error_details: The errors. + :vartype error_details: list[~azure.mgmt.recoveryservicesbackup.models.DpmErrorInfo] + :ivar extended_info: Additional information for this job. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.DpmJobExtendedInfo """ _validation = { @@ -9929,6 +12257,43 @@ def __init__( extended_info: Optional["DpmJobExtendedInfo"] = None, **kwargs ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time elapsed for job. + :paramtype duration: ~datetime.timedelta + :keyword dpm_server_name: DPM server name managing the backup item or backup job. + :paramtype dpm_server_name: str + :keyword container_name: Name of cluster/server protecting current backup item, if any. + :paramtype container_name: str + :keyword container_type: Type of container. + :paramtype container_type: str + :keyword workload_type: Type of backup item. + :paramtype workload_type: str + :keyword actions_info: The state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :keyword error_details: The errors. + :paramtype error_details: list[~azure.mgmt.recoveryservicesbackup.models.DpmErrorInfo] + :keyword extended_info: Additional information for this job. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.DpmJobExtendedInfo + """ super(DpmJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) self.job_type = 'DpmJob' # type: str self.duration = duration @@ -9944,12 +12309,12 @@ def __init__( class DpmJobExtendedInfo(msrest.serialization.Model): """Additional information on the DPM workload-specific job. - :param tasks_list: List of tasks associated with this job. - :type tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.DpmJobTaskDetails] - :param property_bag: The job properties. - :type property_bag: dict[str, str] - :param dynamic_error_message: Non localized error message on job execution. - :type dynamic_error_message: str + :ivar tasks_list: List of tasks associated with this job. + :vartype tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.DpmJobTaskDetails] + :ivar property_bag: The job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message on job execution. + :vartype dynamic_error_message: str """ _attribute_map = { @@ -9966,6 +12331,14 @@ def __init__( dynamic_error_message: Optional[str] = None, **kwargs ): + """ + :keyword tasks_list: List of tasks associated with this job. + :paramtype tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.DpmJobTaskDetails] + :keyword property_bag: The job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message on job execution. + :paramtype dynamic_error_message: str + """ super(DpmJobExtendedInfo, self).__init__(**kwargs) self.tasks_list = tasks_list self.property_bag = property_bag @@ -9975,16 +12348,16 @@ def __init__( class DpmJobTaskDetails(msrest.serialization.Model): """DPM workload-specific job task details. - :param task_id: The task display name. - :type task_id: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param duration: Time elapsed for task. - :type duration: ~datetime.timedelta - :param status: The status. - :type status: str + :ivar task_id: The task display name. + :vartype task_id: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar duration: Time elapsed for task. + :vartype duration: ~datetime.timedelta + :ivar status: The status. + :vartype status: str """ _attribute_map = { @@ -10005,6 +12378,18 @@ def __init__( status: Optional[str] = None, **kwargs ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword duration: Time elapsed for task. + :paramtype duration: ~datetime.timedelta + :keyword status: The status. + :paramtype status: str + """ super(DpmJobTaskDetails, self).__init__(**kwargs) self.task_id = task_id self.start_time = start_time @@ -10018,58 +12403,62 @@ class DPMProtectedItem(ProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 managed item. - :type friendly_name: str - :param backup_engine_name: Backup Management server protecting this backup item. - :type backup_engine_name: str - :param protection_state: Protection state of the backup engine. Possible values include: + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the managed item. + :vartype friendly_name: str + :ivar backup_engine_name: Backup Management server protecting this backup item. + :vartype backup_engine_name: str + :ivar protection_state: Protection state of the backup engine. Possible values include: "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState - :param extended_info: Extended info of the backup item. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMProtectedItemExtendedInfo + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState + :ivar extended_info: Extended info of the backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.DPMProtectedItemExtendedInfo """ _validation = { @@ -10092,6 +12481,8 @@ class DPMProtectedItem(ProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, @@ -10115,13 +12506,74 @@ def __init__( is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, resource_guard_operation_requests: Optional[List[str]] = None, + is_archive_enabled: Optional[bool] = None, + policy_name: Optional[str] = None, friendly_name: Optional[str] = None, backup_engine_name: Optional[str] = None, protection_state: Optional[Union[str, "ProtectedItemState"]] = None, extended_info: Optional["DPMProtectedItemExtendedInfo"] = None, **kwargs ): - super(DPMProtectedItem, 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) + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the managed item. + :paramtype friendly_name: str + :keyword backup_engine_name: Backup Management server protecting this backup item. + :paramtype backup_engine_name: str + :keyword protection_state: Protection state of the backup engine. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemState + :keyword extended_info: Extended info of the backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.DPMProtectedItemExtendedInfo + """ + super(DPMProtectedItem, 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, is_archive_enabled=is_archive_enabled, policy_name=policy_name, **kwargs) self.protected_item_type = 'DPMProtectedItem' # type: str self.friendly_name = friendly_name self.backup_engine_name = backup_engine_name @@ -10132,34 +12584,34 @@ def __init__( class DPMProtectedItemExtendedInfo(msrest.serialization.Model): """Additional information of DPM Protected item. - :param protectable_object_load_path: Attribute to provide information on various DBs. - :type protectable_object_load_path: dict[str, str] - :param protected: To check if backup item is disk protected. - :type protected: bool - :param is_present_on_cloud: To check if backup item is cloud protected. - :type is_present_on_cloud: bool - :param last_backup_status: Last backup status information on backup item. - :type last_backup_status: str - :param last_refreshed_at: Last refresh time on backup item. - :type last_refreshed_at: ~datetime.datetime - :param oldest_recovery_point: Oldest cloud recovery point time. - :type oldest_recovery_point: ~datetime.datetime - :param recovery_point_count: cloud recovery point count. - :type recovery_point_count: int - :param on_premise_oldest_recovery_point: Oldest disk recovery point time. - :type on_premise_oldest_recovery_point: ~datetime.datetime - :param on_premise_latest_recovery_point: latest disk recovery point time. - :type on_premise_latest_recovery_point: ~datetime.datetime - :param on_premise_recovery_point_count: disk recovery point count. - :type on_premise_recovery_point_count: int - :param is_collocated: To check if backup item is collocated. - :type is_collocated: bool - :param protection_group_name: Protection group name of the backup item. - :type protection_group_name: str - :param disk_storage_used_in_bytes: Used Disk storage in bytes. - :type disk_storage_used_in_bytes: str - :param total_disk_storage_size_in_bytes: total Disk storage in bytes. - :type total_disk_storage_size_in_bytes: str + :ivar protectable_object_load_path: Attribute to provide information on various DBs. + :vartype protectable_object_load_path: dict[str, str] + :ivar protected: To check if backup item is disk protected. + :vartype protected: bool + :ivar is_present_on_cloud: To check if backup item is cloud protected. + :vartype is_present_on_cloud: bool + :ivar last_backup_status: Last backup status information on backup item. + :vartype last_backup_status: str + :ivar last_refreshed_at: Last refresh time on backup item. + :vartype last_refreshed_at: ~datetime.datetime + :ivar oldest_recovery_point: Oldest cloud recovery point time. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: cloud recovery point count. + :vartype recovery_point_count: int + :ivar on_premise_oldest_recovery_point: Oldest disk recovery point time. + :vartype on_premise_oldest_recovery_point: ~datetime.datetime + :ivar on_premise_latest_recovery_point: latest disk recovery point time. + :vartype on_premise_latest_recovery_point: ~datetime.datetime + :ivar on_premise_recovery_point_count: disk recovery point count. + :vartype on_premise_recovery_point_count: int + :ivar is_collocated: To check if backup item is collocated. + :vartype is_collocated: bool + :ivar protection_group_name: Protection group name of the backup item. + :vartype protection_group_name: str + :ivar disk_storage_used_in_bytes: Used Disk storage in bytes. + :vartype disk_storage_used_in_bytes: str + :ivar total_disk_storage_size_in_bytes: total Disk storage in bytes. + :vartype total_disk_storage_size_in_bytes: str """ _attribute_map = { @@ -10198,6 +12650,36 @@ def __init__( total_disk_storage_size_in_bytes: Optional[str] = None, **kwargs ): + """ + :keyword protectable_object_load_path: Attribute to provide information on various DBs. + :paramtype protectable_object_load_path: dict[str, str] + :keyword protected: To check if backup item is disk protected. + :paramtype protected: bool + :keyword is_present_on_cloud: To check if backup item is cloud protected. + :paramtype is_present_on_cloud: bool + :keyword last_backup_status: Last backup status information on backup item. + :paramtype last_backup_status: str + :keyword last_refreshed_at: Last refresh time on backup item. + :paramtype last_refreshed_at: ~datetime.datetime + :keyword oldest_recovery_point: Oldest cloud recovery point time. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: cloud recovery point count. + :paramtype recovery_point_count: int + :keyword on_premise_oldest_recovery_point: Oldest disk recovery point time. + :paramtype on_premise_oldest_recovery_point: ~datetime.datetime + :keyword on_premise_latest_recovery_point: latest disk recovery point time. + :paramtype on_premise_latest_recovery_point: ~datetime.datetime + :keyword on_premise_recovery_point_count: disk recovery point count. + :paramtype on_premise_recovery_point_count: int + :keyword is_collocated: To check if backup item is collocated. + :paramtype is_collocated: bool + :keyword protection_group_name: Protection group name of the backup item. + :paramtype protection_group_name: str + :keyword disk_storage_used_in_bytes: Used Disk storage in bytes. + :paramtype disk_storage_used_in_bytes: str + :keyword total_disk_storage_size_in_bytes: total Disk storage in bytes. + :paramtype total_disk_storage_size_in_bytes: str + """ super(DPMProtectedItemExtendedInfo, self).__init__(**kwargs) self.protectable_object_load_path = protectable_object_load_path self.protected = protected @@ -10218,17 +12700,17 @@ def __init__( class EncryptionDetails(msrest.serialization.Model): """Details needed if the VM was encrypted at the time of backup. - :param encryption_enabled: Identifies whether this backup copy represents an encrypted VM at - the time of backup. - :type encryption_enabled: bool - :param kek_url: Key Url. - :type kek_url: str - :param secret_key_url: Secret Url. - :type secret_key_url: str - :param kek_vault_id: ID of Key Vault where KEK is stored. - :type kek_vault_id: str - :param secret_key_vault_id: ID of Key Vault where Secret is stored. - :type secret_key_vault_id: str + :ivar encryption_enabled: Identifies whether this backup copy represents an encrypted VM at the + time of backup. + :vartype encryption_enabled: bool + :ivar kek_url: Key Url. + :vartype kek_url: str + :ivar secret_key_url: Secret Url. + :vartype secret_key_url: str + :ivar kek_vault_id: ID of Key Vault where KEK is stored. + :vartype kek_vault_id: str + :ivar secret_key_vault_id: ID of Key Vault where Secret is stored. + :vartype secret_key_vault_id: str """ _attribute_map = { @@ -10249,6 +12731,19 @@ def __init__( secret_key_vault_id: Optional[str] = None, **kwargs ): + """ + :keyword encryption_enabled: Identifies whether this backup copy represents an encrypted VM at + the time of backup. + :paramtype encryption_enabled: bool + :keyword kek_url: Key Url. + :paramtype kek_url: str + :keyword secret_key_url: Secret Url. + :paramtype secret_key_url: str + :keyword kek_vault_id: ID of Key Vault where KEK is stored. + :paramtype kek_vault_id: str + :keyword secret_key_vault_id: ID of Key Vault where Secret is stored. + :paramtype secret_key_vault_id: str + """ super(EncryptionDetails, self).__init__(**kwargs) self.encryption_enabled = encryption_enabled self.kek_url = kek_url @@ -10282,6 +12777,8 @@ def __init__( self, **kwargs ): + """ + """ super(ErrorAdditionalInfo, self).__init__(**kwargs) self.type = None self.info = None @@ -10316,6 +12813,8 @@ def __init__( self, **kwargs ): + """ + """ super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None @@ -10330,9 +12829,9 @@ class OperationResultInfoBase(msrest.serialization.Model): 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 + :ivar 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 + :vartype object_type: str """ _validation = { @@ -10351,6 +12850,8 @@ def __init__( self, **kwargs ): + """ + """ super(OperationResultInfoBase, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -10360,17 +12861,17 @@ class ExportJobsOperationResultInfo(OperationResultInfoBase): 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 + :ivar 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 blob_url: URL of the blob into which the serialized string of list of jobs is exported. - :type blob_url: str - :param blob_sas_key: SAS key to access the blob. It expires in 15 mins. - :type blob_sas_key: str - :param excel_file_blob_url: URL of the blob into which the ExcelFile is uploaded. - :type excel_file_blob_url: str - :param excel_file_blob_sas_key: SAS key to access the blob. It expires in 15 mins. - :type excel_file_blob_sas_key: str + :vartype object_type: str + :ivar blob_url: URL of the blob into which the serialized string of list of jobs is exported. + :vartype blob_url: str + :ivar blob_sas_key: SAS key to access the blob. It expires in 15 mins. + :vartype blob_sas_key: str + :ivar excel_file_blob_url: URL of the blob into which the ExcelFile is uploaded. + :vartype excel_file_blob_url: str + :ivar excel_file_blob_sas_key: SAS key to access the blob. It expires in 15 mins. + :vartype excel_file_blob_sas_key: str """ _validation = { @@ -10394,6 +12895,17 @@ def __init__( excel_file_blob_sas_key: Optional[str] = None, **kwargs ): + """ + :keyword blob_url: URL of the blob into which the serialized string of list of jobs is + exported. + :paramtype blob_url: str + :keyword blob_sas_key: SAS key to access the blob. It expires in 15 mins. + :paramtype blob_sas_key: str + :keyword excel_file_blob_url: URL of the blob into which the ExcelFile is uploaded. + :paramtype excel_file_blob_url: str + :keyword excel_file_blob_sas_key: SAS key to access the blob. It expires in 15 mins. + :paramtype excel_file_blob_sas_key: str + """ super(ExportJobsOperationResultInfo, self).__init__(**kwargs) self.object_type = 'ExportJobsOperationResultInfo' # type: str self.blob_url = blob_url @@ -10405,23 +12917,35 @@ def __init__( class ExtendedProperties(msrest.serialization.Model): """Extended Properties for Azure IaasVM Backup. - :param disk_exclusion_properties: Extended Properties for Disk Exclusion. - :type disk_exclusion_properties: + :ivar disk_exclusion_properties: Extended Properties for Disk Exclusion. + :vartype disk_exclusion_properties: ~azure.mgmt.recoveryservicesbackup.models.DiskExclusionProperties + :ivar linux_vm_application_name: Linux VM name. + :vartype linux_vm_application_name: str """ _attribute_map = { 'disk_exclusion_properties': {'key': 'diskExclusionProperties', 'type': 'DiskExclusionProperties'}, + 'linux_vm_application_name': {'key': 'linuxVmApplicationName', 'type': 'str'}, } def __init__( self, *, disk_exclusion_properties: Optional["DiskExclusionProperties"] = None, + linux_vm_application_name: Optional[str] = None, **kwargs ): + """ + :keyword disk_exclusion_properties: Extended Properties for Disk Exclusion. + :paramtype disk_exclusion_properties: + ~azure.mgmt.recoveryservicesbackup.models.DiskExclusionProperties + :keyword linux_vm_application_name: Linux VM name. + :paramtype linux_vm_application_name: str + """ super(ExtendedProperties, self).__init__(**kwargs) self.disk_exclusion_properties = disk_exclusion_properties + self.linux_vm_application_name = linux_vm_application_name class GenericContainer(ProtectionContainer): @@ -10429,33 +12953,35 @@ class GenericContainer(ProtectionContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param fabric_name: Name of the container's fabric. - :type fabric_name: str - :param extended_information: Extended information (not returned in List container API calls). - :type extended_information: + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar fabric_name: Name of the container's fabric. + :vartype fabric_name: str + :ivar extended_information: Extended information (not returned in List container API calls). + :vartype extended_information: ~azure.mgmt.recoveryservicesbackup.models.GenericContainerExtendedInfo """ @@ -10469,6 +12995,7 @@ class GenericContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'fabric_name': {'key': 'fabricName', 'type': 'str'}, 'extended_information': {'key': 'extendedInformation', 'type': 'GenericContainerExtendedInfo'}, } @@ -10480,11 +13007,34 @@ def __init__( backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, registration_status: Optional[str] = None, health_status: Optional[str] = None, + protectable_object_type: Optional[str] = None, fabric_name: Optional[str] = None, extended_information: Optional["GenericContainerExtendedInfo"] = None, **kwargs ): - super(GenericContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword fabric_name: Name of the container's fabric. + :paramtype fabric_name: str + :keyword extended_information: Extended information (not returned in List container API calls). + :paramtype extended_information: + ~azure.mgmt.recoveryservicesbackup.models.GenericContainerExtendedInfo + """ + super(GenericContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, protectable_object_type=protectable_object_type, **kwargs) self.container_type = 'GenericContainer' # type: str self.fabric_name = fabric_name self.extended_information = extended_information @@ -10493,12 +13043,13 @@ def __init__( class GenericContainerExtendedInfo(msrest.serialization.Model): """Container extended information. - :param raw_cert_data: Public key of container cert. - :type raw_cert_data: str - :param container_identity_info: Container identity information. - :type container_identity_info: ~azure.mgmt.recoveryservicesbackup.models.ContainerIdentityInfo - :param service_endpoints: Azure Backup Service Endpoints for the container. - :type service_endpoints: dict[str, str] + :ivar raw_cert_data: Public key of container cert. + :vartype raw_cert_data: str + :ivar container_identity_info: Container identity information. + :vartype container_identity_info: + ~azure.mgmt.recoveryservicesbackup.models.ContainerIdentityInfo + :ivar service_endpoints: Azure Backup Service Endpoints for the container. + :vartype service_endpoints: dict[str, str] """ _attribute_map = { @@ -10515,6 +13066,15 @@ def __init__( service_endpoints: Optional[Dict[str, str]] = None, **kwargs ): + """ + :keyword raw_cert_data: Public key of container cert. + :paramtype raw_cert_data: str + :keyword container_identity_info: Container identity information. + :paramtype container_identity_info: + ~azure.mgmt.recoveryservicesbackup.models.ContainerIdentityInfo + :keyword service_endpoints: Azure Backup Service Endpoints for the container. + :paramtype service_endpoints: dict[str, str] + """ super(GenericContainerExtendedInfo, self).__init__(**kwargs) self.raw_cert_data = raw_cert_data self.container_identity_info = container_identity_info @@ -10526,63 +13086,67 @@ class GenericProtectedItem(ProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 container. - :type friendly_name: str - :param policy_state: Indicates consistency of policy object and policy applied to this backup + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar policy_state: Indicates consistency of policy object and policy applied to this backup item. - :type policy_state: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", + :vartype policy_state: str + :ivar 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 protected_item_id: Data Plane Service ID of the protected item. - :type protected_item_id: long - :param source_associations: Loosely coupled (type, value) associations (example - parent of a + :vartype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :ivar protected_item_id: Data Plane Service ID of the protected item. + :vartype protected_item_id: long + :ivar source_associations: Loosely coupled (type, value) associations (example - parent of a protected item). - :type source_associations: dict[str, str] - :param fabric_name: Name of this backup item's fabric. - :type fabric_name: str + :vartype source_associations: dict[str, str] + :ivar fabric_name: Name of this backup item's fabric. + :vartype fabric_name: str """ _validation = { @@ -10605,6 +13169,8 @@ class GenericProtectedItem(ProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'policy_state': {'key': 'policyState', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, @@ -10630,6 +13196,8 @@ def __init__( is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, resource_guard_operation_requests: Optional[List[str]] = None, + is_archive_enabled: Optional[bool] = None, + policy_name: Optional[str] = None, friendly_name: Optional[str] = None, policy_state: Optional[str] = None, protection_state: Optional[Union[str, "ProtectionState"]] = None, @@ -10638,7 +13206,70 @@ def __init__( fabric_name: Optional[str] = None, **kwargs ): - super(GenericProtectedItem, 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) + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword policy_state: Indicates consistency of policy object and policy applied to this backup + item. + :paramtype policy_state: str + :keyword protection_state: Backup state of this backup item. Possible values include: + "Invalid", "IRPending", "Protected", "ProtectionError", "ProtectionStopped", + "ProtectionPaused". + :paramtype protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState + :keyword protected_item_id: Data Plane Service ID of the protected item. + :paramtype protected_item_id: long + :keyword source_associations: Loosely coupled (type, value) associations (example - parent of a + protected item). + :paramtype source_associations: dict[str, str] + :keyword fabric_name: Name of this backup item's fabric. + :paramtype fabric_name: str + """ + super(GenericProtectedItem, 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, is_archive_enabled=is_archive_enabled, policy_name=policy_name, **kwargs) self.protected_item_type = 'GenericProtectedItem' # type: str self.friendly_name = friendly_name self.policy_state = policy_state @@ -10653,22 +13284,22 @@ class GenericProtectionPolicy(ProtectionPolicy): All required parameters must be populated in order to send to Azure. - :param protected_items_count: Number of items associated with this policy. - :type protected_items_count: int - :param backup_management_type: Required. This property will be used as the discriminator for + :ivar protected_items_count: Number of items associated with this policy. + :vartype protected_items_count: int + :ivar backup_management_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 backup_management_type: str - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] - :param sub_protection_policy: List of sub-protection policies which includes schedule and + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + :ivar sub_protection_policy: List of sub-protection policies which includes schedule and retention. - :type sub_protection_policy: + :vartype sub_protection_policy: list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] - :param time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard + :ivar time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - :type time_zone: str - :param fabric_name: Name of this policy's fabric. - :type fabric_name: str + :vartype time_zone: str + :ivar fabric_name: Name of this policy's fabric. + :vartype fabric_name: str """ _validation = { @@ -10694,6 +13325,21 @@ def __init__( fabric_name: Optional[str] = None, **kwargs ): + """ + :keyword protected_items_count: Number of items associated with this policy. + :paramtype protected_items_count: int + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + :keyword sub_protection_policy: List of sub-protection policies which includes schedule and + retention. + :paramtype sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] + :keyword time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific + Standard Time". + :paramtype time_zone: str + :keyword fabric_name: Name of this policy's fabric. + :paramtype fabric_name: str + """ super(GenericProtectionPolicy, self).__init__(protected_items_count=protected_items_count, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.backup_management_type = 'GenericProtectionPolicy' # type: str self.sub_protection_policy = sub_protection_policy @@ -10706,17 +13352,17 @@ class GenericRecoveryPoint(RecoveryPoint): 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 + :ivar 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 friendly_name: Friendly name of the backup copy. - :type friendly_name: str - :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 + :vartype object_type: str + :ivar friendly_name: Friendly name of the backup copy. + :vartype friendly_name: 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 """ _validation = { @@ -10740,6 +13386,17 @@ def __init__( recovery_point_additional_info: Optional[str] = None, **kwargs ): + """ + :keyword friendly_name: Friendly name of the backup copy. + :paramtype friendly_name: str + :keyword recovery_point_type: Type of the backup copy. + :paramtype recovery_point_type: str + :keyword recovery_point_time: Time at which this backup copy was created. + :paramtype recovery_point_time: ~datetime.datetime + :keyword recovery_point_additional_info: Additional information associated with this backup + copy. + :paramtype recovery_point_additional_info: str + """ super(GenericRecoveryPoint, self).__init__(**kwargs) self.object_type = 'GenericRecoveryPoint' # type: str self.friendly_name = friendly_name @@ -10751,8 +13408,8 @@ def __init__( class GetProtectedItemQueryObject(msrest.serialization.Model): """Filters to list backup items. - :param expand: Specifies if the additional information should be provided for this item. - :type expand: str + :ivar expand: Specifies if the additional information should be provided for this item. + :vartype expand: str """ _attribute_map = { @@ -10765,21 +13422,66 @@ def __init__( expand: Optional[str] = None, **kwargs ): + """ + :keyword expand: Specifies if the additional information should be provided for this item. + :paramtype expand: str + """ super(GetProtectedItemQueryObject, self).__init__(**kwargs) self.expand = expand +class HourlySchedule(msrest.serialization.Model): + """HourlySchedule. + + :ivar interval: Interval at which backup needs to be triggered. For hourly the value + can be 4/6/8/12. + :vartype interval: int + :ivar schedule_window_start_time: To specify start time of the backup window. + :vartype schedule_window_start_time: ~datetime.datetime + :ivar schedule_window_duration: To specify duration of the backup window. + :vartype schedule_window_duration: int + """ + + _attribute_map = { + 'interval': {'key': 'interval', 'type': 'int'}, + 'schedule_window_start_time': {'key': 'scheduleWindowStartTime', 'type': 'iso-8601'}, + 'schedule_window_duration': {'key': 'scheduleWindowDuration', 'type': 'int'}, + } + + def __init__( + self, + *, + interval: Optional[int] = None, + schedule_window_start_time: Optional[datetime.datetime] = None, + schedule_window_duration: Optional[int] = None, + **kwargs + ): + """ + :keyword interval: Interval at which backup needs to be triggered. For hourly the value + can be 4/6/8/12. + :paramtype interval: int + :keyword schedule_window_start_time: To specify start time of the backup window. + :paramtype schedule_window_start_time: ~datetime.datetime + :keyword schedule_window_duration: To specify duration of the backup window. + :paramtype schedule_window_duration: int + """ + super(HourlySchedule, self).__init__(**kwargs) + self.interval = interval + self.schedule_window_start_time = schedule_window_start_time + self.schedule_window_duration = schedule_window_duration + + class IaasVMBackupRequest(BackupRequest): """IaaS VM workload-specific backup 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 + :ivar 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_expiry_time_in_utc: Backup copy will expire after the time specified + :vartype object_type: str + :ivar recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified (UTC). - :type recovery_point_expiry_time_in_utc: ~datetime.datetime + :vartype recovery_point_expiry_time_in_utc: ~datetime.datetime """ _validation = { @@ -10797,6 +13499,11 @@ def __init__( recovery_point_expiry_time_in_utc: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword recovery_point_expiry_time_in_utc: Backup copy will expire after the time specified + (UTC). + :paramtype recovery_point_expiry_time_in_utc: ~datetime.datetime + """ super(IaasVMBackupRequest, self).__init__(**kwargs) self.object_type = 'IaasVMBackupRequest' # type: str self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc @@ -10807,20 +13514,20 @@ class IaasVMILRRegistrationRequest(ILRRequest): 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 + :ivar 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 IaaS VM backup copy from where the files/folders have to be + :vartype object_type: str + :ivar recovery_point_id: ID of the IaaS VM backup copy from where the files/folders have to be restored. - :type recovery_point_id: str - :param virtual_machine_id: Fully qualified ARM ID of the virtual machine whose the files / + :vartype recovery_point_id: str + :ivar virtual_machine_id: Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored. - :type virtual_machine_id: str - :param initiator_name: iSCSI initiator name. - :type initiator_name: str - :param renew_existing_registration: Whether to renew existing registration with the iSCSI + :vartype virtual_machine_id: str + :ivar initiator_name: iSCSI initiator name. + :vartype initiator_name: str + :ivar renew_existing_registration: Whether to renew existing registration with the iSCSI server. - :type renew_existing_registration: bool + :vartype renew_existing_registration: bool """ _validation = { @@ -10844,6 +13551,19 @@ def __init__( renew_existing_registration: Optional[bool] = None, **kwargs ): + """ + :keyword recovery_point_id: ID of the IaaS VM backup copy from where the files/folders have to + be restored. + :paramtype recovery_point_id: str + :keyword virtual_machine_id: Fully qualified ARM ID of the virtual machine whose the files / + folders have to be restored. + :paramtype virtual_machine_id: str + :keyword initiator_name: iSCSI initiator name. + :paramtype initiator_name: str + :keyword renew_existing_registration: Whether to renew existing registration with the iSCSI + server. + :paramtype renew_existing_registration: bool + """ super(IaasVMILRRegistrationRequest, self).__init__(**kwargs) self.object_type = 'IaasVMILRRegistrationRequest' # type: str self.recovery_point_id = recovery_point_id @@ -10857,120 +13577,9 @@ class IaasVMRecoveryPoint(RecoveryPoint): 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_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, - *, - 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 + :ivar 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 + :vartype 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. @@ -10981,313 +13590,208 @@ class IaasVMRecoveryPointAutoGenerated(RecoveryPoint): :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'}, - 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, - 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, - 'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'}, - 'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'}, - 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'}, + :vartype is_source_vm_encrypted: bool + :ivar key_and_secret: Required details for recovering an encrypted VM. Applicable only when + IsSourceVMEncrypted is true. + :vartype key_and_secret: ~azure.mgmt.recoveryservicesbackup.models.KeyAndSecretDetails + :ivar is_instant_ilr_session_active: Is the session to recover items from this backup copy + still active. + :vartype is_instant_ilr_session_active: bool + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :ivar is_managed_virtual_machine: Whether VM is with Managed Disks. + :vartype is_managed_virtual_machine: bool + :ivar virtual_machine_size: Virtual Machine Size. + :vartype virtual_machine_size: str + :ivar original_storage_account_option: Original Storage Account Option. + :vartype original_storage_account_option: bool + :ivar os_type: OS type. + :vartype os_type: str + :ivar recovery_point_disk_configuration: Disk configuration. + :vartype recovery_point_disk_configuration: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointDiskConfiguration + :ivar zones: Identifies the zone of the VM at the time of backup. Applicable only for + zone-pinned Vms. + :vartype zones: list[str] + :ivar recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :vartype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + """ + + _validation = { + 'object_type': {'required': True}, } - _subtype_map = { - 'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'} + _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': '[RecoveryPointTierInformationV2]'}, + '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_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["RecoveryPointTierInformationV2"]] = 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 + """ + :keyword recovery_point_type: Type of the backup copy. + :paramtype recovery_point_type: str + :keyword recovery_point_time: Time at which this backup copy was created. + :paramtype recovery_point_time: ~datetime.datetime + :keyword recovery_point_additional_info: Additional information associated with this backup + copy. + :paramtype recovery_point_additional_info: str + :keyword source_vm_storage_type: Storage type of the VM whose backup copy is created. + :paramtype source_vm_storage_type: str + :keyword is_source_vm_encrypted: Identifies whether the VM was encrypted when the backup copy + is created. + :paramtype is_source_vm_encrypted: bool + :keyword key_and_secret: Required details for recovering an encrypted VM. Applicable only when + IsSourceVMEncrypted is true. + :paramtype key_and_secret: ~azure.mgmt.recoveryservicesbackup.models.KeyAndSecretDetails + :keyword is_instant_ilr_session_active: Is the session to recover items from this backup copy + still active. + :paramtype is_instant_ilr_session_active: bool + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformationV2] + :keyword is_managed_virtual_machine: Whether VM is with Managed Disks. + :paramtype is_managed_virtual_machine: bool + :keyword virtual_machine_size: Virtual Machine Size. + :paramtype virtual_machine_size: str + :keyword original_storage_account_option: Original Storage Account Option. + :paramtype original_storage_account_option: bool + :keyword os_type: OS type. + :paramtype os_type: str + :keyword recovery_point_disk_configuration: Disk configuration. + :paramtype recovery_point_disk_configuration: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointDiskConfiguration + :keyword zones: Identifies the zone of the VM at the time of backup. Applicable only for + zone-pinned Vms. + :paramtype zones: list[str] + :keyword recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. + :paramtype recovery_point_move_readiness_info: dict[str, + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] + """ + 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 + :ivar 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", + :vartype object_type: str + :ivar recovery_point_id: ID of the backup copy to be recovered. + :vartype recovery_point_id: str + :ivar 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. + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM which is being recovered. + :vartype source_resource_id: str + :ivar 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 + :vartype target_virtual_machine_id: str + :ivar 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 + :vartype target_resource_group_id: str + :ivar 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 + :vartype storage_account_id: str + :ivar 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 + :vartype virtual_network_id: str + :ivar 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 + :vartype subnet_id: str + :ivar 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 + :vartype target_domain_name_id: str + :ivar region: Region in which the virtual machine is restored. + :vartype region: str + :ivar 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. + :vartype affinity_group: str + :ivar 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 + :vartype create_new_cloud_service: bool + :ivar original_storage_account_option: Original Storage Account Option. + :vartype original_storage_account_option: bool + :ivar encryption_details: Details needed if the VM was encrypted at the time of backup. + :vartype encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails + :ivar restore_disk_lun_list: List of Disk LUNs for partial restore. + :vartype restore_disk_lun_list: list[int] + :ivar 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 + :vartype restore_with_managed_disks: bool + :ivar 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 - :param identity_based_restore_details: IaaS VM workload specific restore details for restores + :vartype disk_encryption_set_id: str + :ivar zones: Target zone where the VM and its disks should be restored. + :vartype zones: list[str] + :ivar identity_info: Managed Identity information required to access customer storage account. + :vartype identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo + :ivar identity_based_restore_details: IaaS VM workload specific restore details for restores using managed identity. - :type identity_based_restore_details: + :vartype identity_based_restore_details: ~azure.mgmt.recoveryservicesbackup.models.IdentityBasedRestoreDetails """ @@ -11319,6 +13823,10 @@ class IaasVMRestoreRequestAutoGenerated(RestoreRequest): 'identity_based_restore_details': {'key': 'identityBasedRestoreDetails', 'type': 'IdentityBasedRestoreDetails'}, } + _subtype_map = { + 'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'} + } + def __init__( self, *, @@ -11344,7 +13852,71 @@ def __init__( identity_based_restore_details: Optional["IdentityBasedRestoreDetails"] = None, **kwargs ): - super(IaasVMRestoreRequestAutoGenerated, self).__init__(**kwargs) + """ + :keyword recovery_point_id: ID of the backup copy to be recovered. + :paramtype recovery_point_id: str + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM which is being recovered. + :paramtype source_resource_id: str + :keyword 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}. + :paramtype target_virtual_machine_id: str + :keyword 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}. + :paramtype target_resource_group_id: str + :keyword storage_account_id: Fully qualified ARM ID of the storage account to which the VM has + to be restored. + :paramtype storage_account_id: str + :keyword 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. + :paramtype virtual_network_id: str + :keyword 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. + :paramtype subnet_id: str + :keyword 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. + :paramtype target_domain_name_id: str + :keyword region: Region in which the virtual machine is restored. + :paramtype region: str + :keyword affinity_group: Affinity group associated to VM to be restored. Used only for Classic + Compute Virtual Machines. + :paramtype affinity_group: str + :keyword 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. + :paramtype create_new_cloud_service: bool + :keyword original_storage_account_option: Original Storage Account Option. + :paramtype original_storage_account_option: bool + :keyword encryption_details: Details needed if the VM was encrypted at the time of backup. + :paramtype encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails + :keyword restore_disk_lun_list: List of Disk LUNs for partial restore. + :paramtype restore_disk_lun_list: list[int] + :keyword restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored + with Managed disks. + :paramtype restore_with_managed_disks: bool + :keyword disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be + encrypted at rest during restore with customer managed key. + :paramtype disk_encryption_set_id: str + :keyword zones: Target zone where the VM and its disks should be restored. + :paramtype zones: list[str] + :keyword identity_info: Managed Identity information required to access customer storage + account. + :paramtype identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo + :keyword identity_based_restore_details: IaaS VM workload specific restore details for restores + using managed identity. + :paramtype identity_based_restore_details: + ~azure.mgmt.recoveryservicesbackup.models.IdentityBasedRestoreDetails + """ + super(IaasVMRestoreRequest, self).__init__(**kwargs) self.object_type = 'IaasVMRestoreRequest' # type: str self.recovery_point_id = recovery_point_id self.recovery_type = recovery_type @@ -11373,68 +13945,72 @@ class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest): 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 + :ivar 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", + :vartype object_type: str + :ivar recovery_point_id: ID of the backup copy to be recovered. + :vartype recovery_point_id: str + :ivar 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. + :vartype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :ivar source_resource_id: Fully qualified ARM ID of the VM which is being recovered. + :vartype source_resource_id: str + :ivar 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 + :vartype target_virtual_machine_id: str + :ivar 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 + :vartype target_resource_group_id: str + :ivar 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 + :vartype storage_account_id: str + :ivar 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 + :vartype virtual_network_id: str + :ivar 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 + :vartype subnet_id: str + :ivar 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 + :vartype target_domain_name_id: str + :ivar region: Region in which the virtual machine is restored. + :vartype region: str + :ivar 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. + :vartype affinity_group: str + :ivar 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 + :vartype create_new_cloud_service: bool + :ivar original_storage_account_option: Original Storage Account Option. + :vartype original_storage_account_option: bool + :ivar encryption_details: Details needed if the VM was encrypted at the time of backup. + :vartype encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails + :ivar restore_disk_lun_list: List of Disk LUNs for partial restore. + :vartype restore_disk_lun_list: list[int] + :ivar 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 + :vartype restore_with_managed_disks: bool + :ivar 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 - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: + :vartype disk_encryption_set_id: str + :ivar zones: Target zone where the VM and its disks should be restored. + :vartype zones: list[str] + :ivar identity_info: Managed Identity information required to access customer storage account. + :vartype identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo + :ivar identity_based_restore_details: IaaS VM workload specific restore details for restores + using managed identity. + :vartype identity_based_restore_details: + ~azure.mgmt.recoveryservicesbackup.models.IdentityBasedRestoreDetails + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo """ @@ -11463,6 +14039,7 @@ class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest): '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'}, 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, } @@ -11488,10 +14065,78 @@ 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, recovery_point_rehydration_info: Optional["RecoveryPointRehydrationInfo"] = None, **kwargs ): - super(IaasVMRestoreWithRehydrationRequest, self).__init__(recovery_point_id=recovery_point_id, recovery_type=recovery_type, source_resource_id=source_resource_id, target_virtual_machine_id=target_virtual_machine_id, target_resource_group_id=target_resource_group_id, storage_account_id=storage_account_id, virtual_network_id=virtual_network_id, subnet_id=subnet_id, target_domain_name_id=target_domain_name_id, region=region, affinity_group=affinity_group, create_new_cloud_service=create_new_cloud_service, original_storage_account_option=original_storage_account_option, encryption_details=encryption_details, restore_disk_lun_list=restore_disk_lun_list, restore_with_managed_disks=restore_with_managed_disks, disk_encryption_set_id=disk_encryption_set_id, zones=zones, identity_info=identity_info, **kwargs) + """ + :keyword recovery_point_id: ID of the backup copy to be recovered. + :paramtype recovery_point_id: str + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :keyword source_resource_id: Fully qualified ARM ID of the VM which is being recovered. + :paramtype source_resource_id: str + :keyword 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}. + :paramtype target_virtual_machine_id: str + :keyword 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}. + :paramtype target_resource_group_id: str + :keyword storage_account_id: Fully qualified ARM ID of the storage account to which the VM has + to be restored. + :paramtype storage_account_id: str + :keyword 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. + :paramtype virtual_network_id: str + :keyword 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. + :paramtype subnet_id: str + :keyword 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. + :paramtype target_domain_name_id: str + :keyword region: Region in which the virtual machine is restored. + :paramtype region: str + :keyword affinity_group: Affinity group associated to VM to be restored. Used only for Classic + Compute Virtual Machines. + :paramtype affinity_group: str + :keyword 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. + :paramtype create_new_cloud_service: bool + :keyword original_storage_account_option: Original Storage Account Option. + :paramtype original_storage_account_option: bool + :keyword encryption_details: Details needed if the VM was encrypted at the time of backup. + :paramtype encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails + :keyword restore_disk_lun_list: List of Disk LUNs for partial restore. + :paramtype restore_disk_lun_list: list[int] + :keyword restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored + with Managed disks. + :paramtype restore_with_managed_disks: bool + :keyword disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be + encrypted at rest during restore with customer managed key. + :paramtype disk_encryption_set_id: str + :keyword zones: Target zone where the VM and its disks should be restored. + :paramtype zones: list[str] + :keyword identity_info: Managed Identity information required to access customer storage + account. + :paramtype identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo + :keyword identity_based_restore_details: IaaS VM workload specific restore details for restores + using managed identity. + :paramtype identity_based_restore_details: + ~azure.mgmt.recoveryservicesbackup.models.IdentityBasedRestoreDetails + :keyword recovery_point_rehydration_info: RP Rehydration Info. + :paramtype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo + """ + super(IaasVMRestoreWithRehydrationRequest, self).__init__(recovery_point_id=recovery_point_id, recovery_type=recovery_type, source_resource_id=source_resource_id, target_virtual_machine_id=target_virtual_machine_id, target_resource_group_id=target_resource_group_id, storage_account_id=storage_account_id, virtual_network_id=virtual_network_id, subnet_id=subnet_id, target_domain_name_id=target_domain_name_id, region=region, affinity_group=affinity_group, create_new_cloud_service=create_new_cloud_service, original_storage_account_option=original_storage_account_option, encryption_details=encryption_details, restore_disk_lun_list=restore_disk_lun_list, restore_with_managed_disks=restore_with_managed_disks, disk_encryption_set_id=disk_encryption_set_id, zones=zones, identity_info=identity_info, identity_based_restore_details=identity_based_restore_details, **kwargs) self.object_type = 'IaasVMRestoreWithRehydrationRequest' # type: str self.recovery_point_rehydration_info = recovery_point_rehydration_info @@ -11499,10 +14144,10 @@ def __init__( 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 + :ivar object_type: Gets the class type. + :vartype object_type: str + :ivar target_storage_account_id: Fully qualified ARM ID of the target storage account. + :vartype target_storage_account_id: str """ _attribute_map = { @@ -11517,6 +14162,12 @@ def __init__( target_storage_account_id: Optional[str] = None, **kwargs ): + """ + :keyword object_type: Gets the class type. + :paramtype object_type: str + :keyword target_storage_account_id: Fully qualified ARM ID of the target storage account. + :paramtype target_storage_account_id: str + """ super(IdentityBasedRestoreDetails, self).__init__(**kwargs) self.object_type = object_type self.target_storage_account_id = target_storage_account_id @@ -11525,12 +14176,12 @@ def __init__( class IdentityInfo(msrest.serialization.Model): """Encapsulates Managed Identity related information. - :param is_system_assigned_identity: To differentiate if the managed identity is system assigned + :ivar is_system_assigned_identity: To differentiate if the managed identity is system assigned or user assigned. - :type is_system_assigned_identity: bool - :param managed_identity_resource_id: Managed Identity Resource Id + :vartype is_system_assigned_identity: bool + :ivar managed_identity_resource_id: Managed Identity Resource Id Optional: Might not be required in the case of system assigned managed identity. - :type managed_identity_resource_id: str + :vartype managed_identity_resource_id: str """ _attribute_map = { @@ -11545,6 +14196,14 @@ def __init__( managed_identity_resource_id: Optional[str] = None, **kwargs ): + """ + :keyword is_system_assigned_identity: To differentiate if the managed identity is system + assigned or user assigned. + :paramtype is_system_assigned_identity: bool + :keyword managed_identity_resource_id: Managed Identity Resource Id + Optional: Might not be required in the case of system assigned managed identity. + :paramtype managed_identity_resource_id: str + """ super(IdentityInfo, self).__init__(**kwargs) self.is_system_assigned_identity = is_system_assigned_identity self.managed_identity_resource_id = managed_identity_resource_id @@ -11562,14 +14221,14 @@ class ILRRequestResource(Resource): :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: ILRRequestResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ILRRequest + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ILRRequestResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ILRRequest """ _validation = { @@ -11597,6 +14256,16 @@ def __init__( properties: Optional["ILRRequest"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ILRRequestResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ILRRequest + """ super(ILRRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -11604,14 +14273,15 @@ def __init__( class InquiryInfo(msrest.serialization.Model): """Details about inquired protectable items under a given container. - :param status: Inquiry Status for this container such as + :ivar status: Inquiry Status for this container such as InProgress | Failed | Succeeded. - :type status: str - :param error_detail: Error Details if the Status is non-success. - :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail - :param inquiry_details: Inquiry Details which will have workload specific details. + :vartype status: str + :ivar error_detail: Error Details if the Status is non-success. + :vartype error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :ivar inquiry_details: Inquiry Details which will have workload specific details. For e.g. - For SQL and oracle this will contain different details. - :type inquiry_details: list[~azure.mgmt.recoveryservicesbackup.models.WorkloadInquiryDetails] + :vartype inquiry_details: + list[~azure.mgmt.recoveryservicesbackup.models.WorkloadInquiryDetails] """ _attribute_map = { @@ -11628,6 +14298,17 @@ def __init__( inquiry_details: Optional[List["WorkloadInquiryDetails"]] = None, **kwargs ): + """ + :keyword status: Inquiry Status for this container such as + InProgress | Failed | Succeeded. + :paramtype status: str + :keyword error_detail: Error Details if the Status is non-success. + :paramtype error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :keyword inquiry_details: Inquiry Details which will have workload specific details. + For e.g. - For SQL and oracle this will contain different details. + :paramtype inquiry_details: + list[~azure.mgmt.recoveryservicesbackup.models.WorkloadInquiryDetails] + """ super(InquiryInfo, self).__init__(**kwargs) self.status = status self.error_detail = error_detail @@ -11639,10 +14320,10 @@ class InquiryValidation(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param status: Status for the Inquiry Validation. - :type status: str - :param error_detail: Error Detail in case the status is non-success. - :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + :ivar status: Status for the Inquiry Validation. + :vartype status: str + :ivar error_detail: Error Detail in case the status is non-success. + :vartype error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail :ivar additional_detail: Error Additional Detail in case the status is non-success. :vartype additional_detail: str """ @@ -11664,6 +14345,12 @@ def __init__( error_detail: Optional["ErrorDetail"] = None, **kwargs ): + """ + :keyword status: Status for the Inquiry Validation. + :paramtype status: str + :keyword error_detail: Error Detail in case the status is non-success. + :paramtype error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail + """ super(InquiryValidation, self).__init__(**kwargs) self.status = status self.error_detail = error_detail @@ -11673,8 +14360,8 @@ def __init__( class InstantItemRecoveryTarget(msrest.serialization.Model): """Target details for file / folder restore. - :param client_scripts: List of client scripts. - :type client_scripts: list[~azure.mgmt.recoveryservicesbackup.models.ClientScriptForConnect] + :ivar client_scripts: List of client scripts. + :vartype client_scripts: list[~azure.mgmt.recoveryservicesbackup.models.ClientScriptForConnect] """ _attribute_map = { @@ -11687,6 +14374,11 @@ def __init__( client_scripts: Optional[List["ClientScriptForConnect"]] = None, **kwargs ): + """ + :keyword client_scripts: List of client scripts. + :paramtype client_scripts: + list[~azure.mgmt.recoveryservicesbackup.models.ClientScriptForConnect] + """ super(InstantItemRecoveryTarget, self).__init__(**kwargs) self.client_scripts = client_scripts @@ -11694,10 +14386,10 @@ def __init__( class InstantRPAdditionalDetails(msrest.serialization.Model): """InstantRPAdditionalDetails. - :param azure_backup_rg_name_prefix: - :type azure_backup_rg_name_prefix: str - :param azure_backup_rg_name_suffix: - :type azure_backup_rg_name_suffix: str + :ivar azure_backup_rg_name_prefix: + :vartype azure_backup_rg_name_prefix: str + :ivar azure_backup_rg_name_suffix: + :vartype azure_backup_rg_name_suffix: str """ _attribute_map = { @@ -11712,6 +14404,12 @@ def __init__( azure_backup_rg_name_suffix: Optional[str] = None, **kwargs ): + """ + :keyword azure_backup_rg_name_prefix: + :paramtype azure_backup_rg_name_prefix: str + :keyword azure_backup_rg_name_suffix: + :paramtype azure_backup_rg_name_suffix: str + """ super(InstantRPAdditionalDetails, self).__init__(**kwargs) self.azure_backup_rg_name_prefix = azure_backup_rg_name_prefix self.azure_backup_rg_name_suffix = azure_backup_rg_name_suffix @@ -11720,24 +14418,24 @@ def __init__( class JobQueryObject(msrest.serialization.Model): """Filters to list the jobs. - :param status: Status of the job. Possible values include: "Invalid", "InProgress", - "Completed", "Failed", "CompletedWithWarnings", "Cancelled", "Cancelling". - :type status: str or ~azure.mgmt.recoveryservicesbackup.models.JobStatus - :param backup_management_type: Type of backup management for the job. Possible values include: + :ivar status: Status of the job. Possible values include: "Invalid", "InProgress", "Completed", + "Failed", "CompletedWithWarnings", "Cancelled", "Cancelling". + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.models.JobStatus + :ivar backup_management_type: Type of backup management for the job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: Type of operation. Possible values include: "Invalid", "Register", + :ivar operation: Type of operation. Possible values include: "Invalid", "Register", "UnRegister", "ConfigureBackup", "Backup", "Restore", "DisableBackup", "DeleteBackupData", "CrossRegionRestore", "Undelete", "UpdateCustomerManagedKey". - :type operation: str or ~azure.mgmt.recoveryservicesbackup.models.JobOperationType - :param job_id: JobID represents the job uniquely. - :type job_id: str - :param start_time: Job has started at this time. Value is in UTC. - :type start_time: ~datetime.datetime - :param end_time: Job has ended at this time. Value is in UTC. - :type end_time: ~datetime.datetime + :vartype operation: str or ~azure.mgmt.recoveryservicesbackup.models.JobOperationType + :ivar job_id: JobID represents the job uniquely. + :vartype job_id: str + :ivar start_time: Job has started at this time. Value is in UTC. + :vartype start_time: ~datetime.datetime + :ivar end_time: Job has ended at this time. Value is in UTC. + :vartype end_time: ~datetime.datetime """ _attribute_map = { @@ -11760,6 +14458,26 @@ def __init__( end_time: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword status: Status of the job. Possible values include: "Invalid", "InProgress", + "Completed", "Failed", "CompletedWithWarnings", "Cancelled", "Cancelling". + :paramtype status: str or ~azure.mgmt.recoveryservicesbackup.models.JobStatus + :keyword backup_management_type: Type of backup management for the job. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: Type of operation. Possible values include: "Invalid", "Register", + "UnRegister", "ConfigureBackup", "Backup", "Restore", "DisableBackup", "DeleteBackupData", + "CrossRegionRestore", "Undelete", "UpdateCustomerManagedKey". + :paramtype operation: str or ~azure.mgmt.recoveryservicesbackup.models.JobOperationType + :keyword job_id: JobID represents the job uniquely. + :paramtype job_id: str + :keyword start_time: Job has started at this time. Value is in UTC. + :paramtype start_time: ~datetime.datetime + :keyword end_time: Job has ended at this time. Value is in UTC. + :paramtype end_time: ~datetime.datetime + """ super(JobQueryObject, self).__init__(**kwargs) self.status = status self.backup_management_type = backup_management_type @@ -11781,14 +14499,14 @@ class JobResource(Resource): :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: JobResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.Job + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: JobResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.Job """ _validation = { @@ -11816,6 +14534,16 @@ def __init__( properties: Optional["Job"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: JobResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.Job + """ super(JobResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -11823,11 +14551,11 @@ def __init__( class JobResourceList(ResourceList): """List of Job resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.JobResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.JobResource] """ _attribute_map = { @@ -11842,6 +14570,13 @@ def __init__( value: Optional[List["JobResource"]] = None, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.JobResource] + """ super(JobResourceList, self).__init__(next_link=next_link, **kwargs) self.value = value @@ -11849,12 +14584,12 @@ def __init__( class KEKDetails(msrest.serialization.Model): """KEK is encryption key for BEK. - :param key_url: Key is KEK. - :type key_url: str - :param key_vault_id: Key Vault ID where this Key is stored. - :type key_vault_id: str - :param key_backup_data: KEK data. - :type key_backup_data: str + :ivar key_url: Key is KEK. + :vartype key_url: str + :ivar key_vault_id: Key Vault ID where this Key is stored. + :vartype key_vault_id: str + :ivar key_backup_data: KEK data. + :vartype key_backup_data: str """ _attribute_map = { @@ -11871,6 +14606,14 @@ def __init__( key_backup_data: Optional[str] = None, **kwargs ): + """ + :keyword key_url: Key is KEK. + :paramtype key_url: str + :keyword key_vault_id: Key Vault ID where this Key is stored. + :paramtype key_vault_id: str + :keyword key_backup_data: KEK data. + :paramtype key_backup_data: str + """ super(KEKDetails, self).__init__(**kwargs) self.key_url = key_url self.key_vault_id = key_vault_id @@ -11888,12 +14631,12 @@ class KeyAndSecretDetails(msrest.serialization.Model): #. EncryptionMechanism BEK and KEK can potentially have different vault ids. - :param kek_details: KEK is encryption key for BEK. - :type kek_details: ~azure.mgmt.recoveryservicesbackup.models.KEKDetails - :param bek_details: BEK is bitlocker encryption key. - :type bek_details: ~azure.mgmt.recoveryservicesbackup.models.BEKDetails - :param encryption_mechanism: Encryption mechanism: None/ SinglePass/ DoublePass. - :type encryption_mechanism: str + :ivar kek_details: KEK is encryption key for BEK. + :vartype kek_details: ~azure.mgmt.recoveryservicesbackup.models.KEKDetails + :ivar bek_details: BEK is bitlocker encryption key. + :vartype bek_details: ~azure.mgmt.recoveryservicesbackup.models.BEKDetails + :ivar encryption_mechanism: Encryption mechanism: None/ SinglePass/ DoublePass. + :vartype encryption_mechanism: str """ _attribute_map = { @@ -11910,6 +14653,14 @@ def __init__( encryption_mechanism: Optional[str] = None, **kwargs ): + """ + :keyword kek_details: KEK is encryption key for BEK. + :paramtype kek_details: ~azure.mgmt.recoveryservicesbackup.models.KEKDetails + :keyword bek_details: BEK is bitlocker encryption key. + :paramtype bek_details: ~azure.mgmt.recoveryservicesbackup.models.BEKDetails + :keyword encryption_mechanism: Encryption mechanism: None/ SinglePass/ DoublePass. + :paramtype encryption_mechanism: str + """ super(KeyAndSecretDetails, self).__init__(**kwargs) self.kek_details = kek_details self.bek_details = bek_details @@ -11919,13 +14670,13 @@ def __init__( class KPIResourceHealthDetails(msrest.serialization.Model): """KPI Resource Health Details. - :param resource_health_status: Resource Health Status. Possible values include: "Healthy", + :ivar resource_health_status: Resource Health Status. Possible values include: "Healthy", "TransientDegraded", "PersistentDegraded", "TransientUnhealthy", "PersistentUnhealthy", "Invalid". - :type resource_health_status: str or + :vartype resource_health_status: str or ~azure.mgmt.recoveryservicesbackup.models.ResourceHealthStatus - :param resource_health_details: Resource Health Status. - :type resource_health_details: + :ivar resource_health_details: Resource Health Status. + :vartype resource_health_details: list[~azure.mgmt.recoveryservicesbackup.models.ResourceHealthDetails] """ @@ -11941,6 +14692,16 @@ def __init__( resource_health_details: Optional[List["ResourceHealthDetails"]] = None, **kwargs ): + """ + :keyword resource_health_status: Resource Health Status. Possible values include: "Healthy", + "TransientDegraded", "PersistentDegraded", "TransientUnhealthy", "PersistentUnhealthy", + "Invalid". + :paramtype resource_health_status: str or + ~azure.mgmt.recoveryservicesbackup.models.ResourceHealthStatus + :keyword resource_health_details: Resource Health Status. + :paramtype resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.models.ResourceHealthDetails] + """ super(KPIResourceHealthDetails, self).__init__(**kwargs) self.resource_health_status = resource_health_status self.resource_health_details = resource_health_details @@ -11949,10 +14710,10 @@ def __init__( class ListRecoveryPointsRecommendedForMoveRequest(msrest.serialization.Model): """ListRecoveryPointsRecommendedForMoveRequest Request. - :param object_type: Gets the class type. - :type object_type: str - :param excluded_rp_list: List of Recovery Points excluded from Move. - :type excluded_rp_list: list[str] + :ivar object_type: Gets the class type. + :vartype object_type: str + :ivar excluded_rp_list: List of Recovery Points excluded from Move. + :vartype excluded_rp_list: list[str] """ _attribute_map = { @@ -11967,6 +14728,12 @@ def __init__( excluded_rp_list: Optional[List[str]] = None, **kwargs ): + """ + :keyword object_type: Gets the class type. + :paramtype object_type: str + :keyword excluded_rp_list: List of Recovery Points excluded from Move. + :paramtype excluded_rp_list: list[str] + """ super(ListRecoveryPointsRecommendedForMoveRequest, self).__init__(**kwargs) self.object_type = object_type self.excluded_rp_list = excluded_rp_list @@ -11980,9 +14747,9 @@ class SchedulePolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param schedule_policy_type: Required. This property will be used as the discriminator for + :ivar schedule_policy_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 schedule_policy_type: str + :vartype schedule_policy_type: str """ _validation = { @@ -12001,6 +14768,8 @@ def __init__( self, **kwargs ): + """ + """ super(SchedulePolicy, self).__init__(**kwargs) self.schedule_policy_type = None # type: Optional[str] @@ -12010,12 +14779,12 @@ class LogSchedulePolicy(SchedulePolicy): All required parameters must be populated in order to send to Azure. - :param schedule_policy_type: Required. This property will be used as the discriminator for + :ivar schedule_policy_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 schedule_policy_type: str - :param schedule_frequency_in_mins: Frequency of the log schedule operation of this policy in + :vartype schedule_policy_type: str + :ivar schedule_frequency_in_mins: Frequency of the log schedule operation of this policy in minutes. - :type schedule_frequency_in_mins: int + :vartype schedule_frequency_in_mins: int """ _validation = { @@ -12033,6 +14802,11 @@ def __init__( schedule_frequency_in_mins: Optional[int] = None, **kwargs ): + """ + :keyword schedule_frequency_in_mins: Frequency of the log schedule operation of this policy in + minutes. + :paramtype schedule_frequency_in_mins: int + """ super(LogSchedulePolicy, self).__init__(**kwargs) self.schedule_policy_type = 'LogSchedulePolicy' # type: str self.schedule_frequency_in_mins = schedule_frequency_in_mins @@ -12046,9 +14820,9 @@ class RetentionPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param retention_policy_type: Required. This property will be used as the discriminator for + :ivar retention_policy_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 retention_policy_type: str + :vartype retention_policy_type: str """ _validation = { @@ -12067,6 +14841,8 @@ def __init__( self, **kwargs ): + """ + """ super(RetentionPolicy, self).__init__(**kwargs) self.retention_policy_type = None # type: Optional[str] @@ -12076,17 +14852,17 @@ class LongTermRetentionPolicy(RetentionPolicy): All required parameters must be populated in order to send to Azure. - :param retention_policy_type: Required. This property will be used as the discriminator for + :ivar retention_policy_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 retention_policy_type: str - :param daily_schedule: Daily retention schedule of the protection policy. - :type daily_schedule: ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionSchedule - :param weekly_schedule: Weekly retention schedule of the protection policy. - :type weekly_schedule: ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionSchedule - :param monthly_schedule: Monthly retention schedule of the protection policy. - :type monthly_schedule: ~azure.mgmt.recoveryservicesbackup.models.MonthlyRetentionSchedule - :param yearly_schedule: Yearly retention schedule of the protection policy. - :type yearly_schedule: ~azure.mgmt.recoveryservicesbackup.models.YearlyRetentionSchedule + :vartype retention_policy_type: str + :ivar daily_schedule: Daily retention schedule of the protection policy. + :vartype daily_schedule: ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionSchedule + :ivar weekly_schedule: Weekly retention schedule of the protection policy. + :vartype weekly_schedule: ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionSchedule + :ivar monthly_schedule: Monthly retention schedule of the protection policy. + :vartype monthly_schedule: ~azure.mgmt.recoveryservicesbackup.models.MonthlyRetentionSchedule + :ivar yearly_schedule: Yearly retention schedule of the protection policy. + :vartype yearly_schedule: ~azure.mgmt.recoveryservicesbackup.models.YearlyRetentionSchedule """ _validation = { @@ -12110,6 +14886,16 @@ def __init__( yearly_schedule: Optional["YearlyRetentionSchedule"] = None, **kwargs ): + """ + :keyword daily_schedule: Daily retention schedule of the protection policy. + :paramtype daily_schedule: ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionSchedule + :keyword weekly_schedule: Weekly retention schedule of the protection policy. + :paramtype weekly_schedule: ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionSchedule + :keyword monthly_schedule: Monthly retention schedule of the protection policy. + :paramtype monthly_schedule: ~azure.mgmt.recoveryservicesbackup.models.MonthlyRetentionSchedule + :keyword yearly_schedule: Yearly retention schedule of the protection policy. + :paramtype yearly_schedule: ~azure.mgmt.recoveryservicesbackup.models.YearlyRetentionSchedule + """ super(LongTermRetentionPolicy, self).__init__(**kwargs) self.retention_policy_type = 'LongTermRetentionPolicy' # type: str self.daily_schedule = daily_schedule @@ -12123,9 +14909,9 @@ class LongTermSchedulePolicy(SchedulePolicy): All required parameters must be populated in order to send to Azure. - :param schedule_policy_type: Required. This property will be used as the discriminator for + :ivar schedule_policy_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 schedule_policy_type: str + :vartype schedule_policy_type: str """ _validation = { @@ -12140,6 +14926,8 @@ def __init__( self, **kwargs ): + """ + """ super(LongTermSchedulePolicy, self).__init__(**kwargs) self.schedule_policy_type = 'LongTermSchedulePolicy' # type: str @@ -12149,44 +14937,46 @@ class MabContainer(ProtectionContainer): All required parameters must be populated in order to send to Azure. - :param friendly_name: Friendly name of the container. - :type friendly_name: str - :param backup_management_type: Type of backup management for the container. Possible values + :ivar friendly_name: Friendly name of the container. + :vartype friendly_name: str + :ivar backup_management_type: Type of backup management for the container. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param registration_status: Status of registration of the container with the Recovery Services + :ivar registration_status: Status of registration of the container with the Recovery Services Vault. - :type registration_status: str - :param health_status: Status of health of the container. - :type health_status: str - :param container_type: Required. Type of the container. The value of this property for: 1. + :vartype registration_status: str + :ivar health_status: Status of health of the container. + :vartype health_status: str + :ivar container_type: Required. Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload - Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", + Backup is VMAppContainer.Constant filled by server. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - :param can_re_register: Can the container be registered one more time. - :type can_re_register: bool - :param container_id: ContainerID represents the container. - :type container_id: long - :param protected_item_count: Number of items backed up in this container. - :type protected_item_count: long - :param agent_version: Agent version of this container. - :type agent_version: str - :param extended_info: Additional information for this container. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.MabContainerExtendedInfo - :param mab_container_health_details: Health details on this mab container. - :type mab_container_health_details: + :vartype container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + :ivar can_re_register: Can the container be registered one more time. + :vartype can_re_register: bool + :ivar container_id: ContainerID represents the container. + :vartype container_id: long + :ivar protected_item_count: Number of items backed up in this container. + :vartype protected_item_count: long + :ivar agent_version: Agent version of this container. + :vartype agent_version: str + :ivar extended_info: Additional information for this container. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.MabContainerExtendedInfo + :ivar mab_container_health_details: Health details on this mab container. + :vartype mab_container_health_details: list[~azure.mgmt.recoveryservicesbackup.models.MABContainerHealthDetails] - :param container_health_state: Health state of mab container. - :type container_health_state: str + :ivar container_health_state: Health state of mab container. + :vartype container_health_state: str """ _validation = { @@ -12199,6 +14989,7 @@ class MabContainer(ProtectionContainer): 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, 'health_status': {'key': 'healthStatus', 'type': 'str'}, 'container_type': {'key': 'containerType', 'type': 'str'}, + 'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'}, 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, 'container_id': {'key': 'containerId', 'type': 'long'}, 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, @@ -12215,6 +15006,7 @@ def __init__( backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, registration_status: Optional[str] = None, health_status: Optional[str] = None, + protectable_object_type: Optional[str] = None, can_re_register: Optional[bool] = None, container_id: Optional[int] = None, protected_item_count: Optional[int] = None, @@ -12224,7 +15016,39 @@ def __init__( container_health_state: Optional[str] = None, **kwargs ): - super(MabContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs) + """ + :keyword friendly_name: Friendly name of the container. + :paramtype friendly_name: str + :keyword backup_management_type: Type of backup management for the container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword registration_status: Status of registration of the container with the Recovery + Services Vault. + :paramtype registration_status: str + :keyword health_status: Status of health of the container. + :paramtype health_status: str + :keyword protectable_object_type: Type of the protectable object associated with this + container. + :paramtype protectable_object_type: str + :keyword can_re_register: Can the container be registered one more time. + :paramtype can_re_register: bool + :keyword container_id: ContainerID represents the container. + :paramtype container_id: long + :keyword protected_item_count: Number of items backed up in this container. + :paramtype protected_item_count: long + :keyword agent_version: Agent version of this container. + :paramtype agent_version: str + :keyword extended_info: Additional information for this container. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.MabContainerExtendedInfo + :keyword mab_container_health_details: Health details on this mab container. + :paramtype mab_container_health_details: + list[~azure.mgmt.recoveryservicesbackup.models.MABContainerHealthDetails] + :keyword container_health_state: Health state of mab container. + :paramtype container_health_state: str + """ + super(MabContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, protectable_object_type=protectable_object_type, **kwargs) self.container_type = 'Windows' # type: str self.can_re_register = can_re_register self.container_id = container_id @@ -12238,19 +15062,19 @@ def __init__( class MabContainerExtendedInfo(msrest.serialization.Model): """Additional information of the container. - :param last_refreshed_at: Time stamp when this container was refreshed. - :type last_refreshed_at: ~datetime.datetime - :param backup_item_type: Type of backup items associated with this container. Possible values + :ivar last_refreshed_at: Time stamp when this container was refreshed. + :vartype last_refreshed_at: ~datetime.datetime + :ivar backup_item_type: Type of backup items associated with this container. Possible values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase". - :type backup_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupItemType - :param backup_items: List of backup items associated with this container. - :type backup_items: list[str] - :param policy_name: Backup policy associated with this container. - :type policy_name: str - :param last_backup_status: Latest backup status of this container. - :type last_backup_status: str + :vartype backup_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupItemType + :ivar backup_items: List of backup items associated with this container. + :vartype backup_items: list[str] + :ivar policy_name: Backup policy associated with this container. + :vartype policy_name: str + :ivar last_backup_status: Latest backup status of this container. + :vartype last_backup_status: str """ _attribute_map = { @@ -12271,6 +15095,21 @@ def __init__( last_backup_status: Optional[str] = None, **kwargs ): + """ + :keyword last_refreshed_at: Time stamp when this container was refreshed. + :paramtype last_refreshed_at: ~datetime.datetime + :keyword backup_item_type: Type of backup items associated with this container. Possible values + include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", + "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype backup_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupItemType + :keyword backup_items: List of backup items associated with this container. + :paramtype backup_items: list[str] + :keyword policy_name: Backup policy associated with this container. + :paramtype policy_name: str + :keyword last_backup_status: Latest backup status of this container. + :paramtype last_backup_status: str + """ super(MabContainerExtendedInfo, self).__init__(**kwargs) self.last_refreshed_at = last_refreshed_at self.backup_item_type = backup_item_type @@ -12282,14 +15121,14 @@ def __init__( class MABContainerHealthDetails(msrest.serialization.Model): """MAB workload-specific Health Details. - :param code: Health Code. - :type code: int - :param title: Health Title. - :type title: str - :param message: Health Message. - :type message: str - :param recommendations: Health Recommended Actions. - :type recommendations: list[str] + :ivar code: Health Code. + :vartype code: int + :ivar title: Health Title. + :vartype title: str + :ivar message: Health Message. + :vartype message: str + :ivar recommendations: Health Recommended Actions. + :vartype recommendations: list[str] """ _attribute_map = { @@ -12308,6 +15147,16 @@ def __init__( recommendations: Optional[List[str]] = None, **kwargs ): + """ + :keyword code: Health Code. + :paramtype code: int + :keyword title: Health Title. + :paramtype title: str + :keyword message: Health Message. + :paramtype message: str + :keyword recommendations: Health Recommended Actions. + :paramtype recommendations: list[str] + """ super(MABContainerHealthDetails, self).__init__(**kwargs) self.code = code self.title = title @@ -12340,6 +15189,8 @@ def __init__( self, **kwargs ): + """ + """ super(MabErrorInfo, self).__init__(**kwargs) self.error_string = None self.recommendations = None @@ -12350,62 +15201,66 @@ class MabFileFolderProtectedItem(ProtectedItem): 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", + :ivar protected_item_type: Required. backup item type.Constant filled by server. + :vartype protected_item_type: str + :ivar 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 + :vartype 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 + :ivar 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". + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar container_name: Unique name of container. + :vartype container_name: str + :ivar source_resource_id: ARM ID of the resource to be backed up. + :vartype source_resource_id: str + :ivar policy_id: ID of the backup policy with which this item is backed up. + :vartype policy_id: str + :ivar 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 + :vartype last_recovery_point: ~datetime.datetime + :ivar backup_set_name: Name of the backup set the backup item belongs to. + :vartype backup_set_name: str + :ivar 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 + :vartype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :ivar deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :vartype deferred_delete_time_in_utc: ~datetime.datetime + :ivar 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 + :vartype is_scheduled_for_deferred_delete: bool + :ivar 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 this backup item. - :type friendly_name: str - :param computer_name: Name of the computer associated with this backup item. - :type computer_name: str - :param last_backup_status: Status of last backup operation. - :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 protection_state: Protected, ProtectionStopped, IRPending or ProtectionError. - :type protection_state: str - :param deferred_delete_sync_time_in_utc: Sync time for deferred deletion in UTC. - :type deferred_delete_sync_time_in_utc: long - :param extended_info: Additional information with this backup item. - :type extended_info: + :vartype deferred_delete_time_remaining: str + :ivar is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS is + to be purged soon. + :vartype is_deferred_delete_schedule_upcoming: bool + :ivar is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. + :vartype is_rehydrate: bool + :ivar resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check will + be performed. + :vartype resource_guard_operation_requests: list[str] + :ivar is_archive_enabled: Flag to identify whether datasource is protected in archive. + :vartype is_archive_enabled: bool + :ivar policy_name: Name of the policy used for protection. + :vartype policy_name: str + :ivar friendly_name: Friendly name of this backup item. + :vartype friendly_name: str + :ivar computer_name: Name of the computer associated with this backup item. + :vartype computer_name: str + :ivar last_backup_status: Status of last backup operation. + :vartype last_backup_status: str + :ivar last_backup_time: Timestamp of the last backup operation on this backup item. + :vartype last_backup_time: ~datetime.datetime + :ivar protection_state: Protected, ProtectionStopped, IRPending or ProtectionError. + :vartype protection_state: str + :ivar deferred_delete_sync_time_in_utc: Sync time for deferred deletion in UTC. + :vartype deferred_delete_sync_time_in_utc: long + :ivar extended_info: Additional information with this backup item. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.MabFileFolderProtectedItemExtendedInfo """ @@ -12429,6 +15284,8 @@ class MabFileFolderProtectedItem(ProtectedItem): 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'computer_name': {'key': 'computerName', 'type': 'str'}, 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, @@ -12455,6 +15312,8 @@ def __init__( is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, resource_guard_operation_requests: Optional[List[str]] = None, + is_archive_enabled: Optional[bool] = None, + policy_name: Optional[str] = None, friendly_name: Optional[str] = None, computer_name: Optional[str] = None, last_backup_status: Optional[str] = None, @@ -12464,7 +15323,69 @@ def __init__( extended_info: Optional["MabFileFolderProtectedItemExtendedInfo"] = None, **kwargs ): - super(MabFileFolderProtectedItem, 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) + """ + :keyword backup_management_type: Type of backup management for the backed up item. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword 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". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword container_name: Unique name of container. + :paramtype container_name: str + :keyword source_resource_id: ARM ID of the resource to be backed up. + :paramtype source_resource_id: str + :keyword policy_id: ID of the backup policy with which this item is backed up. + :paramtype policy_id: str + :keyword last_recovery_point: Timestamp when the last (latest) backup copy was created for this + backup item. + :paramtype last_recovery_point: ~datetime.datetime + :keyword backup_set_name: Name of the backup set the backup item belongs to. + :paramtype backup_set_name: str + :keyword 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". + :paramtype create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode + :keyword deferred_delete_time_in_utc: Time for deferred deletion in UTC. + :paramtype deferred_delete_time_in_utc: ~datetime.datetime + :keyword is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for + deferred delete. + :paramtype is_scheduled_for_deferred_delete: bool + :keyword deferred_delete_time_remaining: Time remaining before the DS marked for deferred + delete is permanently deleted. + :paramtype deferred_delete_time_remaining: str + :keyword is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS + is to be purged soon. + :paramtype is_deferred_delete_schedule_upcoming: bool + :keyword is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause + state. + :paramtype is_rehydrate: bool + :keyword resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :paramtype resource_guard_operation_requests: list[str] + :keyword is_archive_enabled: Flag to identify whether datasource is protected in archive. + :paramtype is_archive_enabled: bool + :keyword policy_name: Name of the policy used for protection. + :paramtype policy_name: str + :keyword friendly_name: Friendly name of this backup item. + :paramtype friendly_name: str + :keyword computer_name: Name of the computer associated with this backup item. + :paramtype computer_name: str + :keyword last_backup_status: Status of last backup operation. + :paramtype last_backup_status: str + :keyword last_backup_time: Timestamp of the last backup operation on this backup item. + :paramtype last_backup_time: ~datetime.datetime + :keyword protection_state: Protected, ProtectionStopped, IRPending or ProtectionError. + :paramtype protection_state: str + :keyword deferred_delete_sync_time_in_utc: Sync time for deferred deletion in UTC. + :paramtype deferred_delete_sync_time_in_utc: long + :keyword extended_info: Additional information with this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.models.MabFileFolderProtectedItemExtendedInfo + """ + super(MabFileFolderProtectedItem, 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, is_archive_enabled=is_archive_enabled, policy_name=policy_name, **kwargs) self.protected_item_type = 'MabFileFolderProtectedItem' # type: str self.friendly_name = friendly_name self.computer_name = computer_name @@ -12478,12 +15399,12 @@ def __init__( class MabFileFolderProtectedItemExtendedInfo(msrest.serialization.Model): """Additional information on the backed up item. - :param last_refreshed_at: Last time when the agent data synced to service. - :type last_refreshed_at: ~datetime.datetime - :param oldest_recovery_point: The oldest backup copy available. - :type oldest_recovery_point: ~datetime.datetime - :param recovery_point_count: Number of backup copies associated with the backup item. - :type recovery_point_count: int + :ivar last_refreshed_at: Last time when the agent data synced to service. + :vartype last_refreshed_at: ~datetime.datetime + :ivar oldest_recovery_point: The oldest backup copy available. + :vartype oldest_recovery_point: ~datetime.datetime + :ivar recovery_point_count: Number of backup copies associated with the backup item. + :vartype recovery_point_count: int """ _attribute_map = { @@ -12500,6 +15421,14 @@ def __init__( recovery_point_count: Optional[int] = None, **kwargs ): + """ + :keyword last_refreshed_at: Last time when the agent data synced to service. + :paramtype last_refreshed_at: ~datetime.datetime + :keyword oldest_recovery_point: The oldest backup copy available. + :paramtype oldest_recovery_point: ~datetime.datetime + :keyword recovery_point_count: Number of backup copies associated with the backup item. + :paramtype recovery_point_count: int + """ super(MabFileFolderProtectedItemExtendedInfo, self).__init__(**kwargs) self.last_refreshed_at = last_refreshed_at self.oldest_recovery_point = oldest_recovery_point @@ -12511,46 +15440,47 @@ class MabJob(Job): All required parameters must be populated in order to send to Azure. - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param activity_id: ActivityId of job. - :type activity_id: str - :param job_type: Required. This property will be used as the discriminator for deciding the + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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 job_type: str - :param duration: Time taken by job to run. - :type duration: ~datetime.timedelta - :param actions_info: The state/actions applicable on jobs like cancel/retry. - :type actions_info: list[str or ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] - :param mab_server_name: Name of server protecting the DS. - :type mab_server_name: str - :param mab_server_type: Server type of MAB container. Possible values include: "Invalid", + :vartype job_type: str + :ivar duration: Time taken by job to run. + :vartype duration: ~datetime.timedelta + :ivar actions_info: The state/actions applicable on jobs like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :ivar mab_server_name: Name of server protecting the DS. + :vartype mab_server_name: str + :ivar mab_server_type: Server type of MAB container. Possible values include: "Invalid", "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type mab_server_type: str or ~azure.mgmt.recoveryservicesbackup.models.MabServerType - :param workload_type: Workload type of backup item. Possible values include: "Invalid", "VM", + :vartype mab_server_type: str or ~azure.mgmt.recoveryservicesbackup.models.MabServerType + :ivar workload_type: Workload type of backup item. 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.WorkloadType - :param error_details: The errors. - :type error_details: list[~azure.mgmt.recoveryservicesbackup.models.MabErrorInfo] - :param extended_info: Additional information on the job. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.MabJobExtendedInfo + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :ivar error_details: The errors. + :vartype error_details: list[~azure.mgmt.recoveryservicesbackup.models.MabErrorInfo] + :ivar extended_info: Additional information on the job. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.MabJobExtendedInfo """ _validation = { @@ -12594,6 +15524,47 @@ def __init__( extended_info: Optional["MabJobExtendedInfo"] = None, **kwargs ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time taken by job to run. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: The state/actions applicable on jobs like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :keyword mab_server_name: Name of server protecting the DS. + :paramtype mab_server_name: str + :keyword mab_server_type: Server type of MAB container. Possible values include: "Invalid", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :paramtype mab_server_type: str or ~azure.mgmt.recoveryservicesbackup.models.MabServerType + :keyword workload_type: Workload type of backup item. Possible values include: "Invalid", "VM", + "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", + "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", + "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + :keyword error_details: The errors. + :paramtype error_details: list[~azure.mgmt.recoveryservicesbackup.models.MabErrorInfo] + :keyword extended_info: Additional information on the job. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.MabJobExtendedInfo + """ super(MabJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) self.job_type = 'MabJob' # type: str self.duration = duration @@ -12608,12 +15579,12 @@ def __init__( class MabJobExtendedInfo(msrest.serialization.Model): """Additional information for the MAB workload-specific job. - :param tasks_list: List of tasks for this job. - :type tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.MabJobTaskDetails] - :param property_bag: The job properties. - :type property_bag: dict[str, str] - :param dynamic_error_message: Non localized error message specific to this job. - :type dynamic_error_message: str + :ivar tasks_list: List of tasks for this job. + :vartype tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.MabJobTaskDetails] + :ivar property_bag: The job properties. + :vartype property_bag: dict[str, str] + :ivar dynamic_error_message: Non localized error message specific to this job. + :vartype dynamic_error_message: str """ _attribute_map = { @@ -12630,6 +15601,14 @@ def __init__( dynamic_error_message: Optional[str] = None, **kwargs ): + """ + :keyword tasks_list: List of tasks for this job. + :paramtype tasks_list: list[~azure.mgmt.recoveryservicesbackup.models.MabJobTaskDetails] + :keyword property_bag: The job properties. + :paramtype property_bag: dict[str, str] + :keyword dynamic_error_message: Non localized error message specific to this job. + :paramtype dynamic_error_message: str + """ super(MabJobExtendedInfo, self).__init__(**kwargs) self.tasks_list = tasks_list self.property_bag = property_bag @@ -12639,16 +15618,16 @@ def __init__( class MabJobTaskDetails(msrest.serialization.Model): """MAB workload-specific job task details. - :param task_id: The task display name. - :type task_id: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param duration: Time elapsed for task. - :type duration: ~datetime.timedelta - :param status: The status. - :type status: str + :ivar task_id: The task display name. + :vartype task_id: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar duration: Time elapsed for task. + :vartype duration: ~datetime.timedelta + :ivar status: The status. + :vartype status: str """ _attribute_map = { @@ -12669,6 +15648,18 @@ def __init__( status: Optional[str] = None, **kwargs ): + """ + :keyword task_id: The task display name. + :paramtype task_id: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword duration: Time elapsed for task. + :paramtype duration: ~datetime.timedelta + :keyword status: The status. + :paramtype status: str + """ super(MabJobTaskDetails, self).__init__(**kwargs) self.task_id = task_id self.start_time = start_time @@ -12682,17 +15673,17 @@ class MabProtectionPolicy(ProtectionPolicy): All required parameters must be populated in order to send to Azure. - :param protected_items_count: Number of items associated with this policy. - :type protected_items_count: int - :param backup_management_type: Required. This property will be used as the discriminator for + :ivar protected_items_count: Number of items associated with this policy. + :vartype protected_items_count: int + :ivar backup_management_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 backup_management_type: str - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] - :param schedule_policy: Backup schedule of backup policy. - :type schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy - :param retention_policy: Retention policy details. - :type retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + :ivar schedule_policy: Backup schedule of backup policy. + :vartype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :ivar retention_policy: Retention policy details. + :vartype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy """ _validation = { @@ -12716,6 +15707,16 @@ def __init__( retention_policy: Optional["RetentionPolicy"] = None, **kwargs ): + """ + :keyword protected_items_count: Number of items associated with this policy. + :paramtype protected_items_count: int + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + :keyword schedule_policy: Backup schedule of backup policy. + :paramtype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :keyword retention_policy: Retention policy details. + :paramtype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + """ super(MabProtectionPolicy, self).__init__(protected_items_count=protected_items_count, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.backup_management_type = 'MAB' # type: str self.schedule_policy = schedule_policy @@ -12725,19 +15726,20 @@ def __init__( class MonthlyRetentionSchedule(msrest.serialization.Model): """Monthly retention schedule. - :param retention_schedule_format_type: Retention schedule format type for monthly retention + :ivar retention_schedule_format_type: Retention schedule format type for monthly retention policy. Possible values include: "Invalid", "Daily", "Weekly". - :type retention_schedule_format_type: str or + :vartype retention_schedule_format_type: str or ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat - :param retention_schedule_daily: Daily retention format for monthly retention policy. - :type retention_schedule_daily: ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat - :param retention_schedule_weekly: Weekly retention format for monthly retention policy. - :type retention_schedule_weekly: + :ivar retention_schedule_daily: Daily retention format for monthly retention policy. + :vartype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat + :ivar retention_schedule_weekly: Weekly retention format for monthly retention policy. + :vartype retention_schedule_weekly: ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat - :param retention_times: Retention times of retention policy. - :type retention_times: list[~datetime.datetime] - :param retention_duration: Retention duration of retention Policy. - :type retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + :ivar retention_times: Retention times of retention policy. + :vartype retention_times: list[~datetime.datetime] + :ivar retention_duration: Retention duration of retention Policy. + :vartype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -12758,6 +15760,22 @@ def __init__( retention_duration: Optional["RetentionDuration"] = None, **kwargs ): + """ + :keyword retention_schedule_format_type: Retention schedule format type for monthly retention + policy. Possible values include: "Invalid", "Daily", "Weekly". + :paramtype retention_schedule_format_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat + :keyword retention_schedule_daily: Daily retention format for monthly retention policy. + :paramtype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat + :keyword retention_schedule_weekly: Weekly retention format for monthly retention policy. + :paramtype retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat + :keyword retention_times: Retention times of retention policy. + :paramtype retention_times: list[~datetime.datetime] + :keyword retention_duration: Retention duration of retention Policy. + :paramtype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ super(MonthlyRetentionSchedule, self).__init__(**kwargs) self.retention_schedule_format_type = retention_schedule_format_type self.retention_schedule_daily = retention_schedule_daily @@ -12769,14 +15787,16 @@ def __init__( class MoveRPAcrossTiersRequest(msrest.serialization.Model): """MoveRPAcrossTiersRequest. - :param object_type: Gets the class type. - :type object_type: str - :param source_tier_type: Source tier from where RP needs to be moved. Possible values include: + :ivar object_type: Gets the class type. + :vartype object_type: str + :ivar source_tier_type: Source tier from where RP needs to be moved. Possible values include: "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". - :type source_tier_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType - :param target_tier_type: Target tier where RP needs to be moved. Possible values include: + :vartype source_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :ivar target_tier_type: Target tier where RP needs to be moved. Possible values include: "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". - :type target_tier_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :vartype target_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType """ _attribute_map = { @@ -12793,6 +15813,18 @@ def __init__( target_tier_type: Optional[Union[str, "RecoveryPointTierType"]] = None, **kwargs ): + """ + :keyword object_type: Gets the class type. + :paramtype object_type: str + :keyword source_tier_type: Source tier from where RP needs to be moved. Possible values + include: "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". + :paramtype source_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :keyword target_tier_type: Target tier where RP needs to be moved. Possible values include: + "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". + :paramtype target_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + """ super(MoveRPAcrossTiersRequest, self).__init__(**kwargs) self.object_type = object_type self.source_tier_type = source_tier_type @@ -12802,10 +15834,10 @@ def __init__( class NameInfo(msrest.serialization.Model): """The name of usage. - :param value: Value of usage. - :type value: str - :param localized_value: Localized value of usage. - :type localized_value: str + :ivar value: Value of usage. + :vartype value: str + :ivar localized_value: Localized value of usage. + :vartype localized_value: str """ _attribute_map = { @@ -12820,6 +15852,12 @@ def __init__( localized_value: Optional[str] = None, **kwargs ): + """ + :keyword value: Value of usage. + :paramtype value: str + :keyword localized_value: Localized value of usage. + :paramtype localized_value: str + """ super(NameInfo, self).__init__(**kwargs) self.value = value self.localized_value = localized_value @@ -12828,8 +15866,8 @@ def __init__( class NewErrorResponse(msrest.serialization.Model): """The resource management error response. - :param error: The error object. - :type error: ~azure.mgmt.recoveryservicesbackup.models.NewErrorResponseError + :ivar error: The error object. + :vartype error: ~azure.mgmt.recoveryservicesbackup.models.NewErrorResponseError """ _attribute_map = { @@ -12842,31 +15880,14 @@ def __init__( error: Optional["NewErrorResponseError"] = None, **kwargs ): + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.recoveryservicesbackup.models.NewErrorResponseError + """ super(NewErrorResponse, self).__init__(**kwargs) 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. @@ -12904,6 +15925,8 @@ def __init__( self, **kwargs ): + """ + """ super(NewErrorResponseError, self).__init__(**kwargs) self.code = None self.message = None @@ -12912,61 +15935,16 @@ 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. 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 + :ivar 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 job_list: List of jobs created by this operation. - :type job_list: list[str] + :vartype object_type: str + :ivar job_list: List of jobs created by this operation. + :vartype job_list: list[str] """ _validation = { @@ -12984,6 +15962,10 @@ def __init__( job_list: Optional[List[str]] = None, **kwargs ): + """ + :keyword job_list: List of jobs created by this operation. + :paramtype job_list: list[str] + """ super(OperationResultInfo, self).__init__(**kwargs) self.object_type = 'OperationResultInfo' # type: str self.job_list = job_list @@ -12992,7 +15974,7 @@ def __init__( class OperationWorkerResponse(msrest.serialization.Model): """This is the base class for operation result responses. - :param status_code: HTTP Status Code of the operation. Possible values include: "Continue", + :ivar status_code: HTTP Status Code of the operation. Possible values include: "Continue", "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", @@ -13003,9 +15985,9 @@ class OperationWorkerResponse(msrest.serialization.Model): "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", "HttpVersionNotSupported". - :type status_code: str or ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode - :param headers: HTTP headers associated with this operation. - :type headers: dict[str, list[str]] + :vartype status_code: str or ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode + :ivar headers: HTTP headers associated with this operation. + :vartype headers: dict[str, list[str]] """ _attribute_map = { @@ -13020,6 +16002,22 @@ def __init__( headers: Optional[Dict[str, List[str]]] = None, **kwargs ): + """ + :keyword status_code: HTTP Status Code of the operation. Possible values include: "Continue", + "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", + "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", + "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", + "TemporaryRedirect", "RedirectKeepVerb", "BadRequest", "Unauthorized", "PaymentRequired", + "Forbidden", "NotFound", "MethodNotAllowed", "NotAcceptable", "ProxyAuthenticationRequired", + "RequestTimeout", "Conflict", "Gone", "LengthRequired", "PreconditionFailed", + "RequestEntityTooLarge", "RequestUriTooLong", "UnsupportedMediaType", + "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", + "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", + "HttpVersionNotSupported". + :paramtype status_code: str or ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode + :keyword headers: HTTP headers associated with this operation. + :paramtype headers: dict[str, list[str]] + """ super(OperationWorkerResponse, self).__init__(**kwargs) self.status_code = status_code self.headers = headers @@ -13028,7 +16026,7 @@ def __init__( class OperationResultInfoBaseResource(OperationWorkerResponse): """Base class for operation result info. - :param status_code: HTTP Status Code of the operation. Possible values include: "Continue", + :ivar status_code: HTTP Status Code of the operation. Possible values include: "Continue", "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", @@ -13039,11 +16037,11 @@ class OperationResultInfoBaseResource(OperationWorkerResponse): "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", "HttpVersionNotSupported". - :type status_code: str or ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode - :param headers: HTTP headers associated with this operation. - :type headers: dict[str, list[str]] - :param operation: OperationResultInfoBaseResource operation. - :type operation: ~azure.mgmt.recoveryservicesbackup.models.OperationResultInfoBase + :vartype status_code: str or ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode + :ivar headers: HTTP headers associated with this operation. + :vartype headers: dict[str, list[str]] + :ivar operation: OperationResultInfoBaseResource operation. + :vartype operation: ~azure.mgmt.recoveryservicesbackup.models.OperationResultInfoBase """ _attribute_map = { @@ -13060,6 +16058,24 @@ def __init__( operation: Optional["OperationResultInfoBase"] = None, **kwargs ): + """ + :keyword status_code: HTTP Status Code of the operation. Possible values include: "Continue", + "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", + "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", + "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", + "TemporaryRedirect", "RedirectKeepVerb", "BadRequest", "Unauthorized", "PaymentRequired", + "Forbidden", "NotFound", "MethodNotAllowed", "NotAcceptable", "ProxyAuthenticationRequired", + "RequestTimeout", "Conflict", "Gone", "LengthRequired", "PreconditionFailed", + "RequestEntityTooLarge", "RequestUriTooLong", "UnsupportedMediaType", + "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", + "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", + "HttpVersionNotSupported". + :paramtype status_code: str or ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode + :keyword headers: HTTP headers associated with this operation. + :paramtype headers: dict[str, list[str]] + :keyword operation: OperationResultInfoBaseResource operation. + :paramtype operation: ~azure.mgmt.recoveryservicesbackup.models.OperationResultInfoBase + """ super(OperationResultInfoBaseResource, self).__init__(status_code=status_code, headers=headers, **kwargs) self.operation = operation @@ -13067,21 +16083,21 @@ def __init__( class OperationStatus(msrest.serialization.Model): """Operation status. - :param id: ID of the operation. - :type id: str - :param name: Name of the operation. - :type name: str - :param status: Operation status. Possible values include: "Invalid", "InProgress", "Succeeded", + :ivar id: ID of the operation. + :vartype id: str + :ivar name: Name of the operation. + :vartype name: str + :ivar status: Operation status. Possible values include: "Invalid", "InProgress", "Succeeded", "Failed", "Canceled". - :type status: str or ~azure.mgmt.recoveryservicesbackup.models.OperationStatusValues - :param start_time: Operation start time. Format: ISO-8601. - :type start_time: ~datetime.datetime - :param end_time: Operation end time. Format: ISO-8601. - :type end_time: ~datetime.datetime - :param error: Error information related to this operation. - :type error: ~azure.mgmt.recoveryservicesbackup.models.OperationStatusError - :param properties: Additional information associated with this operation. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.OperationStatusExtendedInfo + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.models.OperationStatusValues + :ivar start_time: Operation start time. Format: ISO-8601. + :vartype start_time: ~datetime.datetime + :ivar end_time: Operation end time. Format: ISO-8601. + :vartype end_time: ~datetime.datetime + :ivar error: Error information related to this operation. + :vartype error: ~azure.mgmt.recoveryservicesbackup.models.OperationStatusError + :ivar properties: Additional information associated with this operation. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.OperationStatusExtendedInfo """ _attribute_map = { @@ -13106,6 +16122,23 @@ def __init__( properties: Optional["OperationStatusExtendedInfo"] = None, **kwargs ): + """ + :keyword id: ID of the operation. + :paramtype id: str + :keyword name: Name of the operation. + :paramtype name: str + :keyword status: Operation status. Possible values include: "Invalid", "InProgress", + "Succeeded", "Failed", "Canceled". + :paramtype status: str or ~azure.mgmt.recoveryservicesbackup.models.OperationStatusValues + :keyword start_time: Operation start time. Format: ISO-8601. + :paramtype start_time: ~datetime.datetime + :keyword end_time: Operation end time. Format: ISO-8601. + :paramtype end_time: ~datetime.datetime + :keyword error: Error information related to this operation. + :paramtype error: ~azure.mgmt.recoveryservicesbackup.models.OperationStatusError + :keyword properties: Additional information associated with this operation. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.OperationStatusExtendedInfo + """ super(OperationStatus, self).__init__(**kwargs) self.id = id self.name = name @@ -13119,10 +16152,10 @@ def __init__( class OperationStatusError(msrest.serialization.Model): """Error information associated with operation status call. - :param code: Error code of the operation failure. - :type code: str - :param message: Error message displayed if the operation failure. - :type message: str + :ivar code: Error code of the operation failure. + :vartype code: str + :ivar message: Error message displayed if the operation failure. + :vartype message: str """ _attribute_map = { @@ -13137,6 +16170,12 @@ def __init__( message: Optional[str] = None, **kwargs ): + """ + :keyword code: Error code of the operation failure. + :paramtype code: str + :keyword message: Error message displayed if the operation failure. + :paramtype message: str + """ super(OperationStatusError, self).__init__(**kwargs) self.code = code self.message = message @@ -13146,13 +16185,13 @@ 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, OperationStatusValidateOperationExtendedInfo. 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 + :ivar 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 + :vartype object_type: str """ _validation = { @@ -13164,13 +16203,15 @@ 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', 'OperationStatusValidateOperationExtendedInfo': 'OperationStatusValidateOperationExtendedInfo'} } def __init__( self, **kwargs ): + """ + """ super(OperationStatusExtendedInfo, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -13180,11 +16221,11 @@ class OperationStatusJobExtendedInfo(OperationStatusExtendedInfo): 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 + :ivar 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 job_id: ID of the job created for this protected item. - :type job_id: str + :vartype object_type: str + :ivar job_id: ID of the job created for this protected item. + :vartype job_id: str """ _validation = { @@ -13202,6 +16243,10 @@ def __init__( job_id: Optional[str] = None, **kwargs ): + """ + :keyword job_id: ID of the job created for this protected item. + :paramtype job_id: str + """ super(OperationStatusJobExtendedInfo, self).__init__(**kwargs) self.object_type = 'OperationStatusJobExtendedInfo' # type: str self.job_id = job_id @@ -13212,13 +16257,13 @@ class OperationStatusJobsExtendedInfo(OperationStatusExtendedInfo): 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 + :ivar 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 job_ids: IDs of the jobs created for the protected item. - :type job_ids: list[str] - :param failed_jobs_error: Stores all the failed jobs along with the corresponding error codes. - :type failed_jobs_error: dict[str, str] + :vartype object_type: str + :ivar job_ids: IDs of the jobs created for the protected item. + :vartype job_ids: list[str] + :ivar failed_jobs_error: Stores all the failed jobs along with the corresponding error codes. + :vartype failed_jobs_error: dict[str, str] """ _validation = { @@ -13238,6 +16283,13 @@ def __init__( failed_jobs_error: Optional[Dict[str, str]] = None, **kwargs ): + """ + :keyword job_ids: IDs of the jobs created for the protected item. + :paramtype job_ids: list[str] + :keyword failed_jobs_error: Stores all the failed jobs along with the corresponding error + codes. + :paramtype failed_jobs_error: dict[str, str] + """ super(OperationStatusJobsExtendedInfo, self).__init__(**kwargs) self.object_type = 'OperationStatusJobsExtendedInfo' # type: str self.job_ids = job_ids @@ -13249,11 +16301,11 @@ class OperationStatusProvisionILRExtendedInfo(OperationStatusExtendedInfo): 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 + :ivar 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_target: Target details for file / folder restore. - :type recovery_target: ~azure.mgmt.recoveryservicesbackup.models.InstantItemRecoveryTarget + :vartype object_type: str + :ivar recovery_target: Target details for file / folder restore. + :vartype recovery_target: ~azure.mgmt.recoveryservicesbackup.models.InstantItemRecoveryTarget """ _validation = { @@ -13271,24 +16323,26 @@ def __init__( recovery_target: Optional["InstantItemRecoveryTarget"] = None, **kwargs ): + """ + :keyword recovery_target: Target details for file / folder restore. + :paramtype recovery_target: ~azure.mgmt.recoveryservicesbackup.models.InstantItemRecoveryTarget + """ super(OperationStatusProvisionILRExtendedInfo, self).__init__(**kwargs) self.object_type = 'OperationStatusProvisionILRExtendedInfo' # type: str self.recovery_target = recovery_target -class OperationStatusRecoveryPointExtendedInfo(OperationStatusExtendedInfo): - """Operation status extended info for Updated Recovery Point. +class OperationStatusValidateOperationExtendedInfo(OperationStatusExtendedInfo): + """Operation status extended info for ValidateOperation action. 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 + :ivar 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 + :vartype object_type: str + :ivar validate_operation_response: Gets the validation operation response. + :vartype validate_operation_response: + ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationResponse """ _validation = { @@ -13297,30 +16351,32 @@ class OperationStatusRecoveryPointExtendedInfo(OperationStatusExtendedInfo): _attribute_map = { 'object_type': {'key': 'objectType', 'type': 'str'}, - 'updated_recovery_point': {'key': 'updatedRecoveryPoint', 'type': 'RecoveryPoint'}, - 'deleted_backup_item_version': {'key': 'deletedBackupItemVersion', 'type': 'str'}, + 'validate_operation_response': {'key': 'validateOperationResponse', 'type': 'ValidateOperationResponse'}, } def __init__( self, *, - updated_recovery_point: Optional["RecoveryPoint"] = None, - deleted_backup_item_version: Optional[str] = None, + validate_operation_response: Optional["ValidateOperationResponse"] = 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 + """ + :keyword validate_operation_response: Gets the validation operation response. + :paramtype validate_operation_response: + ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationResponse + """ + super(OperationStatusValidateOperationExtendedInfo, self).__init__(**kwargs) + self.object_type = 'OperationStatusValidateOperationExtendedInfo' # type: str + self.validate_operation_response = validate_operation_response class PointInTimeRange(msrest.serialization.Model): """Provides details for log ranges. - :param start_time: Start time of the time range for log recovery. - :type start_time: ~datetime.datetime - :param end_time: End time of the time range for log recovery. - :type end_time: ~datetime.datetime + :ivar start_time: Start time of the time range for log recovery. + :vartype start_time: ~datetime.datetime + :ivar end_time: End time of the time range for log recovery. + :vartype end_time: ~datetime.datetime """ _attribute_map = { @@ -13335,6 +16391,12 @@ def __init__( end_time: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword start_time: Start time of the time range for log recovery. + :paramtype start_time: ~datetime.datetime + :keyword end_time: End time of the time range for log recovery. + :paramtype end_time: ~datetime.datetime + """ super(PointInTimeRange, self).__init__(**kwargs) self.start_time = start_time self.end_time = end_time @@ -13343,13 +16405,13 @@ def __init__( class PreBackupValidation(msrest.serialization.Model): """Pre-backup validation for Azure VM Workload provider. - :param status: Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values + :ivar status: Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values include: "Invalid", "Success", "Failed". - :type status: str or ~azure.mgmt.recoveryservicesbackup.models.InquiryStatus - :param code: Error code of protectable item. - :type code: str - :param message: Message corresponding to the error code for the protectable item. - :type message: str + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.models.InquiryStatus + :ivar code: Error code of protectable item. + :vartype code: str + :ivar message: Message corresponding to the error code for the protectable item. + :vartype message: str """ _attribute_map = { @@ -13366,6 +16428,15 @@ def __init__( message: Optional[str] = None, **kwargs ): + """ + :keyword status: Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values + include: "Invalid", "Success", "Failed". + :paramtype status: str or ~azure.mgmt.recoveryservicesbackup.models.InquiryStatus + :keyword code: Error code of protectable item. + :paramtype code: str + :keyword message: Message corresponding to the error code for the protectable item. + :paramtype message: str + """ super(PreBackupValidation, self).__init__(**kwargs) self.status = status self.code = code @@ -13377,18 +16448,18 @@ class PrepareDataMoveRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param target_resource_id: Required. ARM Id of target vault. - :type target_resource_id: str - :param target_region: Required. Target Region. - :type target_region: str - :param data_move_level: Required. DataMove Level. Possible values include: "Invalid", "Vault", + :ivar target_resource_id: Required. ARM Id of target vault. + :vartype target_resource_id: str + :ivar target_region: Required. Target Region. + :vartype target_region: str + :ivar data_move_level: Required. DataMove Level. Possible values include: "Invalid", "Vault", "Container". - :type data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel - :param source_container_arm_ids: Source Container ArmIds + :vartype data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel + :ivar source_container_arm_ids: Source Container ArmIds This needs to be populated only if DataMoveLevel is set to container. - :type source_container_arm_ids: list[str] - :param ignore_moved: Ignore the artifacts which are already moved. - :type ignore_moved: bool + :vartype source_container_arm_ids: list[str] + :ivar ignore_moved: Ignore the artifacts which are already moved. + :vartype ignore_moved: bool """ _validation = { @@ -13415,6 +16486,20 @@ def __init__( ignore_moved: Optional[bool] = None, **kwargs ): + """ + :keyword target_resource_id: Required. ARM Id of target vault. + :paramtype target_resource_id: str + :keyword target_region: Required. Target Region. + :paramtype target_region: str + :keyword data_move_level: Required. DataMove Level. Possible values include: "Invalid", + "Vault", "Container". + :paramtype data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel + :keyword source_container_arm_ids: Source Container ArmIds + This needs to be populated only if DataMoveLevel is set to container. + :paramtype source_container_arm_ids: list[str] + :keyword ignore_moved: Ignore the artifacts which are already moved. + :paramtype ignore_moved: bool + """ super(PrepareDataMoveRequest, self).__init__(**kwargs) self.target_resource_id = target_resource_id self.target_region = target_region @@ -13431,9 +16516,9 @@ class VaultStorageConfigOperationResultResponse(msrest.serialization.Model): 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 + :ivar 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 + :vartype object_type: str """ _validation = { @@ -13452,6 +16537,8 @@ def __init__( self, **kwargs ): + """ + """ super(VaultStorageConfigOperationResultResponse, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -13461,13 +16548,13 @@ class PrepareDataMoveResponse(VaultStorageConfigOperationResultResponse): 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 + :ivar 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 correlation_id: Co-relationId for move operation. - :type correlation_id: str - :param source_vault_properties: Source Vault Properties. - :type source_vault_properties: dict[str, str] + :vartype object_type: str + :ivar correlation_id: Co-relationId for move operation. + :vartype correlation_id: str + :ivar source_vault_properties: Source Vault Properties. + :vartype source_vault_properties: dict[str, str] """ _validation = { @@ -13487,6 +16574,12 @@ def __init__( source_vault_properties: Optional[Dict[str, str]] = None, **kwargs ): + """ + :keyword correlation_id: Co-relationId for move operation. + :paramtype correlation_id: str + :keyword source_vault_properties: Source Vault Properties. + :paramtype source_vault_properties: dict[str, str] + """ super(PrepareDataMoveResponse, self).__init__(**kwargs) self.object_type = 'PrepareDataMoveResponse' # type: str self.correlation_id = correlation_id @@ -13502,17 +16595,17 @@ class PreValidateEnableBackupRequest(msrest.serialization.Model): #. VM is already protected #. Any VM related configuration passed in properties. - :param resource_type: ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. Possible values + :ivar resource_type: ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. Possible values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase". - :type resource_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType - :param resource_id: ARM Virtual Machine Id. - :type resource_id: str - :param vault_id: ARM id of the Recovery Services Vault. - :type vault_id: str - :param properties: Configuration of VM if any needs to be validated like OS type etc. - :type properties: str + :vartype resource_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar resource_id: ARM Virtual Machine Id. + :vartype resource_id: str + :ivar vault_id: ARM id of the Recovery Services Vault. + :vartype vault_id: str + :ivar properties: Configuration of VM if any needs to be validated like OS type etc. + :vartype properties: str """ _attribute_map = { @@ -13531,6 +16624,19 @@ def __init__( properties: Optional[str] = None, **kwargs ): + """ + :keyword resource_type: ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. Possible + values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", + "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype resource_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword resource_id: ARM Virtual Machine Id. + :paramtype resource_id: str + :keyword vault_id: ARM id of the Recovery Services Vault. + :paramtype vault_id: str + :keyword properties: Configuration of VM if any needs to be validated like OS type etc. + :paramtype properties: str + """ super(PreValidateEnableBackupRequest, self).__init__(**kwargs) self.resource_type = resource_type self.resource_id = resource_id @@ -13541,21 +16647,21 @@ def __init__( class PreValidateEnableBackupResponse(msrest.serialization.Model): """Response contract for enable backup validation request. - :param status: Validation Status. Possible values include: "Invalid", "Succeeded", "Failed". - :type status: str or ~azure.mgmt.recoveryservicesbackup.models.ValidationStatus - :param error_code: Response error code. - :type error_code: str - :param error_message: Response error message. - :type error_message: str - :param recommendation: Recommended action for user. - :type recommendation: str - :param container_name: Specifies the product specific container name. E.g. + :ivar status: Validation Status. Possible values include: "Invalid", "Succeeded", "Failed". + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.models.ValidationStatus + :ivar error_code: Response error code. + :vartype error_code: str + :ivar error_message: Response error message. + :vartype error_message: str + :ivar recommendation: Recommended action for user. + :vartype recommendation: str + :ivar container_name: Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required for portal. - :type container_name: str - :param protected_item_name: Specifies the product specific ds name. E.g. + :vartype container_name: str + :ivar protected_item_name: Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal. - :type protected_item_name: str + :vartype protected_item_name: str """ _attribute_map = { @@ -13578,6 +16684,23 @@ def __init__( protected_item_name: Optional[str] = None, **kwargs ): + """ + :keyword status: Validation Status. Possible values include: "Invalid", "Succeeded", "Failed". + :paramtype status: str or ~azure.mgmt.recoveryservicesbackup.models.ValidationStatus + :keyword error_code: Response error code. + :paramtype error_code: str + :keyword error_message: Response error message. + :paramtype error_message: str + :keyword recommendation: Recommended action for user. + :paramtype recommendation: str + :keyword container_name: Specifies the product specific container name. E.g. + iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required + for portal. + :paramtype container_name: str + :keyword protected_item_name: Specifies the product specific ds name. E.g. + vm;iaasvmcontainer;rgname;vmname. This is required for portal. + :paramtype protected_item_name: str + """ super(PreValidateEnableBackupResponse, self).__init__(**kwargs) self.status = status self.error_code = error_code @@ -13590,8 +16713,8 @@ def __init__( class PrivateEndpoint(msrest.serialization.Model): """The Private Endpoint network resource that is linked to the Private Endpoint connection. - :param id: Gets or sets id. - :type id: str + :ivar id: Gets or sets id. + :vartype id: str """ _attribute_map = { @@ -13604,6 +16727,10 @@ def __init__( id: Optional[str] = None, **kwargs ): + """ + :keyword id: Gets or sets id. + :paramtype id: str + """ super(PrivateEndpoint, self).__init__(**kwargs) self.id = id @@ -13611,15 +16738,15 @@ def __init__( class PrivateEndpointConnection(msrest.serialization.Model): """Private Endpoint Connection Response Properties. - :param provisioning_state: Gets or sets provisioning state of the private endpoint connection. + :ivar provisioning_state: Gets or sets provisioning state of the private endpoint connection. Possible values include: "Succeeded", "Deleting", "Failed", "Pending". - :type provisioning_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProvisioningState - :param private_endpoint: Gets or sets private endpoint associated with the private endpoint + :vartype provisioning_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProvisioningState + :ivar private_endpoint: Gets or sets private endpoint associated with the private endpoint connection. - :type private_endpoint: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpoint - :param private_link_service_connection_state: Gets or sets private link service connection + :vartype private_endpoint: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpoint + :ivar private_link_service_connection_state: Gets or sets private link service connection state. - :type private_link_service_connection_state: + :vartype private_link_service_connection_state: ~azure.mgmt.recoveryservicesbackup.models.PrivateLinkServiceConnectionState """ @@ -13637,6 +16764,19 @@ def __init__( private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, **kwargs ): + """ + :keyword provisioning_state: Gets or sets provisioning state of the private endpoint + connection. Possible values include: "Succeeded", "Deleting", "Failed", "Pending". + :paramtype provisioning_state: str or + ~azure.mgmt.recoveryservicesbackup.models.ProvisioningState + :keyword private_endpoint: Gets or sets private endpoint associated with the private endpoint + connection. + :paramtype private_endpoint: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpoint + :keyword private_link_service_connection_state: Gets or sets private link service connection + state. + :paramtype private_link_service_connection_state: + ~azure.mgmt.recoveryservicesbackup.models.PrivateLinkServiceConnectionState + """ super(PrivateEndpointConnection, self).__init__(**kwargs) self.provisioning_state = provisioning_state self.private_endpoint = private_endpoint @@ -13655,14 +16795,14 @@ class PrivateEndpointConnectionResource(Resource): :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: PrivateEndpointConnectionResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnection + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: PrivateEndpointConnectionResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnection """ _validation = { @@ -13690,6 +16830,16 @@ def __init__( properties: Optional["PrivateEndpointConnection"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: PrivateEndpointConnectionResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnection + """ super(PrivateEndpointConnectionResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -13697,13 +16847,14 @@ def __init__( class PrivateLinkServiceConnectionState(msrest.serialization.Model): """Private Link Service Connection State. - :param status: Gets or sets the status. Possible values include: "Pending", "Approved", + :ivar status: Gets or sets the status. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". - :type status: str or ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionStatus - :param description: Gets or sets description. - :type description: str - :param action_required: Gets or sets actions required. - :type action_required: str + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionStatus + :ivar description: Gets or sets description. + :vartype description: str + :ivar action_required: Gets or sets actions required. + :vartype action_required: str """ _attribute_map = { @@ -13720,6 +16871,16 @@ def __init__( action_required: Optional[str] = None, **kwargs ): + """ + :keyword status: Gets or sets the status. Possible values include: "Pending", "Approved", + "Rejected", "Disconnected". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionStatus + :keyword description: Gets or sets description. + :paramtype description: str + :keyword action_required: Gets or sets actions required. + :paramtype action_required: str + """ super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) self.status = status self.description = description @@ -13738,14 +16899,14 @@ class ProtectableContainerResource(Resource): :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: ProtectableContainerResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectableContainer + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ProtectableContainerResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectableContainer """ _validation = { @@ -13773,6 +16934,16 @@ def __init__( properties: Optional["ProtectableContainer"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ProtectableContainerResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectableContainer + """ super(ProtectableContainerResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -13780,11 +16951,11 @@ def __init__( class ProtectableContainerResourceList(ResourceList): """List of ProtectableContainer resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResource] """ _attribute_map = { @@ -13799,6 +16970,13 @@ def __init__( value: Optional[List["ProtectableContainerResource"]] = None, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResource] + """ super(ProtectableContainerResourceList, self).__init__(next_link=next_link, **kwargs) self.value = value @@ -13806,31 +16984,31 @@ def __init__( class ProtectedItemQueryObject(msrest.serialization.Model): """Filters to list backup items. - :param health_state: Health State for the backed up item. Possible values include: "Passed", + :ivar health_state: Health State for the backed up item. Possible values include: "Passed", "ActionRequired", "ActionSuggested", "Invalid". - :type health_state: str or ~azure.mgmt.recoveryservicesbackup.models.HealthState - :param backup_management_type: Backup management type for the backed up item. Possible values + :vartype health_state: str or ~azure.mgmt.recoveryservicesbackup.models.HealthState + :ivar 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 + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param item_type: Type of workload this item represents. Possible values include: "Invalid", + :ivar item_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 item_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType - :param policy_name: Backup policy name associated with the backup item. - :type policy_name: str - :param container_name: Name of the container. - :type container_name: str - :param backup_engine_name: Backup Engine name. - :type backup_engine_name: str - :param friendly_name: Friendly name of protected item. - :type friendly_name: str - :param fabric_name: Name of the fabric. - :type fabric_name: str - :param backup_set_name: Name of the backup set. - :type backup_set_name: str + :vartype item_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :ivar policy_name: Backup policy name associated with the backup item. + :vartype policy_name: str + :ivar container_name: Name of the container. + :vartype container_name: str + :ivar backup_engine_name: Backup Engine name. + :vartype backup_engine_name: str + :ivar friendly_name: Friendly name of protected item. + :vartype friendly_name: str + :ivar fabric_name: Name of the fabric. + :vartype fabric_name: str + :ivar backup_set_name: Name of the backup set. + :vartype backup_set_name: str """ _attribute_map = { @@ -13859,6 +17037,33 @@ def __init__( backup_set_name: Optional[str] = None, **kwargs ): + """ + :keyword health_state: Health State for the backed up item. Possible values include: "Passed", + "ActionRequired", "ActionSuggested", "Invalid". + :paramtype health_state: str or ~azure.mgmt.recoveryservicesbackup.models.HealthState + :keyword backup_management_type: Backup management type for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword item_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". + :paramtype item_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType + :keyword policy_name: Backup policy name associated with the backup item. + :paramtype policy_name: str + :keyword container_name: Name of the container. + :paramtype container_name: str + :keyword backup_engine_name: Backup Engine name. + :paramtype backup_engine_name: str + :keyword friendly_name: Friendly name of protected item. + :paramtype friendly_name: str + :keyword fabric_name: Name of the fabric. + :paramtype fabric_name: str + :keyword backup_set_name: Name of the backup set. + :paramtype backup_set_name: str + """ super(ProtectedItemQueryObject, self).__init__(**kwargs) self.health_state = health_state self.backup_management_type = backup_management_type @@ -13883,14 +17088,14 @@ class ProtectedItemResource(Resource): :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: ProtectedItemResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItem + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ProtectedItemResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItem """ _validation = { @@ -13918,6 +17123,16 @@ def __init__( properties: Optional["ProtectedItem"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ProtectedItemResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItem + """ super(ProtectedItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -13925,11 +17140,11 @@ def __init__( class ProtectedItemResourceList(ResourceList): """List of ProtectedItem resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource] """ _attribute_map = { @@ -13944,6 +17159,13 @@ def __init__( value: Optional[List["ProtectedItemResource"]] = None, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource] + """ super(ProtectedItemResourceList, self).__init__(next_link=next_link, **kwargs) self.value = value @@ -13960,14 +17182,14 @@ class ProtectionContainerResource(Resource): :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: ProtectionContainerResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainer + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ProtectionContainerResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainer """ _validation = { @@ -13995,6 +17217,16 @@ def __init__( properties: Optional["ProtectionContainer"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ProtectionContainerResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainer + """ super(ProtectionContainerResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -14002,11 +17234,11 @@ def __init__( class ProtectionContainerResourceList(ResourceList): """List of ProtectionContainer resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource] """ _attribute_map = { @@ -14021,6 +17253,13 @@ def __init__( value: Optional[List["ProtectionContainerResource"]] = None, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource] + """ super(ProtectionContainerResourceList, self).__init__(next_link=next_link, **kwargs) self.value = value @@ -14028,18 +17267,18 @@ def __init__( class ProtectionIntentQueryObject(msrest.serialization.Model): """Filters to list protection intent. - :param backup_management_type: Backup management type for the backed up item. Possible values + :ivar 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 + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param item_type: Type of workload this item represents. Possible values include: "Invalid", + :ivar item_type: Type of workload this item represents. Possible values include: "Invalid", "SQLInstance", "SQLAvailabilityGroupContainer". - :type item_type: str or ~azure.mgmt.recoveryservicesbackup.models.IntentItemType - :param parent_name: Parent name of the intent. - :type parent_name: str - :param item_name: Item name of the intent. - :type item_name: str + :vartype item_type: str or ~azure.mgmt.recoveryservicesbackup.models.IntentItemType + :ivar parent_name: Parent name of the intent. + :vartype parent_name: str + :ivar item_name: Item name of the intent. + :vartype item_name: str """ _attribute_map = { @@ -14058,6 +17297,20 @@ def __init__( item_name: Optional[str] = None, **kwargs ): + """ + :keyword backup_management_type: Backup management type for the backed up item. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword item_type: Type of workload this item represents. Possible values include: "Invalid", + "SQLInstance", "SQLAvailabilityGroupContainer". + :paramtype item_type: str or ~azure.mgmt.recoveryservicesbackup.models.IntentItemType + :keyword parent_name: Parent name of the intent. + :paramtype parent_name: str + :keyword item_name: Item name of the intent. + :paramtype item_name: str + """ super(ProtectionIntentQueryObject, self).__init__(**kwargs) self.backup_management_type = backup_management_type self.item_type = item_type @@ -14077,14 +17330,14 @@ class ProtectionIntentResource(Resource): :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: ProtectionIntentResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntent + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ProtectionIntentResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntent """ _validation = { @@ -14112,6 +17365,16 @@ def __init__( properties: Optional["ProtectionIntent"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ProtectionIntentResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntent + """ super(ProtectionIntentResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -14119,11 +17382,11 @@ def __init__( class ProtectionIntentResourceList(ResourceList): """List of ProtectionIntent resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource] """ _attribute_map = { @@ -14138,6 +17401,13 @@ def __init__( value: Optional[List["ProtectionIntentResource"]] = None, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource] + """ super(ProtectionIntentResourceList, self).__init__(next_link=next_link, **kwargs) self.value = value @@ -14145,18 +17415,18 @@ def __init__( class ProtectionPolicyQueryObject(msrest.serialization.Model): """Filters the list backup policies API. - :param backup_management_type: Backup management type for the backup policy. Possible values + :ivar backup_management_type: Backup management type for the backup policy. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param fabric_name: Fabric name for filter. - :type fabric_name: str - :param workload_type: Workload type for the backup policy. Possible values include: "Invalid", + :ivar fabric_name: Fabric name for filter. + :vartype fabric_name: str + :ivar workload_type: Workload type for the backup policy. 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.WorkloadType + :vartype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType """ _attribute_map = { @@ -14173,6 +17443,20 @@ def __init__( workload_type: Optional[Union[str, "WorkloadType"]] = None, **kwargs ): + """ + :keyword backup_management_type: Backup management type for the backup policy. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword fabric_name: Fabric name for filter. + :paramtype fabric_name: str + :keyword workload_type: Workload type for the backup policy. Possible values include: + "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", + "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", + "SAPHanaDatabase", "SAPAseDatabase". + :paramtype workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType + """ super(ProtectionPolicyQueryObject, self).__init__(**kwargs) self.backup_management_type = backup_management_type self.fabric_name = fabric_name @@ -14191,14 +17475,14 @@ class ProtectionPolicyResource(Resource): :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: ProtectionPolicyResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicy + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ProtectionPolicyResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicy """ _validation = { @@ -14226,6 +17510,16 @@ def __init__( properties: Optional["ProtectionPolicy"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ProtectionPolicyResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicy + """ super(ProtectionPolicyResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -14233,11 +17527,11 @@ def __init__( class ProtectionPolicyResourceList(ResourceList): """List of ProtectionPolicy resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource] """ _attribute_map = { @@ -14252,6 +17546,13 @@ def __init__( value: Optional[List["ProtectionPolicyResource"]] = None, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource] + """ super(ProtectionPolicyResourceList, self).__init__(next_link=next_link, **kwargs) self.value = value @@ -14259,14 +17560,14 @@ def __init__( class RecoveryPointDiskConfiguration(msrest.serialization.Model): """Disk configuration. - :param number_of_disks_included_in_backup: Number of disks included in backup. - :type number_of_disks_included_in_backup: int - :param number_of_disks_attached_to_vm: Number of disks attached to the VM. - :type number_of_disks_attached_to_vm: int - :param included_disk_list: Information of disks included in backup. - :type included_disk_list: list[~azure.mgmt.recoveryservicesbackup.models.DiskInformation] - :param excluded_disk_list: Information of disks excluded from backup. - :type excluded_disk_list: list[~azure.mgmt.recoveryservicesbackup.models.DiskInformation] + :ivar number_of_disks_included_in_backup: Number of disks included in backup. + :vartype number_of_disks_included_in_backup: int + :ivar number_of_disks_attached_to_vm: Number of disks attached to the VM. + :vartype number_of_disks_attached_to_vm: int + :ivar included_disk_list: Information of disks included in backup. + :vartype included_disk_list: list[~azure.mgmt.recoveryservicesbackup.models.DiskInformation] + :ivar excluded_disk_list: Information of disks excluded from backup. + :vartype excluded_disk_list: list[~azure.mgmt.recoveryservicesbackup.models.DiskInformation] """ _attribute_map = { @@ -14285,6 +17586,16 @@ def __init__( excluded_disk_list: Optional[List["DiskInformation"]] = None, **kwargs ): + """ + :keyword number_of_disks_included_in_backup: Number of disks included in backup. + :paramtype number_of_disks_included_in_backup: int + :keyword number_of_disks_attached_to_vm: Number of disks attached to the VM. + :paramtype number_of_disks_attached_to_vm: int + :keyword included_disk_list: Information of disks included in backup. + :paramtype included_disk_list: list[~azure.mgmt.recoveryservicesbackup.models.DiskInformation] + :keyword excluded_disk_list: Information of disks excluded from backup. + :paramtype excluded_disk_list: list[~azure.mgmt.recoveryservicesbackup.models.DiskInformation] + """ super(RecoveryPointDiskConfiguration, self).__init__(**kwargs) self.number_of_disks_included_in_backup = number_of_disks_included_in_backup self.number_of_disks_attached_to_vm = number_of_disks_attached_to_vm @@ -14295,10 +17606,10 @@ def __init__( class RecoveryPointMoveReadinessInfo(msrest.serialization.Model): """RecoveryPointMoveReadinessInfo. - :param is_ready_for_move: - :type is_ready_for_move: bool - :param additional_info: - :type additional_info: str + :ivar is_ready_for_move: + :vartype is_ready_for_move: bool + :ivar additional_info: + :vartype additional_info: str """ _attribute_map = { @@ -14313,6 +17624,12 @@ def __init__( additional_info: Optional[str] = None, **kwargs ): + """ + :keyword is_ready_for_move: + :paramtype is_ready_for_move: bool + :keyword additional_info: + :paramtype additional_info: str + """ super(RecoveryPointMoveReadinessInfo, self).__init__(**kwargs) self.is_ready_for_move = is_ready_for_move self.additional_info = additional_info @@ -14321,11 +17638,11 @@ def __init__( class RecoveryPointRehydrationInfo(msrest.serialization.Model): """RP Rehydration Info. - :param rehydration_retention_duration: How long the rehydrated RP should be kept + :ivar rehydration_retention_duration: How long the rehydrated RP should be kept Should be ISO8601 Duration format e.g. "P7D". - :type rehydration_retention_duration: str - :param rehydration_priority: Rehydration Priority. Possible values include: "Standard", "High". - :type rehydration_priority: str or + :vartype rehydration_retention_duration: str + :ivar rehydration_priority: Rehydration Priority. Possible values include: "Standard", "High". + :vartype rehydration_priority: str or ~azure.mgmt.recoveryservicesbackup.models.RehydrationPriority """ @@ -14341,6 +17658,15 @@ def __init__( rehydration_priority: Optional[Union[str, "RehydrationPriority"]] = None, **kwargs ): + """ + :keyword rehydration_retention_duration: How long the rehydrated RP should be kept + Should be ISO8601 Duration format e.g. "P7D". + :paramtype rehydration_retention_duration: str + :keyword rehydration_priority: Rehydration Priority. Possible values include: "Standard", + "High". + :paramtype rehydration_priority: str or + ~azure.mgmt.recoveryservicesbackup.models.RehydrationPriority + """ super(RecoveryPointRehydrationInfo, self).__init__(**kwargs) self.rehydration_retention_duration = rehydration_retention_duration self.rehydration_priority = rehydration_priority @@ -14358,14 +17684,14 @@ class RecoveryPointResource(Resource): :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: RecoveryPointResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPoint + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: RecoveryPointResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPoint """ _validation = { @@ -14393,6 +17719,16 @@ def __init__( properties: Optional["RecoveryPoint"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: RecoveryPointResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPoint + """ super(RecoveryPointResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -14400,11 +17736,11 @@ def __init__( class RecoveryPointResourceList(ResourceList): """List of RecoveryPoint resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource] """ _attribute_map = { @@ -14419,6 +17755,13 @@ def __init__( value: Optional[List["RecoveryPointResource"]] = None, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource] + """ super(RecoveryPointResourceList, self).__init__(next_link=next_link, **kwargs) self.value = value @@ -14426,14 +17769,14 @@ def __init__( class RecoveryPointTierInformation(msrest.serialization.Model): """Recovery point tier information. - :param type: Recovery point tier type. Possible values include: "Invalid", "InstantRP", + :ivar type: Recovery point tier type. Possible values include: "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". - :type type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType - :param status: Recovery point tier status. Possible values include: "Invalid", "Valid", + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :ivar status: Recovery point tier status. Possible values include: "Invalid", "Valid", "Disabled", "Deleted", "Rehydrated". - :type status: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus - :param extended_info: Recovery point tier status. - :type extended_info: dict[str, str] + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus + :ivar extended_info: Recovery point tier status. + :vartype extended_info: dict[str, str] """ _attribute_map = { @@ -14450,19 +17793,69 @@ def __init__( extended_info: Optional[Dict[str, str]] = None, **kwargs ): + """ + :keyword type: Recovery point tier type. Possible values include: "Invalid", "InstantRP", + "HardenedRP", "ArchivedRP". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :keyword status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :paramtype status: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus + :keyword extended_info: Recovery point tier status. + :paramtype extended_info: dict[str, str] + """ super(RecoveryPointTierInformation, self).__init__(**kwargs) self.type = type self.status = status self.extended_info = extended_info +class RecoveryPointTierInformationV2(RecoveryPointTierInformation): + """RecoveryPoint Tier Information V2. + + :ivar type: Recovery point tier type. Possible values include: "Invalid", "InstantRP", + "HardenedRP", "ArchivedRP". + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :ivar status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus + :ivar extended_info: Recovery point tier status. + :vartype extended_info: dict[str, str] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': '{str}'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "RecoveryPointTierType"]] = None, + status: Optional[Union[str, "RecoveryPointTierStatus"]] = None, + extended_info: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword type: Recovery point tier type. Possible values include: "Invalid", "InstantRP", + "HardenedRP", "ArchivedRP". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType + :keyword status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :paramtype status: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus + :keyword extended_info: Recovery point tier status. + :paramtype extended_info: dict[str, str] + """ + super(RecoveryPointTierInformationV2, self).__init__(type=type, status=status, extended_info=extended_info, **kwargs) + + class ResourceGuardOperationDetail(msrest.serialization.Model): """ResourceGuardOperationDetail. - :param vault_critical_operation: - :type vault_critical_operation: str - :param default_resource_request: - :type default_resource_request: str + :ivar vault_critical_operation: + :vartype vault_critical_operation: str + :ivar default_resource_request: + :vartype default_resource_request: str """ _attribute_map = { @@ -14477,6 +17870,12 @@ def __init__( default_resource_request: Optional[str] = None, **kwargs ): + """ + :keyword vault_critical_operation: + :paramtype vault_critical_operation: str + :keyword default_resource_request: + :paramtype default_resource_request: str + """ super(ResourceGuardOperationDetail, self).__init__(**kwargs) self.vault_critical_operation = vault_critical_operation self.default_resource_request = default_resource_request @@ -14485,15 +17884,15 @@ def __init__( class ResourceGuardProxyBase(msrest.serialization.Model): """ResourceGuardProxyBase. - :param resource_guard_resource_id: - :type resource_guard_resource_id: str - :param resource_guard_operation_details: - :type resource_guard_operation_details: + :ivar resource_guard_resource_id: + :vartype resource_guard_resource_id: str + :ivar resource_guard_operation_details: + :vartype resource_guard_operation_details: list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardOperationDetail] - :param last_updated_time: - :type last_updated_time: str - :param description: - :type description: str + :ivar last_updated_time: + :vartype last_updated_time: str + :ivar description: + :vartype description: str """ _attribute_map = { @@ -14512,6 +17911,17 @@ def __init__( description: Optional[str] = None, **kwargs ): + """ + :keyword resource_guard_resource_id: + :paramtype resource_guard_resource_id: str + :keyword resource_guard_operation_details: + :paramtype resource_guard_operation_details: + list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardOperationDetail] + :keyword last_updated_time: + :paramtype last_updated_time: str + :keyword description: + :paramtype description: str + """ super(ResourceGuardProxyBase, self).__init__(**kwargs) self.resource_guard_resource_id = resource_guard_resource_id self.resource_guard_operation_details = resource_guard_operation_details @@ -14531,14 +17941,14 @@ class ResourceGuardProxyBaseResource(Resource): :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: ResourceGuardProxyBaseResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBase + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: ResourceGuardProxyBaseResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBase """ _validation = { @@ -14566,6 +17976,16 @@ def __init__( properties: Optional["ResourceGuardProxyBase"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: ResourceGuardProxyBaseResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBase + """ super(ResourceGuardProxyBaseResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -14573,11 +17993,11 @@ def __init__( class ResourceGuardProxyBaseResourceList(ResourceList): """List of ResourceGuardProxyBase resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource] """ _attribute_map = { @@ -14592,6 +18012,14 @@ def __init__( value: Optional[List["ResourceGuardProxyBaseResource"]] = None, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource] + """ super(ResourceGuardProxyBaseResourceList, self).__init__(next_link=next_link, **kwargs) self.value = value @@ -14599,12 +18027,12 @@ def __init__( class RestoreFileSpecs(msrest.serialization.Model): """Restore file specs like file path, type and target folder path info. - :param path: Source File/Folder path. - :type path: str - :param file_spec_type: Indicates what the Path variable stands for. - :type file_spec_type: str - :param target_folder_path: Destination folder path in target FileShare. - :type target_folder_path: str + :ivar path: Source File/Folder path. + :vartype path: str + :ivar file_spec_type: Indicates what the Path variable stands for. + :vartype file_spec_type: str + :ivar target_folder_path: Destination folder path in target FileShare. + :vartype target_folder_path: str """ _attribute_map = { @@ -14621,6 +18049,14 @@ def __init__( target_folder_path: Optional[str] = None, **kwargs ): + """ + :keyword path: Source File/Folder path. + :paramtype path: str + :keyword file_spec_type: Indicates what the Path variable stands for. + :paramtype file_spec_type: str + :keyword target_folder_path: Destination folder path in target FileShare. + :paramtype target_folder_path: str + """ super(RestoreFileSpecs, self).__init__(**kwargs) self.path = path self.file_spec_type = file_spec_type @@ -14639,14 +18075,14 @@ class RestoreRequestResource(Resource): :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: RestoreRequestResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: RestoreRequestResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest """ _validation = { @@ -14674,6 +18110,16 @@ def __init__( properties: Optional["RestoreRequest"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: RestoreRequestResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + """ super(RestoreRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -14681,13 +18127,13 @@ def __init__( class RetentionDuration(msrest.serialization.Model): """Retention duration. - :param count: Count of duration types. Retention duration is obtained by the counting the + :ivar count: Count of duration types. Retention duration is obtained by the counting the duration type Count times. For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. - :type count: int - :param duration_type: Retention duration type of retention policy. Possible values include: + :vartype count: int + :ivar duration_type: Retention duration type of retention policy. Possible values include: "Invalid", "Days", "Weeks", "Months", "Years". - :type duration_type: str or ~azure.mgmt.recoveryservicesbackup.models.RetentionDurationType + :vartype duration_type: str or ~azure.mgmt.recoveryservicesbackup.models.RetentionDurationType """ _attribute_map = { @@ -14702,6 +18148,16 @@ def __init__( duration_type: Optional[Union[str, "RetentionDurationType"]] = None, **kwargs ): + """ + :keyword count: Count of duration types. Retention duration is obtained by the counting the + duration type Count times. + For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + :paramtype count: int + :keyword duration_type: Retention duration type of retention policy. Possible values include: + "Invalid", "Days", "Weeks", "Months", "Years". + :paramtype duration_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RetentionDurationType + """ super(RetentionDuration, self).__init__(**kwargs) self.count = count self.duration_type = duration_type @@ -14710,8 +18166,8 @@ def __init__( class SecurityPinBase(msrest.serialization.Model): """Base class for get security pin request body. - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] """ _attribute_map = { @@ -14724,6 +18180,10 @@ def __init__( resource_guard_operation_requests: Optional[List[str]] = None, **kwargs ): + """ + :keyword resource_guard_operation_requests: ResourceGuard Operation Requests. + :paramtype resource_guard_operation_requests: list[str] + """ super(SecurityPinBase, self).__init__(**kwargs) self.resource_guard_operation_requests = resource_guard_operation_requests @@ -14731,15 +18191,14 @@ def __init__( class Settings(msrest.serialization.Model): """Common settings field for backup management. - :param time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard + :ivar time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - :type time_zone: str - :param issqlcompression: SQL compression flag. - :type issqlcompression: bool - :param is_compression: Workload compression flag. This has been added so that - 'isSqlCompression' + :vartype time_zone: str + :ivar issqlcompression: SQL compression flag. + :vartype issqlcompression: bool + :ivar is_compression: Workload compression flag. This has been added so that 'isSqlCompression' will be deprecated once clients upgrade to consider this flag. - :type is_compression: bool + :vartype is_compression: bool """ _attribute_map = { @@ -14756,6 +18215,17 @@ def __init__( is_compression: Optional[bool] = None, **kwargs ): + """ + :keyword time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific + Standard Time". + :paramtype time_zone: str + :keyword issqlcompression: SQL compression flag. + :paramtype issqlcompression: bool + :keyword is_compression: Workload compression flag. This has been added so that + 'isSqlCompression' + will be deprecated once clients upgrade to consider this flag. + :paramtype is_compression: bool + """ super(Settings, self).__init__(**kwargs) self.time_zone = time_zone self.issqlcompression = issqlcompression @@ -14767,11 +18237,11 @@ class SimpleRetentionPolicy(RetentionPolicy): All required parameters must be populated in order to send to Azure. - :param retention_policy_type: Required. This property will be used as the discriminator for + :ivar retention_policy_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 retention_policy_type: str - :param retention_duration: Retention duration of the protection policy. - :type retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + :vartype retention_policy_type: str + :ivar retention_duration: Retention duration of the protection policy. + :vartype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _validation = { @@ -14789,6 +18259,10 @@ def __init__( retention_duration: Optional["RetentionDuration"] = None, **kwargs ): + """ + :keyword retention_duration: Retention duration of the protection policy. + :paramtype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ super(SimpleRetentionPolicy, self).__init__(**kwargs) self.retention_policy_type = 'SimpleRetentionPolicy' # type: str self.retention_duration = retention_duration @@ -14799,18 +18273,21 @@ class SimpleSchedulePolicy(SchedulePolicy): All required parameters must be populated in order to send to Azure. - :param schedule_policy_type: Required. This property will be used as the discriminator for + :ivar schedule_policy_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 schedule_policy_type: str - :param schedule_run_frequency: Frequency of the schedule operation of this policy. Possible - values include: "Invalid", "Daily", "Weekly". - :type schedule_run_frequency: str or ~azure.mgmt.recoveryservicesbackup.models.ScheduleRunType - :param schedule_run_days: List of days of week this schedule has to be run. - :type schedule_run_days: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] - :param schedule_run_times: List of times of day this schedule has to be run. - :type schedule_run_times: list[~datetime.datetime] - :param schedule_weekly_frequency: At every number weeks this schedule has to be run. - :type schedule_weekly_frequency: int + :vartype schedule_policy_type: str + :ivar schedule_run_frequency: Frequency of the schedule operation of this policy. Possible + values include: "Invalid", "Daily", "Weekly", "Hourly". + :vartype schedule_run_frequency: str or + ~azure.mgmt.recoveryservicesbackup.models.ScheduleRunType + :ivar schedule_run_days: List of days of week this schedule has to be run. + :vartype schedule_run_days: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :ivar schedule_run_times: List of times of day this schedule has to be run. + :vartype schedule_run_times: list[~datetime.datetime] + :ivar hourly_schedule: Hourly Schedule of this Policy. + :vartype hourly_schedule: ~azure.mgmt.recoveryservicesbackup.models.HourlySchedule + :ivar schedule_weekly_frequency: At every number weeks this schedule has to be run. + :vartype schedule_weekly_frequency: int """ _validation = { @@ -14822,6 +18299,7 @@ class SimpleSchedulePolicy(SchedulePolicy): 'schedule_run_frequency': {'key': 'scheduleRunFrequency', 'type': 'str'}, 'schedule_run_days': {'key': 'scheduleRunDays', 'type': '[str]'}, 'schedule_run_times': {'key': 'scheduleRunTimes', 'type': '[iso-8601]'}, + 'hourly_schedule': {'key': 'hourlySchedule', 'type': 'HourlySchedule'}, 'schedule_weekly_frequency': {'key': 'scheduleWeeklyFrequency', 'type': 'int'}, } @@ -14831,26 +18309,42 @@ def __init__( schedule_run_frequency: Optional[Union[str, "ScheduleRunType"]] = None, schedule_run_days: Optional[List[Union[str, "DayOfWeek"]]] = None, schedule_run_times: Optional[List[datetime.datetime]] = None, + hourly_schedule: Optional["HourlySchedule"] = None, schedule_weekly_frequency: Optional[int] = None, **kwargs ): + """ + :keyword schedule_run_frequency: Frequency of the schedule operation of this policy. Possible + values include: "Invalid", "Daily", "Weekly", "Hourly". + :paramtype schedule_run_frequency: str or + ~azure.mgmt.recoveryservicesbackup.models.ScheduleRunType + :keyword schedule_run_days: List of days of week this schedule has to be run. + :paramtype schedule_run_days: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :keyword schedule_run_times: List of times of day this schedule has to be run. + :paramtype schedule_run_times: list[~datetime.datetime] + :keyword hourly_schedule: Hourly Schedule of this Policy. + :paramtype hourly_schedule: ~azure.mgmt.recoveryservicesbackup.models.HourlySchedule + :keyword schedule_weekly_frequency: At every number weeks this schedule has to be run. + :paramtype schedule_weekly_frequency: int + """ super(SimpleSchedulePolicy, self).__init__(**kwargs) self.schedule_policy_type = 'SimpleSchedulePolicy' # type: str self.schedule_run_frequency = schedule_run_frequency self.schedule_run_days = schedule_run_days self.schedule_run_times = schedule_run_times + self.hourly_schedule = hourly_schedule self.schedule_weekly_frequency = schedule_weekly_frequency class SQLDataDirectory(msrest.serialization.Model): """SQLDataDirectory info. - :param type: Type of data directory mapping. Possible values include: "Invalid", "Data", "Log". - :type type: str or ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType - :param path: File path. - :type path: str - :param logical_name: Logical name of the file. - :type logical_name: str + :ivar type: Type of data directory mapping. Possible values include: "Invalid", "Data", "Log". + :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :ivar path: File path. + :vartype path: str + :ivar logical_name: Logical name of the file. + :vartype logical_name: str """ _attribute_map = { @@ -14867,6 +18361,15 @@ def __init__( logical_name: Optional[str] = None, **kwargs ): + """ + :keyword type: Type of data directory mapping. Possible values include: "Invalid", "Data", + "Log". + :paramtype type: str or ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :keyword path: File path. + :paramtype path: str + :keyword logical_name: Logical name of the file. + :paramtype logical_name: str + """ super(SQLDataDirectory, self).__init__(**kwargs) self.type = type self.path = path @@ -14876,15 +18379,15 @@ def __init__( class SQLDataDirectoryMapping(msrest.serialization.Model): """Encapsulates information regarding data directory. - :param mapping_type: Type of data directory mapping. Possible values include: "Invalid", - "Data", "Log". - :type mapping_type: str or ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType - :param source_logical_name: Restore source logical name path. - :type source_logical_name: str - :param source_path: Restore source path. - :type source_path: str - :param target_path: Target path. - :type target_path: str + :ivar mapping_type: Type of data directory mapping. Possible values include: "Invalid", "Data", + "Log". + :vartype mapping_type: str or ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :ivar source_logical_name: Restore source logical name path. + :vartype source_logical_name: str + :ivar source_path: Restore source path. + :vartype source_path: str + :ivar target_path: Target path. + :vartype target_path: str """ _attribute_map = { @@ -14903,6 +18406,17 @@ def __init__( target_path: Optional[str] = None, **kwargs ): + """ + :keyword mapping_type: Type of data directory mapping. Possible values include: "Invalid", + "Data", "Log". + :paramtype mapping_type: str or ~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryType + :keyword source_logical_name: Restore source logical name path. + :paramtype source_logical_name: str + :keyword source_path: Restore source path. + :paramtype source_path: str + :keyword target_path: Target path. + :paramtype target_path: str + """ super(SQLDataDirectoryMapping, self).__init__(**kwargs) self.mapping_type = mapping_type self.source_logical_name = source_logical_name @@ -14913,13 +18427,13 @@ def __init__( class SubProtectionPolicy(msrest.serialization.Model): """Sub-protection policy which includes schedule and retention. - :param policy_type: Type of backup policy type. Possible values include: "Invalid", "Full", + :ivar policy_type: Type of backup policy type. Possible values include: "Invalid", "Full", "Differential", "Log", "CopyOnlyFull", "Incremental". - :type policy_type: str or ~azure.mgmt.recoveryservicesbackup.models.PolicyType - :param schedule_policy: Backup schedule specified as part of backup policy. - :type schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy - :param retention_policy: Retention policy with the details on backup copy retention ranges. - :type retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + :vartype policy_type: str or ~azure.mgmt.recoveryservicesbackup.models.PolicyType + :ivar schedule_policy: Backup schedule specified as part of backup policy. + :vartype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :ivar retention_policy: Retention policy with the details on backup copy retention ranges. + :vartype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy """ _attribute_map = { @@ -14936,6 +18450,15 @@ def __init__( retention_policy: Optional["RetentionPolicy"] = None, **kwargs ): + """ + :keyword policy_type: Type of backup policy type. Possible values include: "Invalid", "Full", + "Differential", "Log", "CopyOnlyFull", "Incremental". + :paramtype policy_type: str or ~azure.mgmt.recoveryservicesbackup.models.PolicyType + :keyword schedule_policy: Backup schedule specified as part of backup policy. + :paramtype schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy + :keyword retention_policy: Retention policy with the details on backup copy retention ranges. + :paramtype retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy + """ super(SubProtectionPolicy, self).__init__(**kwargs) self.policy_type = policy_type self.schedule_policy = schedule_policy @@ -14945,10 +18468,10 @@ def __init__( class TargetAFSRestoreInfo(msrest.serialization.Model): """Target Azure File Share Info. - :param name: File share name. - :type name: str - :param target_resource_id: Target file share resource ARM ID. - :type target_resource_id: str + :ivar name: File share name. + :vartype name: str + :ivar target_resource_id: Target file share resource ARM ID. + :vartype target_resource_id: str """ _attribute_map = { @@ -14963,6 +18486,12 @@ def __init__( target_resource_id: Optional[str] = None, **kwargs ): + """ + :keyword name: File share name. + :paramtype name: str + :keyword target_resource_id: Target file share resource ARM ID. + :paramtype target_resource_id: str + """ super(TargetAFSRestoreInfo, self).__init__(**kwargs) self.name = name self.target_resource_id = target_resource_id @@ -14971,16 +18500,16 @@ def __init__( class TargetRestoreInfo(msrest.serialization.Model): """Details about target workload during restore operation. - :param overwrite_option: Can Overwrite if Target DataBase already exists. Possible values + :ivar overwrite_option: Can Overwrite if Target DataBase already exists. Possible values include: "Invalid", "FailOnConflict", "Overwrite". - :type overwrite_option: str or ~azure.mgmt.recoveryservicesbackup.models.OverwriteOptions - :param container_id: Resource Id name of the container in which Target DataBase resides. - :type container_id: str - :param database_name: Database name InstanceName/DataBaseName for SQL or System/DbName for SAP + :vartype overwrite_option: str or ~azure.mgmt.recoveryservicesbackup.models.OverwriteOptions + :ivar container_id: Resource Id name of the container in which Target DataBase resides. + :vartype container_id: str + :ivar database_name: Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana. - :type database_name: str - :param target_directory_for_file_restore: Target directory location for restore as files. - :type target_directory_for_file_restore: str + :vartype database_name: str + :ivar target_directory_for_file_restore: Target directory location for restore as files. + :vartype target_directory_for_file_restore: str """ _attribute_map = { @@ -14999,6 +18528,18 @@ def __init__( target_directory_for_file_restore: Optional[str] = None, **kwargs ): + """ + :keyword overwrite_option: Can Overwrite if Target DataBase already exists. Possible values + include: "Invalid", "FailOnConflict", "Overwrite". + :paramtype overwrite_option: str or ~azure.mgmt.recoveryservicesbackup.models.OverwriteOptions + :keyword container_id: Resource Id name of the container in which Target DataBase resides. + :paramtype container_id: str + :keyword database_name: Database name InstanceName/DataBaseName for SQL or System/DbName for + SAP Hana. + :paramtype database_name: str + :keyword target_directory_for_file_restore: Target directory location for restore as files. + :paramtype target_directory_for_file_restore: str + """ super(TargetRestoreInfo, self).__init__(**kwargs) self.overwrite_option = overwrite_option self.container_id = container_id @@ -15009,12 +18550,12 @@ def __init__( class TokenInformation(msrest.serialization.Model): """The token information details. - :param token: Token value. - :type token: str - :param expiry_time_in_utc_ticks: Expiry time of token. - :type expiry_time_in_utc_ticks: long - :param security_pin: Security PIN. - :type security_pin: str + :ivar token: Token value. + :vartype token: str + :ivar expiry_time_in_utc_ticks: Expiry time of token. + :vartype expiry_time_in_utc_ticks: long + :ivar security_pin: Security PIN. + :vartype security_pin: str """ _attribute_map = { @@ -15031,6 +18572,14 @@ def __init__( security_pin: Optional[str] = None, **kwargs ): + """ + :keyword token: Token value. + :paramtype token: str + :keyword expiry_time_in_utc_ticks: Expiry time of token. + :paramtype expiry_time_in_utc_ticks: long + :keyword security_pin: Security PIN. + :paramtype security_pin: str + """ super(TokenInformation, self).__init__(**kwargs) self.token = token self.expiry_time_in_utc_ticks = expiry_time_in_utc_ticks @@ -15042,19 +18591,19 @@ class TriggerDataMoveRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param source_resource_id: Required. ARM Id of source vault. - :type source_resource_id: str - :param source_region: Required. Source Region. - :type source_region: str - :param data_move_level: Required. DataMove Level. Possible values include: "Invalid", "Vault", + :ivar source_resource_id: Required. ARM Id of source vault. + :vartype source_resource_id: str + :ivar source_region: Required. Source Region. + :vartype source_region: str + :ivar data_move_level: Required. DataMove Level. Possible values include: "Invalid", "Vault", "Container". - :type data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel - :param correlation_id: Required. Correlation Id. - :type correlation_id: str - :param source_container_arm_ids: Source Container ArmIds. - :type source_container_arm_ids: list[str] - :param pause_gc: Pause GC. - :type pause_gc: bool + :vartype data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel + :ivar correlation_id: Required. Correlation Id. + :vartype correlation_id: str + :ivar source_container_arm_ids: Source Container ArmIds. + :vartype source_container_arm_ids: list[str] + :ivar pause_gc: Pause GC. + :vartype pause_gc: bool """ _validation = { @@ -15084,6 +18633,21 @@ def __init__( pause_gc: Optional[bool] = None, **kwargs ): + """ + :keyword source_resource_id: Required. ARM Id of source vault. + :paramtype source_resource_id: str + :keyword source_region: Required. Source Region. + :paramtype source_region: str + :keyword data_move_level: Required. DataMove Level. Possible values include: "Invalid", + "Vault", "Container". + :paramtype data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel + :keyword correlation_id: Required. Correlation Id. + :paramtype correlation_id: str + :keyword source_container_arm_ids: Source Container ArmIds. + :paramtype source_container_arm_ids: list[str] + :keyword pause_gc: Pause GC. + :paramtype pause_gc: bool + """ super(TriggerDataMoveRequest, self).__init__(**kwargs) self.source_resource_id = source_resource_id self.source_region = source_region @@ -15096,10 +18660,10 @@ def __init__( class UnlockDeleteRequest(msrest.serialization.Model): """Request body of unlock delete API. - :param resource_guard_operation_requests: - :type resource_guard_operation_requests: list[str] - :param resource_to_be_deleted: - :type resource_to_be_deleted: str + :ivar resource_guard_operation_requests: + :vartype resource_guard_operation_requests: list[str] + :ivar resource_to_be_deleted: + :vartype resource_to_be_deleted: str """ _attribute_map = { @@ -15114,6 +18678,12 @@ def __init__( resource_to_be_deleted: Optional[str] = None, **kwargs ): + """ + :keyword resource_guard_operation_requests: + :paramtype resource_guard_operation_requests: list[str] + :keyword resource_to_be_deleted: + :paramtype resource_to_be_deleted: str + """ super(UnlockDeleteRequest, self).__init__(**kwargs) self.resource_guard_operation_requests = resource_guard_operation_requests self.resource_to_be_deleted = resource_to_be_deleted @@ -15122,9 +18692,9 @@ def __init__( class UnlockDeleteResponse(msrest.serialization.Model): """Response of Unlock Delete API. - :param unlock_delete_expiry_time: This is the time when unlock delete privileges will get + :ivar unlock_delete_expiry_time: This is the time when unlock delete privileges will get expired. - :type unlock_delete_expiry_time: str + :vartype unlock_delete_expiry_time: str """ _attribute_map = { @@ -15137,6 +18707,11 @@ def __init__( unlock_delete_expiry_time: Optional[str] = None, **kwargs ): + """ + :keyword unlock_delete_expiry_time: This is the time when unlock delete privileges will get + expired. + :paramtype unlock_delete_expiry_time: str + """ super(UnlockDeleteResponse, self).__init__(**kwargs) self.unlock_delete_expiry_time = unlock_delete_expiry_time @@ -15149,9 +18724,9 @@ class ValidateOperationRequest(msrest.serialization.Model): 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 + :ivar 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 + :vartype object_type: str """ _validation = { @@ -15170,6 +18745,8 @@ def __init__( self, **kwargs ): + """ + """ super(ValidateOperationRequest, self).__init__(**kwargs) self.object_type = None # type: Optional[str] @@ -15182,11 +18759,11 @@ class ValidateRestoreOperationRequest(ValidateOperationRequest): 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 + :ivar 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 restore_request: Sets restore request to be validated. - :type restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + :vartype object_type: str + :ivar restore_request: Sets restore request to be validated. + :vartype restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest """ _validation = { @@ -15208,6 +18785,10 @@ def __init__( restore_request: Optional["RestoreRequest"] = None, **kwargs ): + """ + :keyword restore_request: Sets restore request to be validated. + :paramtype restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + """ super(ValidateRestoreOperationRequest, self).__init__(**kwargs) self.object_type = 'ValidateRestoreOperationRequest' # type: str self.restore_request = restore_request @@ -15218,11 +18799,11 @@ class ValidateIaasVMRestoreOperationRequest(ValidateRestoreOperationRequest): 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 + :ivar 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 restore_request: Sets restore request to be validated. - :type restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + :vartype object_type: str + :ivar restore_request: Sets restore request to be validated. + :vartype restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest """ _validation = { @@ -15240,6 +18821,10 @@ def __init__( restore_request: Optional["RestoreRequest"] = None, **kwargs ): + """ + :keyword restore_request: Sets restore request to be validated. + :paramtype restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest + """ super(ValidateIaasVMRestoreOperationRequest, self).__init__(restore_request=restore_request, **kwargs) self.object_type = 'ValidateIaasVMRestoreOperationRequest' # type: str @@ -15247,8 +18832,8 @@ def __init__( class ValidateOperationResponse(msrest.serialization.Model): """Base class for validate operation response. - :param validation_results: Gets the validation result. - :type validation_results: list[~azure.mgmt.recoveryservicesbackup.models.ErrorDetail] + :ivar validation_results: Gets the validation result. + :vartype validation_results: list[~azure.mgmt.recoveryservicesbackup.models.ErrorDetail] """ _attribute_map = { @@ -15261,6 +18846,10 @@ def __init__( validation_results: Optional[List["ErrorDetail"]] = None, **kwargs ): + """ + :keyword validation_results: Gets the validation result. + :paramtype validation_results: list[~azure.mgmt.recoveryservicesbackup.models.ErrorDetail] + """ super(ValidateOperationResponse, self).__init__(**kwargs) self.validation_results = validation_results @@ -15268,8 +18857,8 @@ def __init__( class ValidateOperationsResponse(msrest.serialization.Model): """ValidateOperationsResponse. - :param validate_operation_response: Base class for validate operation response. - :type validate_operation_response: + :ivar validate_operation_response: Base class for validate operation response. + :vartype validate_operation_response: ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationResponse """ @@ -15283,6 +18872,11 @@ def __init__( validate_operation_response: Optional["ValidateOperationResponse"] = None, **kwargs ): + """ + :keyword validate_operation_response: Base class for validate operation response. + :paramtype validate_operation_response: + ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationResponse + """ super(ValidateOperationsResponse, self).__init__(**kwargs) self.validate_operation_response = validate_operation_response @@ -15292,34 +18886,35 @@ class VaultJob(Job): All required parameters must be populated in order to send to Azure. - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible + :ivar entity_friendly_name: Friendly name of the entity on which the current job is executing. + :vartype entity_friendly_name: str + :ivar backup_management_type: Backup management type to execute the current job. Possible values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or + :vartype backup_management_type: str or ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.datetime - :param end_time: The end time. - :type end_time: ~datetime.datetime - :param activity_id: ActivityId of job. - :type activity_id: str - :param job_type: Required. This property will be used as the discriminator for deciding the + :ivar operation: The operation name. + :vartype operation: str + :ivar status: Job status. + :vartype status: str + :ivar start_time: The start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time. + :vartype end_time: ~datetime.datetime + :ivar activity_id: ActivityId of job. + :vartype activity_id: str + :ivar job_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 job_type: str - :param duration: Time elapsed during the execution of this job. - :type duration: ~datetime.timedelta - :param actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. - :type actions_info: list[str or ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] - :param error_details: Error details on execution of this job. - :type error_details: list[~azure.mgmt.recoveryservicesbackup.models.VaultJobErrorInfo] - :param extended_info: Additional information about the job. - :type extended_info: ~azure.mgmt.recoveryservicesbackup.models.VaultJobExtendedInfo + :vartype job_type: str + :ivar duration: Time elapsed during the execution of this job. + :vartype duration: ~datetime.timedelta + :ivar actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :vartype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: list[~azure.mgmt.recoveryservicesbackup.models.VaultJobErrorInfo] + :ivar extended_info: Additional information about the job. + :vartype extended_info: ~azure.mgmt.recoveryservicesbackup.models.VaultJobExtendedInfo """ _validation = { @@ -15357,6 +18952,35 @@ def __init__( extended_info: Optional["VaultJobExtendedInfo"] = None, **kwargs ): + """ + :keyword entity_friendly_name: Friendly name of the entity on which the current job is + executing. + :paramtype entity_friendly_name: str + :keyword backup_management_type: Backup management type to execute the current job. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType + :keyword operation: The operation name. + :paramtype operation: str + :keyword status: Job status. + :paramtype status: str + :keyword start_time: The start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time. + :paramtype end_time: ~datetime.datetime + :keyword activity_id: ActivityId of job. + :paramtype activity_id: str + :keyword duration: Time elapsed during the execution of this job. + :paramtype duration: ~datetime.timedelta + :keyword actions_info: Gets or sets the state/actions applicable on this job like cancel/retry. + :paramtype actions_info: list[str or + ~azure.mgmt.recoveryservicesbackup.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: list[~azure.mgmt.recoveryservicesbackup.models.VaultJobErrorInfo] + :keyword extended_info: Additional information about the job. + :paramtype extended_info: ~azure.mgmt.recoveryservicesbackup.models.VaultJobExtendedInfo + """ super(VaultJob, self).__init__(entity_friendly_name=entity_friendly_name, backup_management_type=backup_management_type, operation=operation, status=status, start_time=start_time, end_time=end_time, activity_id=activity_id, **kwargs) self.job_type = 'VaultJob' # type: str self.duration = duration @@ -15368,12 +18992,12 @@ def __init__( class VaultJobErrorInfo(msrest.serialization.Model): """Vault Job specific error information. - :param error_code: Error code. - :type error_code: int - :param error_string: Localized error string. - :type error_string: str - :param recommendations: List of localized recommendations for above error code. - :type recommendations: list[str] + :ivar error_code: Error code. + :vartype error_code: int + :ivar error_string: Localized error string. + :vartype error_string: str + :ivar recommendations: List of localized recommendations for above error code. + :vartype recommendations: list[str] """ _attribute_map = { @@ -15390,6 +19014,14 @@ def __init__( recommendations: Optional[List[str]] = None, **kwargs ): + """ + :keyword error_code: Error code. + :paramtype error_code: int + :keyword error_string: Localized error string. + :paramtype error_string: str + :keyword recommendations: List of localized recommendations for above error code. + :paramtype recommendations: list[str] + """ super(VaultJobErrorInfo, self).__init__(**kwargs) self.error_code = error_code self.error_string = error_string @@ -15399,8 +19031,8 @@ def __init__( class VaultJobExtendedInfo(msrest.serialization.Model): """Vault Job for CMK - has CMK specific info. - :param property_bag: Job properties. - :type property_bag: dict[str, str] + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] """ _attribute_map = { @@ -15413,6 +19045,10 @@ def __init__( property_bag: Optional[Dict[str, str]] = None, **kwargs ): + """ + :keyword property_bag: Job properties. + :paramtype property_bag: dict[str, str] + """ super(VaultJobExtendedInfo, self).__init__(**kwargs) self.property_bag = property_bag @@ -15420,10 +19056,10 @@ def __init__( class WeeklyRetentionFormat(msrest.serialization.Model): """Weekly retention format. - :param days_of_the_week: List of days of the week. - :type days_of_the_week: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] - :param weeks_of_the_month: List of weeks of month. - :type weeks_of_the_month: list[str or ~azure.mgmt.recoveryservicesbackup.models.WeekOfMonth] + :ivar days_of_the_week: List of days of the week. + :vartype days_of_the_week: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :ivar weeks_of_the_month: List of weeks of month. + :vartype weeks_of_the_month: list[str or ~azure.mgmt.recoveryservicesbackup.models.WeekOfMonth] """ _attribute_map = { @@ -15438,6 +19074,13 @@ def __init__( weeks_of_the_month: Optional[List[Union[str, "WeekOfMonth"]]] = None, **kwargs ): + """ + :keyword days_of_the_week: List of days of the week. + :paramtype days_of_the_week: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :keyword weeks_of_the_month: List of weeks of month. + :paramtype weeks_of_the_month: list[str or + ~azure.mgmt.recoveryservicesbackup.models.WeekOfMonth] + """ super(WeeklyRetentionFormat, self).__init__(**kwargs) self.days_of_the_week = days_of_the_week self.weeks_of_the_month = weeks_of_the_month @@ -15446,12 +19089,12 @@ def __init__( class WeeklyRetentionSchedule(msrest.serialization.Model): """Weekly retention schedule. - :param days_of_the_week: List of days of week for weekly retention policy. - :type days_of_the_week: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] - :param retention_times: Retention times of retention policy. - :type retention_times: list[~datetime.datetime] - :param retention_duration: Retention duration of retention Policy. - :type retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + :ivar days_of_the_week: List of days of week for weekly retention policy. + :vartype days_of_the_week: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :ivar retention_times: Retention times of retention policy. + :vartype retention_times: list[~datetime.datetime] + :ivar retention_duration: Retention duration of retention Policy. + :vartype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -15468,196 +19111,29 @@ def __init__( retention_duration: Optional["RetentionDuration"] = None, **kwargs ): + """ + :keyword days_of_the_week: List of days of week for weekly retention policy. + :paramtype days_of_the_week: list[str or ~azure.mgmt.recoveryservicesbackup.models.DayOfWeek] + :keyword retention_times: Retention times of retention policy. + :paramtype retention_times: list[~datetime.datetime] + :keyword retention_duration: Retention duration of retention Policy. + :paramtype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ super(WeeklyRetentionSchedule, self).__init__(**kwargs) self.days_of_the_week = days_of_the_week self.retention_times = retention_times 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. - :param type: Type of the Workload such as SQL, Oracle etc. - :type type: str - :param item_count: Contains the protectable item Count inside this Container. - :type item_count: long - :param inquiry_validation: Inquiry validation such as permissions and other backup validations. - :type inquiry_validation: ~azure.mgmt.recoveryservicesbackup.models.InquiryValidation + :ivar type: Type of the Workload such as SQL, Oracle etc. + :vartype type: str + :ivar item_count: Contains the protectable item Count inside this Container. + :vartype item_count: long + :ivar inquiry_validation: Inquiry validation such as permissions and other backup validations. + :vartype inquiry_validation: ~azure.mgmt.recoveryservicesbackup.models.InquiryValidation """ _attribute_map = { @@ -15674,6 +19150,15 @@ def __init__( inquiry_validation: Optional["InquiryValidation"] = None, **kwargs ): + """ + :keyword type: Type of the Workload such as SQL, Oracle etc. + :paramtype type: str + :keyword item_count: Contains the protectable item Count inside this Container. + :paramtype item_count: long + :keyword inquiry_validation: Inquiry validation such as permissions and other backup + validations. + :paramtype inquiry_validation: ~azure.mgmt.recoveryservicesbackup.models.InquiryValidation + """ super(WorkloadInquiryDetails, self).__init__(**kwargs) self.type = type self.item_count = item_count @@ -15692,14 +19177,14 @@ class WorkloadItemResource(Resource): :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: WorkloadItemResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadItem + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: WorkloadItemResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadItem """ _validation = { @@ -15727,6 +19212,16 @@ def __init__( properties: Optional["WorkloadItem"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: WorkloadItemResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadItem + """ super(WorkloadItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -15734,11 +19229,11 @@ def __init__( class WorkloadItemResourceList(ResourceList): """List of WorkloadItem resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResource] """ _attribute_map = { @@ -15753,6 +19248,13 @@ def __init__( value: Optional[List["WorkloadItemResource"]] = None, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: list[~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResource] + """ super(WorkloadItemResourceList, self).__init__(next_link=next_link, **kwargs) self.value = value @@ -15769,14 +19271,14 @@ class WorkloadProtectableItemResource(Resource): :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: WorkloadProtectableItemResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItem + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar e_tag: Optional ETag. + :vartype e_tag: str + :ivar properties: WorkloadProtectableItemResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItem """ _validation = { @@ -15804,6 +19306,16 @@ def __init__( properties: Optional["WorkloadProtectableItem"] = None, **kwargs ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword e_tag: Optional ETag. + :paramtype e_tag: str + :keyword properties: WorkloadProtectableItemResource properties. + :paramtype properties: ~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItem + """ super(WorkloadProtectableItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) self.properties = properties @@ -15811,11 +19323,11 @@ def __init__( class WorkloadProtectableItemResourceList(ResourceList): """List of WorkloadProtectableItem resources. - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - :param value: List of resources. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResource] + :ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page + of resources. + :vartype next_link: str + :ivar value: List of resources. + :vartype value: list[~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResource] """ _attribute_map = { @@ -15830,6 +19342,14 @@ def __init__( value: Optional[List["WorkloadProtectableItemResource"]] = None, **kwargs ): + """ + :keyword next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :paramtype next_link: str + :keyword value: List of resources. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResource] + """ super(WorkloadProtectableItemResourceList, self).__init__(next_link=next_link, **kwargs) self.value = value @@ -15837,21 +19357,22 @@ def __init__( class YearlyRetentionSchedule(msrest.serialization.Model): """Yearly retention schedule. - :param retention_schedule_format_type: Retention schedule format for yearly retention policy. + :ivar retention_schedule_format_type: Retention schedule format for yearly retention policy. Possible values include: "Invalid", "Daily", "Weekly". - :type retention_schedule_format_type: str or + :vartype retention_schedule_format_type: str or ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat - :param months_of_year: List of months of year of yearly retention policy. - :type months_of_year: list[str or ~azure.mgmt.recoveryservicesbackup.models.MonthOfYear] - :param retention_schedule_daily: Daily retention format for yearly retention policy. - :type retention_schedule_daily: ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat - :param retention_schedule_weekly: Weekly retention format for yearly retention policy. - :type retention_schedule_weekly: + :ivar months_of_year: List of months of year of yearly retention policy. + :vartype months_of_year: list[str or ~azure.mgmt.recoveryservicesbackup.models.MonthOfYear] + :ivar retention_schedule_daily: Daily retention format for yearly retention policy. + :vartype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat + :ivar retention_schedule_weekly: Weekly retention format for yearly retention policy. + :vartype retention_schedule_weekly: ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat - :param retention_times: Retention times of retention policy. - :type retention_times: list[~datetime.datetime] - :param retention_duration: Retention duration of retention Policy. - :type retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + :ivar retention_times: Retention times of retention policy. + :vartype retention_times: list[~datetime.datetime] + :ivar retention_duration: Retention duration of retention Policy. + :vartype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration """ _attribute_map = { @@ -15874,6 +19395,24 @@ def __init__( retention_duration: Optional["RetentionDuration"] = None, **kwargs ): + """ + :keyword retention_schedule_format_type: Retention schedule format for yearly retention policy. + Possible values include: "Invalid", "Daily", "Weekly". + :paramtype retention_schedule_format_type: str or + ~azure.mgmt.recoveryservicesbackup.models.RetentionScheduleFormat + :keyword months_of_year: List of months of year of yearly retention policy. + :paramtype months_of_year: list[str or ~azure.mgmt.recoveryservicesbackup.models.MonthOfYear] + :keyword retention_schedule_daily: Daily retention format for yearly retention policy. + :paramtype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.models.DailyRetentionFormat + :keyword retention_schedule_weekly: Weekly retention format for yearly retention policy. + :paramtype retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.models.WeeklyRetentionFormat + :keyword retention_times: Retention times of retention policy. + :paramtype retention_times: list[~datetime.datetime] + :keyword retention_duration: Retention duration of retention Policy. + :paramtype retention_duration: ~azure.mgmt.recoveryservicesbackup.models.RetentionDuration + """ super(YearlyRetentionSchedule, self).__init__(**kwargs) self.retention_schedule_format_type = retention_schedule_format_type self.months_of_year = months_of_year 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..7c4126e0e4d8 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 @@ -6,27 +6,19 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum, EnumMeta +from enum import Enum from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) +class AcquireStorageAccountLock(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Whether storage account lock is to be acquired for this container or not. + """ + ACQUIRE = "Acquire" + NOT_ACQUIRE = "NotAcquire" -class AzureFileShareType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class AzureFileShareType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """File Share type XSync or XSMB. """ @@ -34,7 +26,7 @@ class AzureFileShareType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): XSMB = "XSMB" X_SYNC = "XSync" -class BackupEngineType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class BackupEngineType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of the backup engine. """ @@ -42,7 +34,7 @@ class BackupEngineType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DPM_BACKUP_ENGINE = "DpmBackupEngine" AZURE_BACKUP_SERVER_ENGINE = "AzureBackupServerEngine" -class BackupItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class BackupItemType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of backup items associated with this container. """ @@ -62,7 +54,7 @@ class BackupItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SAP_HANA_DATABASE = "SAPHanaDatabase" SAP_ASE_DATABASE = "SAPAseDatabase" -class BackupManagementType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class BackupManagementType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Backup management type to execute the current job. """ @@ -76,7 +68,7 @@ class BackupManagementType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): AZURE_WORKLOAD = "AzureWorkload" DEFAULT_BACKUP = "DefaultBackup" -class BackupType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class BackupType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of backup, viz. Full, Differential, Log or CopyOnlyFull """ @@ -87,7 +79,7 @@ class BackupType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): COPY_ONLY_FULL = "CopyOnlyFull" INCREMENTAL = "Incremental" -class ContainerType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ContainerType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of container for filter """ @@ -107,7 +99,7 @@ class ContainerType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): STORAGE_CONTAINER = "StorageContainer" GENERIC_CONTAINER = "GenericContainer" -class CopyOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class CopyOptions(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Options to resolve copy conflicts. """ @@ -117,7 +109,7 @@ class CopyOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): OVERWRITE = "Overwrite" FAIL_ON_CONFLICT = "FailOnConflict" -class CreateMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class CreateMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Create mode to indicate recovery of existing soft deleted data source or creation of new data source. """ @@ -126,7 +118,7 @@ class CreateMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DEFAULT = "Default" RECOVER = "Recover" -class DataMoveLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DataMoveLevel(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """DataMove Level """ @@ -134,7 +126,7 @@ class DataMoveLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): VAULT = "Vault" CONTAINER = "Container" -class DataSourceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DataSourceType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of workload this item represents. """ @@ -154,7 +146,7 @@ class DataSourceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SAP_HANA_DATABASE = "SAPHanaDatabase" SAP_ASE_DATABASE = "SAPAseDatabase" -class DayOfWeek(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DayOfWeek(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): SUNDAY = "Sunday" MONDAY = "Monday" @@ -164,7 +156,15 @@ class DayOfWeek(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): FRIDAY = "Friday" SATURDAY = "Saturday" -class EncryptionAtRestType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DedupState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Vault Dedup state + """ + + INVALID = "Invalid" + ENABLED = "Enabled" + DISABLED = "Disabled" + +class EncryptionAtRestType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Encryption At Rest Type """ @@ -172,7 +172,7 @@ class EncryptionAtRestType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MICROSOFT_MANAGED = "MicrosoftManaged" CUSTOMER_MANAGED = "CustomerManaged" -class EnhancedSecurityState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class EnhancedSecurityState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Enabled or Disabled. """ @@ -180,14 +180,14 @@ class EnhancedSecurityState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) ENABLED = "Enabled" DISABLED = "Disabled" -class FabricName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class FabricName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Specifies the fabric name - Azure or AD """ INVALID = "Invalid" AZURE = "Azure" -class HealthState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class HealthState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Health State for the backed up item. """ @@ -196,8 +196,8 @@ class HealthState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ACTION_SUGGESTED = "ActionSuggested" INVALID = "Invalid" -class HealthStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """backups running status for this backup item. +class HealthStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Health status of protected item. """ PASSED = "Passed" @@ -205,7 +205,7 @@ class HealthStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ACTION_SUGGESTED = "ActionSuggested" INVALID = "Invalid" -class HttpStatusCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class HttpStatusCode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """HTTP Status Code of the operation. """ @@ -257,13 +257,13 @@ class HttpStatusCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): GATEWAY_TIMEOUT = "GatewayTimeout" HTTP_VERSION_NOT_SUPPORTED = "HttpVersionNotSupported" -class InfrastructureEncryptionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class InfrastructureEncryptionState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): INVALID = "Invalid" DISABLED = "Disabled" ENABLED = "Enabled" -class InquiryStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class InquiryStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Status of protectable item, i.e. InProgress,Succeeded,Failed """ @@ -271,7 +271,7 @@ class InquiryStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SUCCESS = "Success" FAILED = "Failed" -class IntentItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class IntentItemType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of workload this item represents """ @@ -279,7 +279,7 @@ class IntentItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SQL_INSTANCE = "SQLInstance" SQL_AVAILABILITY_GROUP_CONTAINER = "SQLAvailabilityGroupContainer" -class JobOperationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class JobOperationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of operation. """ @@ -295,7 +295,7 @@ class JobOperationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): UNDELETE = "Undelete" UPDATE_CUSTOMER_MANAGED_KEY = "UpdateCustomerManagedKey" -class JobStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class JobStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Status of the job. """ @@ -307,13 +307,13 @@ class JobStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): CANCELLED = "Cancelled" CANCELLING = "Cancelling" -class JobSupportedAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class JobSupportedAction(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): INVALID = "Invalid" CANCELLABLE = "Cancellable" RETRIABLE = "Retriable" -class LastBackupStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class LastBackupStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Last backup operation status. Possible values: Healthy, Unhealthy. """ @@ -322,7 +322,7 @@ class LastBackupStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): UNHEALTHY = "Unhealthy" IR_PENDING = "IRPending" -class LastUpdateStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class LastUpdateStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): INVALID = "Invalid" NOT_ENABLED = "NotEnabled" @@ -333,7 +333,7 @@ class LastUpdateStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): INITIALIZED = "Initialized" FIRST_INITIALIZATION = "FirstInitialization" -class MabServerType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class MabServerType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Server type of MAB container. """ @@ -353,7 +353,7 @@ class MabServerType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): STORAGE_CONTAINER = "StorageContainer" GENERIC_CONTAINER = "GenericContainer" -class MonthOfYear(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class MonthOfYear(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): INVALID = "Invalid" JANUARY = "January" @@ -369,7 +369,7 @@ class MonthOfYear(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): NOVEMBER = "November" DECEMBER = "December" -class OperationStatusValues(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class OperationStatusValues(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Operation status. """ @@ -379,7 +379,7 @@ class OperationStatusValues(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) FAILED = "Failed" CANCELED = "Canceled" -class OperationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class OperationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Re-Do Operation """ @@ -387,7 +387,7 @@ class OperationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): REGISTER = "Register" REREGISTER = "Reregister" -class OverwriteOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class OverwriteOptions(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Can Overwrite if Target DataBase already exists """ @@ -395,7 +395,7 @@ class OverwriteOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): FAIL_ON_CONFLICT = "FailOnConflict" OVERWRITE = "Overwrite" -class PolicyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class PolicyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of backup policy type """ @@ -406,7 +406,7 @@ class PolicyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): COPY_ONLY_FULL = "CopyOnlyFull" INCREMENTAL = "Incremental" -class PrivateEndpointConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class PrivateEndpointConnectionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Gets or sets the status """ @@ -415,7 +415,7 @@ class PrivateEndpointConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, s REJECTED = "Rejected" DISCONNECTED = "Disconnected" -class ProtectedItemHealthStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ProtectedItemHealthStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Health status of the backup item, evaluated based on last heartbeat received """ @@ -425,7 +425,7 @@ class ProtectedItemHealthStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, En NOT_REACHABLE = "NotReachable" IR_PENDING = "IRPending" -class ProtectedItemState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ProtectedItemState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Backup state of the backed up item. """ @@ -436,7 +436,16 @@ class ProtectedItemState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): PROTECTION_STOPPED = "ProtectionStopped" PROTECTION_PAUSED = "ProtectionPaused" -class ProtectionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ProtectionIntentItemType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """backup protectionIntent type. + """ + + INVALID = "Invalid" + AZURE_RESOURCE_ITEM = "AzureResourceItem" + RECOVERY_SERVICE_VAULT_ITEM = "RecoveryServiceVaultItem" + AZURE_WORKLOAD_CONTAINER_AUTO_PROTECTION_INTENT = "AzureWorkloadContainerAutoProtectionIntent" + +class ProtectionState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Backup state of this backup item. """ @@ -447,7 +456,7 @@ class ProtectionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): PROTECTION_STOPPED = "ProtectionStopped" PROTECTION_PAUSED = "ProtectionPaused" -class ProtectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ProtectionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Specifies whether the container is registered or not """ @@ -457,7 +466,7 @@ class ProtectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): PROTECTED = "Protected" PROTECTION_FAILED = "ProtectionFailed" -class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Gets or sets provisioning state of the private endpoint connection """ @@ -466,7 +475,7 @@ class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): FAILED = "Failed" PENDING = "Pending" -class RecoveryMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class RecoveryMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Defines whether the current recovery mode is file restore or database restore """ @@ -474,7 +483,7 @@ class RecoveryMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): FILE_RECOVERY = "FileRecovery" WORKLOAD_RECOVERY = "WorkloadRecovery" -class RecoveryPointTierStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class RecoveryPointTierStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Recovery point tier status. """ @@ -484,7 +493,7 @@ class RecoveryPointTierStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum DELETED = "Deleted" REHYDRATED = "Rehydrated" -class RecoveryPointTierType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class RecoveryPointTierType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Recovery point tier type. """ @@ -493,7 +502,7 @@ class RecoveryPointTierType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) HARDENED_RP = "HardenedRP" ARCHIVED_RP = "ArchivedRP" -class RecoveryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class RecoveryType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of this recovery. """ @@ -503,14 +512,14 @@ class RecoveryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): RESTORE_DISKS = "RestoreDisks" OFFLINE = "Offline" -class RehydrationPriority(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class RehydrationPriority(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Rehydration Priority """ STANDARD = "Standard" HIGH = "High" -class ResourceHealthStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ResourceHealthStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Resource Health Status """ @@ -521,7 +530,7 @@ class ResourceHealthStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): PERSISTENT_UNHEALTHY = "PersistentUnhealthy" INVALID = "Invalid" -class RestorePointQueryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class RestorePointQueryType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """RestorePoint type """ @@ -533,7 +542,7 @@ class RestorePointQueryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) ALL = "All" INCREMENTAL = "Incremental" -class RestorePointType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class RestorePointType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of restore point """ @@ -543,7 +552,7 @@ class RestorePointType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DIFFERENTIAL = "Differential" INCREMENTAL = "Incremental" -class RestoreRequestType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class RestoreRequestType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Restore Type (FullShareRestore or ItemLevelRestore) """ @@ -551,7 +560,7 @@ class RestoreRequestType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): FULL_SHARE_RESTORE = "FullShareRestore" ITEM_LEVEL_RESTORE = "ItemLevelRestore" -class RetentionDurationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class RetentionDurationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Retention duration type of retention policy. """ @@ -561,7 +570,7 @@ class RetentionDurationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) MONTHS = "Months" YEARS = "Years" -class RetentionScheduleFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class RetentionScheduleFormat(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Retention schedule format type for monthly retention policy. """ @@ -569,15 +578,16 @@ class RetentionScheduleFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum DAILY = "Daily" WEEKLY = "Weekly" -class ScheduleRunType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ScheduleRunType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Frequency of the schedule operation of this policy. """ INVALID = "Invalid" DAILY = "Daily" WEEKLY = "Weekly" + HOURLY = "Hourly" -class SoftDeleteFeatureState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SoftDeleteFeatureState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Soft Delete feature state """ @@ -585,7 +595,7 @@ class SoftDeleteFeatureState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) ENABLED = "Enabled" DISABLED = "Disabled" -class SQLDataDirectoryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SQLDataDirectoryType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of data directory mapping """ @@ -593,7 +603,7 @@ class SQLDataDirectoryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DATA = "Data" LOG = "Log" -class StorageType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class StorageType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Storage type """ @@ -603,7 +613,7 @@ class StorageType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ZONE_REDUNDANT = "ZoneRedundant" READ_ACCESS_GEO_ZONE_REDUNDANT = "ReadAccessGeoZoneRedundant" -class StorageTypeState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class StorageTypeState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. """ @@ -612,7 +622,7 @@ class StorageTypeState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): LOCKED = "Locked" UNLOCKED = "Unlocked" -class SupportStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SupportStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Support status of feature """ @@ -622,7 +632,7 @@ class SupportStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DEFAULT_ON = "DefaultON" NOT_SUPPORTED = "NotSupported" -class Type(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Type(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Backup management type for this container. """ @@ -630,7 +640,7 @@ class Type(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): BACKUP_PROTECTED_ITEM_COUNT_SUMMARY = "BackupProtectedItemCountSummary" BACKUP_PROTECTION_CONTAINER_COUNT_SUMMARY = "BackupProtectionContainerCountSummary" -class UsagesUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class UsagesUnit(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Unit of the usage. """ @@ -641,7 +651,7 @@ class UsagesUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): COUNT_PER_SECOND = "CountPerSecond" BYTES_PER_SECOND = "BytesPerSecond" -class ValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ValidationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Validation Status """ @@ -649,7 +659,7 @@ class ValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SUCCEEDED = "Succeeded" FAILED = "Failed" -class WeekOfMonth(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class WeekOfMonth(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): FIRST = "First" SECOND = "Second" @@ -658,7 +668,7 @@ class WeekOfMonth(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): LAST = "Last" INVALID = "Invalid" -class WorkloadItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class WorkloadItemType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Workload item type of the item for which intent is to be set """ @@ -670,8 +680,8 @@ class WorkloadItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SAP_ASE_SYSTEM = "SAPAseSystem" SAP_ASE_DATABASE = "SAPAseDatabase" -class WorkloadType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Workload type of backup item. +class WorkloadType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of workload for the backup management """ INVALID = "Invalid" @@ -689,3 +699,11 @@ class WorkloadType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): AZURE_FILE_SHARE = "AzureFileShare" SAP_HANA_DATABASE = "SAPHanaDatabase" SAP_ASE_DATABASE = "SAPAseDatabase" + +class XcoolState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Vault x-cool state + """ + + INVALID = "Invalid" + ENABLED = "Enabled" + DISABLED = "Disabled" 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..262a069be4dc 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 @@ -34,6 +34,9 @@ from ._jobs_operations import JobsOperations from ._backup_protected_items_operations import BackupProtectedItemsOperations from ._operation_operations import OperationOperations +from ._validate_operation_operations import ValidateOperationOperations +from ._validate_operation_results_operations import ValidateOperationResultsOperations +from ._validate_operation_statuses_operations import ValidateOperationStatusesOperations from ._backup_engines_operations import BackupEnginesOperations from ._protection_container_refresh_operation_results_operations import ProtectionContainerRefreshOperationResultsOperations from ._protectable_containers_operations import ProtectableContainersOperations @@ -52,16 +55,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', @@ -92,6 +85,9 @@ 'JobsOperations', 'BackupProtectedItemsOperations', 'OperationOperations', + 'ValidateOperationOperations', + 'ValidateOperationResultsOperations', + 'ValidateOperationStatusesOperations', 'BackupEnginesOperations', 'ProtectionContainerRefreshOperationResultsOperations', 'ProtectableContainersOperations', @@ -110,14 +106,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/_backup_engines_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py index 18b91322a7f2..5588cf39ccc2 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py @@ -5,24 +5,120 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + backup_engine_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "backupEngineName": _SERIALIZER.url("backup_engine_name", backup_engine_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupEnginesOperations(object): """BackupEnginesOperations operations. @@ -45,6 +141,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -66,50 +163,56 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either BackupEngineBaseResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResourceList] + :return: An iterator like instance of either BackupEngineBaseResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupEngineBaseResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('BackupEngineBaseResourceList', pipeline_response) + deserialized = self._deserialize("BackupEngineBaseResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -127,11 +230,13 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged( get_next, extract_data ) list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines'} # type: ignore + @distributed_trace def get( self, vault_name, # type: str @@ -155,6 +260,9 @@ def get( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupEngineBaseResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResource @@ -165,32 +273,23 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'backupEngineName': self._serialize.url("backup_engine_name", backup_engine_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') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + backup_engine_name=backup_engine_name, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -204,4 +303,6 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_jobs_operations.py index d4c27b63eb60..5e879d6fa025 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_jobs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_jobs_operations.py @@ -5,24 +5,75 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupJobsOperations(object): """BackupJobsOperations operations. @@ -45,6 +96,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -65,50 +117,54 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + 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 = "2021-08-01" - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('JobResourceList', pipeline_response) + deserialized = self._deserialize("JobResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -126,6 +182,7 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_results_operations.py index da93e057c37a..30b9cbd0ea53 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_results_operations.py @@ -5,23 +5,70 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupOperationResultsOperations(object): """BackupOperationResultsOperations operations. @@ -44,6 +91,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -67,6 +115,9 @@ def get( :type resource_group_name: str :param operation_id: OperationID which represents the operation. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -77,28 +128,21 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -110,3 +154,4 @@ def get( return cls(pipeline_response, None, {}) get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_statuses_operations.py index b2fc5c5eaef4..027985bd9107 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_statuses_operations.py @@ -5,23 +5,70 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupOperationStatusesOperations(object): """BackupOperationStatusesOperations operations. @@ -44,6 +91,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -65,6 +113,9 @@ def get( :type resource_group_name: str :param operation_id: OperationID which represents the operation. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -75,28 +126,21 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -110,4 +154,6 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_policies_operations.py index 96e3059e557c..fc440863b18f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_policies_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_policies_operations.py @@ -5,24 +5,72 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupPoliciesOperations(object): """BackupPoliciesOperations operations. @@ -45,6 +93,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -64,48 +113,54 @@ def list( :type resource_group_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectionPolicyResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResourceList] + :return: An iterator like instance of either ProtectionPolicyResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionPolicyResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectionPolicyResourceList', pipeline_response) + deserialized = self._deserialize("ProtectionPolicyResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -123,6 +178,7 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protectable_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protectable_items_operations.py index fb64b6e5649a..f2274f24429c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protectable_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protectable_items_operations.py @@ -5,24 +5,75 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupProtectableItemsOperations(object): """BackupProtectableItemsOperations operations. @@ -45,6 +96,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -67,50 +119,56 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadProtectableItemResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResourceList] + :return: An iterator like instance of either WorkloadProtectableItemResourceList or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadProtectableItemResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadProtectableItemResourceList', pipeline_response) + deserialized = self._deserialize("WorkloadProtectableItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -128,6 +186,7 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py index dfd4b29c25e4..2e57bbb78174 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py @@ -5,24 +5,75 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupProtectedItemsOperations(object): """BackupProtectedItemsOperations operations. @@ -45,6 +96,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -65,50 +117,56 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :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 """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + 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 = "2021-08-01" - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectedItemResourceList', pipeline_response) + deserialized = self._deserialize("ProtectedItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -126,6 +184,7 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py index 29e77faa867c..36470929ea83 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py @@ -5,24 +5,72 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupProtectionContainersOperations(object): """BackupProtectionContainersOperations operations. @@ -45,6 +93,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -62,48 +111,54 @@ def list( :type resource_group_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectionContainerResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResourceList] + :return: An iterator like instance of either ProtectionContainerResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionContainerResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectionContainerResourceList', pipeline_response) + deserialized = self._deserialize("ProtectionContainerResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -121,6 +176,7 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_intent_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_intent_operations.py index 89f4f6241b10..5739baad1fb4 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_intent_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_intent_operations.py @@ -5,24 +5,75 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupProtectionIntentOperations(object): """BackupProtectionIntentOperations operations. @@ -45,6 +96,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -65,50 +117,56 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectionIntentResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResourceList] + :return: An iterator like instance of either ProtectionIntentResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionIntentResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectionIntentResourceList', pipeline_response) + deserialized = self._deserialize("ProtectionIntentResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -126,6 +184,7 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_encryption_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_encryption_configs_operations.py index c2318886521d..64f017ef6edf 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_encryption_configs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_encryption_configs_operations.py @@ -5,23 +5,108 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_update_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupResourceEncryptionConfigsOperations(object): """BackupResourceEncryptionConfigsOperations operations. @@ -44,6 +129,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -58,9 +144,13 @@ def get( :param resource_group_name: The name of the resource group where the recovery services vault is present. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupResourceEncryptionConfigExtendedResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtendedResource + :rtype: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtendedResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceEncryptionConfigExtendedResource"] @@ -68,33 +158,26 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupResourceEncryptionConfigExtendedResource', pipeline_response) @@ -103,8 +186,11 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig'} # type: ignore + + @distributed_trace def update( self, vault_name, # type: str @@ -121,7 +207,11 @@ def update( present. :type resource_group_name: str :param parameters: Vault encryption input config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -132,41 +222,34 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupResourceEncryptionConfigResource') - # 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') + request = build_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupResourceEncryptionConfigResource') - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_non_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_non_crr_operations.py index db0a78c1b91d..a822d7a11207 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_non_crr_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_non_crr_operations.py @@ -5,23 +5,148 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_update_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_patch_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupResourceStorageConfigsNonCRROperations(object): """BackupResourceStorageConfigsNonCRROperations operations. @@ -44,6 +169,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -58,6 +184,9 @@ def get( :param resource_group_name: The name of the resource group where the recovery services vault is present. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -68,33 +197,26 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) @@ -103,8 +225,11 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore + + @distributed_trace def update( self, vault_name, # type: str @@ -122,6 +247,9 @@ def update( :type resource_group_name: str :param parameters: Vault storage config request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -132,38 +260,30 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupResourceConfigResource') - # 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') + request = build_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) @@ -172,8 +292,11 @@ def update( return cls(pipeline_response, deserialized, {}) return deserialized + update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore + + @distributed_trace def patch( self, vault_name, # type: str @@ -191,6 +314,9 @@ def patch( :type resource_group_name: str :param parameters: Vault storage config request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -201,41 +327,34 @@ def patch( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'BackupResourceConfigResource') + + request = build_patch_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.patch.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_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_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_resource_vault_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_vault_configs_operations.py index 0e194112cafe..66eb3a256d74 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_vault_configs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_vault_configs_operations.py @@ -5,23 +5,148 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_update_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_put_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupResourceVaultConfigsOperations(object): """BackupResourceVaultConfigsOperations operations. @@ -44,6 +169,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -58,6 +184,9 @@ def get( :param resource_group_name: The name of the resource group where the recovery services vault is present. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupResourceVaultConfigResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource @@ -68,33 +197,26 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) @@ -103,8 +225,11 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} # type: ignore + + @distributed_trace def update( self, vault_name, # type: str @@ -122,6 +247,9 @@ def update( :type resource_group_name: str :param parameters: resource config request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupResourceVaultConfigResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource @@ -132,38 +260,30 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupResourceVaultConfigResource') - # 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') + request = build_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupResourceVaultConfigResource') - 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 [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) @@ -172,8 +292,11 @@ def update( return cls(pipeline_response, deserialized, {}) return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} # type: ignore + + @distributed_trace def put( self, vault_name, # type: str @@ -191,6 +314,9 @@ def put( :type resource_group_name: str :param parameters: resource config request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupResourceVaultConfigResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource @@ -201,38 +327,30 @@ def put( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.put.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'BackupResourceVaultConfigResource') + + request = build_put_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.put.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupResourceVaultConfigResource') - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) @@ -241,4 +359,6 @@ def put( return cls(pipeline_response, deserialized, {}) return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_status_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_status_operations.py index b42bedf4d2d1..77d4bdd15a15 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_status_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_status_operations.py @@ -5,23 +5,69 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + azure_region, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus') + path_format_arguments = { + "azureRegion": _SERIALIZER.url("azure_region", azure_region, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupStatusOperations(object): """BackupStatusOperations operations. @@ -44,6 +90,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, azure_region, # type: str @@ -59,6 +106,9 @@ def get( :type azure_region: str :param parameters: Container Backup Status Request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupStatusRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: BackupStatusResponse, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupStatusResponse @@ -69,31 +119,23 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupStatusRequest') - # 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') + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupStatusRequest') - 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 @@ -107,4 +149,6 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py index c484700883cd..d32a2132f965 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py @@ -5,24 +5,75 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupUsageSummariesOperations(object): """BackupUsageSummariesOperations operations. @@ -45,6 +96,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -65,50 +117,56 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :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 """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + 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 = "2021-08-01" - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('BackupManagementUsageList', pipeline_response) + deserialized = self._deserialize("BackupManagementUsageList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -126,6 +184,7 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py index ba086d19548e..b5f92bc58ad7 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py @@ -5,24 +5,79 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupWorkloadItemsOperations(object): """BackupWorkloadItemsOperations operations. @@ -45,6 +100,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -73,52 +129,60 @@ def list( :type filter: str :param skip_token: skipToken Filter. :type skip_token: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadItemResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResourceList] + :return: An iterator like instance of either WorkloadItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadItemResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - } - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + api_version=api_version, + filter=filter, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadItemResourceList', pipeline_response) + deserialized = self._deserialize("WorkloadItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -136,6 +200,7 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backups_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backups_operations.py index 29c41688404b..499c40153b13 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backups_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backups_operations.py @@ -5,23 +5,77 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_trigger_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BackupsOperations(object): """BackupsOperations operations. @@ -44,6 +98,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def trigger( self, vault_name, # type: str @@ -72,6 +127,9 @@ def trigger( :type protected_item_name: str :param parameters: resource backup request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupRequestResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -82,35 +140,27 @@ def trigger( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.trigger.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupRequestResource') + + request = build_trigger_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.trigger.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # 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, 'BackupRequestResource') - 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 @@ -122,3 +172,4 @@ def trigger( return cls(pipeline_response, None, {}) trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py index f860d252bca6..74839b6e6f90 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py @@ -5,23 +5,70 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationResults/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class BMSPrepareDataMoveOperationResultOperations(object): """BMSPrepareDataMoveOperationResultOperations operations. @@ -44,6 +91,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -61,9 +109,13 @@ def get( :type resource_group_name: str :param operation_id: :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VaultStorageConfigOperationResultResponse, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.VaultStorageConfigOperationResultResponse or None + :rtype: ~azure.mgmt.recoveryservicesbackup.models.VaultStorageConfigOperationResultResponse or + None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VaultStorageConfigOperationResultResponse"]] @@ -71,34 +123,27 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -109,4 +154,6 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py index 875e6b29abcf..19279ac31ccb 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py @@ -5,23 +5,70 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ExportJobsOperationResultsOperations(object): """ExportJobsOperationResultsOperations operations. @@ -44,6 +91,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -64,6 +112,9 @@ def get( :type resource_group_name: str :param operation_id: OperationID which represents the export job. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationResultInfoBaseResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationResultInfoBaseResource @@ -74,28 +125,21 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -113,4 +157,6 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_feature_support_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_feature_support_operations.py index 073ade8447fe..88e1c039e2ed 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_feature_support_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_feature_support_operations.py @@ -5,23 +5,69 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_validate_request( + azure_region, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures') + path_format_arguments = { + "azureRegion": _SERIALIZER.url("azure_region", azure_region, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class FeatureSupportOperations(object): """FeatureSupportOperations operations. @@ -44,6 +90,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def validate( self, azure_region, # type: str @@ -59,6 +106,9 @@ def validate( :type azure_region: str :param parameters: Feature support request object. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.FeatureSupportRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureVMResourceFeatureSupportResponse, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.AzureVMResourceFeatureSupportResponse @@ -69,31 +119,23 @@ def validate( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.validate.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'FeatureSupportRequest') - # 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') + request = build_validate_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.validate.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'FeatureSupportRequest') - 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 @@ -107,4 +149,6 @@ def validate( return cls(pipeline_response, deserialized, {}) return deserialized + validate.metadata = {'url': '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_item_level_recovery_connections_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_item_level_recovery_connections_operations.py index a30950df6363..5864fc116300 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_item_level_recovery_connections_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_item_level_recovery_connections_operations.py @@ -5,23 +5,124 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_provision_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + recovery_point_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + "recoveryPointId": _SERIALIZER.url("recovery_point_id", recovery_point_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_revoke_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + recovery_point_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + "recoveryPointId": _SERIALIZER.url("recovery_point_id", recovery_point_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ItemLevelRecoveryConnectionsOperations(object): """ItemLevelRecoveryConnectionsOperations operations. @@ -44,6 +145,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def provision( self, vault_name, # type: str @@ -79,6 +181,9 @@ def provision( :type recovery_point_id: str :param parameters: resource ILR request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ILRRequestResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -89,36 +194,28 @@ def provision( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.provision.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ILRRequestResource') - # 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') + request = build_provision_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.provision.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ILRRequestResource') - 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 @@ -131,6 +228,8 @@ def provision( provision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery'} # type: ignore + + @distributed_trace def revoke( self, vault_name, # type: str @@ -161,6 +260,9 @@ def revoke( will be revoked for this backed up data. :type recovery_point_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -171,31 +273,24 @@ def revoke( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.revoke.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_revoke_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + api_version=api_version, + template_url=self.revoke.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -207,3 +302,4 @@ def revoke( return cls(pipeline_response, None, {}) revoke.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_cancellations_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_cancellations_operations.py index 2713c58df457..cb694a200884 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_cancellations_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_cancellations_operations.py @@ -5,23 +5,70 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_trigger_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + job_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "jobName": _SERIALIZER.url("job_name", job_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class JobCancellationsOperations(object): """JobCancellationsOperations operations. @@ -44,6 +91,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def trigger( self, vault_name, # type: str @@ -62,6 +110,9 @@ def trigger( :type resource_group_name: str :param job_name: Name of the job to cancel. :type job_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -72,28 +123,21 @@ def trigger( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.trigger.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'), - 'jobName': self._serialize.url("job_name", job_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_trigger_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + job_name=job_name, + api_version=api_version, + template_url=self.trigger.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -105,3 +149,4 @@ def trigger( return cls(pipeline_response, None, {}) trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_details_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_details_operations.py index b92495c6777f..1983cd78f90d 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_details_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_details_operations.py @@ -5,23 +5,70 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + job_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "jobName": _SERIALIZER.url("job_name", job_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class JobDetailsOperations(object): """JobDetailsOperations operations. @@ -44,6 +91,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -61,6 +109,9 @@ def get( :type resource_group_name: str :param job_name: Name of the job whose details are to be fetched. :type job_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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 @@ -71,28 +122,21 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'jobName': self._serialize.url("job_name", job_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + job_name=job_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -106,4 +150,6 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_operation_results_operations.py index e9aef23b51d4..a43c754cff98 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_operation_results_operations.py @@ -5,23 +5,72 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + job_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "jobName": _SERIALIZER.url("job_name", job_name, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class JobOperationResultsOperations(object): """JobOperationResultsOperations operations. @@ -44,6 +93,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -64,6 +114,9 @@ def get( :type job_name: str :param operation_id: OperationID which represents the operation whose result has to be fetched. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -74,29 +127,22 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'jobName': self._serialize.url("job_name", job_name, '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + job_name=job_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # 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 @@ -108,3 +154,4 @@ def get( return cls(pipeline_response, None, {}) get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_jobs_operations.py index 25692cfce608..1e4a41c7487b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_jobs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_jobs_operations.py @@ -5,23 +5,71 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_export_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class JobsOperations(object): """JobsOperations operations. @@ -44,6 +92,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def export( self, vault_name, # type: str @@ -61,6 +110,9 @@ def export( :type resource_group_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -71,29 +123,21 @@ def export( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.export.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_export_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + filter=filter, + template_url=self.export.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -105,3 +149,4 @@ def export( return cls(pipeline_response, None, {}) export.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operation_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operation_operations.py index e9ba5a00de5b..82cac5207298 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operation_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operation_operations.py @@ -5,23 +5,71 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_validate_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperation') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class OperationOperations(object): """OperationOperations operations. @@ -44,6 +92,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def validate( self, vault_name, # type: str @@ -61,6 +110,9 @@ def validate( :type resource_group_name: str :param parameters: resource validate operation request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ValidateOperationsResponse, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationsResponse @@ -71,32 +123,24 @@ def validate( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.validate.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ValidateOperationRequest') - # 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') + request = build_validate_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.validate.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ValidateOperationRequest') - 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 @@ -110,4 +154,6 @@ def validate( return cls(pipeline_response, deserialized, {}) return deserialized + validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperation'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operations.py index cec78994caad..315fe686df47 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operations.py @@ -5,24 +5,59 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/providers/Microsoft.RecoveryServices/operations') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class Operations(object): """Operations operations. @@ -45,6 +80,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, **kwargs # type: Any @@ -52,40 +88,46 @@ def list( # type: (...) -> Iterable["_models.ClientDiscoveryResponse"] """Returns the list of available operations. + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ClientDiscoveryResponse or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryResponse] + :return: An iterator like instance of either ClientDiscoveryResponse or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClientDiscoveryResponse"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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 - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + + request = build_list_request( + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('ClientDiscoveryResponse', pipeline_response) + deserialized = self._deserialize("ClientDiscoveryResponse", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -103,6 +145,7 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_connection_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_connection_operations.py index 1b40295b6cc6..36763f89cfd0 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_connection_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_connection_operations.py @@ -5,25 +5,153 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_put_request_initial( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class PrivateEndpointConnectionOperations(object): """PrivateEndpointConnectionOperations operations. @@ -46,6 +174,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -63,6 +192,9 @@ def get( :type resource_group_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnectionResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionResource @@ -73,34 +205,27 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) @@ -109,8 +234,10 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + def _put_initial( self, vault_name, # type: str @@ -125,33 +252,25 @@ def _put_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._put_initial.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'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'PrivateEndpointConnectionResource') + + request = build_put_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._put_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PrivateEndpointConnectionResource') - 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 @@ -169,8 +288,11 @@ def _put_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + @distributed_trace def begin_put( self, vault_name, # type: str @@ -191,17 +313,26 @@ def begin_put( :type private_endpoint_connection_name: str :param parameters: Request body for operation. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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 PrivateEndpointConnectionResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionResource] - :raises ~azure.core.exceptions.HttpResponseError: + :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 PrivateEndpointConnectionResource or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionResource] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -214,28 +345,22 @@ def begin_put( resource_group_name=resource_group_name, private_endpoint_connection_name=private_endpoint_connection_name, parameters=parameters, + api_version=api_version, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + response = pipeline_response.http_response deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -247,6 +372,7 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore def _delete_initial( @@ -262,28 +388,21 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.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'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_delete_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -296,6 +415,8 @@ def _delete_initial( _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + @distributed_trace def begin_delete( self, vault_name, # type: str @@ -313,17 +434,23 @@ def begin_delete( :type resource_group_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -335,25 +462,18 @@ def begin_delete( vault_name=vault_name, resource_group_name=resource_group_name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, 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 = { - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -365,4 +485,5 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py index 540984fde373..60aa3d29f059 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py @@ -5,23 +5,72 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_operation_status_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + private_endpoint_connection_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class PrivateEndpointOperations(object): """PrivateEndpointOperations operations. @@ -44,6 +93,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get_operation_status( self, vault_name, # type: str @@ -66,6 +116,9 @@ def get_operation_status( :type private_endpoint_connection_name: str :param operation_id: Operation id. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -76,35 +129,28 @@ def get_operation_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.get_operation_status.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'), - 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_operation_status_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + private_endpoint_connection_name=private_endpoint_connection_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get_operation_status.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('OperationStatus', pipeline_response) @@ -113,4 +159,6 @@ def get_operation_status( return cls(pipeline_response, deserialized, {}) return deserialized + get_operation_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protectable_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protectable_containers_operations.py index 0ca0df5b9c3a..a0bbe4388a5c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protectable_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protectable_containers_operations.py @@ -5,24 +5,74 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ProtectableContainersOperations(object): """ProtectableContainersOperations operations. @@ -45,6 +95,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -65,49 +116,56 @@ def list( :type fabric_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectableContainerResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResourceList] + :return: An iterator like instance of either ProtectableContainerResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectableContainerResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - } - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + api_version=api_version, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + api_version=api_version, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectableContainerResourceList', pipeline_response) + deserialized = self._deserialize("ProtectableContainerResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -125,6 +183,7 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_results_operations.py index 686c9dc62299..077cfec71f46 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_results_operations.py @@ -5,23 +5,76 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ProtectedItemOperationResultsOperations(object): """ProtectedItemOperationResultsOperations operations. @@ -44,6 +97,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -71,6 +125,9 @@ def get( :param operation_id: OperationID which represents the operation whose result needs to be fetched. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectedItemResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource or None @@ -81,31 +138,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -121,4 +171,6 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_statuses_operations.py index 494d84541d12..04ea96406049 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_statuses_operations.py @@ -5,23 +5,76 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ProtectedItemOperationStatusesOperations(object): """ProtectedItemOperationStatusesOperations operations. @@ -44,6 +97,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -74,6 +128,9 @@ def get( :type protected_item_name: str :param operation_id: OperationID represents the operation whose status needs to be fetched. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -84,31 +141,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -122,4 +172,6 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_items_operations.py index 97efdc1f6d6f..27a14d390fc2 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_items_operations.py @@ -5,23 +5,166 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ProtectedItemsOperations(object): """ProtectedItemsOperations operations. @@ -44,6 +187,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -72,6 +216,9 @@ def get( :type protected_item_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectedItemResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource @@ -82,32 +229,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + filter=filter, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -121,8 +260,11 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} # type: ignore + + @distributed_trace def create_or_update( self, vault_name, # type: str @@ -152,6 +294,9 @@ def create_or_update( :type protected_item_name: str :param parameters: resource backed up item. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectedItemResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource or None @@ -162,35 +307,27 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ProtectedItemResource') + + request = build_create_or_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # 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, 'ProtectedItemResource') - 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 @@ -206,8 +343,11 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} # type: ignore + + @distributed_trace def delete( self, vault_name, # type: str @@ -233,6 +373,9 @@ def delete( :type container_name: str :param protected_item_name: Backed up item to be deleted. :type protected_item_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -243,30 +386,23 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.delete.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') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_delete_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -278,3 +414,4 @@ def delete( return cls(pipeline_response, None, {}) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_operation_results_operations.py index 300a25276d95..f735afc1dee8 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_operation_results_operations.py @@ -5,23 +5,74 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ProtectionContainerOperationResultsOperations(object): """ProtectionContainerOperationResultsOperations operations. @@ -44,6 +95,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -68,6 +120,9 @@ def get( :param operation_id: Operation ID which represents the operation whose result needs to be fetched. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionContainerResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource or None @@ -78,30 +133,23 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), - 'containerName': self._serialize.url("container_name", container_name, '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -117,4 +165,6 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_refresh_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_refresh_operation_results_operations.py index 2b720baee343..cdc9574e4ddd 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_refresh_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_refresh_operation_results_operations.py @@ -5,23 +5,72 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ProtectionContainerRefreshOperationResultsOperations(object): """ProtectionContainerRefreshOperationResultsOperations operations. @@ -44,6 +93,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -65,6 +115,9 @@ def get( :param operation_id: Operation ID associated with the operation whose result needs to be fetched. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -75,29 +128,22 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'fabricName': self._serialize.url("fabric_name", fabric_name, '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # 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 @@ -109,3 +155,4 @@ def get( return cls(pipeline_response, None, {}) get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_containers_operations.py index f39c58d3806b..b645d6bb2da1 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_containers_operations.py @@ -5,23 +5,243 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_register_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_unregister_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_inquire_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_refresh_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ProtectionContainersOperations(object): """ProtectionContainersOperations operations. @@ -44,6 +264,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -64,6 +285,9 @@ def get( :type fabric_name: str :param container_name: Name of the container whose details need to be fetched. :type container_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionContainerResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource @@ -74,29 +298,22 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), - 'containerName': self._serialize.url("container_name", container_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') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -110,8 +327,11 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} # type: ignore + + @distributed_trace def register( self, vault_name, # type: str @@ -138,6 +358,9 @@ def register( :type container_name: str :param parameters: Request body for operation. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionContainerResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource or None @@ -148,34 +371,26 @@ def register( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.register.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'), - } - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ProtectionContainerResource') + + request = build_register_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.register.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ProtectionContainerResource') - 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 @@ -191,8 +406,11 @@ def register( return cls(pipeline_response, deserialized, {}) return deserialized + register.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} # type: ignore + + @distributed_trace def unregister( self, vault_name, # type: str @@ -217,6 +435,9 @@ def unregister( :param container_name: Name of the container which needs to be unregistered from the Recovery Services Vault. :type container_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -227,29 +448,22 @@ def unregister( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.unregister.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'), - } - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_unregister_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + api_version=api_version, + template_url=self.unregister.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -262,6 +476,8 @@ def unregister( unregister.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} # type: ignore + + @distributed_trace def inquire( self, vault_name, # type: str @@ -288,6 +504,9 @@ def inquire( :type container_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -298,31 +517,23 @@ def inquire( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.inquire.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'), - } - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_inquire_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + api_version=api_version, + filter=filter, + template_url=self.inquire.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -335,6 +546,8 @@ def inquire( inquire.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire'} # type: ignore + + @distributed_trace def refresh( self, vault_name, # type: str @@ -358,6 +571,9 @@ def refresh( :type fabric_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -368,30 +584,22 @@ def refresh( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.refresh.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'), - } - 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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_refresh_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + api_version=api_version, + filter=filter, + template_url=self.refresh.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -403,3 +611,4 @@ def refresh( return cls(pipeline_response, None, {}) refresh.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_intent_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_intent_operations.py index 68c9cb1a77b2..3acd40287460 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_intent_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_intent_operations.py @@ -5,23 +5,189 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_validate_request( + azure_region, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection') + path_format_arguments = { + "azureRegion": _SERIALIZER.url("azure_region", azure_region, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + intent_object_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "intentObjectName": _SERIALIZER.url("intent_object_name", intent_object_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + intent_object_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "intentObjectName": _SERIALIZER.url("intent_object_name", intent_object_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + intent_object_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + # Construct URL + url = kwargs.pop("template_url", '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "intentObjectName": _SERIALIZER.url("intent_object_name", intent_object_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + **kwargs + ) + +# fmt: on class ProtectionIntentOperations(object): """ProtectionIntentOperations operations. @@ -44,6 +210,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def validate( self, azure_region, # type: str @@ -69,6 +236,9 @@ def validate( :type azure_region: str :param parameters: Enable backup validation request on Virtual Machine. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.PreValidateEnableBackupRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PreValidateEnableBackupResponse, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.PreValidateEnableBackupResponse @@ -79,31 +249,23 @@ def validate( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.validate.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'PreValidateEnableBackupRequest') + + request = build_validate_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.validate.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PreValidateEnableBackupRequest') - 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 @@ -117,8 +279,11 @@ def validate( return cls(pipeline_response, deserialized, {}) return deserialized + validate.metadata = {'url': '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection'} # type: ignore + + @distributed_trace def get( self, vault_name, # type: str @@ -141,6 +306,9 @@ def get( :type fabric_name: str :param intent_object_name: Backed up item name whose details are to be fetched. :type intent_object_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionIntentResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource @@ -151,29 +319,22 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), - 'intentObjectName': self._serialize.url("intent_object_name", intent_object_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + intent_object_name=intent_object_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # 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 @@ -187,8 +348,11 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}'} # type: ignore + + @distributed_trace def create_or_update( self, vault_name, # type: str @@ -212,6 +376,9 @@ def create_or_update( :type intent_object_name: str :param parameters: resource backed up item. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionIntentResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource @@ -222,34 +389,26 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_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'), - 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), - 'intentObjectName': self._serialize.url("intent_object_name", intent_object_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ProtectionIntentResource') + + request = build_create_or_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + intent_object_name=intent_object_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # 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, 'ProtectionIntentResource') - 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 @@ -263,8 +422,11 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}'} # type: ignore + + @distributed_trace def delete( self, vault_name, # type: str @@ -285,6 +447,9 @@ def delete( :type fabric_name: str :param intent_object_name: Intent to be deleted. :type intent_object_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -295,27 +460,22 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - - # Construct URL - url = self.delete.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'), - 'intentObjectName': self._serialize.url("intent_object_name", intent_object_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_delete_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + intent_object_name=intent_object_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -327,3 +487,4 @@ def delete( return cls(pipeline_response, None, {}) delete.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policies_operations.py index 2b48ce38183c..ea575a6760e2 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policies_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policies_operations.py @@ -5,25 +5,153 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + policy_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "policyName": _SERIALIZER.url("policy_name", policy_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + policy_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "policyName": _SERIALIZER.url("policy_name", policy_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + policy_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "policyName": _SERIALIZER.url("policy_name", policy_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ProtectionPoliciesOperations(object): """ProtectionPoliciesOperations operations. @@ -46,6 +174,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -65,6 +194,9 @@ def get( :type resource_group_name: str :param policy_name: Backup policy information to be fetched. :type policy_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionPolicyResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource @@ -75,28 +207,21 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'policyName': self._serialize.url("policy_name", policy_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + policy_name=policy_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -110,8 +235,11 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} # type: ignore + + @distributed_trace def create_or_update( self, vault_name, # type: str @@ -134,6 +262,9 @@ def create_or_update( :type policy_name: str :param parameters: resource backup policy. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionPolicyResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource or None @@ -144,33 +275,25 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_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'), - 'policyName': self._serialize.url("policy_name", policy_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ProtectionPolicyResource') - # 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') + request = build_create_or_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + policy_name=policy_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ProtectionPolicyResource') - 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 @@ -186,8 +309,10 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} # type: ignore + def _delete_initial( self, vault_name, # type: str @@ -201,28 +326,21 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.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'), - 'policyName': self._serialize.url("policy_name", policy_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_delete_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + policy_name=policy_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -235,6 +353,8 @@ def _delete_initial( _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} # type: ignore + + @distributed_trace def begin_delete( self, vault_name, # type: str @@ -254,17 +374,23 @@ def begin_delete( :type resource_group_name: str :param policy_name: Backup policy to be deleted. :type policy_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -276,25 +402,18 @@ def begin_delete( vault_name=vault_name, resource_group_name=resource_group_name, policy_name=policy_name, + api_version=api_version, 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 = { - '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'), - 'policyName': self._serialize.url("policy_name", policy_name, 'str'), - } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -306,4 +425,5 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_results_operations.py index d219d859a1a9..cab4e2ded191 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_results_operations.py @@ -5,23 +5,72 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + policy_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "policyName": _SERIALIZER.url("policy_name", policy_name, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ProtectionPolicyOperationResultsOperations(object): """ProtectionPolicyOperationResultsOperations operations. @@ -44,6 +93,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -65,6 +115,9 @@ def get( :param operation_id: Operation ID which represents the operation whose result needs to be fetched. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ProtectionPolicyResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource @@ -75,29 +128,22 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'policyName': self._serialize.url("policy_name", policy_name, '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + policy_name=policy_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -111,4 +157,6 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_statuses_operations.py index 7569d503d056..c05602bbff66 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_statuses_operations.py @@ -5,23 +5,72 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + policy_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "policyName": _SERIALIZER.url("policy_name", policy_name, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ProtectionPolicyOperationStatusesOperations(object): """ProtectionPolicyOperationStatusesOperations operations. @@ -44,6 +93,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -69,6 +119,9 @@ def get( :param operation_id: Operation ID which represents an operation whose status needs to be fetched. :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -79,29 +132,22 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'policyName': self._serialize.url("policy_name", policy_name, '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + policy_name=policy_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -115,4 +161,6 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}'} # 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..df646eaecf17 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 @@ -5,24 +5,123 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + filter = kwargs.pop('filter', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + recovery_point_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + "recoveryPointId": _SERIALIZER.url("recovery_point_id", recovery_point_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class RecoveryPointsOperations(object): """RecoveryPointsOperations operations. @@ -45,6 +144,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -71,51 +171,60 @@ def list( :type protected_item_name: str :param filter: OData filter options. :type filter: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :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 """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + 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 = "2021-08-01" - 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) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('RecoveryPointResourceList', pipeline_response) + deserialized = self._deserialize("RecoveryPointResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -133,11 +242,13 @@ def get_next(next_link=None): 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 + @distributed_trace def get( self, vault_name, # type: str @@ -166,6 +277,9 @@ def get( :type protected_item_name: str :param recovery_point_id: RecoveryPointID represents the backed up data to be fetched. :type recovery_point_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecoveryPointResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResource @@ -176,31 +290,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - '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['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -214,93 +321,6 @@ def get( return cls(pipeline_response, deserialized, {}) 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, {}) + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}'} # type: ignore - 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/operations/_recovery_points_recommended_for_move_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_recommended_for_move_operations.py index 893f3cb6071d..98081b5f287d 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_recommended_for_move_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_recommended_for_move_operations.py @@ -5,24 +5,78 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPointsRecommendedForMove') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class RecoveryPointsRecommendedForMoveOperations(object): """RecoveryPointsRecommendedForMoveOperations operations. @@ -45,6 +99,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, vault_name, # type: str @@ -70,58 +125,67 @@ def list( :param protected_item_name: :type protected_item_name: str :param parameters: List Recovery points Recommended for Move Request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest + :type parameters: + ~azure.mgmt.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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] + :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 """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + 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 = "2021-08-01" - 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 = { - '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') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ListRecoveryPointsRecommendedForMoveRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(parameters, 'ListRecoveryPointsRecommendedForMoveRequest') + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ListRecoveryPointsRecommendedForMoveRequest') - body_content_kwargs['content'] = body_content - request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(parameters, 'ListRecoveryPointsRecommendedForMoveRequest') + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('RecoveryPointResourceList', pipeline_response) + deserialized = self._deserialize("RecoveryPointResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -139,6 +203,7 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_services_backup_client_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_services_backup_client_operations.py index 48810877fd87..2dca963fe32e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_services_backup_client_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_services_backup_client_operations.py @@ -5,27 +5,203 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_operation_status_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationStatus/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_bms_prepare_data_move_request_initial( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/prepareDataMove') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_bms_trigger_data_move_request_initial( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/triggerDataMove') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_move_recovery_point_request_initial( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + recovery_point_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/move') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + "recoveryPointId": _SERIALIZER.url("recovery_point_id", recovery_point_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class RecoveryServicesBackupClientOperationsMixin(object): + @distributed_trace def get_operation_status( self, vault_name, # type: str @@ -43,6 +219,9 @@ def get_operation_status( :type resource_group_name: str :param operation_id: :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -53,34 +232,27 @@ def get_operation_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.get_operation_status.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'), - '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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_operation_status_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get_operation_status.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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.NewErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('OperationStatus', pipeline_response) @@ -89,8 +261,10 @@ def get_operation_status( return cls(pipeline_response, deserialized, {}) return deserialized + get_operation_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationStatus/{operationId}'} # type: ignore + def _bms_prepare_data_move_initial( self, vault_name, # type: str @@ -104,45 +278,38 @@ def _bms_prepare_data_move_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._bms_prepare_data_move_initial.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PrepareDataMoveRequest') - # 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') + request = build_bms_prepare_data_move_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._bms_prepare_data_move_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PrepareDataMoveRequest') - 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.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) _bms_prepare_data_move_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/prepareDataMove'} # type: ignore + + @distributed_trace def begin_bms_prepare_data_move( self, vault_name, # type: str @@ -160,17 +327,24 @@ def begin_bms_prepare_data_move( :type resource_group_name: str :param parameters: Prepare data move request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.PrepareDataMoveRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -182,24 +356,19 @@ def begin_bms_prepare_data_move( vault_name=vault_name, resource_group_name=resource_group_name, parameters=parameters, + api_version=api_version, + content_type=content_type, 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 = { - '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'), - } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -211,6 +380,7 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_bms_prepare_data_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/prepareDataMove'} # type: ignore def _bms_trigger_data_move_initial( @@ -226,45 +396,38 @@ def _bms_trigger_data_move_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._bms_trigger_data_move_initial.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'TriggerDataMoveRequest') + + request = build_bms_trigger_data_move_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._bms_trigger_data_move_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TriggerDataMoveRequest') - 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.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) _bms_trigger_data_move_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/triggerDataMove'} # type: ignore + + @distributed_trace def begin_bms_trigger_data_move( self, vault_name, # type: str @@ -282,17 +445,24 @@ def begin_bms_trigger_data_move( :type resource_group_name: str :param parameters: Trigger data move request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.TriggerDataMoveRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -304,24 +474,19 @@ def begin_bms_trigger_data_move( vault_name=vault_name, resource_group_name=resource_group_name, parameters=parameters, + api_version=api_version, + content_type=content_type, 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 = { - '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'), - } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -333,6 +498,7 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_bms_trigger_data_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/triggerDataMove'} # type: ignore def _move_recovery_point_initial( @@ -352,36 +518,28 @@ def _move_recovery_point_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._move_recovery_point_initial.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'MoveRPAcrossTiersRequest') + + request = build_move_recovery_point_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._move_recovery_point_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'MoveRPAcrossTiersRequest') - 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 @@ -394,6 +552,8 @@ def _move_recovery_point_initial( _move_recovery_point_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/move'} # type: ignore + + @distributed_trace def begin_move_recovery_point( self, vault_name, # type: str @@ -425,17 +585,24 @@ def begin_move_recovery_point( :type recovery_point_id: str :param parameters: Move Resource Across Tiers Request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.MoveRPAcrossTiersRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -451,28 +618,19 @@ def begin_move_recovery_point( protected_item_name=protected_item_name, recovery_point_id=recovery_point_id, parameters=parameters, + api_version=api_version, + content_type=content_type, 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 = { - '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'), - } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -484,4 +642,5 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_move_recovery_point.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/move'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxies_operations.py index b18a52a35e25..4d26bcc5268c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxies_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxies_operations.py @@ -5,24 +5,69 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ResourceGuardProxiesOperations(object): """ResourceGuardProxiesOperations operations. @@ -45,6 +90,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -59,46 +105,52 @@ def get( :param resource_group_name: The name of the resource group where the recovery services vault is present. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ResourceGuardProxyBaseResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResourceList] + :return: An iterator like instance of either ResourceGuardProxyBaseResourceList or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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.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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('ResourceGuardProxyBaseResourceList', pipeline_response) + deserialized = self._deserialize("ResourceGuardProxyBaseResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -116,6 +168,7 @@ def get_next(next_link=None): return pipeline_response + return ItemPaged( get_next, extract_data ) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxy_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxy_operations.py index de4740f8635c..2e1ac97e5d14 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxy_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxy_operations.py @@ -5,23 +5,190 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + resource_guard_proxy_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGuardProxyName": _SERIALIZER.url("resource_guard_proxy_name", resource_guard_proxy_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_put_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + resource_guard_proxy_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGuardProxyName": _SERIALIZER.url("resource_guard_proxy_name", resource_guard_proxy_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + resource_guard_proxy_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGuardProxyName": _SERIALIZER.url("resource_guard_proxy_name", resource_guard_proxy_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_unlock_delete_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + resource_guard_proxy_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGuardProxyName": _SERIALIZER.url("resource_guard_proxy_name", resource_guard_proxy_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ResourceGuardProxyOperations(object): """ResourceGuardProxyOperations operations. @@ -44,6 +211,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -61,6 +229,9 @@ def get( :type resource_group_name: str :param resource_guard_proxy_name: :type resource_guard_proxy_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceGuardProxyBaseResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource @@ -71,28 +242,21 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - 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'), - 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + resource_guard_proxy_name=resource_guard_proxy_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -106,8 +270,11 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore + + @distributed_trace def put( self, vault_name, # type: str @@ -126,6 +293,9 @@ def put( :type resource_group_name: str :param resource_guard_proxy_name: :type resource_guard_proxy_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceGuardProxyBaseResource, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource @@ -136,28 +306,21 @@ def put( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.put.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'), - 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_put_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + resource_guard_proxy_name=resource_guard_proxy_name, + api_version=api_version, + template_url=self.put.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.put(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -171,8 +334,11 @@ def put( return cls(pipeline_response, deserialized, {}) return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore + + @distributed_trace def delete( self, vault_name, # type: str @@ -190,6 +356,9 @@ def delete( :type resource_group_name: str :param resource_guard_proxy_name: :type resource_guard_proxy_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 @@ -200,28 +369,21 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - accept = "application/json" - - # Construct URL - url = self.delete.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'), - 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_delete_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + resource_guard_proxy_name=resource_guard_proxy_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -234,6 +396,8 @@ def delete( delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore + + @distributed_trace def unlock_delete( self, vault_name, # type: str @@ -254,6 +418,9 @@ def unlock_delete( :type resource_guard_proxy_name: str :param parameters: Request body for operation. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.UnlockDeleteRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: UnlockDeleteResponse, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.UnlockDeleteResponse @@ -264,33 +431,25 @@ def unlock_delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.unlock_delete.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'), - 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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') + _json = self._serialize.body(parameters, 'UnlockDeleteRequest') + + request = build_unlock_delete_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + resource_guard_proxy_name=resource_guard_proxy_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.unlock_delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'UnlockDeleteRequest') - 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 @@ -304,4 +463,6 @@ def unlock_delete( return cls(pipeline_response, deserialized, {}) return deserialized + unlock_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_restores_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_restores_operations.py index 7ebb62e219cb..a9836557f844 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_restores_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_restores_operations.py @@ -5,25 +5,81 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_trigger_request_initial( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + recovery_point_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "fabricName": _SERIALIZER.url("fabric_name", fabric_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + "protectedItemName": _SERIALIZER.url("protected_item_name", protected_item_name, 'str'), + "recoveryPointId": _SERIALIZER.url("recovery_point_id", recovery_point_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class RestoresOperations(object): """RestoresOperations operations. @@ -63,36 +119,28 @@ def _trigger_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._trigger_initial.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') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'RestoreRequestResource') + + request = build_trigger_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._trigger_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'RestoreRequestResource') - 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 @@ -105,6 +153,8 @@ def _trigger_initial( _trigger_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'} # type: ignore + + @distributed_trace def begin_trigger( self, vault_name, # type: str @@ -136,17 +186,24 @@ def begin_trigger( :type recovery_point_id: str :param parameters: resource restore request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestResource + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :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. + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -162,28 +219,19 @@ def begin_trigger( protected_item_name=protected_item_name, recovery_point_id=recovery_point_id, parameters=parameters, + api_version=api_version, + content_type=content_type, 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 = { - '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'), - } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -195,4 +243,5 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_security_pins_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_security_pins_operations.py index 06c421b4db77..ccf9826f8c9b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_security_pins_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_security_pins_operations.py @@ -5,23 +5,71 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section 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]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class SecurityPINsOperations(object): """SecurityPINsOperations operations. @@ -44,6 +92,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, vault_name, # type: str @@ -61,6 +110,9 @@ def get( :type resource_group_name: str :param parameters: security pin request. :type parameters: ~azure.mgmt.recoveryservicesbackup.models.SecurityPinBase + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TokenInformation, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.TokenInformation @@ -71,35 +123,27 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" - content_type = kwargs.pop("content_type", "application/json") - 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['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - body_content_kwargs = {} # type: Dict[str, Any] if parameters is not None: - body_content = self._serialize.body(parameters, 'SecurityPinBase') + _json = self._serialize.body(parameters, 'SecurityPinBase') else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + _json = None + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -113,4 +157,6 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_validate_operation_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_validate_operation_operations.py new file mode 100644 index 000000000000..b4148d0b38e5 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_validate_operation_operations.py @@ -0,0 +1,214 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +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 HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +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]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_trigger_request_initial( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTriggerValidateOperation') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class ValidateOperationOperations(object): + """ValidateOperationOperations 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, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.ValidateOperationRequest" + **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 = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ValidateOperationRequest') + + request = build_trigger_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._trigger_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _trigger_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTriggerValidateOperation'} # type: ignore + + + @distributed_trace + def begin_trigger( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.ValidateOperationRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Validate operation for specified backed up item in the form of an asynchronous operation. + Returns tracking headers which can be tracked using GetValidateOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: resource validate operation request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationRequest + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :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 + """ + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.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( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **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}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTriggerValidateOperation'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_validate_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_validate_operation_results_operations.py new file mode 100644 index 000000000000..5d0db46e48b2 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_validate_operation_results_operations.py @@ -0,0 +1,158 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +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 HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +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]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationResults/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class ValidateOperationResultsOperations(object): + """ValidateOperationResultsOperations 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 + + @distributed_trace + def get( + self, + vault_name, # type: str + resource_group_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ValidateOperationsResponse"] + """Fetches the result of a triggered validate operation. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param operation_id: OperationID which represents the operation whose result needs to be + fetched. + :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ValidateOperationsResponse, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationsResponse or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ValidateOperationsResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + 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) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ValidateOperationsResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_validate_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_validate_operation_statuses_operations.py new file mode 100644 index 000000000000..4f8e359fa4b1 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_validate_operation_statuses_operations.py @@ -0,0 +1,159 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +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 HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +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]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationsStatuses/{operationId}') + path_format_arguments = { + "vaultName": _SERIALIZER.url("vault_name", vault_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class ValidateOperationStatusesOperations(object): + """ValidateOperationStatusesOperations 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 + + @distributed_trace + def get( + self, + vault_name, # type: str + resource_group_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.OperationStatus" + """Fetches the status of a triggered validate operation. The status can be in progress, completed + or failed. You can refer to the OperationStatus enum for all the possible states of the + operation. + If operation has completed, this method returns the list of errors obtained while validating + the operation. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param operation_id: OperationID represents the operation whose status needs to be fetched. + :type operation_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: 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 = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + 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) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationsStatuses/{operationId}'} # type: ignore +