From bfa0f081eb9e0963bb5e014b52320832de549854 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 21 Dec 2021 07:02:11 +0000 Subject: [PATCH 1/3] CodeGen from PR 16985 in Azure/azure-rest-api-specs [Recoveryservicesbackup]python config (#16985) * python config * split namespace * Update readme.python.md --- .../_meta.json | 10 +- .../activestamp/__init__.py | 18 + .../activestamp/_configuration.py | 71 + .../activestamp/_metadata.json | 239 + .../activestamp/_patch.py | 31 + .../_recovery_services_backup_client.py | 289 + .../activestamp/_vendor.py | 27 + .../activestamp/_version.py | 9 + .../activestamp/aio/__init__.py | 15 + .../activestamp/aio/_configuration.py | 67 + .../activestamp/aio/_patch.py | 31 + .../aio/_recovery_services_backup_client.py | 284 + .../activestamp/aio/operations/__init__.py | 109 + .../operations/_backup_engines_operations.py | 198 + .../aio/operations/_backup_jobs_operations.py | 132 + .../_backup_operation_results_operations.py | 103 + .../_backup_operation_statuses_operations.py | 105 + .../operations/_backup_policies_operations.py | 130 + .../_backup_protectable_items_operations.py | 135 + .../_backup_protected_items_operations.py | 133 + ...backup_protection_containers_operations.py | 128 + .../_backup_protection_intent_operations.py | 133 + ..._resource_encryption_configs_operations.py | 157 + ...urce_storage_configs_non_crr_operations.py | 218 + ...ackup_resource_vault_configs_operations.py | 222 + .../operations/_backup_status_operations.py | 102 + .../_backup_usage_summaries_operations.py | 133 + .../_backup_workload_items_operations.py | 145 + .../aio/operations/_backups_operations.py | 115 + ...e_data_move_operation_result_operations.py | 106 + ...xport_jobs_operation_results_operations.py | 108 + .../operations/_feature_support_operations.py | 103 + ...m_level_recovery_connections_operations.py | 191 + .../_job_cancellations_operations.py | 98 + .../aio/operations/_job_details_operations.py | 101 + .../_job_operation_results_operations.py | 101 + .../aio/operations/_jobs_operations.py | 97 + .../aio/operations/_operation_operations.py | 106 + .../activestamp/aio/operations/_operations.py | 110 + ..._private_endpoint_connection_operations.py | 336 + .../_private_endpoint_operations.py | 108 + .../_protectable_containers_operations.py | 133 + ...ected_item_operation_results_operations.py | 116 + ...cted_item_operation_statuses_operations.py | 117 + .../operations/_protected_items_operations.py | 254 + ..._container_operation_results_operations.py | 113 + ...er_refresh_operation_results_operations.py | 102 + .../_protection_containers_operations.py | 362 + .../_protection_intent_operations.py | 300 + .../_protection_policies_operations.py | 279 + ...ion_policy_operation_results_operations.py | 106 + ...on_policy_operation_statuses_operations.py | 110 + .../operations/_recovery_points_operations.py | 213 + ..._points_recommended_for_move_operations.py | 150 + ...overy_services_backup_client_operations.py | 438 + .../_resource_guard_proxies_operations.py | 123 + .../_resource_guard_proxy_operations.py | 274 + .../aio/operations/_restores_operations.py | 182 + .../operations/_security_pins_operations.py | 108 + .../_validate_operation_operations.py | 158 + .../_validate_operation_results_operations.py | 105 + ..._validate_operation_statuses_operations.py | 105 + .../activestamp/models/__init__.py | 1008 + .../activestamp/models/_models.py | 18038 ++++++++++++++ .../activestamp/models/_models_py3.py | 19871 ++++++++++++++++ .../_recovery_services_backup_client_enums.py | 709 + .../activestamp/operations/__init__.py | 109 + .../operations/_backup_engines_operations.py | 295 + .../operations/_backup_jobs_operations.py | 183 + .../_backup_operation_results_operations.py | 150 + .../_backup_operation_statuses_operations.py | 152 + .../operations/_backup_policies_operations.py | 178 + .../_backup_protectable_items_operations.py | 186 + .../_backup_protected_items_operations.py | 184 + ...backup_protection_containers_operations.py | 176 + .../_backup_protection_intent_operations.py | 184 + ..._resource_encryption_configs_operations.py | 243 + ...urce_storage_configs_non_crr_operations.py | 345 + ...ackup_resource_vault_configs_operations.py | 349 + .../operations/_backup_status_operations.py | 149 + .../_backup_usage_summaries_operations.py | 184 + .../_backup_workload_items_operations.py | 200 + .../operations/_backups_operations.py | 170 + ...e_data_move_operation_result_operations.py | 153 + ...xport_jobs_operation_results_operations.py | 155 + .../operations/_feature_support_operations.py | 150 + ...m_level_recovery_connections_operations.py | 293 + .../_job_cancellations_operations.py | 145 + .../operations/_job_details_operations.py | 148 + .../_job_operation_results_operations.py | 150 + .../operations/_jobs_operations.py | 146 + .../operations/_operation_operations.py | 155 + .../activestamp/operations/_operations.py | 144 + ..._private_endpoint_connection_operations.py | 467 + .../_private_endpoint_operations.py | 157 + .../_protectable_containers_operations.py | 183 + ...ected_item_operation_results_operations.py | 169 + ...cted_item_operation_statuses_operations.py | 170 + .../operations/_protected_items_operations.py | 399 + ..._container_operation_results_operations.py | 164 + ...er_refresh_operation_results_operations.py | 151 + .../_protection_containers_operations.py | 585 + .../_protection_intent_operations.py | 468 + .../_protection_policies_operations.py | 409 + ...ion_policy_operation_results_operations.py | 155 + ...on_policy_operation_statuses_operations.py | 159 + .../operations/_recovery_points_operations.py | 312 + ..._points_recommended_for_move_operations.py | 204 + ...overy_services_backup_client_operations.py | 619 + .../_resource_guard_proxies_operations.py | 167 + .../_resource_guard_proxy_operations.py | 442 + .../operations/_restores_operations.py | 240 + .../operations/_security_pins_operations.py | 157 + .../_validate_operation_operations.py | 208 + .../_validate_operation_results_operations.py | 152 + ..._validate_operation_statuses_operations.py | 152 + .../activestamp/py.typed | 1 + .../passivestamp/__init__.py | 18 + .../passivestamp/_configuration.py | 71 + .../passivestamp/_metadata.json | 112 + .../passivestamp/_patch.py | 31 + ...recovery_services_backup_passive_client.py | 138 + .../passivestamp/_vendor.py | 27 + .../passivestamp/_version.py | 9 + .../passivestamp/aio/__init__.py | 15 + .../passivestamp/aio/_configuration.py | 67 + .../passivestamp/aio/_patch.py | 31 + ...recovery_services_backup_passive_client.py | 131 + .../passivestamp/aio/operations/__init__.py | 33 + .../operations/_aad_properties_operations.py | 99 + .../_backup_crr_job_details_operations.py | 103 + .../operations/_backup_crr_jobs_operations.py | 140 + .../_backup_protected_items_crr_operations.py | 134 + ...kup_resource_storage_configs_operations.py | 218 + .../_backup_usage_summaries_crr_operations.py | 134 + .../_cross_region_restore_operations.py | 154 + .../_crr_operation_results_operations.py | 93 + .../_crr_operation_status_operations.py | 97 + .../_recovery_points_crr_operations.py | 144 + .../operations/_recovery_points_operations.py | 126 + .../passivestamp/models/__init__.py | 439 + .../passivestamp/models/_models.py | 8447 +++++++ .../passivestamp/models/_models_py3.py | 9332 ++++++++ ...ry_services_backup_passive_client_enums.py | 340 + .../passivestamp/operations/__init__.py | 33 + .../operations/_aad_properties_operations.py | 146 + .../_backup_crr_job_details_operations.py | 150 + .../operations/_backup_crr_jobs_operations.py | 192 + .../_backup_protected_items_crr_operations.py | 185 + ...kup_resource_storage_configs_operations.py | 345 + .../_backup_usage_summaries_crr_operations.py | 185 + .../_cross_region_restore_operations.py | 202 + .../_crr_operation_results_operations.py | 138 + .../_crr_operation_status_operations.py | 142 + .../_recovery_points_crr_operations.py | 198 + .../operations/_recovery_points_operations.py | 183 + .../passivestamp/py.typed | 1 + 157 files changed, 82672 insertions(+), 5 deletions(-) create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/__init__.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_configuration.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_metadata.json create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_patch.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_recovery_services_backup_client.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_vendor.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_version.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/__init__.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/_configuration.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/_patch.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/_recovery_services_backup_client.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/__init__.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_engines_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_jobs_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_operation_statuses_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_policies_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protectable_items_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protected_items_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protection_containers_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protection_intent_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_resource_encryption_configs_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_resource_storage_configs_non_crr_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_resource_vault_configs_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_status_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_usage_summaries_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_workload_items_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backups_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_bms_prepare_data_move_operation_result_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_export_jobs_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_feature_support_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_item_level_recovery_connections_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_job_cancellations_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_job_details_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_job_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_jobs_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_operation_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_private_endpoint_connection_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_private_endpoint_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protectable_containers_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protected_item_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protected_item_operation_statuses_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protected_items_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_container_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_container_refresh_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_containers_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_intent_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_policies_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_policy_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_policy_operation_statuses_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_recovery_points_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_recovery_points_recommended_for_move_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_recovery_services_backup_client_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_resource_guard_proxies_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_resource_guard_proxy_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_restores_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_security_pins_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_validate_operation_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_validate_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_validate_operation_statuses_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/__init__.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/_models.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/_models_py3.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/_recovery_services_backup_client_enums.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/__init__.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_engines_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_jobs_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_operation_statuses_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_policies_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protectable_items_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protected_items_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protection_containers_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protection_intent_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_resource_encryption_configs_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_resource_storage_configs_non_crr_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_resource_vault_configs_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_status_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_usage_summaries_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_workload_items_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backups_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_bms_prepare_data_move_operation_result_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_export_jobs_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_feature_support_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_item_level_recovery_connections_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_job_cancellations_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_job_details_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_job_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_jobs_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_operation_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_private_endpoint_connection_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_private_endpoint_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protectable_containers_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protected_item_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protected_item_operation_statuses_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protected_items_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_container_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_container_refresh_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_containers_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_intent_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_policies_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_policy_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_policy_operation_statuses_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_points_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_points_recommended_for_move_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_services_backup_client_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_resource_guard_proxies_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_resource_guard_proxy_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_restores_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_security_pins_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_validate_operation_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_validate_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_validate_operation_statuses_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/py.typed create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/__init__.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_configuration.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_metadata.json create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_patch.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_recovery_services_backup_passive_client.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_vendor.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_version.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/__init__.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_configuration.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_patch.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_recovery_services_backup_passive_client.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/__init__.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_aad_properties_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_crr_job_details_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_crr_jobs_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_protected_items_crr_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_resource_storage_configs_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_usage_summaries_crr_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_cross_region_restore_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_crr_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_crr_operation_status_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_recovery_points_crr_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_recovery_points_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/models/__init__.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/models/_models.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/models/_models_py3.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/models/_recovery_services_backup_passive_client_enums.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/__init__.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_aad_properties_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_crr_job_details_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_crr_jobs_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_protected_items_crr_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_resource_storage_configs_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_usage_summaries_crr_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_cross_region_restore_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_crr_operation_results_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_crr_operation_status_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_recovery_points_crr_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_recovery_points_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/py.typed diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json index c79fa0f25239..4494e1ba4d93 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json @@ -1,11 +1,11 @@ { - "autorest": "3.4.5", + "autorest": "3.7.2", "use": [ - "@autorest/python@5.8.4", - "@autorest/modelerfour@4.19.2" + "@autorest/python@5.12.0", + "@autorest/modelerfour@4.19.3" ], - "commit": "33998161763a845ec4160ab09bb5de7d70befb37", + "commit": "0cd7b3e83d5e7e21222dcc4bdde4565562da0cdf", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/recoveryservicesbackup/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", + "autorest_command": "autorest specification/recoveryservicesbackup/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", "readme": "specification/recoveryservicesbackup/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/__init__.py new file mode 100644 index 000000000000..a44ce6ced155 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/__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 ._recovery_services_backup_client import RecoveryServicesBackupClient +from ._version import VERSION + +__version__ = VERSION +__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/activestamp/_configuration.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_configuration.py new file mode 100644 index 000000000000..829d4b1a8967 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_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 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 RecoveryServicesBackupClientConfiguration(Configuration): + """Configuration for RecoveryServicesBackupClient. + + 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 + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + super(RecoveryServicesBackupClientConfiguration, self).__init__(**kwargs) + 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 = "2021-10-01" + 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/activestamp/_metadata.json b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_metadata.json new file mode 100644 index 000000000000..466b74d94d05 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_metadata.json @@ -0,0 +1,239 @@ +{ + "chosen_version": "2021-10-01", + "total_api_version_list": ["2021-10-01"], + "client": { + "name": "RecoveryServicesBackupClient", + "filename": "_recovery_services_backup_client", + "description": "Open API 2.0 Specs for Azure RecoveryServices Backup service.", + "host_value": "\"https://management.azure.com\"", + "parameterized_host_template": 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\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"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\"]}}}" + }, + "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=\"https://management.azure.com\", # type: 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: str = \"https://management.azure.com\",", + "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_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", + "credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"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\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"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", + "validate_operation": "ValidateOperationOperations", + "validate_operation_results": "ValidateOperationResultsOperations", + "validate_operation_statuses": "ValidateOperationStatusesOperations", + "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" + }, + "operation_mixins": { + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.polling\": [\"LROPoller\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.polling\": [\"AsyncLROPoller\"]}}}", + "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 # type: (...) -\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.activestamp.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.activestamp.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 # type: (...) -\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.activestamp.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.activestamp.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 # type: (...) -\u003e LROPoller[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.activestamp.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. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n 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\n 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.activestamp.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. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n 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\n 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 # type: (...) -\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.activestamp.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.activestamp.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 # type: (...) -\u003e LROPoller[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.activestamp.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. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n 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\n 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.activestamp.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. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n 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\n 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 # type: (...) -\u003e None\n", + "doc": "\"\"\"Move 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:\n ~azure.mgmt.recoveryservicesbackup.activestamp.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": "\"\"\"Move 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:\n ~azure.mgmt.recoveryservicesbackup.activestamp.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 # type: (...) -\u003e LROPoller[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:\n ~azure.mgmt.recoveryservicesbackup.activestamp.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. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n 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\n 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:\n ~azure.mgmt.recoveryservicesbackup.activestamp.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. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n 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\n 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/activestamp/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_patch.py new file mode 100644 index 000000000000..74e48ecd07cf --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_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/activestamp/_recovery_services_backup_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_recovery_services_backup_client.py new file mode 100644 index 000000000000..76efe74a28e1 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_recovery_services_backup_client.py @@ -0,0 +1,289 @@ +# 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 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.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.activestamp.operations.BackupResourceStorageConfigsNonCRROperations + :ivar protection_intent: ProtectionIntentOperations operations + :vartype protection_intent: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectionIntentOperations + :ivar backup_status: BackupStatusOperations operations + :vartype backup_status: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupStatusOperations + :ivar feature_support: FeatureSupportOperations operations + :vartype feature_support: + azure.mgmt.recoveryservicesbackup.activestamp.operations.FeatureSupportOperations + :ivar backup_protection_intent: BackupProtectionIntentOperations operations + :vartype backup_protection_intent: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupProtectionIntentOperations + :ivar backup_usage_summaries: BackupUsageSummariesOperations operations + :vartype backup_usage_summaries: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupUsageSummariesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.recoveryservicesbackup.activestamp.operations.Operations + :ivar backup_resource_vault_configs: BackupResourceVaultConfigsOperations operations + :vartype backup_resource_vault_configs: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupResourceVaultConfigsOperations + :ivar backup_resource_encryption_configs: BackupResourceEncryptionConfigsOperations operations + :vartype backup_resource_encryption_configs: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupResourceEncryptionConfigsOperations + :ivar private_endpoint_connection: PrivateEndpointConnectionOperations operations + :vartype private_endpoint_connection: + azure.mgmt.recoveryservicesbackup.activestamp.operations.PrivateEndpointConnectionOperations + :ivar private_endpoint: PrivateEndpointOperations operations + :vartype private_endpoint: + azure.mgmt.recoveryservicesbackup.activestamp.operations.PrivateEndpointOperations + :ivar bms_prepare_data_move_operation_result: BMSPrepareDataMoveOperationResultOperations + operations + :vartype bms_prepare_data_move_operation_result: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BMSPrepareDataMoveOperationResultOperations + :ivar protected_items: ProtectedItemsOperations operations + :vartype protected_items: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectedItemsOperations + :ivar protected_item_operation_results: ProtectedItemOperationResultsOperations operations + :vartype protected_item_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectedItemOperationResultsOperations + :ivar recovery_points: RecoveryPointsOperations operations + :vartype recovery_points: + azure.mgmt.recoveryservicesbackup.activestamp.operations.RecoveryPointsOperations + :ivar restores: RestoresOperations operations + :vartype restores: azure.mgmt.recoveryservicesbackup.activestamp.operations.RestoresOperations + :ivar backup_policies: BackupPoliciesOperations operations + :vartype backup_policies: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupPoliciesOperations + :ivar protection_policies: ProtectionPoliciesOperations operations + :vartype protection_policies: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectionPoliciesOperations + :ivar protection_policy_operation_results: ProtectionPolicyOperationResultsOperations + operations + :vartype protection_policy_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectionPolicyOperationResultsOperations + :ivar backup_jobs: BackupJobsOperations operations + :vartype backup_jobs: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupJobsOperations + :ivar job_details: JobDetailsOperations operations + :vartype job_details: + azure.mgmt.recoveryservicesbackup.activestamp.operations.JobDetailsOperations + :ivar job_cancellations: JobCancellationsOperations operations + :vartype job_cancellations: + azure.mgmt.recoveryservicesbackup.activestamp.operations.JobCancellationsOperations + :ivar job_operation_results: JobOperationResultsOperations operations + :vartype job_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.operations.JobOperationResultsOperations + :ivar export_jobs_operation_results: ExportJobsOperationResultsOperations operations + :vartype export_jobs_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ExportJobsOperationResultsOperations + :ivar jobs: JobsOperations operations + :vartype jobs: azure.mgmt.recoveryservicesbackup.activestamp.operations.JobsOperations + :ivar backup_protected_items: BackupProtectedItemsOperations operations + :vartype backup_protected_items: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupProtectedItemsOperations + :ivar operation: OperationOperations operations + :vartype operation: + azure.mgmt.recoveryservicesbackup.activestamp.operations.OperationOperations + :ivar validate_operation: ValidateOperationOperations operations + :vartype validate_operation: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ValidateOperationOperations + :ivar validate_operation_results: ValidateOperationResultsOperations operations + :vartype validate_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ValidateOperationResultsOperations + :ivar validate_operation_statuses: ValidateOperationStatusesOperations operations + :vartype validate_operation_statuses: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ValidateOperationStatusesOperations + :ivar backup_engines: BackupEnginesOperations operations + :vartype backup_engines: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupEnginesOperations + :ivar protection_container_refresh_operation_results: + ProtectionContainerRefreshOperationResultsOperations operations + :vartype protection_container_refresh_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectionContainerRefreshOperationResultsOperations + :ivar protectable_containers: ProtectableContainersOperations operations + :vartype protectable_containers: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectableContainersOperations + :ivar protection_containers: ProtectionContainersOperations operations + :vartype protection_containers: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectionContainersOperations + :ivar backup_workload_items: BackupWorkloadItemsOperations operations + :vartype backup_workload_items: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupWorkloadItemsOperations + :ivar protection_container_operation_results: ProtectionContainerOperationResultsOperations + operations + :vartype protection_container_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectionContainerOperationResultsOperations + :ivar backups: BackupsOperations operations + :vartype backups: azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupsOperations + :ivar protected_item_operation_statuses: ProtectedItemOperationStatusesOperations operations + :vartype protected_item_operation_statuses: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectedItemOperationStatusesOperations + :ivar item_level_recovery_connections: ItemLevelRecoveryConnectionsOperations operations + :vartype item_level_recovery_connections: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ItemLevelRecoveryConnectionsOperations + :ivar backup_operation_results: BackupOperationResultsOperations operations + :vartype backup_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupOperationResultsOperations + :ivar backup_operation_statuses: BackupOperationStatusesOperations operations + :vartype backup_operation_statuses: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupOperationStatusesOperations + :ivar protection_policy_operation_statuses: ProtectionPolicyOperationStatusesOperations + operations + :vartype protection_policy_operation_statuses: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectionPolicyOperationStatusesOperations + :ivar backup_protectable_items: BackupProtectableItemsOperations operations + :vartype backup_protectable_items: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupProtectableItemsOperations + :ivar backup_protection_containers: BackupProtectionContainersOperations operations + :vartype backup_protection_containers: + azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupProtectionContainersOperations + :ivar security_pins: SecurityPINsOperations operations + :vartype security_pins: + azure.mgmt.recoveryservicesbackup.activestamp.operations.SecurityPINsOperations + :ivar recovery_points_recommended_for_move: RecoveryPointsRecommendedForMoveOperations + operations + :vartype recovery_points_recommended_for_move: + azure.mgmt.recoveryservicesbackup.activestamp.operations.RecoveryPointsRecommendedForMoveOperations + :ivar resource_guard_proxies: ResourceGuardProxiesOperations operations + :vartype resource_guard_proxies: + azure.mgmt.recoveryservicesbackup.activestamp.operations.ResourceGuardProxiesOperations + :ivar resource_guard_proxy: ResourceGuardProxyOperations operations + :vartype resource_guard_proxy: + azure.mgmt.recoveryservicesbackup.activestamp.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 base_url: Service URL. Default value is 'https://management.azure.com'. + :type base_url: 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 = 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._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) + + + 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: () -> RecoveryServicesBackupClient + 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/activestamp/_vendor.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_vendor.py new file mode 100644 index 000000000000..138f663c53a4 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_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/activestamp/_version.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_version.py new file mode 100644 index 000000000000..e5754a47ce68 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_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/activestamp/aio/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/__init__.py new file mode 100644 index 000000000000..468a2bb9e3e4 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/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 ._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/activestamp/aio/_configuration.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/_configuration.py new file mode 100644 index 000000000000..57d7035c59ec --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/_configuration.py @@ -0,0 +1,67 @@ +# 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 RecoveryServicesBackupClientConfiguration(Configuration): + """Configuration for RecoveryServicesBackupClient. + + 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 + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + super(RecoveryServicesBackupClientConfiguration, self).__init__(**kwargs) + 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 = "2021-10-01" + 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/activestamp/aio/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/_patch.py new file mode 100644 index 000000000000..74e48ecd07cf --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/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/activestamp/aio/_recovery_services_backup_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/_recovery_services_backup_client.py new file mode 100644 index 000000000000..d9ea7be427ed --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/_recovery_services_backup_client.py @@ -0,0 +1,284 @@ +# 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 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 + +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.activestamp.aio.operations.BackupResourceStorageConfigsNonCRROperations + :ivar protection_intent: ProtectionIntentOperations operations + :vartype protection_intent: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ProtectionIntentOperations + :ivar backup_status: BackupStatusOperations operations + :vartype backup_status: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupStatusOperations + :ivar feature_support: FeatureSupportOperations operations + :vartype feature_support: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.FeatureSupportOperations + :ivar backup_protection_intent: BackupProtectionIntentOperations operations + :vartype backup_protection_intent: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupProtectionIntentOperations + :ivar backup_usage_summaries: BackupUsageSummariesOperations operations + :vartype backup_usage_summaries: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupUsageSummariesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.Operations + :ivar backup_resource_vault_configs: BackupResourceVaultConfigsOperations operations + :vartype backup_resource_vault_configs: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupResourceVaultConfigsOperations + :ivar backup_resource_encryption_configs: BackupResourceEncryptionConfigsOperations operations + :vartype backup_resource_encryption_configs: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupResourceEncryptionConfigsOperations + :ivar private_endpoint_connection: PrivateEndpointConnectionOperations operations + :vartype private_endpoint_connection: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.PrivateEndpointConnectionOperations + :ivar private_endpoint: PrivateEndpointOperations operations + :vartype private_endpoint: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.PrivateEndpointOperations + :ivar bms_prepare_data_move_operation_result: BMSPrepareDataMoveOperationResultOperations + operations + :vartype bms_prepare_data_move_operation_result: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BMSPrepareDataMoveOperationResultOperations + :ivar protected_items: ProtectedItemsOperations operations + :vartype protected_items: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ProtectedItemsOperations + :ivar protected_item_operation_results: ProtectedItemOperationResultsOperations operations + :vartype protected_item_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ProtectedItemOperationResultsOperations + :ivar recovery_points: RecoveryPointsOperations operations + :vartype recovery_points: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.RecoveryPointsOperations + :ivar restores: RestoresOperations operations + :vartype restores: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.RestoresOperations + :ivar backup_policies: BackupPoliciesOperations operations + :vartype backup_policies: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupPoliciesOperations + :ivar protection_policies: ProtectionPoliciesOperations operations + :vartype protection_policies: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ProtectionPoliciesOperations + :ivar protection_policy_operation_results: ProtectionPolicyOperationResultsOperations + operations + :vartype protection_policy_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ProtectionPolicyOperationResultsOperations + :ivar backup_jobs: BackupJobsOperations operations + :vartype backup_jobs: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupJobsOperations + :ivar job_details: JobDetailsOperations operations + :vartype job_details: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.JobDetailsOperations + :ivar job_cancellations: JobCancellationsOperations operations + :vartype job_cancellations: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.JobCancellationsOperations + :ivar job_operation_results: JobOperationResultsOperations operations + :vartype job_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.JobOperationResultsOperations + :ivar export_jobs_operation_results: ExportJobsOperationResultsOperations operations + :vartype export_jobs_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ExportJobsOperationResultsOperations + :ivar jobs: JobsOperations operations + :vartype jobs: azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.JobsOperations + :ivar backup_protected_items: BackupProtectedItemsOperations operations + :vartype backup_protected_items: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupProtectedItemsOperations + :ivar operation: OperationOperations operations + :vartype operation: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.OperationOperations + :ivar validate_operation: ValidateOperationOperations operations + :vartype validate_operation: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ValidateOperationOperations + :ivar validate_operation_results: ValidateOperationResultsOperations operations + :vartype validate_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ValidateOperationResultsOperations + :ivar validate_operation_statuses: ValidateOperationStatusesOperations operations + :vartype validate_operation_statuses: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ValidateOperationStatusesOperations + :ivar backup_engines: BackupEnginesOperations operations + :vartype backup_engines: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupEnginesOperations + :ivar protection_container_refresh_operation_results: + ProtectionContainerRefreshOperationResultsOperations operations + :vartype protection_container_refresh_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ProtectionContainerRefreshOperationResultsOperations + :ivar protectable_containers: ProtectableContainersOperations operations + :vartype protectable_containers: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ProtectableContainersOperations + :ivar protection_containers: ProtectionContainersOperations operations + :vartype protection_containers: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ProtectionContainersOperations + :ivar backup_workload_items: BackupWorkloadItemsOperations operations + :vartype backup_workload_items: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupWorkloadItemsOperations + :ivar protection_container_operation_results: ProtectionContainerOperationResultsOperations + operations + :vartype protection_container_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ProtectionContainerOperationResultsOperations + :ivar backups: BackupsOperations operations + :vartype backups: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupsOperations + :ivar protected_item_operation_statuses: ProtectedItemOperationStatusesOperations operations + :vartype protected_item_operation_statuses: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ProtectedItemOperationStatusesOperations + :ivar item_level_recovery_connections: ItemLevelRecoveryConnectionsOperations operations + :vartype item_level_recovery_connections: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ItemLevelRecoveryConnectionsOperations + :ivar backup_operation_results: BackupOperationResultsOperations operations + :vartype backup_operation_results: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupOperationResultsOperations + :ivar backup_operation_statuses: BackupOperationStatusesOperations operations + :vartype backup_operation_statuses: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupOperationStatusesOperations + :ivar protection_policy_operation_statuses: ProtectionPolicyOperationStatusesOperations + operations + :vartype protection_policy_operation_statuses: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ProtectionPolicyOperationStatusesOperations + :ivar backup_protectable_items: BackupProtectableItemsOperations operations + :vartype backup_protectable_items: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupProtectableItemsOperations + :ivar backup_protection_containers: BackupProtectionContainersOperations operations + :vartype backup_protection_containers: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.BackupProtectionContainersOperations + :ivar security_pins: SecurityPINsOperations operations + :vartype security_pins: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.SecurityPINsOperations + :ivar recovery_points_recommended_for_move: RecoveryPointsRecommendedForMoveOperations + operations + :vartype recovery_points_recommended_for_move: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.RecoveryPointsRecommendedForMoveOperations + :ivar resource_guard_proxies: ResourceGuardProxiesOperations operations + :vartype resource_guard_proxies: + azure.mgmt.recoveryservicesbackup.activestamp.aio.operations.ResourceGuardProxiesOperations + :ivar resource_guard_proxy: ResourceGuardProxyOperations operations + :vartype resource_guard_proxy: + azure.mgmt.recoveryservicesbackup.activestamp.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 base_url: Service URL. Default value is 'https://management.azure.com'. + :type base_url: 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 = 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._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) + + + 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) -> "RecoveryServicesBackupClient": + 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/activestamp/aio/operations/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/__init__.py new file mode 100644 index 000000000000..262a069be4dc --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/__init__.py @@ -0,0 +1,109 @@ +# 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_resource_storage_configs_non_crr_operations import BackupResourceStorageConfigsNonCRROperations +from ._protection_intent_operations import ProtectionIntentOperations +from ._backup_status_operations import BackupStatusOperations +from ._feature_support_operations import FeatureSupportOperations +from ._backup_protection_intent_operations import BackupProtectionIntentOperations +from ._backup_usage_summaries_operations import BackupUsageSummariesOperations +from ._operations import Operations +from ._backup_resource_vault_configs_operations import BackupResourceVaultConfigsOperations +from ._backup_resource_encryption_configs_operations import BackupResourceEncryptionConfigsOperations +from ._private_endpoint_connection_operations import PrivateEndpointConnectionOperations +from ._private_endpoint_operations import PrivateEndpointOperations +from ._recovery_services_backup_client_operations import RecoveryServicesBackupClientOperationsMixin +from ._bms_prepare_data_move_operation_result_operations import BMSPrepareDataMoveOperationResultOperations +from ._protected_items_operations import ProtectedItemsOperations +from ._protected_item_operation_results_operations import ProtectedItemOperationResultsOperations +from ._recovery_points_operations import RecoveryPointsOperations +from ._restores_operations import RestoresOperations +from ._backup_policies_operations import BackupPoliciesOperations +from ._protection_policies_operations import ProtectionPoliciesOperations +from ._protection_policy_operation_results_operations import ProtectionPolicyOperationResultsOperations +from ._backup_jobs_operations import BackupJobsOperations +from ._job_details_operations import JobDetailsOperations +from ._job_cancellations_operations import JobCancellationsOperations +from ._job_operation_results_operations import JobOperationResultsOperations +from ._export_jobs_operation_results_operations import ExportJobsOperationResultsOperations +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 +from ._protection_containers_operations import ProtectionContainersOperations +from ._backup_workload_items_operations import BackupWorkloadItemsOperations +from ._protection_container_operation_results_operations import ProtectionContainerOperationResultsOperations +from ._backups_operations import BackupsOperations +from ._protected_item_operation_statuses_operations import ProtectedItemOperationStatusesOperations +from ._item_level_recovery_connections_operations import ItemLevelRecoveryConnectionsOperations +from ._backup_operation_results_operations import BackupOperationResultsOperations +from ._backup_operation_statuses_operations import BackupOperationStatusesOperations +from ._protection_policy_operation_statuses_operations import ProtectionPolicyOperationStatusesOperations +from ._backup_protectable_items_operations import BackupProtectableItemsOperations +from ._backup_protection_containers_operations import BackupProtectionContainersOperations +from ._security_pins_operations import SecurityPINsOperations +from ._recovery_points_recommended_for_move_operations import RecoveryPointsRecommendedForMoveOperations +from ._resource_guard_proxies_operations import ResourceGuardProxiesOperations +from ._resource_guard_proxy_operations import ResourceGuardProxyOperations + +__all__ = [ + 'BackupResourceStorageConfigsNonCRROperations', + 'ProtectionIntentOperations', + 'BackupStatusOperations', + 'FeatureSupportOperations', + 'BackupProtectionIntentOperations', + 'BackupUsageSummariesOperations', + 'Operations', + 'BackupResourceVaultConfigsOperations', + 'BackupResourceEncryptionConfigsOperations', + 'PrivateEndpointConnectionOperations', + 'PrivateEndpointOperations', + 'RecoveryServicesBackupClientOperationsMixin', + 'BMSPrepareDataMoveOperationResultOperations', + 'ProtectedItemsOperations', + 'ProtectedItemOperationResultsOperations', + 'RecoveryPointsOperations', + 'RestoresOperations', + 'BackupPoliciesOperations', + 'ProtectionPoliciesOperations', + 'ProtectionPolicyOperationResultsOperations', + 'BackupJobsOperations', + 'JobDetailsOperations', + 'JobCancellationsOperations', + 'JobOperationResultsOperations', + 'ExportJobsOperationResultsOperations', + 'JobsOperations', + 'BackupProtectedItemsOperations', + 'OperationOperations', + 'ValidateOperationOperations', + 'ValidateOperationResultsOperations', + 'ValidateOperationStatusesOperations', + 'BackupEnginesOperations', + 'ProtectionContainerRefreshOperationResultsOperations', + 'ProtectableContainersOperations', + 'ProtectionContainersOperations', + 'BackupWorkloadItemsOperations', + 'ProtectionContainerOperationResultsOperations', + 'BackupsOperations', + 'ProtectedItemOperationStatusesOperations', + 'ItemLevelRecoveryConnectionsOperations', + 'BackupOperationResultsOperations', + 'BackupOperationStatusesOperations', + 'ProtectionPolicyOperationStatusesOperations', + 'BackupProtectableItemsOperations', + 'BackupProtectionContainersOperations', + 'SecurityPINsOperations', + 'RecoveryPointsRecommendedForMoveOperations', + 'ResourceGuardProxiesOperations', + 'ResourceGuardProxyOperations', +] diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_engines_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_engines_operations.py new file mode 100644 index 000000000000..d48d97a509d3 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_engines_operations.py @@ -0,0 +1,198 @@ +# 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, 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 +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]] + +class BackupEnginesOperations: + """BackupEnginesOperations 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.activestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.BackupEngineBaseResourceList"]: + """Backup management servers registered to Recovery Services Vault. Returns a pageable list of + servers. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupEngineBaseResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupEngineBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupEngineBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + 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, + resource_group_name: str, + backup_engine_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> "_models.BackupEngineBaseResource": + """Returns backup management server registered to Recovery Services Vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param backup_engine_name: Name of the backup management server. + :type backup_engine_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupEngineBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupEngineBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupEngineBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + filter=filter, + skip_token=skip_token, + 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('BackupEngineBaseResource', pipeline_response) + + if cls: + 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/activestamp/aio/operations/_backup_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_jobs_operations.py new file mode 100644 index 000000000000..155ee33ff61c --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_jobs_operations.py @@ -0,0 +1,132 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import 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 +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]] + +class BackupJobsOperations: + """BackupJobsOperations 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.activestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.JobResourceList"]: + """Provides a pageable list of jobs. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_operation_results_operations.py new file mode 100644 index 000000000000..e0977223fe33 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_operation_results_operations.py @@ -0,0 +1,103 @@ +# 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._backup_operation_results_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BackupOperationResultsOperations: + """BackupOperationResultsOperations 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.activestamp.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 + ) -> None: + """Provides the status of the delete operations such as deleting backed up item. Once the + operation has started, the + status code in the response would be Accepted. It will continue to be in this state till it + reaches completion. On + successful completion, the status code will be OK. This method expects OperationID as an + argument. OperationID is + part of the Location header of the operation response. + + :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. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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, 204]: + 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, {}) + + 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/activestamp/aio/operations/_backup_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_operation_statuses_operations.py new file mode 100644 index 000000000000..a5c1274235b8 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_operation_statuses_operations.py @@ -0,0 +1,105 @@ +# 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._backup_operation_statuses_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BackupOperationStatusesOperations: + """BackupOperationStatusesOperations 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.activestamp.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 an operation such as triggering a backup, restore. The status can be in + progress, completed + or failed. You can refer to the OperationStatus enum for all the possible states of an + operation. Some operations + create jobs. This method returns the list of jobs when the operation is complete. + + :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. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationStatus, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.activestamp.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', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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}/backupOperations/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_policies_operations.py new file mode 100644 index 000000000000..14f5c3796969 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_policies_operations.py @@ -0,0 +1,130 @@ +# 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, 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 +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]] + +class BackupPoliciesOperations: + """BackupPoliciesOperations 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.activestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ProtectionPolicyResourceList"]: + """Lists of backup policies associated with Recovery Services Vault. API provides pagination + parameters to fetch + scoped results. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :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.activestamp.models.ProtectionPolicyResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionPolicyResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protectable_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protectable_items_operations.py new file mode 100644 index 000000000000..4d38523f491f --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protectable_items_operations.py @@ -0,0 +1,135 @@ +# 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, 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 +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]] + +class BackupProtectableItemsOperations: + """BackupProtectableItemsOperations 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.activestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.WorkloadProtectableItemResourceList"]: + """Provides a pageable list of protectable objects within your subscription according to the query + filter and the + pagination parameters. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkloadProtectableItemResourceList or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadProtectableItemResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadProtectableItemResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protected_items_operations.py new file mode 100644 index 000000000000..d46d3b74d45c --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protected_items_operations.py @@ -0,0 +1,133 @@ +# 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, 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 +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]] + +class BackupProtectedItemsOperations: + """BackupProtectedItemsOperations 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.activestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ProtectedItemResourceList"]: + """Provides a pageable list of all items that are backed up within a vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProtectedItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectedItemResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectedItemResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protection_containers_operations.py new file mode 100644 index 000000000000..4b79d6e1ce30 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protection_containers_operations.py @@ -0,0 +1,128 @@ +# 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, 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 +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]] + +class BackupProtectionContainersOperations: + """BackupProtectionContainersOperations 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.activestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ProtectionContainerResourceList"]: + """Lists the containers registered to Recovery Services Vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :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.activestamp.models.ProtectionContainerResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionContainerResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protection_intent_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protection_intent_operations.py new file mode 100644 index 000000000000..35a0e24e990c --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_protection_intent_operations.py @@ -0,0 +1,133 @@ +# 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, 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 +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]] + +class BackupProtectionIntentOperations: + """BackupProtectionIntentOperations 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.activestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ProtectionIntentResourceList"]: + """Provides a pageable list of all intents that are present within a vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProtectionIntentResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionIntentResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionIntentResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_resource_encryption_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_resource_encryption_configs_operations.py new file mode 100644 index 000000000000..1971b35ec994 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_resource_encryption_configs_operations.py @@ -0,0 +1,157 @@ +# 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._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]] + +class BackupResourceEncryptionConfigsOperations: + """BackupResourceEncryptionConfigsOperations 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.activestamp.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, + **kwargs: Any + ) -> "_models.BackupResourceEncryptionConfigExtendedResource": + """Fetches Vault Encryption 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: BackupResourceEncryptionConfigExtendedResource, or the result of cls(response) + :rtype: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupResourceEncryptionConfigExtendedResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceEncryptionConfigExtendedResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupResourceEncryptionConfigExtendedResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + parameters: "_models.BackupResourceEncryptionConfigResource", + **kwargs: Any + ) -> None: + """Updates Vault encryption config. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: Vault encryption input config request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupResourceEncryptionConfigResource + :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', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupResourceEncryptionConfigResource') + + request = build_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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 = 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, 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/activestamp/aio/operations/_backup_resource_storage_configs_non_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_resource_storage_configs_non_crr_operations.py new file mode 100644 index 000000000000..40fe8fe7d5d0 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_resource_storage_configs_non_crr_operations.py @@ -0,0 +1,218 @@ +# 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._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]] + +class BackupResourceStorageConfigsNonCRROperations: + """BackupResourceStorageConfigsNonCRROperations 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.activestamp.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, + **kwargs: Any + ) -> "_models.BackupResourceConfigResource": + """Fetches resource storage config. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupResourceConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.activestamp.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', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + 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_async + async def update( + self, + vault_name: str, + resource_group_name: str, + parameters: "_models.BackupResourceConfigResource", + **kwargs: Any + ) -> "_models.BackupResourceConfigResource": + """Updates vault storage model type. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: Vault storage config request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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', {})) + + 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, + 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 = 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, 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_async + async def patch( + self, + vault_name: str, + resource_group_name: str, + parameters: "_models.BackupResourceConfigResource", + **kwargs: Any + ) -> None: + """Updates vault storage model type. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: Vault storage config request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.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', {})) + + 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, + 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 = 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, 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/activestamp/aio/operations/_backup_resource_vault_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_resource_vault_configs_operations.py new file mode 100644 index 000000000000..e0e263a2784d --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_resource_vault_configs_operations.py @@ -0,0 +1,222 @@ +# 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._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]] + +class BackupResourceVaultConfigsOperations: + """BackupResourceVaultConfigsOperations 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.activestamp.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, + **kwargs: Any + ) -> "_models.BackupResourceVaultConfigResource": + """Fetches resource vault config. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :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.activestamp.models.BackupResourceVaultConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceVaultConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + parameters: "_models.BackupResourceVaultConfigResource", + **kwargs: Any + ) -> "_models.BackupResourceVaultConfigResource": + """Updates vault security config. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: resource config request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupResourceVaultConfigResource + :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.activestamp.models.BackupResourceVaultConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceVaultConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupResourceVaultConfigResource') + + request = build_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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 = 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, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + parameters: "_models.BackupResourceVaultConfigResource", + **kwargs: Any + ) -> "_models.BackupResourceVaultConfigResource": + """Updates vault security config. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: resource config request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupResourceVaultConfigResource + :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.activestamp.models.BackupResourceVaultConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceVaultConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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, + content_type=content_type, + json=_json, + template_url=self.put.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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) + + if cls: + 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/activestamp/aio/operations/_backup_status_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_status_operations.py new file mode 100644 index 000000000000..61f43c9f903a --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_status_operations.py @@ -0,0 +1,102 @@ +# 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._backup_status_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BackupStatusOperations: + """BackupStatusOperations 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.activestamp.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, + azure_region: str, + parameters: "_models.BackupStatusRequest", + **kwargs: Any + ) -> "_models.BackupStatusResponse": + """Get the container backup status. + + Get the container backup status. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param parameters: Container Backup Status Request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupStatusRequest + :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.activestamp.models.BackupStatusResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupStatusResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupStatusRequest') + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + 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 + + 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('BackupStatusResponse', pipeline_response) + + if cls: + 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/activestamp/aio/operations/_backup_usage_summaries_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_usage_summaries_operations.py new file mode 100644 index 000000000000..843e55fac9ff --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_usage_summaries_operations.py @@ -0,0 +1,133 @@ +# 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, 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 +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]] + +class BackupUsageSummariesOperations: + """BackupUsageSummariesOperations 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.activestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.BackupManagementUsageList"]: + """Fetches the backup management usage summaries of the vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupManagementUsageList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementUsageList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupManagementUsageList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_workload_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_workload_items_operations.py new file mode 100644 index 000000000000..d1a1fafcc616 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_workload_items_operations.py @@ -0,0 +1,145 @@ +# 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, 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 +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]] + +class BackupWorkloadItemsOperations: + """BackupWorkloadItemsOperations 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.activestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + fabric_name: str, + container_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.WorkloadItemResourceList"]: + """Provides a pageable list of workload item of a specific container according to the query filter + and the pagination + parameters. + + :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 filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkloadItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadItemResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadItemResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + 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, + 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: + + 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, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backups_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backups_operations.py new file mode 100644 index 000000000000..284710e1f7c4 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backups_operations.py @@ -0,0 +1,115 @@ +# 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._backups_operations import build_trigger_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BackupsOperations: + """BackupsOperations 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.activestamp.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 trigger( + self, + vault_name: str, + resource_group_name: str, + fabric_name: str, + container_name: str, + protected_item_name: str, + parameters: "_models.BackupRequestResource", + **kwargs: Any + ) -> None: + """Triggers backup for specified backed up item. This is an asynchronous operation. To know the + status of the + operation, call GetProtectedItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backup item. + :type fabric_name: str + :param container_name: Container name associated with the backup item. + :type container_name: str + :param protected_item_name: Backup item for which backup needs to be triggered. + :type protected_item_name: str + :param parameters: resource backup request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupRequestResource + :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', {})) + + 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, + content_type=content_type, + json=_json, + template_url=self.trigger.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.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/activestamp/aio/operations/_bms_prepare_data_move_operation_result_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_bms_prepare_data_move_operation_result_operations.py new file mode 100644 index 000000000000..766e6abd66e7 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_bms_prepare_data_move_operation_result_operations.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import 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._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]] + +class BMSPrepareDataMoveOperationResultOperations: + """BMSPrepareDataMoveOperationResultOperations 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.activestamp.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.VaultStorageConfigOperationResultResponse"]: + """Fetches Operation Result for Prepare Data Move. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param operation_id: + :type operation_id: str + :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.activestamp.models.VaultStorageConfigOperationResultResponse + or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VaultStorageConfigOperationResultResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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) + 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('VaultStorageConfigOperationResultResponse', 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/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_export_jobs_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_export_jobs_operation_results_operations.py new file mode 100644 index 000000000000..a8cae08f1ceb --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_export_jobs_operation_results_operations.py @@ -0,0 +1,108 @@ +# 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.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]] + +class ExportJobsOperationResultsOperations: + """ExportJobsOperationResultsOperations 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.activestamp.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.OperationResultInfoBaseResource": + """Gets the operation result of operation triggered by Export Jobs API. If the operation is + successful, then it also + contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in + JSON serialized format. + + :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 export job. + :type operation_id: 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.activestamp.models.OperationResultInfoBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationResultInfoBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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) + + if response.status_code == 200: + deserialized = self._deserialize('OperationResultInfoBaseResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('OperationResultInfoBaseResource', pipeline_response) + + if cls: + 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/activestamp/aio/operations/_feature_support_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_feature_support_operations.py new file mode 100644 index 000000000000..c4b37c180303 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_feature_support_operations.py @@ -0,0 +1,103 @@ +# 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._feature_support_operations import build_validate_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class FeatureSupportOperations: + """FeatureSupportOperations 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.activestamp.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 validate( + self, + azure_region: str, + parameters: "_models.FeatureSupportRequest", + **kwargs: Any + ) -> "_models.AzureVMResourceFeatureSupportResponse": + """It will validate if given feature with resource properties is supported in service. + + It will validate if given feature with resource properties is supported in service. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param parameters: Feature support request object. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.FeatureSupportRequest + :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.activestamp.models.AzureVMResourceFeatureSupportResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureVMResourceFeatureSupportResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'FeatureSupportRequest') + + request = build_validate_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + template_url=self.validate.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('AzureVMResourceFeatureSupportResponse', pipeline_response) + + if cls: + 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/activestamp/aio/operations/_item_level_recovery_connections_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_item_level_recovery_connections_operations.py new file mode 100644 index 000000000000..364af796cc2c --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_item_level_recovery_connections_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 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._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]] + +class ItemLevelRecoveryConnectionsOperations: + """ItemLevelRecoveryConnectionsOperations 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.activestamp.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 provision( + self, + vault_name: str, + resource_group_name: str, + fabric_name: str, + container_name: str, + protected_item_name: str, + recovery_point_id: str, + parameters: "_models.ILRRequestResource", + **kwargs: Any + ) -> None: + """Provisions a script which invokes an iSCSI connection to the backup data. Executing this script + opens a file + explorer displaying all the recoverable files and folders. This is an asynchronous operation. + To know the status of + provisioning, call GetProtectedItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up items. + :type fabric_name: str + :param container_name: Container name associated with the backed up items. + :type container_name: str + :param protected_item_name: Backed up item name whose files/folders are to be restored. + :type protected_item_name: str + :param recovery_point_id: Recovery point ID which represents backed up data. iSCSI connection + will be provisioned + for this backed up data. + :type recovery_point_id: str + :param parameters: resource ILR request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ILRRequestResource + :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', {})) + + 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, + content_type=content_type, + json=_json, + template_url=self.provision.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, {}) + + 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, + resource_group_name: str, + fabric_name: str, + container_name: str, + protected_item_name: str, + recovery_point_id: str, + **kwargs: Any + ) -> None: + """Revokes an iSCSI connection which can be used to download a script. Executing this script opens + a file explorer + displaying all recoverable files and folders. This is an asynchronous 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 fabric_name: Fabric name associated with the backed up items. + :type fabric_name: str + :param container_name: Container name associated with the backed up items. + :type container_name: str + :param protected_item_name: Backed up item name whose files/folders are to be restored. + :type protected_item_name: str + :param recovery_point_id: Recovery point ID which represents backed up data. iSCSI connection + will be revoked for + this backed up data. + :type recovery_point_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + template_url=self.revoke.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, {}) + + 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/activestamp/aio/operations/_job_cancellations_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_job_cancellations_operations.py new file mode 100644 index 000000000000..3c1982835202 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_job_cancellations_operations.py @@ -0,0 +1,98 @@ +# 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._job_cancellations_operations import build_trigger_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class JobCancellationsOperations: + """JobCancellationsOperations 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.activestamp.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 trigger( + self, + vault_name: str, + resource_group_name: str, + job_name: str, + **kwargs: Any + ) -> None: + """Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call + GetCancelOperationResult 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 job_name: Name of the job to cancel. + :type job_name: 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', {})) + + + request = build_trigger_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + job_name=job_name, + template_url=self.trigger.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.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/activestamp/aio/operations/_job_details_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_job_details_operations.py new file mode 100644 index 000000000000..e4ab6ba7c9a7 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_job_details_operations.py @@ -0,0 +1,101 @@ +# 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._job_details_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class JobDetailsOperations: + """JobDetailsOperations 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.activestamp.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, + job_name: str, + **kwargs: Any + ) -> "_models.JobResource": + """Gets extended information associated with the job. + + :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 job_name: Name of the job whose details are to be fetched. + :type job_name: 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.activestamp.models.JobResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + job_name=job_name, + 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('JobResource', pipeline_response) + + if cls: + 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/activestamp/aio/operations/_job_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_job_operation_results_operations.py new file mode 100644 index 000000000000..79a3439de3c9 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_job_operation_results_operations.py @@ -0,0 +1,101 @@ +# 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._job_operation_results_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class JobOperationResultsOperations: + """JobOperationResultsOperations 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.activestamp.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, + job_name: str, + operation_id: str, + **kwargs: Any + ) -> None: + """Fetches the result of any 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 job_name: Job name whose operation result has to be fetched. + :type job_name: str + :param operation_id: OperationID which represents the operation whose result has to be fetched. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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, 204]: + 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, {}) + + 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/activestamp/aio/operations/_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_jobs_operations.py new file mode 100644 index 000000000000..645973e29a26 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_jobs_operations.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import 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._jobs_operations import build_export_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class JobsOperations: + """JobsOperations 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.activestamp.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 export( + self, + vault_name: str, + resource_group_name: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> None: + """Triggers export of jobs specified by filters and returns an OperationID to track. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :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', {})) + + + request = build_export_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + filter=filter, + template_url=self.export.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, {}) + + 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/activestamp/aio/operations/_operation_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_operation_operations.py new file mode 100644 index 000000000000..69a5e46e143b --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_operation_operations.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import 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._operation_operations import build_validate_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OperationOperations: + """OperationOperations 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.activestamp.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 validate( + self, + vault_name: str, + resource_group_name: str, + parameters: "_models.ValidateOperationRequest", + **kwargs: Any + ) -> "_models.ValidateOperationsResponse": + """Validate operation for specified backed up item. This is a synchronous operation. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: resource validate operation request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ValidateOperationRequest + :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.activestamp.models.ValidateOperationsResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateOperationsResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ValidateOperationRequest') + + request = build_validate_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + template_url=self.validate.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('ValidateOperationsResponse', pipeline_response) + + if cls: + 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/activestamp/aio/operations/_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_operations.py new file mode 100644 index 000000000000..1d6edc67fcfd --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_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, 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 +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]] + +class Operations: + """Operations 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.activestamp.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 + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ClientDiscoveryResponse"]: + """Returns the list of available operations. + + :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.activestamp.models.ClientDiscoveryResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClientDiscoveryResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.RecoveryServices/operations'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_private_endpoint_connection_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_private_endpoint_connection_operations.py new file mode 100644 index 000000000000..a24cb05de651 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_private_endpoint_connection_operations.py @@ -0,0 +1,336 @@ +# 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._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]] + +class PrivateEndpointConnectionOperations: + """PrivateEndpointConnectionOperations 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.activestamp.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, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnectionResource": + """Get Private Endpoint Connection. This call is made by Backup Admin. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :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.activestamp.models.PrivateEndpointConnectionResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnectionResource", + **kwargs: Any + ) -> "_models.PrivateEndpointConnectionResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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, + 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) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnectionResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.PrivateEndpointConnectionResource"]: + """Approve or Reject Private Endpoint requests. This call is made by Backup Admin. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: Request body for operation. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.PrivateEndpointConnectionResource + :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 PrivateEndpointConnectionResource or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.recoveryservicesbackup.activestamp.models.PrivateEndpointConnectionResource] + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._put_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + private_endpoint_connection_name=private_endpoint_connection_name, + parameters=parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', 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 + + + 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_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_initial( + self, + vault_name: str, + resource_group_name: str, + private_endpoint_connection_name: str, + **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', {})) + + + 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, + template_url=self._delete_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 [200, 202, 204]: + 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, {}) + + _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, + resource_group_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete Private Endpoint requests. This call is made by Backup Admin. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, 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._delete_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + private_endpoint_connection_name=private_endpoint_connection_name, + 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_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/activestamp/aio/operations/_private_endpoint_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_private_endpoint_operations.py new file mode 100644 index 000000000000..0c94ea60aabc --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_private_endpoint_operations.py @@ -0,0 +1,108 @@ +# 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._private_endpoint_operations import build_get_operation_status_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointOperations: + """PrivateEndpointOperations 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.activestamp.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_operation_status( + self, + vault_name: str, + resource_group_name: str, + private_endpoint_connection_name: str, + operation_id: str, + **kwargs: Any + ) -> "_models.OperationStatus": + """Gets the operation status for a private endpoint connection. + + Gets the operation status for a private endpoint connection. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param operation_id: Operation id. + :type operation_id: str + :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.activestamp.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', {})) + + + 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, + template_url=self.get_operation_status.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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_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/activestamp/aio/operations/_protectable_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protectable_containers_operations.py new file mode 100644 index 000000000000..71c2cfc0958c --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protectable_containers_operations.py @@ -0,0 +1,133 @@ +# 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, 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 +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]] + +class ProtectableContainersOperations: + """ProtectableContainersOperations 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.activestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + fabric_name: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ProtectableContainerResourceList"]: + """Lists the containers that can be registered to Recovery Services Vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: + :type fabric_name: str + :param filter: OData filter options. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProtectableContainerResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectableContainerResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectableContainerResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protected_item_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protected_item_operation_results_operations.py new file mode 100644 index 000000000000..744995db01a2 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protected_item_operation_results_operations.py @@ -0,0 +1,116 @@ +# 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._protected_item_operation_results_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ProtectedItemOperationResultsOperations: + """ProtectedItemOperationResultsOperations 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.activestamp.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, + fabric_name: str, + container_name: str, + protected_item_name: str, + operation_id: str, + **kwargs: Any + ) -> Optional["_models.ProtectedItemResource"]: + """Fetches the result of any operation on the backup item. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backup item. + :type fabric_name: str + :param container_name: Container name associated with the backup item. + :type container_name: str + :param protected_item_name: Backup item name whose details are to be fetched. + :type protected_item_name: str + :param operation_id: OperationID which represents the operation whose result needs to be + fetched. + :type operation_id: 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.activestamp.models.ProtectedItemResource or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectedItemResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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, 204]: + 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('ProtectedItemResource', pipeline_response) + + if cls: + 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/activestamp/aio/operations/_protected_item_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protected_item_operation_statuses_operations.py new file mode 100644 index 000000000000..4217d806f467 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protected_item_operation_statuses_operations.py @@ -0,0 +1,117 @@ +# 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._protected_item_operation_statuses_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ProtectedItemOperationStatusesOperations: + """ProtectedItemOperationStatusesOperations 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.activestamp.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, + fabric_name: str, + container_name: str, + protected_item_name: str, + operation_id: str, + **kwargs: Any + ) -> "_models.OperationStatus": + """Fetches the status of an operation such as triggering a backup, restore. The status can be in + progress, completed + or failed. You can refer to the OperationStatus enum for all the possible states of the + operation. Some operations + create jobs. This method returns the list of jobs associated with 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 fabric_name: Fabric name associated with the backup item. + :type fabric_name: str + :param container_name: Container name associated with the backup item. + :type container_name: str + :param protected_item_name: Backup item name whose details are to be fetched. + :type protected_item_name: str + :param operation_id: OperationID represents the operation whose status needs to be fetched. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationStatus, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.activestamp.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', {})) + + + 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, + 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}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protected_items_operations.py new file mode 100644 index 000000000000..c6824048308b --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protected_items_operations.py @@ -0,0 +1,254 @@ +# 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._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]] + +class ProtectedItemsOperations: + """ProtectedItemsOperations 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.activestamp.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, + fabric_name: str, + container_name: str, + protected_item_name: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> "_models.ProtectedItemResource": + """Provides the details of the backed up item. This is an asynchronous operation. To know the + status of the operation, + call the GetItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up item. + :type fabric_name: str + :param container_name: Container name associated with the backed up item. + :type container_name: str + :param protected_item_name: Backed up item name whose details are to be fetched. + :type protected_item_name: str + :param filter: OData filter options. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProtectedItemResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectedItemResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectedItemResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + filter=filter, + 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('ProtectedItemResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + fabric_name: str, + container_name: str, + protected_item_name: str, + parameters: "_models.ProtectedItemResource", + **kwargs: Any + ) -> Optional["_models.ProtectedItemResource"]: + """Enables backup of an item or to modifies the backup policy information of an already backed up + item. This is an + asynchronous operation. To know the status of the operation, call the GetItemOperationResult + API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backup item. + :type fabric_name: str + :param container_name: Container name associated with the backup item. + :type container_name: str + :param protected_item_name: Item name to be backed up. + :type protected_item_name: str + :param parameters: resource backed up item. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectedItemResource + :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.activestamp.models.ProtectedItemResource or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectedItemResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + 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, + 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) + + 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('ProtectedItemResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + fabric_name: str, + container_name: str, + protected_item_name: str, + **kwargs: Any + ) -> None: + """Used to disable backup of an item within a container. This is an asynchronous operation. To + know the status of the + request, call the GetItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up item. + :type fabric_name: str + :param container_name: Container name associated with the backed up item. + :type container_name: str + :param protected_item_name: Backed up item to be deleted. + :type protected_item_name: 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', {})) + + + 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, + template_url=self.delete.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, 204]: + 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, {}) + + 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/activestamp/aio/operations/_protection_container_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_container_operation_results_operations.py new file mode 100644 index 000000000000..475f344eddbc --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_container_operation_results_operations.py @@ -0,0 +1,113 @@ +# 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._protection_container_operation_results_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ProtectionContainerOperationResultsOperations: + """ProtectionContainerOperationResultsOperations 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.activestamp.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, + fabric_name: str, + container_name: str, + operation_id: str, + **kwargs: Any + ) -> Optional["_models.ProtectionContainerResource"]: + """Fetches the result of any operation on the container. + + :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: Container name whose information should be fetched. + :type container_name: str + :param operation_id: Operation ID which represents the operation whose result needs to be + fetched. + :type operation_id: 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.activestamp.models.ProtectionContainerResource or + None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectionContainerResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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, 204]: + 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('ProtectionContainerResource', pipeline_response) + + if cls: + 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/activestamp/aio/operations/_protection_container_refresh_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_container_refresh_operation_results_operations.py new file mode 100644 index 000000000000..61edf92ab770 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_container_refresh_operation_results_operations.py @@ -0,0 +1,102 @@ +# 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._protection_container_refresh_operation_results_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ProtectionContainerRefreshOperationResultsOperations: + """ProtectionContainerRefreshOperationResultsOperations 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.activestamp.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, + fabric_name: str, + operation_id: str, + **kwargs: Any + ) -> None: + """Provides the result of the refresh operation triggered by the BeginRefresh 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 fabric_name: Fabric name associated with the container. + :type fabric_name: str + :param operation_id: Operation ID associated with the operation whose result needs to be + fetched. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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 [202, 204]: + 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, {}) + + 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/activestamp/aio/operations/_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_containers_operations.py new file mode 100644 index 000000000000..6c9f94234fb7 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_containers_operations.py @@ -0,0 +1,362 @@ +# 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._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]] + +class ProtectionContainersOperations: + """ProtectionContainersOperations 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.activestamp.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, + fabric_name: str, + container_name: str, + **kwargs: Any + ) -> "_models.ProtectionContainerResource": + """Gets details of the specific container registered to your Recovery Services Vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Name of the fabric where the container belongs. + :type fabric_name: str + :param container_name: Name of the container whose details need to be fetched. + :type container_name: 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.activestamp.models.ProtectionContainerResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionContainerResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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('ProtectionContainerResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + fabric_name: str, + container_name: str, + parameters: "_models.ProtectionContainerResource", + **kwargs: Any + ) -> Optional["_models.ProtectionContainerResource"]: + """Registers the container with Recovery Services vault. + This is an asynchronous operation. To track the operation status, use location header to call + get latest status of + 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 fabric_name: Fabric name associated with the container. + :type fabric_name: str + :param container_name: Name of the container to be registered. + :type container_name: str + :param parameters: Request body for operation. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionContainerResource + :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.activestamp.models.ProtectionContainerResource or + None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectionContainerResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + 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, + content_type=content_type, + json=_json, + template_url=self.register.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('ProtectionContainerResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + fabric_name: str, + container_name: str, + **kwargs: Any + ) -> None: + """Unregisters the given container from your Recovery Services Vault. This is an asynchronous + operation. To determine + whether the backend service has finished processing the request, call Get Container Operation + Result API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Name of the fabric where the container belongs. + :type fabric_name: str + :param container_name: Name of the container which needs to be unregistered from the Recovery + Services Vault. + :type container_name: 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', {})) + + + 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, + template_url=self.unregister.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, 204]: + 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, {}) + + 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, + resource_group_name: str, + fabric_name: str, + container_name: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> None: + """Inquires all the protectable items under the given container. + + This is an async operation and the results should be tracked using location header or + Azure-async-url. + + :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 in which inquiry needs to be triggered. + :type container_name: str + :param filter: OData filter options. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: 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', {})) + + + 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, + filter=filter, + template_url=self.inquire.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, {}) + + 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, + resource_group_name: str, + fabric_name: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> None: + """Discovers all the containers in the subscription that can be backed up to Recovery Services + Vault. This is an + asynchronous operation. To know the status of the operation, call GetRefreshOperationResult + API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated the container. + :type fabric_name: str + :param filter: OData filter options. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: 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', {})) + + + request = build_refresh_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + filter=filter, + template_url=self.refresh.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, {}) + + 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/activestamp/aio/operations/_protection_intent_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_intent_operations.py new file mode 100644 index 000000000000..e4a9f970d1d6 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_intent_operations.py @@ -0,0 +1,300 @@ +# 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._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]] + +class ProtectionIntentOperations: + """ProtectionIntentOperations 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.activestamp.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 validate( + self, + azure_region: str, + parameters: "_models.PreValidateEnableBackupRequest", + **kwargs: Any + ) -> "_models.PreValidateEnableBackupResponse": + """It will validate followings + + + #. Vault capacity + #. VM is already protected + #. Any VM related configuration passed in properties. + + It will validate followings + + + #. Vault capacity + #. VM is already protected + #. Any VM related configuration passed in properties. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param parameters: Enable backup validation request on Virtual Machine. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.PreValidateEnableBackupRequest + :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.activestamp.models.PreValidateEnableBackupResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PreValidateEnableBackupResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PreValidateEnableBackupRequest') + + request = build_validate_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + template_url=self.validate.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('PreValidateEnableBackupResponse', pipeline_response) + + if cls: + 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, + resource_group_name: str, + fabric_name: str, + intent_object_name: str, + **kwargs: Any + ) -> "_models.ProtectionIntentResource": + """Provides the details of the protection intent up item. This is an asynchronous operation. To + know the status of the operation, + call the GetItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up item. + :type fabric_name: str + :param intent_object_name: Backed up item name whose details are to be fetched. + :type intent_object_name: 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.activestamp.models.ProtectionIntentResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionIntentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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('ProtectionIntentResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + fabric_name: str, + intent_object_name: str, + parameters: "_models.ProtectionIntentResource", + **kwargs: Any + ) -> "_models.ProtectionIntentResource": + """Create Intent for Enabling backup of an item. This is a synchronous 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 fabric_name: Fabric name associated with the backup item. + :type fabric_name: str + :param intent_object_name: Intent object name. + :type intent_object_name: str + :param parameters: resource backed up item. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionIntentResource + :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.activestamp.models.ProtectionIntentResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionIntentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + 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, + 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) + + 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('ProtectionIntentResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + fabric_name: str, + intent_object_name: str, + **kwargs: Any + ) -> None: + """Used to remove intent from an item. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the intent. + :type fabric_name: str + :param intent_object_name: Intent to be deleted. + :type intent_object_name: 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', {})) + + + 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, + template_url=self.delete.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 [204]: + 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, {}) + + 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/activestamp/aio/operations/_protection_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_policies_operations.py new file mode 100644 index 000000000000..93b8ad39e43b --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_policies_operations.py @@ -0,0 +1,279 @@ +# 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._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]] + +class ProtectionPoliciesOperations: + """ProtectionPoliciesOperations 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.activestamp.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, + policy_name: str, + **kwargs: Any + ) -> "_models.ProtectionPolicyResource": + """Provides the details of the backup policies associated to Recovery Services Vault. This is an + asynchronous + operation. Status of the operation can be fetched using GetPolicyOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param policy_name: Backup policy information to be fetched. + :type policy_name: 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.activestamp.models.ProtectionPolicyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionPolicyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + policy_name=policy_name, + 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('ProtectionPolicyResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + policy_name: str, + parameters: "_models.ProtectionPolicyResource", + **kwargs: Any + ) -> Optional["_models.ProtectionPolicyResource"]: + """Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation + can be fetched + using GetPolicyOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param policy_name: Backup policy to be created. + :type policy_name: str + :param parameters: resource backup policy. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionPolicyResource + :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.activestamp.models.ProtectionPolicyResource or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectionPolicyResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ProtectionPolicyResource') + + 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, + 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) + + 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('ProtectionPolicyResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + policy_name: str, + **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', {})) + + + 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, + template_url=self._delete_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 [200, 204]: + 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, {}) + + _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, + resource_group_name: str, + policy_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous + operation. Status of the + operation can be fetched using GetProtectionPolicyOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param policy_name: Backup policy to be deleted. + :type policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, 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._delete_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + policy_name=policy_name, + 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_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/activestamp/aio/operations/_protection_policy_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_policy_operation_results_operations.py new file mode 100644 index 000000000000..46e216086645 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_policy_operation_results_operations.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import 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._protection_policy_operation_results_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ProtectionPolicyOperationResultsOperations: + """ProtectionPolicyOperationResultsOperations 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.activestamp.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, + policy_name: str, + operation_id: str, + **kwargs: Any + ) -> "_models.ProtectionPolicyResource": + """Provides the result of an 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 policy_name: Backup policy name whose operation's result needs to be fetched. + :type policy_name: str + :param operation_id: Operation ID which represents the operation whose result needs to be + fetched. + :type operation_id: 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.activestamp.models.ProtectionPolicyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionPolicyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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('ProtectionPolicyResource', pipeline_response) + + if cls: + 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/activestamp/aio/operations/_protection_policy_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_policy_operation_statuses_operations.py new file mode 100644 index 000000000000..b55495d6a0c7 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_protection_policy_operation_statuses_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._protection_policy_operation_statuses_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ProtectionPolicyOperationStatusesOperations: + """ProtectionPolicyOperationStatusesOperations 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.activestamp.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, + policy_name: str, + operation_id: str, + **kwargs: Any + ) -> "_models.OperationStatus": + """Provides the status of the asynchronous operations like backup, restore. The status can be in + progress, completed + or failed. You can refer to the Operation Status enum for all the possible states of an + operation. Some operations + create jobs. This method returns the list of jobs associated with 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 policy_name: Backup policy name whose operation's status needs to be fetched. + :type policy_name: str + :param operation_id: Operation ID which represents an operation whose status needs to be + fetched. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationStatus, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.activestamp.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', {})) + + + 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, + 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}/backupPolicies/{policyName}/operations/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_recovery_points_operations.py new file mode 100644 index 000000000000..82781c69d7b4 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_recovery_points_operations.py @@ -0,0 +1,213 @@ +# 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, 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 +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]] + +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.activestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + fabric_name: str, + container_name: str, + protected_item_name: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.RecoveryPointResourceList"]: + """Lists the backup copies for the backed up item. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up item. + :type fabric_name: str + :param container_name: Container name associated with the backed up item. + :type container_name: str + :param protected_item_name: Backed up item whose backup copies are to be fetched. + :type protected_item_name: str + :param filter: OData filter options. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RecoveryPointResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.RecoveryPointResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + 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, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + 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, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints'} # type: ignore + + @distributed_trace_async + async def get( + self, + vault_name: str, + resource_group_name: str, + fabric_name: str, + container_name: str, + protected_item_name: str, + recovery_point_id: str, + **kwargs: Any + ) -> "_models.RecoveryPointResource": + """Provides the information of the backed up data identified using RecoveryPointID. This is an + asynchronous operation. + To know the status of the operation, call the GetProtectedItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with backed up item. + :type fabric_name: str + :param container_name: Container name associated with backed up item. + :type container_name: str + :param protected_item_name: Backed up item name whose backup data needs to be fetched. + :type protected_item_name: str + :param recovery_point_id: RecoveryPointID represents the backed up data to be fetched. + :type recovery_point_id: 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.activestamp.models.RecoveryPointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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('RecoveryPointResource', pipeline_response) + + if cls: + 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 + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_recovery_points_recommended_for_move_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_recovery_points_recommended_for_move_operations.py new file mode 100644 index 000000000000..fd1e4ac530d4 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_recovery_points_recommended_for_move_operations.py @@ -0,0 +1,150 @@ +# 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, 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 +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]] + +class RecoveryPointsRecommendedForMoveOperations: + """RecoveryPointsRecommendedForMoveOperations 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.activestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + fabric_name: str, + container_name: str, + protected_item_name: str, + parameters: "_models.ListRecoveryPointsRecommendedForMoveRequest", + **kwargs: Any + ) -> AsyncIterable["_models.RecoveryPointResourceList"]: + """Lists the recovery points recommended for move to another tier. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: + :type fabric_name: str + :param container_name: + :type container_name: str + :param protected_item_name: + :type protected_item_name: str + :param parameters: List Recovery points Recommended for Move Request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ListRecoveryPointsRecommendedForMoveRequest + :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.activestamp.models.RecoveryPointResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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', {})) + def prepare_request(next_link=None): + if not next_link: + _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, + 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: + _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, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPointsRecommendedForMove'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_recovery_services_backup_client_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_recovery_services_backup_client_operations.py new file mode 100644 index 000000000000..08ac6d06db32 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_recovery_services_backup_client_operations.py @@ -0,0 +1,438 @@ +# 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._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, + resource_group_name: str, + operation_id: str, + **kwargs: Any + ) -> "_models.OperationStatus": + """Fetches operation status for data move operation on vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param operation_id: + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationStatus, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.activestamp.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', {})) + + + 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, + template_url=self.get_operation_status.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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_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, + resource_group_name: str, + parameters: "_models.PrepareDataMoveRequest", + **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', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PrepareDataMoveRequest') + + request = build_bms_prepare_data_move_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + + 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) + + 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, + resource_group_name: str, + parameters: "_models.PrepareDataMoveRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Prepares source vault for Data Move operation. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: Prepare data move request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.PrepareDataMoveRequest + :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 + """ + 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._bms_prepare_data_move_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + 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_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( + self, + vault_name: str, + resource_group_name: str, + parameters: "_models.TriggerDataMoveRequest", + **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', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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, + 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) + + 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) + + 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, + resource_group_name: str, + parameters: "_models.TriggerDataMoveRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Triggers Data Move Operation on target vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: Trigger data move request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.TriggerDataMoveRequest + :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 + """ + 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._bms_trigger_data_move_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + 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_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( + self, + vault_name: str, + resource_group_name: str, + fabric_name: str, + container_name: str, + protected_item_name: str, + recovery_point_id: str, + parameters: "_models.MoveRPAcrossTiersRequest", + **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', {})) + + 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, + 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) + + 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, {}) + + _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, + resource_group_name: str, + fabric_name: str, + container_name: str, + protected_item_name: str, + recovery_point_id: str, + parameters: "_models.MoveRPAcrossTiersRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Move recovery point from one datastore to another store. + + Move recovery point from one datastore to another store. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: + :type fabric_name: str + :param container_name: + :type container_name: str + :param protected_item_name: + :type protected_item_name: str + :param recovery_point_id: + :type recovery_point_id: str + :param parameters: Move Resource Across Tiers Request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.MoveRPAcrossTiersRequest + :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 + """ + 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._move_recovery_point_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + parameters=parameters, + 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_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/activestamp/aio/operations/_resource_guard_proxies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_resource_guard_proxies_operations.py new file mode 100644 index 000000000000..654ed3c80564 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_resource_guard_proxies_operations.py @@ -0,0 +1,123 @@ +# 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, 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 +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]] + +class ResourceGuardProxiesOperations: + """ResourceGuardProxiesOperations 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.activestamp.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 + def get( + self, + vault_name: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ResourceGuardProxyBaseResourceList"]: + """List the ResourceGuardProxies under vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :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.activestamp.models.ResourceGuardProxyBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_resource_guard_proxy_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_resource_guard_proxy_operations.py new file mode 100644 index 000000000000..bd6333e503fb --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_resource_guard_proxy_operations.py @@ -0,0 +1,274 @@ +# 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._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]] + +class ResourceGuardProxyOperations: + """ResourceGuardProxyOperations 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.activestamp.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, + resource_guard_proxy_name: str, + **kwargs: Any + ) -> "_models.ResourceGuardProxyBaseResource": + """Returns ResourceGuardProxy under vault and with the name referenced in request. + + :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 resource_guard_proxy_name: + :type resource_guard_proxy_name: 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.activestamp.models.ResourceGuardProxyBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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('ResourceGuardProxyBaseResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + resource_guard_proxy_name: str, + **kwargs: Any + ) -> "_models.ResourceGuardProxyBaseResource": + """Add or Update ResourceGuardProxy under vault + Secures vault critical operations. + + :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 resource_guard_proxy_name: + :type resource_guard_proxy_name: 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.activestamp.models.ResourceGuardProxyBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + template_url=self.put.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('ResourceGuardProxyBaseResource', pipeline_response) + + if cls: + 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, + resource_group_name: str, + resource_guard_proxy_name: str, + **kwargs: Any + ) -> None: + """Delete ResourceGuardProxy under vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param resource_guard_proxy_name: + :type resource_guard_proxy_name: 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', {})) + + + 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, + template_url=self.delete.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, 204]: + 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, {}) + + 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, + resource_group_name: str, + resource_guard_proxy_name: str, + parameters: "_models.UnlockDeleteRequest", + **kwargs: Any + ) -> "_models.UnlockDeleteResponse": + """Secures delete ResourceGuardProxy operations. + + :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 resource_guard_proxy_name: + :type resource_guard_proxy_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.UnlockDeleteRequest + :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.activestamp.models.UnlockDeleteResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UnlockDeleteResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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, + 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) + + 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('UnlockDeleteResponse', pipeline_response) + + if cls: + 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/activestamp/aio/operations/_restores_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_restores_operations.py new file mode 100644 index 000000000000..0d332f2422d5 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_restores_operations.py @@ -0,0 +1,182 @@ +# 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._restores_operations import build_trigger_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RestoresOperations: + """RestoresOperations 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.activestamp.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, + fabric_name: str, + container_name: str, + protected_item_name: str, + recovery_point_id: str, + parameters: "_models.RestoreRequestResource", + **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', {})) + + 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, + 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}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'} # type: ignore + + + @distributed_trace_async + async def begin_trigger( + self, + vault_name: str, + resource_group_name: str, + fabric_name: str, + container_name: str, + protected_item_name: str, + recovery_point_id: str, + parameters: "_models.RestoreRequestResource", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Restores the specified backed up data. This is an asynchronous operation. To know the status of + this API call, use + GetProtectedItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up items. + :type fabric_name: str + :param container_name: Container name associated with the backed up items. + :type container_name: str + :param protected_item_name: Backed up item to be restored. + :type protected_item_name: str + :param recovery_point_id: Recovery point ID which represents the backed up data to be restored. + :type recovery_point_id: str + :param parameters: resource restore request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.RestoreRequestResource + :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 + """ + 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, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + parameters=parameters, + 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}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_security_pins_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_security_pins_operations.py new file mode 100644 index 000000000000..fe391577f47b --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_security_pins_operations.py @@ -0,0 +1,108 @@ +# 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._security_pins_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class SecurityPINsOperations: + """SecurityPINsOperations 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.activestamp.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, + parameters: Optional["_models.SecurityPinBase"] = None, + **kwargs: Any + ) -> "_models.TokenInformation": + """Get the security PIN. + + :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: security pin request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.SecurityPinBase + :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.activestamp.models.TokenInformation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TokenInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'SecurityPinBase') + else: + _json = None + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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 + + 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('TokenInformation', pipeline_response) + + if cls: + 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/activestamp/aio/operations/_validate_operation_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_validate_operation_operations.py new file mode 100644 index 000000000000..c0764842a7b8 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_validate_operation_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 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.activestamp.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', {})) + + 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, + 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.activestamp.models.ValidateOperationRequest + :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 + """ + 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, + 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/activestamp/aio/operations/_validate_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_validate_operation_results_operations.py new file mode 100644 index 000000000000..d2f7b9e2eeda --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_validate_operation_results_operations.py @@ -0,0 +1,105 @@ +# 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.activestamp.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 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.activestamp.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', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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/activestamp/aio/operations/_validate_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_validate_operation_statuses_operations.py new file mode 100644 index 000000000000..72fbf7fc31f6 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_validate_operation_statuses_operations.py @@ -0,0 +1,105 @@ +# 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.activestamp.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 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.activestamp.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', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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/activestamp/models/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/__init__.py new file mode 100644 index 000000000000..f7b2600047dc --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/__init__.py @@ -0,0 +1,1008 @@ +# 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 AzureBackupGoalFeatureSupportRequest + from ._models_py3 import AzureBackupServerContainer + from ._models_py3 import AzureBackupServerEngine + from ._models_py3 import AzureFileShareBackupRequest + from ._models_py3 import AzureFileShareProtectableItem + from ._models_py3 import AzureFileShareProtectionPolicy + from ._models_py3 import AzureFileShareProvisionILRRequest + from ._models_py3 import AzureFileShareRecoveryPoint + from ._models_py3 import AzureFileShareRestoreRequest + from ._models_py3 import AzureFileshareProtectedItem + from ._models_py3 import AzureFileshareProtectedItemExtendedInfo + from ._models_py3 import AzureIaaSClassicComputeVMContainer + from ._models_py3 import AzureIaaSClassicComputeVMProtectableItem + from ._models_py3 import AzureIaaSClassicComputeVMProtectedItem + from ._models_py3 import AzureIaaSComputeVMContainer + from ._models_py3 import AzureIaaSComputeVMProtectableItem + 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 AzureIaaSVMJobV2 + from ._models_py3 import AzureIaaSVMProtectedItem + from ._models_py3 import AzureIaaSVMProtectedItemExtendedInfo + from ._models_py3 import AzureIaaSVMProtectionPolicy + from ._models_py3 import AzureRecoveryServiceVaultProtectionIntent + from ._models_py3 import AzureResourceProtectionIntent + from ._models_py3 import AzureSQLAGWorkloadContainerProtectionContainer + from ._models_py3 import AzureSqlContainer + from ._models_py3 import AzureSqlProtectedItem + from ._models_py3 import AzureSqlProtectedItemExtendedInfo + from ._models_py3 import AzureSqlProtectionPolicy + from ._models_py3 import AzureStorageContainer + from ._models_py3 import AzureStorageErrorInfo + from ._models_py3 import AzureStorageJob + from ._models_py3 import AzureStorageJobExtendedInfo + from ._models_py3 import AzureStorageJobTaskDetails + from ._models_py3 import AzureStorageProtectableContainer + from ._models_py3 import AzureVMAppContainerProtectableContainer + from ._models_py3 import AzureVMAppContainerProtectionContainer + from ._models_py3 import AzureVMResourceFeatureSupportRequest + from ._models_py3 import AzureVMResourceFeatureSupportResponse + from ._models_py3 import AzureVmWorkloadItem + from ._models_py3 import AzureVmWorkloadProtectableItem + from ._models_py3 import AzureVmWorkloadProtectedItem + from ._models_py3 import AzureVmWorkloadProtectedItemExtendedInfo + from ._models_py3 import AzureVmWorkloadProtectionPolicy + from ._models_py3 import AzureVmWorkloadSAPAseDatabaseProtectedItem + from ._models_py3 import AzureVmWorkloadSAPAseDatabaseWorkloadItem + from ._models_py3 import AzureVmWorkloadSAPAseSystemProtectableItem + from ._models_py3 import AzureVmWorkloadSAPAseSystemWorkloadItem + from ._models_py3 import AzureVmWorkloadSAPHanaDatabaseProtectableItem + from ._models_py3 import AzureVmWorkloadSAPHanaDatabaseProtectedItem + from ._models_py3 import AzureVmWorkloadSAPHanaDatabaseWorkloadItem + from ._models_py3 import AzureVmWorkloadSAPHanaSystemProtectableItem + from ._models_py3 import AzureVmWorkloadSAPHanaSystemWorkloadItem + from ._models_py3 import AzureVmWorkloadSQLAvailabilityGroupProtectableItem + from ._models_py3 import AzureVmWorkloadSQLDatabaseProtectableItem + from ._models_py3 import AzureVmWorkloadSQLDatabaseProtectedItem + from ._models_py3 import AzureVmWorkloadSQLDatabaseWorkloadItem + from ._models_py3 import AzureVmWorkloadSQLInstanceProtectableItem + from ._models_py3 import AzureVmWorkloadSQLInstanceWorkloadItem + 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 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 AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest + from ._models_py3 import AzureWorkloadSAPHanaRecoveryPoint + from ._models_py3 import AzureWorkloadSAPHanaRestoreRequest + from ._models_py3 import AzureWorkloadSAPHanaRestoreWithRehydrateRequest + from ._models_py3 import AzureWorkloadSQLAutoProtectionIntent + from ._models_py3 import AzureWorkloadSQLPointInTimeRecoveryPoint + from ._models_py3 import AzureWorkloadSQLPointInTimeRestoreRequest + from ._models_py3 import AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest + from ._models_py3 import AzureWorkloadSQLRecoveryPoint + from ._models_py3 import AzureWorkloadSQLRecoveryPointExtendedInfo + from ._models_py3 import AzureWorkloadSQLRestoreRequest + from ._models_py3 import AzureWorkloadSQLRestoreWithRehydrateRequest + from ._models_py3 import BEKDetails + from ._models_py3 import BMSBackupEngineQueryObject + from ._models_py3 import BMSBackupEnginesQueryObject + from ._models_py3 import BMSBackupSummariesQueryObject + from ._models_py3 import BMSContainerQueryObject + from ._models_py3 import BMSContainersInquiryQueryObject + from ._models_py3 import BMSPOQueryObject + from ._models_py3 import BMSRPQueryObject + from ._models_py3 import BMSRefreshContainersQueryObject + from ._models_py3 import BMSWorkloadItemQueryObject + from ._models_py3 import BackupEngineBase + from ._models_py3 import BackupEngineBaseResource + from ._models_py3 import BackupEngineBaseResourceList + from ._models_py3 import BackupEngineExtendedInfo + from ._models_py3 import BackupManagementUsage + from ._models_py3 import BackupManagementUsageList + from ._models_py3 import BackupRequest + from ._models_py3 import BackupRequestResource + from ._models_py3 import BackupResourceConfig + from ._models_py3 import BackupResourceConfigResource + from ._models_py3 import BackupResourceEncryptionConfig + from ._models_py3 import BackupResourceEncryptionConfigExtended + from ._models_py3 import BackupResourceEncryptionConfigExtendedResource + from ._models_py3 import BackupResourceEncryptionConfigResource + from ._models_py3 import BackupResourceVaultConfig + from ._models_py3 import BackupResourceVaultConfigResource + from ._models_py3 import BackupStatusRequest + from ._models_py3 import BackupStatusResponse + from ._models_py3 import ClientDiscoveryDisplay + from ._models_py3 import ClientDiscoveryForLogSpecification + from ._models_py3 import ClientDiscoveryForProperties + from ._models_py3 import ClientDiscoveryForServiceSpecification + from ._models_py3 import ClientDiscoveryResponse + from ._models_py3 import ClientDiscoveryValueForSingleApi + from ._models_py3 import ClientScriptForConnect + from ._models_py3 import CloudErrorBody + from ._models_py3 import ContainerIdentityInfo + from ._models_py3 import DPMContainerExtendedInfo + from ._models_py3 import DPMProtectedItem + from ._models_py3 import DPMProtectedItemExtendedInfo + from ._models_py3 import DailyRetentionFormat + from ._models_py3 import DailyRetentionSchedule + from ._models_py3 import Day + from ._models_py3 import DiskExclusionProperties + from ._models_py3 import DiskInformation + from ._models_py3 import DistributedNodesInfo + from ._models_py3 import DpmBackupEngine + from ._models_py3 import DpmContainer + 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 ExportJobsOperationResultInfo + from ._models_py3 import ExtendedProperties + from ._models_py3 import FeatureSupportRequest + from ._models_py3 import GenericContainer + from ._models_py3 import GenericContainerExtendedInfo + from ._models_py3 import GenericProtectedItem + 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 + from ._models_py3 import IaaSVMProtectableItem + from ._models_py3 import IaasVMBackupRequest + from ._models_py3 import IaasVMILRRegistrationRequest + from ._models_py3 import IaasVMRecoveryPoint + from ._models_py3 import IaasVMRestoreRequest + from ._models_py3 import IaasVMRestoreWithRehydrationRequest + from ._models_py3 import IdentityBasedRestoreDetails + from ._models_py3 import IdentityInfo + from ._models_py3 import InquiryInfo + from ._models_py3 import InquiryValidation + from ._models_py3 import InstantItemRecoveryTarget + from ._models_py3 import InstantRPAdditionalDetails + 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 ListRecoveryPointsRecommendedForMoveRequest + from ._models_py3 import LogSchedulePolicy + from ._models_py3 import LongTermRetentionPolicy + from ._models_py3 import LongTermSchedulePolicy + from ._models_py3 import MABContainerHealthDetails + from ._models_py3 import MabContainer + from ._models_py3 import MabContainerExtendedInfo + 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 MabProtectionPolicy + from ._models_py3 import MonthlyRetentionSchedule + from ._models_py3 import MoveRPAcrossTiersRequest + from ._models_py3 import NameInfo + from ._models_py3 import NewErrorResponse + from ._models_py3 import NewErrorResponseError + from ._models_py3 import OperationResultInfo + from ._models_py3 import OperationResultInfoBase + from ._models_py3 import OperationResultInfoBaseResource + 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 OperationStatusValidateOperationExtendedInfo + from ._models_py3 import OperationWorkerResponse + from ._models_py3 import PointInTimeRange + from ._models_py3 import PreBackupValidation + from ._models_py3 import PreValidateEnableBackupRequest + from ._models_py3 import PreValidateEnableBackupResponse + from ._models_py3 import PrepareDataMoveRequest + from ._models_py3 import PrepareDataMoveResponse + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionResource + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import ProtectableContainer + from ._models_py3 import ProtectableContainerResource + from ._models_py3 import ProtectableContainerResourceList + from ._models_py3 import ProtectedItem + from ._models_py3 import ProtectedItemQueryObject + from ._models_py3 import ProtectedItemResource + from ._models_py3 import ProtectedItemResourceList + from ._models_py3 import ProtectionContainer + from ._models_py3 import ProtectionContainerResource + from ._models_py3 import ProtectionContainerResourceList + from ._models_py3 import ProtectionIntent + from ._models_py3 import ProtectionIntentQueryObject + from ._models_py3 import ProtectionIntentResource + from ._models_py3 import ProtectionIntentResourceList + from ._models_py3 import ProtectionPolicy + from ._models_py3 import ProtectionPolicyQueryObject + from ._models_py3 import ProtectionPolicyResource + from ._models_py3 import ProtectionPolicyResourceList + from ._models_py3 import RecoveryPoint + from ._models_py3 import RecoveryPointDiskConfiguration + from ._models_py3 import RecoveryPointMoveReadinessInfo + from ._models_py3 import RecoveryPointRehydrationInfo + from ._models_py3 import RecoveryPointResource + from ._models_py3 import 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 + from ._models_py3 import ResourceGuardProxyBaseResource + from ._models_py3 import ResourceGuardProxyBaseResourceList + from ._models_py3 import ResourceHealthDetails + from ._models_py3 import ResourceList + from ._models_py3 import RestoreFileSpecs + from ._models_py3 import RestoreRequest + from ._models_py3 import RestoreRequestResource + from ._models_py3 import RetentionDuration + from ._models_py3 import RetentionPolicy + from ._models_py3 import SQLDataDirectory + from ._models_py3 import SQLDataDirectoryMapping + from ._models_py3 import SchedulePolicy + from ._models_py3 import SecurityPinBase + from ._models_py3 import Settings + from ._models_py3 import SimpleRetentionPolicy + from ._models_py3 import SimpleSchedulePolicy + from ._models_py3 import SubProtectionPolicy + from ._models_py3 import TargetAFSRestoreInfo + from ._models_py3 import TargetRestoreInfo + from ._models_py3 import TokenInformation + from ._models_py3 import TriggerDataMoveRequest + from ._models_py3 import UnlockDeleteRequest + from ._models_py3 import UnlockDeleteResponse + from ._models_py3 import ValidateIaasVMRestoreOperationRequest + from ._models_py3 import ValidateOperationRequest + from ._models_py3 import ValidateOperationResponse + from ._models_py3 import ValidateOperationsResponse + from ._models_py3 import ValidateRestoreOperationRequest + from ._models_py3 import VaultJob + from ._models_py3 import VaultJobErrorInfo + from ._models_py3 import VaultJobExtendedInfo + from ._models_py3 import VaultStorageConfigOperationResultResponse + from ._models_py3 import WeeklyRetentionFormat + from ._models_py3 import WeeklyRetentionSchedule + from ._models_py3 import WorkloadInquiryDetails + from ._models_py3 import WorkloadItem + from ._models_py3 import WorkloadItemResource + from ._models_py3 import WorkloadItemResourceList + from ._models_py3 import WorkloadProtectableItem + from ._models_py3 import WorkloadProtectableItemResource + from ._models_py3 import WorkloadProtectableItemResourceList + from ._models_py3 import YearlyRetentionSchedule +except (SyntaxError, ImportError): + from ._models import AzureBackupGoalFeatureSupportRequest # type: ignore + from ._models import AzureBackupServerContainer # type: ignore + from ._models import AzureBackupServerEngine # type: ignore + from ._models import AzureFileShareBackupRequest # type: ignore + from ._models import AzureFileShareProtectableItem # type: ignore + from ._models import AzureFileShareProtectionPolicy # type: ignore + from ._models import AzureFileShareProvisionILRRequest # 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 AzureIaaSClassicComputeVMContainer # type: ignore + from ._models import AzureIaaSClassicComputeVMProtectableItem # type: ignore + from ._models import AzureIaaSClassicComputeVMProtectedItem # type: ignore + from ._models import AzureIaaSComputeVMContainer # type: ignore + from ._models import AzureIaaSComputeVMProtectableItem # 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 AzureIaaSVMJobV2 # type: ignore + from ._models import AzureIaaSVMProtectedItem # type: ignore + from ._models import AzureIaaSVMProtectedItemExtendedInfo # type: ignore + from ._models import AzureIaaSVMProtectionPolicy # type: ignore + from ._models import AzureRecoveryServiceVaultProtectionIntent # type: ignore + from ._models import AzureResourceProtectionIntent # type: ignore + from ._models import AzureSQLAGWorkloadContainerProtectionContainer # type: ignore + from ._models import AzureSqlContainer # type: ignore + from ._models import AzureSqlProtectedItem # type: ignore + from ._models import AzureSqlProtectedItemExtendedInfo # type: ignore + from ._models import AzureSqlProtectionPolicy # type: ignore + from ._models import AzureStorageContainer # 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 AzureStorageProtectableContainer # type: ignore + from ._models import AzureVMAppContainerProtectableContainer # type: ignore + from ._models import AzureVMAppContainerProtectionContainer # type: ignore + from ._models import AzureVMResourceFeatureSupportRequest # type: ignore + from ._models import AzureVMResourceFeatureSupportResponse # type: ignore + from ._models import AzureVmWorkloadItem # type: ignore + from ._models import AzureVmWorkloadProtectableItem # type: ignore + from ._models import AzureVmWorkloadProtectedItem # type: ignore + from ._models import AzureVmWorkloadProtectedItemExtendedInfo # type: ignore + from ._models import AzureVmWorkloadProtectionPolicy # type: ignore + from ._models import AzureVmWorkloadSAPAseDatabaseProtectedItem # type: ignore + from ._models import AzureVmWorkloadSAPAseDatabaseWorkloadItem # type: ignore + from ._models import AzureVmWorkloadSAPAseSystemProtectableItem # type: ignore + from ._models import AzureVmWorkloadSAPAseSystemWorkloadItem # type: ignore + from ._models import AzureVmWorkloadSAPHanaDatabaseProtectableItem # type: ignore + from ._models import AzureVmWorkloadSAPHanaDatabaseProtectedItem # type: ignore + from ._models import AzureVmWorkloadSAPHanaDatabaseWorkloadItem # type: ignore + from ._models import AzureVmWorkloadSAPHanaSystemProtectableItem # type: ignore + from ._models import AzureVmWorkloadSAPHanaSystemWorkloadItem # type: ignore + from ._models import AzureVmWorkloadSQLAvailabilityGroupProtectableItem # type: ignore + from ._models import AzureVmWorkloadSQLDatabaseProtectableItem # type: ignore + from ._models import AzureVmWorkloadSQLDatabaseProtectedItem # type: ignore + from ._models import AzureVmWorkloadSQLDatabaseWorkloadItem # type: ignore + from ._models import AzureVmWorkloadSQLInstanceProtectableItem # type: ignore + from ._models import AzureVmWorkloadSQLInstanceWorkloadItem # type: ignore + 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 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 AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest # type: ignore + from ._models import AzureWorkloadSAPHanaRecoveryPoint # 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 AzureWorkloadSQLPointInTimeRestoreRequest # type: ignore + from ._models import AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest # type: ignore + from ._models import AzureWorkloadSQLRecoveryPoint # type: ignore + from ._models import AzureWorkloadSQLRecoveryPointExtendedInfo # type: ignore + from ._models import AzureWorkloadSQLRestoreRequest # type: ignore + from ._models import AzureWorkloadSQLRestoreWithRehydrateRequest # type: ignore + from ._models import BEKDetails # type: ignore + from ._models import BMSBackupEngineQueryObject # type: ignore + from ._models import BMSBackupEnginesQueryObject # type: ignore + from ._models import BMSBackupSummariesQueryObject # type: ignore + from ._models import BMSContainerQueryObject # type: ignore + from ._models import BMSContainersInquiryQueryObject # type: ignore + from ._models import BMSPOQueryObject # type: ignore + from ._models import BMSRPQueryObject # type: ignore + from ._models import BMSRefreshContainersQueryObject # type: ignore + from ._models import BMSWorkloadItemQueryObject # type: ignore + from ._models import BackupEngineBase # type: ignore + from ._models import BackupEngineBaseResource # type: ignore + from ._models import BackupEngineBaseResourceList # type: ignore + from ._models import BackupEngineExtendedInfo # type: ignore + from ._models import BackupManagementUsage # type: ignore + from ._models import BackupManagementUsageList # type: ignore + from ._models import BackupRequest # type: ignore + from ._models import BackupRequestResource # type: ignore + from ._models import BackupResourceConfig # type: ignore + from ._models import BackupResourceConfigResource # type: ignore + from ._models import BackupResourceEncryptionConfig # type: ignore + from ._models import BackupResourceEncryptionConfigExtended # type: ignore + from ._models import BackupResourceEncryptionConfigExtendedResource # type: ignore + from ._models import BackupResourceEncryptionConfigResource # type: ignore + from ._models import BackupResourceVaultConfig # type: ignore + from ._models import BackupResourceVaultConfigResource # type: ignore + from ._models import BackupStatusRequest # type: ignore + from ._models import BackupStatusResponse # type: ignore + from ._models import ClientDiscoveryDisplay # type: ignore + from ._models import ClientDiscoveryForLogSpecification # type: ignore + from ._models import ClientDiscoveryForProperties # type: ignore + from ._models import ClientDiscoveryForServiceSpecification # type: ignore + from ._models import ClientDiscoveryResponse # type: ignore + from ._models import ClientDiscoveryValueForSingleApi # type: ignore + from ._models import ClientScriptForConnect # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import ContainerIdentityInfo # type: ignore + from ._models import DPMContainerExtendedInfo # type: ignore + from ._models import DPMProtectedItem # type: ignore + from ._models import DPMProtectedItemExtendedInfo # type: ignore + from ._models import DailyRetentionFormat # type: ignore + from ._models import DailyRetentionSchedule # type: ignore + from ._models import Day # type: ignore + from ._models import DiskExclusionProperties # type: ignore + from ._models import DiskInformation # type: ignore + from ._models import DistributedNodesInfo # type: ignore + from ._models import DpmBackupEngine # type: ignore + from ._models import DpmContainer # 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 ExportJobsOperationResultInfo # type: ignore + from ._models import ExtendedProperties # type: ignore + from ._models import FeatureSupportRequest # type: ignore + from ._models import GenericContainer # type: ignore + from ._models import GenericContainerExtendedInfo # type: ignore + from ._models import GenericProtectedItem # type: ignore + 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 + from ._models import IaaSVMProtectableItem # type: ignore + from ._models import IaasVMBackupRequest # type: ignore + from ._models import IaasVMILRRegistrationRequest # type: ignore + from ._models import IaasVMRecoveryPoint # type: ignore + from ._models import IaasVMRestoreRequest # type: ignore + from ._models import IaasVMRestoreWithRehydrationRequest # type: ignore + from ._models import IdentityBasedRestoreDetails # type: ignore + from ._models import IdentityInfo # type: ignore + from ._models import InquiryInfo # type: ignore + from ._models import InquiryValidation # type: ignore + from ._models import InstantItemRecoveryTarget # type: ignore + from ._models import InstantRPAdditionalDetails # 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 ListRecoveryPointsRecommendedForMoveRequest # type: ignore + from ._models import LogSchedulePolicy # type: ignore + from ._models import LongTermRetentionPolicy # type: ignore + from ._models import LongTermSchedulePolicy # type: ignore + from ._models import MABContainerHealthDetails # type: ignore + from ._models import MabContainer # type: ignore + from ._models import MabContainerExtendedInfo # 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 MabProtectionPolicy # type: ignore + from ._models import MonthlyRetentionSchedule # type: ignore + from ._models import MoveRPAcrossTiersRequest # type: ignore + from ._models import NameInfo # type: ignore + from ._models import NewErrorResponse # type: ignore + from ._models import NewErrorResponseError # type: ignore + from ._models import OperationResultInfo # type: ignore + from ._models import OperationResultInfoBase # type: ignore + from ._models import OperationResultInfoBaseResource # 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 OperationStatusValidateOperationExtendedInfo # type: ignore + from ._models import OperationWorkerResponse # type: ignore + from ._models import PointInTimeRange # type: ignore + from ._models import PreBackupValidation # type: ignore + from ._models import PreValidateEnableBackupRequest # type: ignore + from ._models import PreValidateEnableBackupResponse # type: ignore + from ._models import PrepareDataMoveRequest # type: ignore + from ._models import PrepareDataMoveResponse # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionResource # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import ProtectableContainer # type: ignore + from ._models import ProtectableContainerResource # type: ignore + from ._models import ProtectableContainerResourceList # 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 ProtectionContainer # type: ignore + from ._models import ProtectionContainerResource # type: ignore + from ._models import ProtectionContainerResourceList # type: ignore + from ._models import ProtectionIntent # type: ignore + from ._models import ProtectionIntentQueryObject # type: ignore + from ._models import ProtectionIntentResource # type: ignore + from ._models import ProtectionIntentResourceList # type: ignore + from ._models import ProtectionPolicy # type: ignore + from ._models import ProtectionPolicyQueryObject # type: ignore + from ._models import ProtectionPolicyResource # type: ignore + from ._models import ProtectionPolicyResourceList # type: ignore + from ._models import RecoveryPoint # type: ignore + from ._models import RecoveryPointDiskConfiguration # type: ignore + from ._models import RecoveryPointMoveReadinessInfo # type: ignore + from ._models import RecoveryPointRehydrationInfo # type: ignore + 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 + from ._models import ResourceGuardProxyBaseResource # type: ignore + from ._models import ResourceGuardProxyBaseResourceList # 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 RestoreRequestResource # type: ignore + from ._models import RetentionDuration # type: ignore + from ._models import RetentionPolicy # type: ignore + from ._models import SQLDataDirectory # type: ignore + from ._models import SQLDataDirectoryMapping # type: ignore + from ._models import SchedulePolicy # type: ignore + from ._models import SecurityPinBase # type: ignore + from ._models import Settings # type: ignore + from ._models import SimpleRetentionPolicy # type: ignore + from ._models import SimpleSchedulePolicy # type: ignore + from ._models import SubProtectionPolicy # type: ignore + from ._models import TargetAFSRestoreInfo # type: ignore + from ._models import TargetRestoreInfo # type: ignore + from ._models import TokenInformation # type: ignore + from ._models import TriggerDataMoveRequest # type: ignore + from ._models import UnlockDeleteRequest # type: ignore + from ._models import UnlockDeleteResponse # type: ignore + from ._models import ValidateIaasVMRestoreOperationRequest # type: ignore + from ._models import ValidateOperationRequest # type: ignore + from ._models import ValidateOperationResponse # type: ignore + from ._models import ValidateOperationsResponse # type: ignore + from ._models import ValidateRestoreOperationRequest # type: ignore + from ._models import VaultJob # type: ignore + from ._models import VaultJobErrorInfo # type: ignore + from ._models import VaultJobExtendedInfo # type: ignore + from ._models import VaultStorageConfigOperationResultResponse # type: ignore + from ._models import WeeklyRetentionFormat # type: ignore + from ._models import WeeklyRetentionSchedule # type: ignore + from ._models import WorkloadInquiryDetails # type: ignore + from ._models import WorkloadItem # type: ignore + from ._models import WorkloadItemResource # type: ignore + from ._models import WorkloadItemResourceList # type: ignore + from ._models import WorkloadProtectableItem # type: ignore + from ._models import WorkloadProtectableItemResource # type: ignore + from ._models import WorkloadProtectableItemResourceList # type: ignore + from ._models import YearlyRetentionSchedule # type: ignore + +from ._recovery_services_backup_client_enums import ( + AcquireStorageAccountLock, + AzureFileShareType, + BackupEngineType, + BackupItemType, + BackupManagementType, + BackupType, + ContainerType, + CopyOptions, + CreateMode, + DataMoveLevel, + DataSourceType, + DayOfWeek, + DedupState, + EncryptionAtRestType, + EnhancedSecurityState, + FabricName, + HealthState, + HealthStatus, + HttpStatusCode, + InfrastructureEncryptionState, + InquiryStatus, + IntentItemType, + JobOperationType, + JobStatus, + JobSupportedAction, + LastBackupStatus, + LastUpdateStatus, + MabServerType, + MonthOfYear, + OperationStatusValues, + OperationType, + OverwriteOptions, + PolicyType, + PrivateEndpointConnectionStatus, + ProtectedItemHealthStatus, + ProtectedItemState, + ProtectionIntentItemType, + ProtectionState, + ProtectionStatus, + ProvisioningState, + RecoveryMode, + RecoveryPointTierStatus, + RecoveryPointTierType, + RecoveryType, + RehydrationPriority, + ResourceHealthStatus, + RestorePointQueryType, + RestorePointType, + RestoreRequestType, + RetentionDurationType, + RetentionScheduleFormat, + SQLDataDirectoryType, + ScheduleRunType, + SoftDeleteFeatureState, + StorageType, + StorageTypeState, + SupportStatus, + Type, + UsagesUnit, + ValidationStatus, + WeekOfMonth, + WorkloadItemType, + WorkloadType, + XcoolState, +) + +__all__ = [ + 'AzureBackupGoalFeatureSupportRequest', + 'AzureBackupServerContainer', + 'AzureBackupServerEngine', + 'AzureFileShareBackupRequest', + 'AzureFileShareProtectableItem', + 'AzureFileShareProtectionPolicy', + 'AzureFileShareProvisionILRRequest', + 'AzureFileShareRecoveryPoint', + 'AzureFileShareRestoreRequest', + 'AzureFileshareProtectedItem', + 'AzureFileshareProtectedItemExtendedInfo', + 'AzureIaaSClassicComputeVMContainer', + 'AzureIaaSClassicComputeVMProtectableItem', + 'AzureIaaSClassicComputeVMProtectedItem', + 'AzureIaaSComputeVMContainer', + 'AzureIaaSComputeVMProtectableItem', + 'AzureIaaSComputeVMProtectedItem', + 'AzureIaaSVMErrorInfo', + 'AzureIaaSVMHealthDetails', + 'AzureIaaSVMJob', + 'AzureIaaSVMJobExtendedInfo', + 'AzureIaaSVMJobTaskDetails', + 'AzureIaaSVMJobV2', + 'AzureIaaSVMProtectedItem', + 'AzureIaaSVMProtectedItemExtendedInfo', + 'AzureIaaSVMProtectionPolicy', + 'AzureRecoveryServiceVaultProtectionIntent', + 'AzureResourceProtectionIntent', + 'AzureSQLAGWorkloadContainerProtectionContainer', + 'AzureSqlContainer', + 'AzureSqlProtectedItem', + 'AzureSqlProtectedItemExtendedInfo', + 'AzureSqlProtectionPolicy', + 'AzureStorageContainer', + 'AzureStorageErrorInfo', + 'AzureStorageJob', + 'AzureStorageJobExtendedInfo', + 'AzureStorageJobTaskDetails', + 'AzureStorageProtectableContainer', + 'AzureVMAppContainerProtectableContainer', + 'AzureVMAppContainerProtectionContainer', + 'AzureVMResourceFeatureSupportRequest', + 'AzureVMResourceFeatureSupportResponse', + 'AzureVmWorkloadItem', + 'AzureVmWorkloadProtectableItem', + 'AzureVmWorkloadProtectedItem', + 'AzureVmWorkloadProtectedItemExtendedInfo', + 'AzureVmWorkloadProtectionPolicy', + 'AzureVmWorkloadSAPAseDatabaseProtectedItem', + 'AzureVmWorkloadSAPAseDatabaseWorkloadItem', + 'AzureVmWorkloadSAPAseSystemProtectableItem', + 'AzureVmWorkloadSAPAseSystemWorkloadItem', + 'AzureVmWorkloadSAPHanaDatabaseProtectableItem', + 'AzureVmWorkloadSAPHanaDatabaseProtectedItem', + 'AzureVmWorkloadSAPHanaDatabaseWorkloadItem', + 'AzureVmWorkloadSAPHanaSystemProtectableItem', + 'AzureVmWorkloadSAPHanaSystemWorkloadItem', + 'AzureVmWorkloadSQLAvailabilityGroupProtectableItem', + 'AzureVmWorkloadSQLDatabaseProtectableItem', + 'AzureVmWorkloadSQLDatabaseProtectedItem', + 'AzureVmWorkloadSQLDatabaseWorkloadItem', + 'AzureVmWorkloadSQLInstanceProtectableItem', + 'AzureVmWorkloadSQLInstanceWorkloadItem', + 'AzureWorkloadAutoProtectionIntent', + 'AzureWorkloadBackupRequest', + 'AzureWorkloadContainer', + 'AzureWorkloadContainerAutoProtectionIntent', + 'AzureWorkloadContainerExtendedInfo', + 'AzureWorkloadErrorInfo', + 'AzureWorkloadJob', + 'AzureWorkloadJobExtendedInfo', + 'AzureWorkloadJobTaskDetails', + 'AzureWorkloadPointInTimeRecoveryPoint', + 'AzureWorkloadPointInTimeRestoreRequest', + 'AzureWorkloadRecoveryPoint', + 'AzureWorkloadRestoreRequest', + 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint', + 'AzureWorkloadSAPHanaPointInTimeRestoreRequest', + 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest', + 'AzureWorkloadSAPHanaRecoveryPoint', + 'AzureWorkloadSAPHanaRestoreRequest', + 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest', + 'AzureWorkloadSQLAutoProtectionIntent', + 'AzureWorkloadSQLPointInTimeRecoveryPoint', + 'AzureWorkloadSQLPointInTimeRestoreRequest', + 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest', + 'AzureWorkloadSQLRecoveryPoint', + 'AzureWorkloadSQLRecoveryPointExtendedInfo', + 'AzureWorkloadSQLRestoreRequest', + 'AzureWorkloadSQLRestoreWithRehydrateRequest', + 'BEKDetails', + 'BMSBackupEngineQueryObject', + 'BMSBackupEnginesQueryObject', + 'BMSBackupSummariesQueryObject', + 'BMSContainerQueryObject', + 'BMSContainersInquiryQueryObject', + 'BMSPOQueryObject', + 'BMSRPQueryObject', + 'BMSRefreshContainersQueryObject', + 'BMSWorkloadItemQueryObject', + 'BackupEngineBase', + 'BackupEngineBaseResource', + 'BackupEngineBaseResourceList', + 'BackupEngineExtendedInfo', + 'BackupManagementUsage', + 'BackupManagementUsageList', + 'BackupRequest', + 'BackupRequestResource', + 'BackupResourceConfig', + 'BackupResourceConfigResource', + 'BackupResourceEncryptionConfig', + 'BackupResourceEncryptionConfigExtended', + 'BackupResourceEncryptionConfigExtendedResource', + 'BackupResourceEncryptionConfigResource', + 'BackupResourceVaultConfig', + 'BackupResourceVaultConfigResource', + 'BackupStatusRequest', + 'BackupStatusResponse', + 'ClientDiscoveryDisplay', + 'ClientDiscoveryForLogSpecification', + 'ClientDiscoveryForProperties', + 'ClientDiscoveryForServiceSpecification', + 'ClientDiscoveryResponse', + 'ClientDiscoveryValueForSingleApi', + 'ClientScriptForConnect', + 'CloudErrorBody', + 'ContainerIdentityInfo', + 'DPMContainerExtendedInfo', + 'DPMProtectedItem', + 'DPMProtectedItemExtendedInfo', + 'DailyRetentionFormat', + 'DailyRetentionSchedule', + 'Day', + 'DiskExclusionProperties', + 'DiskInformation', + 'DistributedNodesInfo', + 'DpmBackupEngine', + 'DpmContainer', + 'DpmErrorInfo', + 'DpmJob', + 'DpmJobExtendedInfo', + 'DpmJobTaskDetails', + 'EncryptionDetails', + 'ErrorAdditionalInfo', + 'ErrorDetail', + 'ExportJobsOperationResultInfo', + 'ExtendedProperties', + 'FeatureSupportRequest', + 'GenericContainer', + 'GenericContainerExtendedInfo', + 'GenericProtectedItem', + 'GenericProtectionPolicy', + 'GenericRecoveryPoint', + 'GetProtectedItemQueryObject', + 'HourlySchedule', + 'ILRRequest', + 'ILRRequestResource', + 'IaaSVMContainer', + 'IaaSVMProtectableItem', + 'IaasVMBackupRequest', + 'IaasVMILRRegistrationRequest', + 'IaasVMRecoveryPoint', + 'IaasVMRestoreRequest', + 'IaasVMRestoreWithRehydrationRequest', + 'IdentityBasedRestoreDetails', + 'IdentityInfo', + 'InquiryInfo', + 'InquiryValidation', + 'InstantItemRecoveryTarget', + 'InstantRPAdditionalDetails', + 'Job', + 'JobQueryObject', + 'JobResource', + 'JobResourceList', + 'KEKDetails', + 'KPIResourceHealthDetails', + 'KeyAndSecretDetails', + 'ListRecoveryPointsRecommendedForMoveRequest', + 'LogSchedulePolicy', + 'LongTermRetentionPolicy', + 'LongTermSchedulePolicy', + 'MABContainerHealthDetails', + 'MabContainer', + 'MabContainerExtendedInfo', + 'MabErrorInfo', + 'MabFileFolderProtectedItem', + 'MabFileFolderProtectedItemExtendedInfo', + 'MabJob', + 'MabJobExtendedInfo', + 'MabJobTaskDetails', + 'MabProtectionPolicy', + 'MonthlyRetentionSchedule', + 'MoveRPAcrossTiersRequest', + 'NameInfo', + 'NewErrorResponse', + 'NewErrorResponseError', + 'OperationResultInfo', + 'OperationResultInfoBase', + 'OperationResultInfoBaseResource', + 'OperationStatus', + 'OperationStatusError', + 'OperationStatusExtendedInfo', + 'OperationStatusJobExtendedInfo', + 'OperationStatusJobsExtendedInfo', + 'OperationStatusProvisionILRExtendedInfo', + 'OperationStatusValidateOperationExtendedInfo', + 'OperationWorkerResponse', + 'PointInTimeRange', + 'PreBackupValidation', + 'PreValidateEnableBackupRequest', + 'PreValidateEnableBackupResponse', + 'PrepareDataMoveRequest', + 'PrepareDataMoveResponse', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionResource', + 'PrivateLinkServiceConnectionState', + 'ProtectableContainer', + 'ProtectableContainerResource', + 'ProtectableContainerResourceList', + 'ProtectedItem', + 'ProtectedItemQueryObject', + 'ProtectedItemResource', + 'ProtectedItemResourceList', + 'ProtectionContainer', + 'ProtectionContainerResource', + 'ProtectionContainerResourceList', + 'ProtectionIntent', + 'ProtectionIntentQueryObject', + 'ProtectionIntentResource', + 'ProtectionIntentResourceList', + 'ProtectionPolicy', + 'ProtectionPolicyQueryObject', + 'ProtectionPolicyResource', + 'ProtectionPolicyResourceList', + 'RecoveryPoint', + 'RecoveryPointDiskConfiguration', + 'RecoveryPointMoveReadinessInfo', + 'RecoveryPointRehydrationInfo', + 'RecoveryPointResource', + 'RecoveryPointResourceList', + 'RecoveryPointTierInformation', + 'RecoveryPointTierInformationV2', + 'Resource', + 'ResourceGuardOperationDetail', + 'ResourceGuardProxyBase', + 'ResourceGuardProxyBaseResource', + 'ResourceGuardProxyBaseResourceList', + 'ResourceHealthDetails', + 'ResourceList', + 'RestoreFileSpecs', + 'RestoreRequest', + 'RestoreRequestResource', + 'RetentionDuration', + 'RetentionPolicy', + 'SQLDataDirectory', + 'SQLDataDirectoryMapping', + 'SchedulePolicy', + 'SecurityPinBase', + 'Settings', + 'SimpleRetentionPolicy', + 'SimpleSchedulePolicy', + 'SubProtectionPolicy', + 'TargetAFSRestoreInfo', + 'TargetRestoreInfo', + 'TokenInformation', + 'TriggerDataMoveRequest', + 'UnlockDeleteRequest', + 'UnlockDeleteResponse', + 'ValidateIaasVMRestoreOperationRequest', + 'ValidateOperationRequest', + 'ValidateOperationResponse', + 'ValidateOperationsResponse', + 'ValidateRestoreOperationRequest', + 'VaultJob', + 'VaultJobErrorInfo', + 'VaultJobExtendedInfo', + 'VaultStorageConfigOperationResultResponse', + 'WeeklyRetentionFormat', + 'WeeklyRetentionSchedule', + 'WorkloadInquiryDetails', + 'WorkloadItem', + 'WorkloadItemResource', + 'WorkloadItemResourceList', + 'WorkloadProtectableItem', + 'WorkloadProtectableItemResource', + 'WorkloadProtectableItemResourceList', + 'YearlyRetentionSchedule', + 'AcquireStorageAccountLock', + 'AzureFileShareType', + 'BackupEngineType', + 'BackupItemType', + 'BackupManagementType', + 'BackupType', + 'ContainerType', + 'CopyOptions', + 'CreateMode', + 'DataMoveLevel', + 'DataSourceType', + 'DayOfWeek', + 'DedupState', + 'EncryptionAtRestType', + 'EnhancedSecurityState', + 'FabricName', + 'HealthState', + 'HealthStatus', + 'HttpStatusCode', + 'InfrastructureEncryptionState', + 'InquiryStatus', + 'IntentItemType', + 'JobOperationType', + 'JobStatus', + 'JobSupportedAction', + 'LastBackupStatus', + 'LastUpdateStatus', + 'MabServerType', + 'MonthOfYear', + 'OperationStatusValues', + 'OperationType', + 'OverwriteOptions', + 'PolicyType', + 'PrivateEndpointConnectionStatus', + 'ProtectedItemHealthStatus', + 'ProtectedItemState', + 'ProtectionIntentItemType', + 'ProtectionState', + 'ProtectionStatus', + 'ProvisioningState', + 'RecoveryMode', + 'RecoveryPointTierStatus', + 'RecoveryPointTierType', + 'RecoveryType', + 'RehydrationPriority', + 'ResourceHealthStatus', + 'RestorePointQueryType', + 'RestorePointType', + 'RestoreRequestType', + 'RetentionDurationType', + 'RetentionScheduleFormat', + 'SQLDataDirectoryType', + 'ScheduleRunType', + 'SoftDeleteFeatureState', + 'StorageType', + 'StorageTypeState', + 'SupportStatus', + 'Type', + 'UsagesUnit', + 'ValidationStatus', + 'WeekOfMonth', + 'WorkloadItemType', + 'WorkloadType', + 'XcoolState', +] diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/_models.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/_models.py new file mode 100644 index 000000000000..bcaecb30f75e --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/_models.py @@ -0,0 +1,18038 @@ +# 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 FeatureSupportRequest(msrest.serialization.Model): + """Base class for feature request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupGoalFeatureSupportRequest, AzureVMResourceFeatureSupportRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar feature_type: Required. backup support feature type.Constant filled by server. + :vartype feature_type: str + """ + + _validation = { + 'feature_type': {'required': True}, + } + + _attribute_map = { + 'feature_type': {'key': 'featureType', 'type': 'str'}, + } + + _subtype_map = { + 'feature_type': {'AzureBackupGoals': 'AzureBackupGoalFeatureSupportRequest', 'AzureVMResourceBackup': 'AzureVMResourceFeatureSupportRequest'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(FeatureSupportRequest, self).__init__(**kwargs) + self.feature_type = None # type: Optional[str] + + +class AzureBackupGoalFeatureSupportRequest(FeatureSupportRequest): + """Azure backup goal feature specific request. + + All required parameters must be populated in order to send to Azure. + + :ivar feature_type: Required. backup support feature type.Constant filled by server. + :vartype feature_type: str + """ + + _validation = { + 'feature_type': {'required': True}, + } + + _attribute_map = { + 'feature_type': {'key': 'featureType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AzureBackupGoalFeatureSupportRequest, self).__init__(**kwargs) + self.feature_type = 'AzureBackupGoals' # type: str + + +class ProtectionContainer(msrest.serialization.Model): + """Base class for container with backup items. Containers with specific workloads are derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureSqlContainer, AzureWorkloadContainer, DpmContainer, GenericContainer, IaaSVMContainer, AzureStorageContainer, MabContainer. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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 = { + 'container_type': {'AzureSqlContainer': 'AzureSqlContainer', 'AzureWorkloadContainer': 'AzureWorkloadContainer', 'DPMContainer': 'DpmContainer', 'GenericContainer': 'GenericContainer', 'IaaSVMContainer': 'IaaSVMContainer', 'StorageContainer': 'AzureStorageContainer', 'Windows': 'MabContainer'} + } + + 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.activestamp.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): + """DPM workload-specific protection container. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupServerContainer. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.DPMContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, + 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, + 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, + } + + _subtype_map = { + 'container_type': {'AzureBackupServerContainer': 'AzureBackupServerContainer'} + } + + 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.activestamp.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.activestamp.models.DPMContainerExtendedInfo + """ + super(DpmContainer, self).__init__(**kwargs) + self.container_type = 'DPMContainer' # type: str + self.can_re_register = kwargs.get('can_re_register', None) + self.container_id = kwargs.get('container_id', None) + self.protected_item_count = kwargs.get('protected_item_count', None) + self.dpm_agent_version = kwargs.get('dpm_agent_version', None) + self.dpm_servers = kwargs.get('dpm_servers', None) + self.upgrade_available = kwargs.get('upgrade_available', None) + self.protection_status = kwargs.get('protection_status', None) + self.extended_info = kwargs.get('extended_info', None) + + +class AzureBackupServerContainer(DpmContainer): + """AzureBackupServer (DPMVenus) workload-specific protection container. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.DPMContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, + 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, + 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, + } + + 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.activestamp.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.activestamp.models.DPMContainerExtendedInfo + """ + super(AzureBackupServerContainer, self).__init__(**kwargs) + self.container_type = 'AzureBackupServerContainer' # type: str + + +class BackupEngineBase(msrest.serialization.Model): + """The base backup engine class. All workload specific backup engines derive from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupServerEngine, DpmBackupEngine. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Registration 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}. + :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". + :vartype backup_engine_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupEngineType + :ivar can_re_register: Flag indicating if the backup engine be registered, once already + registered. + :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.activestamp.models.BackupEngineExtendedInfo + """ + + _validation = { + 'backup_engine_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + } + + _subtype_map = { + 'backup_engine_type': {'AzureBackupServerEngine': 'AzureBackupServerEngine', 'DpmBackupEngine': 'DpmBackupEngine'} + } + + 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.activestamp.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.activestamp.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) + self.registration_status = kwargs.get('registration_status', None) + self.backup_engine_state = kwargs.get('backup_engine_state', None) + self.health_status = kwargs.get('health_status', None) + self.backup_engine_type = None # type: Optional[str] + self.can_re_register = kwargs.get('can_re_register', None) + self.backup_engine_id = kwargs.get('backup_engine_id', None) + self.dpm_version = kwargs.get('dpm_version', None) + self.azure_backup_agent_version = kwargs.get('azure_backup_agent_version', None) + self.is_azure_backup_agent_upgrade_available = kwargs.get('is_azure_backup_agent_upgrade_available', None) + self.is_dpm_upgrade_available = kwargs.get('is_dpm_upgrade_available', None) + self.extended_info = kwargs.get('extended_info', None) + + +class AzureBackupServerEngine(BackupEngineBase): + """Backup engine type when Azure Backup Server is used to manage the backups. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Registration 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}. + :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". + :vartype backup_engine_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupEngineType + :ivar can_re_register: Flag indicating if the backup engine be registered, once already + registered. + :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.activestamp.models.BackupEngineExtendedInfo + """ + + _validation = { + 'backup_engine_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + } + + 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.activestamp.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.activestamp.models.BackupEngineExtendedInfo + """ + super(AzureBackupServerEngine, self).__init__(**kwargs) + self.backup_engine_type = 'AzureBackupServerEngine' # type: str + + +class BackupRequest(msrest.serialization.Model): + """Base class for backup request. Workload-specific backup requests are derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareBackupRequest, AzureWorkloadBackupRequest, IaasVMBackupRequest. + + 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': {'AzureFileShareBackupRequest': 'AzureFileShareBackupRequest', 'AzureWorkloadBackupRequest': 'AzureWorkloadBackupRequest', 'IaasVMBackupRequest': 'IaasVMBackupRequest'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(BackupRequest, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureFileShareBackupRequest(BackupRequest): + """AzureFileShare workload-specific backup 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_expiry_time_in_utc: Backup copy will expire after the time specified + (UTC). + :vartype recovery_point_expiry_time_in_utc: ~datetime.datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + 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) + + +class WorkloadProtectableItem(msrest.serialization.Model): + """Base class for backup item. Workload-specific backup items are derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareProtectableItem, AzureVmWorkloadProtectableItem, IaaSVMProtectableItem. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionStatus + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + } + + _subtype_map = { + 'protectable_item_type': {'AzureFileShare': 'AzureFileShareProtectableItem', 'AzureVmWorkloadProtectableItem': 'AzureVmWorkloadProtectableItem', 'IaaSVMProtectableItem': 'IaaSVMProtectableItem'} + } + + 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.activestamp.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) + self.protectable_item_type = None # type: Optional[str] + self.friendly_name = kwargs.get('friendly_name', None) + self.protection_state = kwargs.get('protection_state', None) + + +class AzureFileShareProtectableItem(WorkloadProtectableItem): + """Protectable item for Azure Fileshare workloads. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionStatus + :ivar parent_container_fabric_id: Full Fabric ID of container to which this protectable item + belongs. For example, ARM ID. + :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.activestamp.models.AzureFileShareType + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_container_fabric_id': {'key': 'parentContainerFabricId', 'type': 'str'}, + 'parent_container_friendly_name': {'key': 'parentContainerFriendlyName', 'type': 'str'}, + 'azure_file_share_type': {'key': 'azureFileShareType', '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.activestamp.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.activestamp.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) + self.parent_container_friendly_name = kwargs.get('parent_container_friendly_name', None) + self.azure_file_share_type = kwargs.get('azure_file_share_type', 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.activestamp.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.activestamp.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.activestamp.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 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 = { + '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]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', '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.activestamp.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.activestamp.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.activestamp.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) + 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) + self.is_archive_enabled = kwargs.get('is_archive_enabled', None) + self.policy_name = kwargs.get('policy_name', 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.activestamp.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.activestamp.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.activestamp.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 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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.KPIResourceHealthDetails] + :ivar extended_info: Additional information with this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.KPIResourceHealthDetails] + :keyword extended_info: Additional information with this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.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 ProtectionPolicy(msrest.serialization.Model): + """Base class for backup policy. Workload-specific backup policies are derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSVMProtectionPolicy, AzureSqlProtectionPolicy, AzureFileShareProtectionPolicy, AzureVmWorkloadProtectionPolicy, GenericProtectionPolicy, MabProtectionPolicy. + + All required parameters must be populated in order to send to Azure. + + :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. + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + } + + _subtype_map = { + 'backup_management_type': {'AzureIaasVM': 'AzureIaaSVMProtectionPolicy', 'AzureSql': 'AzureSqlProtectionPolicy', 'AzureStorage': 'AzureFileShareProtectionPolicy', 'AzureWorkload': 'AzureVmWorkloadProtectionPolicy', 'GenericProtectionPolicy': 'GenericProtectionPolicy', 'MAB': 'MabProtectionPolicy'} + } + + 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] + self.resource_guard_operation_requests = kwargs.get('resource_guard_operation_requests', None) + + +class AzureFileShareProtectionPolicy(ProtectionPolicy): + """AzureStorage backup policy. + + All required parameters must be populated in order to send to Azure. + + :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. + :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". + :vartype work_load_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + :ivar schedule_policy: Backup schedule specified as part of backup policy. + :vartype schedule_policy: ~azure.mgmt.recoveryservicesbackup.activestamp.models.SchedulePolicy + :ivar retention_policy: Retention policy with the details on backup copy retention ranges. + :vartype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionPolicy + :ivar time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard + Time". + :vartype time_zone: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + 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.activestamp.models.WorkloadType + :keyword schedule_policy: Backup schedule specified as part of backup policy. + :paramtype schedule_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.SchedulePolicy + :keyword retention_policy: Retention policy with the details on backup copy retention ranges. + :paramtype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.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) + self.schedule_policy = kwargs.get('schedule_policy', None) + self.retention_policy = kwargs.get('retention_policy', None) + self.time_zone = kwargs.get('time_zone', None) + + +class ILRRequest(msrest.serialization.Model): + """Parameters to Provision ILR API. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareProvisionILRRequest, IaasVMILRRegistrationRequest. + + 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': {'AzureFileShareProvisionILRRequest': 'AzureFileShareProvisionILRRequest', 'IaasVMILRRegistrationRequest': 'IaasVMILRRegistrationRequest'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ILRRequest, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureFileShareProvisionILRRequest(ILRRequest): + """Update snapshot Uri with the correct friendly Name of the source Azure file share. + + 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: Recovery point ID. + :vartype recovery_point_id: str + :ivar source_resource_id: Source Storage account ARM Id. + :vartype source_resource_id: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + } + + 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) + self.source_resource_id = kwargs.get('source_resource_id', 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. + + 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}, + } + + _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 + ): + """ + :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 = 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, 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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.RestoreFileSpecs] + :ivar target_details: Target File Share Details. + :vartype target_details: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.RestoreFileSpecs] + :keyword target_details: Target File Share Details. + :paramtype target_details: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 IaaSVMContainer(ProtectionContainer): + """IaaS VM workload-specific container. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMContainer, AzureIaaSComputeVMContainer. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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 = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + } + + _subtype_map = { + 'container_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMContainer', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMContainer'} + } + + 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.activestamp.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) + self.virtual_machine_version = kwargs.get('virtual_machine_version', None) + self.resource_group = kwargs.get('resource_group', None) + + +class AzureIaaSClassicComputeVMContainer(IaaSVMContainer): + """IaaS VM workload-specific backup item representing a classic virtual machine. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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 = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + } + + 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.activestamp.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 + + +class IaaSVMProtectableItem(WorkloadProtectableItem): + """IaaS VM workload-specific backup item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMProtectableItem, AzureIaaSComputeVMProtectableItem. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + '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 = { + 'protectable_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectableItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectableItem'} + } + + 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.activestamp.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): + """IaaS VM workload-specific backup item representing the Classic Compute VM. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + '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.activestamp.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 + + +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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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.activestamp.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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.activestamp.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ExtendedProperties + """ + super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str + + +class AzureIaaSComputeVMContainer(IaaSVMContainer): + """IaaS VM workload-specific backup item representing an Azure Resource Manager virtual machine. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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 = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + } + + 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.activestamp.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 + + +class AzureIaaSComputeVMProtectableItem(IaaSVMProtectableItem): + """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 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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + '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.activestamp.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 + + +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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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.activestamp.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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, AzureIaaSVMJobV2, AzureStorageJob, AzureWorkloadJob, DpmJob, MabJob, VaultJob. + + 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.activestamp.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', '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.activestamp.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.activestamp.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.activestamp.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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 = { + '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'}, + '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.activestamp.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.activestamp.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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) + 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) + 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. + + :ivar tasks_list: List of tasks associated with this job. + :vartype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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. + + :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 AzureIaaSVMProtectionPolicy(ProtectionPolicy): + """IaaS VM workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :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. + :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.activestamp.models.InstantRPAdditionalDetails + :ivar schedule_policy: Backup schedule specified as part of backup policy. + :vartype schedule_policy: ~azure.mgmt.recoveryservicesbackup.activestamp.models.SchedulePolicy + :ivar retention_policy: Retention policy with the details on backup copy retention ranges. + :vartype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.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". + :vartype time_zone: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'instant_rp_details': {'key': 'instantRPDetails', 'type': 'InstantRPAdditionalDetails'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'instant_rp_retention_range_in_days': {'key': 'instantRpRetentionRangeInDays', 'type': 'int'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + 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.activestamp.models.InstantRPAdditionalDetails + :keyword schedule_policy: Backup schedule specified as part of backup policy. + :paramtype schedule_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.SchedulePolicy + :keyword retention_policy: Retention policy with the details on backup copy retention ranges. + :paramtype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.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) + self.schedule_policy = kwargs.get('schedule_policy', None) + self.retention_policy = kwargs.get('retention_policy', None) + self.instant_rp_retention_range_in_days = kwargs.get('instant_rp_retention_range_in_days', None) + self.time_zone = kwargs.get('time_zone', None) + + +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, AzureWorkloadContainerAutoProtectionIntent, AzureRecoveryServiceVaultProtectionIntent. + + 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.activestamp.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.activestamp.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.activestamp.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'}, + } + + _subtype_map = { + '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.activestamp.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.activestamp.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) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.item_id = kwargs.get('item_id', None) + self.policy_id = kwargs.get('policy_id', None) + self.protection_state = kwargs.get('protection_state', None) + + +class AzureRecoveryServiceVaultProtectionIntent(ProtectionIntent): + """Azure Recovery Services Vault specific protection intent item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadAutoProtectionIntent. + + 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.activestamp.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.activestamp.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.activestamp.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'}, + } + + _subtype_map = { + 'protection_intent_item_type': {'AzureWorkloadAutoProtectionIntent': 'AzureWorkloadAutoProtectionIntent'} + } + + 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.activestamp.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.activestamp.models.ProtectionStatus + """ + super(AzureRecoveryServiceVaultProtectionIntent, self).__init__(**kwargs) + self.protection_intent_item_type = 'RecoveryServiceVaultItem' # type: str + + +class AzureResourceProtectionIntent(ProtectionIntent): + """IaaS VM specific backup 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.activestamp.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.activestamp.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.activestamp.models.ProtectionStatus + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str + """ + + _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'}, + 'friendly_name': {'key': 'friendlyName', '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.activestamp.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.activestamp.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) + + +class AzureWorkloadContainer(ProtectionContainer): + """Container for the workloads running inside Azure Compute or Classic Compute. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureSQLAGWorkloadContainerProtectionContainer, AzureVMAppContainerProtectionContainer. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.AzureWorkloadContainerExtendedInfo + :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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + :ivar operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :vartype operation_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.OperationType + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'operation_type': {'key': 'operationType', 'type': 'str'}, + } + + _subtype_map = { + 'container_type': {'SQLAGWorkLoadContainer': 'AzureSQLAGWorkloadContainerProtectionContainer', 'VMAppContainer': 'AzureVMAppContainerProtectionContainer'} + } + + 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.activestamp.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.activestamp.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.activestamp.models.WorkloadType + :keyword operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :paramtype operation_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.OperationType + """ + super(AzureWorkloadContainer, self).__init__(**kwargs) + self.container_type = 'AzureWorkloadContainer' # type: str + self.source_resource_id = kwargs.get('source_resource_id', None) + self.last_updated_time = kwargs.get('last_updated_time', None) + self.extended_info = kwargs.get('extended_info', None) + self.workload_type = kwargs.get('workload_type', None) + self.operation_type = kwargs.get('operation_type', None) + + +class AzureSQLAGWorkloadContainerProtectionContainer(AzureWorkloadContainer): + """Container for SQL workloads under SQL Availability Group. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.AzureWorkloadContainerExtendedInfo + :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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + :ivar operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :vartype operation_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.OperationType + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'operation_type': {'key': 'operationType', '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.activestamp.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.activestamp.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.activestamp.models.WorkloadType + :keyword operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :paramtype operation_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.OperationType + """ + super(AzureSQLAGWorkloadContainerProtectionContainer, self).__init__(**kwargs) + self.container_type = 'SQLAGWorkLoadContainer' # type: str + + +class AzureSqlContainer(ProtectionContainer): + """Azure Sql workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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.activestamp.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 + + +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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.models.ProtectedItemState + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + } + + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemState + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 AzureSqlProtectionPolicy(ProtectionPolicy): + """Azure SQL workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :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. + :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.activestamp.models.RetentionPolicy + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + 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.activestamp.models.RetentionPolicy + """ + super(AzureSqlProtectionPolicy, self).__init__(**kwargs) + self.backup_management_type = 'AzureSql' # type: str + self.retention_policy = kwargs.get('retention_policy', None) + + +class AzureStorageContainer(ProtectionContainer): + """Azure Storage Account workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AcquireStorageAccountLock + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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__( + 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.activestamp.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.activestamp.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. + + :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.activestamp.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.activestamp.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AzureStorageJobExtendedInfo + :ivar is_user_triggered: Indicated that whether the job is adhoc(true) or scheduled(false). + :vartype is_user_triggered: bool + """ + + _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'}, + '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.activestamp.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.activestamp.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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) + 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) + self.is_user_triggered = kwargs.get('is_user_triggered', 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.activestamp.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.activestamp.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 ProtectableContainer(msrest.serialization.Model): + """Protectable Container Class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureStorageProtectableContainer, AzureVMAppContainerProtectableContainer. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :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", + "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", + "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", + "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype protectable_container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ContainerType + :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 = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + } + + _subtype_map = { + 'protectable_container_type': {'StorageContainer': 'AzureStorageProtectableContainer', 'VMAppContainer': 'AzureVMAppContainerProtectableContainer'} + } + + 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.activestamp.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) + self.protectable_container_type = None # type: Optional[str] + self.health_status = kwargs.get('health_status', None) + self.container_id = kwargs.get('container_id', None) + + +class AzureStorageProtectableContainer(ProtectableContainer): + """Azure Storage-specific protectable containers. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :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", + "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", + "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", + "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype protectable_container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ContainerType + :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 = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', '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.activestamp.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 + + +class AzureVMAppContainerProtectableContainer(ProtectableContainer): + """Azure workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :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", + "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", + "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", + "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype protectable_container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ContainerType + :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 = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', '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.activestamp.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 + + +class AzureVMAppContainerProtectionContainer(AzureWorkloadContainer): + """Container for SQL workloads under Azure Virtual Machines. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.AzureWorkloadContainerExtendedInfo + :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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + :ivar operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :vartype operation_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.OperationType + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'operation_type': {'key': 'operationType', '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.activestamp.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.activestamp.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.activestamp.models.WorkloadType + :keyword operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :paramtype operation_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.OperationType + """ + super(AzureVMAppContainerProtectionContainer, self).__init__(**kwargs) + self.container_type = 'VMAppContainer' # type: str + + +class AzureVMResourceFeatureSupportRequest(FeatureSupportRequest): + """AzureResource(IaaS VM) Specific feature support request. + + All required parameters must be populated in order to send to Azure. + + :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 = { + 'feature_type': {'required': True}, + } + + _attribute_map = { + 'feature_type': {'key': 'featureType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_sku': {'key': 'vmSku', 'type': 'str'}, + } + + 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) + self.vm_sku = kwargs.get('vm_sku', None) + + +class AzureVMResourceFeatureSupportResponse(msrest.serialization.Model): + """Response for feature support requests for Azure IaasVm. + + :ivar support_status: Support status of feature. Possible values include: "Invalid", + "Supported", "DefaultOFF", "DefaultON", "NotSupported". + :vartype support_status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.SupportStatus + """ + + _attribute_map = { + 'support_status': {'key': 'supportStatus', 'type': 'str'}, + } + + 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.activestamp.models.SupportStatus + """ + super(AzureVMResourceFeatureSupportResponse, self).__init__(**kwargs) + self.support_status = kwargs.get('support_status', None) + + +class WorkloadItem(msrest.serialization.Model): + """Base class for backup item. Workload-specific backup items are derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadItem. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionStatus + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + } + + _subtype_map = { + 'workload_item_type': {'AzureVmWorkloadItem': 'AzureVmWorkloadItem'} + } + + 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.activestamp.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) + self.workload_item_type = None # type: Optional[str] + self.friendly_name = kwargs.get('friendly_name', None) + self.protection_state = kwargs.get('protection_state', None) + + +class AzureVmWorkloadItem(WorkloadItem): + """Azure VM workload-specific workload item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadSAPAseDatabaseWorkloadItem, AzureVmWorkloadSAPAseSystemWorkloadItem, AzureVmWorkloadSAPHanaDatabaseWorkloadItem, AzureVmWorkloadSAPHanaSystemWorkloadItem, AzureVmWorkloadSQLDatabaseWorkloadItem, AzureVmWorkloadSQLInstanceWorkloadItem. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + _subtype_map = { + 'workload_item_type': {'SAPAseDatabase': 'AzureVmWorkloadSAPAseDatabaseWorkloadItem', 'SAPAseSystem': 'AzureVmWorkloadSAPAseSystemWorkloadItem', 'SAPHanaDatabase': 'AzureVmWorkloadSAPHanaDatabaseWorkloadItem', 'SAPHanaSystem': 'AzureVmWorkloadSAPHanaSystemWorkloadItem', 'SQLDataBase': 'AzureVmWorkloadSQLDatabaseWorkloadItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceWorkloadItem'} + } + + 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.activestamp.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) + self.server_name = kwargs.get('server_name', None) + self.is_auto_protectable = kwargs.get('is_auto_protectable', None) + self.subinquireditemcount = kwargs.get('subinquireditemcount', None) + self.sub_workload_item_count = kwargs.get('sub_workload_item_count', None) + + +class AzureVmWorkloadProtectableItem(WorkloadProtectableItem): + """Azure VM workload-specific protectable item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadSAPAseSystemProtectableItem, AzureVmWorkloadSAPHanaDatabaseProtectableItem, AzureVmWorkloadSAPHanaSystemProtectableItem, AzureVmWorkloadSQLAvailabilityGroupProtectableItem, AzureVmWorkloadSQLDatabaseProtectableItem, AzureVmWorkloadSQLInstanceProtectableItem. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + _subtype_map = { + 'protectable_item_type': {'SAPAseSystem': 'AzureVmWorkloadSAPAseSystemProtectableItem', 'SAPHanaDatabase': 'AzureVmWorkloadSAPHanaDatabaseProtectableItem', 'SAPHanaSystem': 'AzureVmWorkloadSAPHanaSystemProtectableItem', 'SQLAvailabilityGroupContainer': 'AzureVmWorkloadSQLAvailabilityGroupProtectableItem', 'SQLDataBase': 'AzureVmWorkloadSQLDatabaseProtectableItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceProtectableItem'} + } + + 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.activestamp.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.activestamp.models.PreBackupValidation + """ + super(AzureVmWorkloadProtectableItem, self).__init__(**kwargs) + self.protectable_item_type = 'AzureVmWorkloadProtectableItem' # type: str + self.parent_name = kwargs.get('parent_name', None) + self.parent_unique_name = kwargs.get('parent_unique_name', None) + self.server_name = kwargs.get('server_name', None) + self.is_auto_protectable = kwargs.get('is_auto_protectable', None) + self.is_auto_protected = kwargs.get('is_auto_protected', None) + self.subinquireditemcount = kwargs.get('subinquireditemcount', None) + self.subprotectableitemcount = kwargs.get('subprotectableitemcount', None) + self.prebackupvalidation = kwargs.get('prebackupvalidation', 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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + :ivar recovery_model: Indicates consistency of policy object and policy applied to this backup + item. + :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): + """Azure VM (Mercury) workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :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. + :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". + :vartype work_load_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + :ivar settings: Common settings for the backup management. + :vartype settings: ~azure.mgmt.recoveryservicesbackup.activestamp.models.Settings + :ivar sub_protection_policy: List of sub-protection policies which includes schedule and + retention. + :vartype sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.SubProtectionPolicy] + :ivar make_policy_consistent: Fix the policy inconsistency. + :vartype make_policy_consistent: bool + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, + 'settings': {'key': 'settings', 'type': 'Settings'}, + 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, + 'make_policy_consistent': {'key': 'makePolicyConsistent', 'type': 'bool'}, + } + + 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.activestamp.models.WorkloadType + :keyword settings: Common settings for the backup management. + :paramtype settings: ~azure.mgmt.recoveryservicesbackup.activestamp.models.Settings + :keyword sub_protection_policy: List of sub-protection policies which includes schedule and + retention. + :paramtype sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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) + self.settings = kwargs.get('settings', None) + self.sub_protection_policy = kwargs.get('sub_protection_policy', None) + self.make_policy_consistent = kwargs.get('make_policy_consistent', 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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadSAPAseDatabaseProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'AzureVmWorkloadSAPAseDatabase' # type: str + + +class AzureVmWorkloadSAPAseDatabaseWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SAP ASE Database. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + 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.activestamp.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 + + +class AzureVmWorkloadSAPAseSystemProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SAP ASE System. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + 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.activestamp.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.activestamp.models.PreBackupValidation + """ + super(AzureVmWorkloadSAPAseSystemProtectableItem, self).__init__(**kwargs) + self.protectable_item_type = 'SAPAseSystem' # type: str + + +class AzureVmWorkloadSAPAseSystemWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SAP ASE System. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + 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.activestamp.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 + + +class AzureVmWorkloadSAPHanaDatabaseProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SAP HANA Database. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + 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.activestamp.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.activestamp.models.PreBackupValidation + """ + super(AzureVmWorkloadSAPHanaDatabaseProtectableItem, self).__init__(**kwargs) + self.protectable_item_type = 'SAPHanaDatabase' # 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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadSAPHanaDatabaseProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'AzureVmWorkloadSAPHanaDatabase' # type: str + + +class AzureVmWorkloadSAPHanaDatabaseWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SAP HANA Database. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + 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.activestamp.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 + + +class AzureVmWorkloadSAPHanaSystemProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SAP HANA System. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + 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.activestamp.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.activestamp.models.PreBackupValidation + """ + super(AzureVmWorkloadSAPHanaSystemProtectableItem, self).__init__(**kwargs) + self.protectable_item_type = 'SAPHanaSystem' # type: str + + +class AzureVmWorkloadSAPHanaSystemWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SAP HANA System. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + 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.activestamp.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 + + +class AzureVmWorkloadSQLAvailabilityGroupProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Availability Group. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + 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.activestamp.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.activestamp.models.PreBackupValidation + """ + super(AzureVmWorkloadSQLAvailabilityGroupProtectableItem, self).__init__(**kwargs) + self.protectable_item_type = 'SQLAvailabilityGroupContainer' # type: str + + +class AzureVmWorkloadSQLDatabaseProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + 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.activestamp.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.activestamp.models.PreBackupValidation + """ + super(AzureVmWorkloadSQLDatabaseProtectableItem, self).__init__(**kwargs) + self.protectable_item_type = 'SQLDataBase' # 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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.models.KPIResourceHealthDetails] + """ + super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(**kwargs) + self.protected_item_type = 'AzureVmWorkloadSQLDatabase' # type: str + + +class AzureVmWorkloadSQLDatabaseWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + 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.activestamp.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 + + +class AzureVmWorkloadSQLInstanceProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Instance. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + 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.activestamp.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.activestamp.models.PreBackupValidation + """ + super(AzureVmWorkloadSQLInstanceProtectableItem, self).__init__(**kwargs) + self.protectable_item_type = 'SQLInstance' # type: str + + +class AzureVmWorkloadSQLInstanceWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SQL Instance. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.SQLDataDirectory] + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, + } + + 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.activestamp.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.activestamp.models.SQLDataDirectory] + """ + super(AzureVmWorkloadSQLInstanceWorkloadItem, self).__init__(**kwargs) + self.workload_item_type = 'SQLInstance' # type: str + self.data_directory_paths = kwargs.get('data_directory_paths', None) + + +class AzureWorkloadAutoProtectionIntent(AzureRecoveryServiceVaultProtectionIntent): + """Azure Recovery Services Vault specific protection intent item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLAutoProtectionIntent. + + 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.activestamp.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.activestamp.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.activestamp.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'}, + } + + _subtype_map = { + 'protection_intent_item_type': {'AzureWorkloadSQLAutoProtectionIntent': 'AzureWorkloadSQLAutoProtectionIntent'} + } + + 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.activestamp.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.activestamp.models.ProtectionStatus + """ + super(AzureWorkloadAutoProtectionIntent, self).__init__(**kwargs) + self.protection_intent_item_type = 'AzureWorkloadAutoProtectionIntent' # type: str + + +class AzureWorkloadBackupRequest(BackupRequest): + """AzureWorkload workload-specific backup 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 backup_type: Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible + values include: "Invalid", "Full", "Differential", "Log", "CopyOnlyFull", "Incremental". + :vartype backup_type: str or ~azure.mgmt.recoveryservicesbackup.activestamp.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). + :vartype recovery_point_expiry_time_in_utc: ~datetime.datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + 'enable_compression': {'key': 'enableCompression', 'type': 'bool'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + 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.activestamp.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) + self.enable_compression = kwargs.get('enable_compression', None) + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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. + + :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.activestamp.models.InquiryInfo + :ivar nodes_list: List of the nodes in case of distributed container. + :vartype nodes_list: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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, + **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.activestamp.models.InquiryInfo + :keyword nodes_list: List of the nodes in case of distributed container. + :paramtype nodes_list: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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) + self.nodes_list = kwargs.get('nodes_list', None) + + +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.activestamp.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.activestamp.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureWorkloadErrorInfo] + :ivar extended_info: Additional information about the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureWorkloadErrorInfo] + :keyword extended_info: Additional information about the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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. + + 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.activestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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': '[RecoveryPointTierInformationV2]'}, + '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_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.activestamp.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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) + self.type = kwargs.get('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. + + 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.activestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointMoveReadinessInfo] + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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': '[RecoveryPointTierInformationV2]'}, + '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_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.activestamp.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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. + + 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.activestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointMoveReadinessInfo] + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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': '[RecoveryPointTierInformationV2]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, + 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, + } + + 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.activestamp.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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, AzureWorkloadSAPHanaRestoreWithRehydrateRequest. + + 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.activestamp.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.activestamp.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.activestamp.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', 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest': 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest'} + } + + 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.activestamp.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.activestamp.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.activestamp.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. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. + + All required parameters must be populated in order to send to Azure. + + :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.activestamp.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.activestamp.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.activestamp.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'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest'} + } + + 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.activestamp.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.activestamp.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.activestamp.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 AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSAPHanaPointInTimeRestoreRequest): + """AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. + + All required parameters must be populated in order to send to Azure. + + :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.activestamp.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.activestamp.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.activestamp.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 + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.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) + + +class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): + """SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints. + + 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.activestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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': '[RecoveryPointTierInformationV2]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, + } + + 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.activestamp.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointMoveReadinessInfo] + """ + super(AzureWorkloadSAPHanaRecoveryPoint, self).__init__(**kwargs) + self.object_type = 'AzureWorkloadSAPHanaRecoveryPoint' # type: str + + +class AzureWorkloadSAPHanaRestoreWithRehydrateRequest(AzureWorkloadSAPHanaRestoreRequest): + """AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. + + All required parameters must be populated in order to send to Azure. + + :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.activestamp.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.activestamp.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.activestamp.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 recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.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) + + +class AzureWorkloadSQLAutoProtectionIntent(AzureWorkloadAutoProtectionIntent): + """Azure Workload SQL Auto 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.activestamp.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.activestamp.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.activestamp.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". + :vartype workload_item_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadItemType + """ + + _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'}, + 'workload_item_type': {'key': 'workloadItemType', '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.activestamp.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.activestamp.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.activestamp.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) + + +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. + + 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.activestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.AzureWorkloadSQLRecoveryPointExtendedInfo + """ + + _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': '[RecoveryPointTierInformationV2]'}, + '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_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.activestamp.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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. + + 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.activestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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': '[RecoveryPointTierInformationV2]'}, + '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_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.activestamp.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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, AzureWorkloadSQLRestoreWithRehydrateRequest. + + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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', 'AzureWorkloadSQLRestoreWithRehydrateRequest': 'AzureWorkloadSQLRestoreWithRehydrateRequest'} + } + + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. + + All required parameters must be populated in order to send to Azure. + + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.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'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest': 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest'} + } + + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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 AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSQLPointInTimeRestoreRequest): + """AzureWorkload SQL-specific restore with integrated rehydration of 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 recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.models.SQLDataDirectoryMapping] + :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.activestamp.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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) + + +class AzureWorkloadSQLRecoveryPointExtendedInfo(msrest.serialization.Model): + """Extended info class details. + + :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.activestamp.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 + ): + """ + :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.activestamp.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): + """AzureWorkload SQL-specific restore with integrated rehydration of 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 recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.models.SQLDataDirectoryMapping] + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :paramtype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.models.SQLDataDirectoryMapping] + :keyword recovery_point_rehydration_info: RP Rehydration Info. + :paramtype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + + 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: BackupEngineBaseResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupEngineBase + """ + + _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': 'BackupEngineBase'}, + } + + 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.activestamp.models.BackupEngineBase + """ + super(BackupEngineBaseResource, 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 BackupEngineBaseResourceList(ResourceList): + """List of BackupEngineBase 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.activestamp.models.BackupEngineBaseResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BackupEngineBaseResource]'}, + } + + 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.activestamp.models.BackupEngineBaseResource] + """ + super(BackupEngineBaseResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class BackupEngineExtendedInfo(msrest.serialization.Model): + """Additional information on backup engine. + + :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 = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'protected_servers_count': {'key': 'protectedServersCount', 'type': 'int'}, + 'disk_count': {'key': 'diskCount', 'type': 'int'}, + 'used_disk_space': {'key': 'usedDiskSpace', 'type': 'float'}, + 'available_disk_space': {'key': 'availableDiskSpace', 'type': 'float'}, + 'refreshed_at': {'key': 'refreshedAt', 'type': 'iso-8601'}, + 'azure_protected_instances': {'key': 'azureProtectedInstances', 'type': 'int'}, + } + + 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) + self.protected_servers_count = kwargs.get('protected_servers_count', None) + self.disk_count = kwargs.get('disk_count', None) + self.used_disk_space = kwargs.get('used_disk_space', None) + self.available_disk_space = kwargs.get('available_disk_space', None) + self.refreshed_at = kwargs.get('refreshed_at', None) + self.azure_protected_instances = kwargs.get('azure_protected_instances', 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.BackupManagementUsage] + """ + super(BackupManagementUsageList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class BackupRequestResource(Resource): + """Base class for backup request. Workload-specific backup requests 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: BackupRequestResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupRequest + """ + + _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': 'BackupRequest'}, + } + + 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.activestamp.models.BackupRequest + """ + super(BackupRequestResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', 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.activestamp.models.StorageType + :ivar storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :vartype storage_type: str or ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.DedupState + :ivar xcool_state: Vault x-cool state. Possible values include: "Invalid", "Enabled", + "Disabled". + :vartype xcool_state: str or ~azure.mgmt.recoveryservicesbackup.activestamp.models.XcoolState + """ + + _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'}, + '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.activestamp.models.StorageType + :keyword storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.DedupState + :keyword xcool_state: Vault x-cool state. Possible values include: "Invalid", "Enabled", + "Disabled". + :paramtype xcool_state: str or ~azure.mgmt.recoveryservicesbackup.activestamp.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): + """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.activestamp.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.activestamp.models.BackupResourceConfig + """ + super(BackupResourceConfigResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class BackupResourceEncryptionConfig(msrest.serialization.Model): + """BackupResourceEncryptionConfig. + + :ivar encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", + "MicrosoftManaged", "CustomerManaged". + :vartype encryption_at_rest_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.EncryptionAtRestType + :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". + :vartype last_update_status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.LastUpdateStatus + :ivar infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + "Enabled". + :vartype infrastructure_encryption_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.InfrastructureEncryptionState + """ + + _attribute_map = { + 'encryption_at_rest_type': {'key': 'encryptionAtRestType', 'type': 'str'}, + 'key_uri': {'key': 'keyUri', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'last_update_status': {'key': 'lastUpdateStatus', 'type': 'str'}, + 'infrastructure_encryption_state': {'key': 'infrastructureEncryptionState', 'type': 'str'}, + } + + 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.activestamp.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.activestamp.models.LastUpdateStatus + :keyword infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + "Enabled". + :paramtype infrastructure_encryption_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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) + self.subscription_id = kwargs.get('subscription_id', None) + self.last_update_status = kwargs.get('last_update_status', None) + self.infrastructure_encryption_state = kwargs.get('infrastructure_encryption_state', None) + + +class BackupResourceEncryptionConfigExtended(BackupResourceEncryptionConfig): + """BackupResourceEncryptionConfigExtended. + + :ivar encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", + "MicrosoftManaged", "CustomerManaged". + :vartype encryption_at_rest_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.EncryptionAtRestType + :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". + :vartype last_update_status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.LastUpdateStatus + :ivar infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + "Enabled". + :vartype infrastructure_encryption_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.InfrastructureEncryptionState + :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 = { + 'encryption_at_rest_type': {'key': 'encryptionAtRestType', 'type': 'str'}, + 'key_uri': {'key': 'keyUri', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'last_update_status': {'key': 'lastUpdateStatus', 'type': 'str'}, + 'infrastructure_encryption_state': {'key': 'infrastructureEncryptionState', 'type': 'str'}, + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + 'use_system_assigned_identity': {'key': 'useSystemAssignedIdentity', 'type': 'bool'}, + } + + 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.activestamp.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.activestamp.models.LastUpdateStatus + :keyword infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + "Enabled". + :paramtype infrastructure_encryption_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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) + + +class BackupResourceEncryptionConfigExtendedResource(Resource): + """BackupResourceEncryptionConfigExtendedResource. + + 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: BackupResourceEncryptionConfigExtendedResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupResourceEncryptionConfigExtended + """ + + _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': 'BackupResourceEncryptionConfigExtended'}, + } + + 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.activestamp.models.BackupResourceEncryptionConfigExtended + """ + super(BackupResourceEncryptionConfigExtendedResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class BackupResourceEncryptionConfigResource(Resource): + """BackupResourceEncryptionConfigResource. + + 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: BackupResourceEncryptionConfigResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupResourceEncryptionConfig + """ + + _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': 'BackupResourceEncryptionConfig'}, + } + + 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.activestamp.models.BackupResourceEncryptionConfig + """ + super(BackupResourceEncryptionConfigResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class BackupResourceVaultConfig(msrest.serialization.Model): + """Backup resource vault config details. + + :ivar storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :vartype storage_model_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.StorageType + :ivar storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :vartype storage_type: str or ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.StorageTypeState + :ivar enhanced_security_state: Enabled or Disabled. Possible values include: "Invalid", + "Enabled", "Disabled". + :vartype enhanced_security_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.EnhancedSecurityState + :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.activestamp.models.SoftDeleteFeatureState + :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 = { + 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, + 'enhanced_security_state': {'key': 'enhancedSecurityState', 'type': 'str'}, + 'soft_delete_feature_state': {'key': 'softDeleteFeatureState', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + '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.activestamp.models.StorageType + :keyword storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.StorageTypeState + :keyword enhanced_security_state: Enabled or Disabled. Possible values include: "Invalid", + "Enabled", "Disabled". + :paramtype enhanced_security_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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) + self.storage_type_state = kwargs.get('storage_type_state', None) + self.enhanced_security_state = kwargs.get('enhanced_security_state', None) + self.soft_delete_feature_state = kwargs.get('soft_delete_feature_state', None) + 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): + """Backup resource vault config details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :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.activestamp.models.BackupResourceVaultConfig + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BackupResourceVaultConfig'}, + } + + def __init__( + self, + **kwargs + ): + """ + :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.activestamp.models.BackupResourceVaultConfig + """ + super(BackupResourceVaultConfigResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class BackupStatusRequest(msrest.serialization.Model): + """BackupStatus request. + + :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". + :vartype resource_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'po_logical_name': {'key': 'poLogicalName', 'type': 'str'}, + } + + 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.activestamp.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) + self.po_logical_name = kwargs.get('po_logical_name', None) + + +class BackupStatusResponse(msrest.serialization.Model): + """BackupStatus response. + + :ivar protection_status: Specifies whether the container is registered or not. Possible values + include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :vartype protection_status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.FabricName + :ivar container_name: Specifies the product specific container name. E.g. + iaasvmcontainer;iaasvmcontainer;csname;vmname. + :vartype container_name: str + :ivar protected_item_name: Specifies the product specific ds name. E.g. + vm;iaasvmcontainer;csname;vmname. + :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 = { + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + } + + 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.activestamp.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.activestamp.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) + self.fabric_name = kwargs.get('fabric_name', None) + self.container_name = kwargs.get('container_name', None) + self.protected_item_name = kwargs.get('protected_item_name', None) + self.error_code = kwargs.get('error_code', None) + self.error_message = kwargs.get('error_message', None) + self.policy_name = kwargs.get('policy_name', None) + self.registration_status = kwargs.get('registration_status', 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 BMSBackupEngineQueryObject(msrest.serialization.Model): + """Query parameters to fetch list of backup engines. + + :ivar expand: attribute to add extended info. + :vartype expand: str + """ + + _attribute_map = { + 'expand': {'key': 'expand', 'type': 'str'}, + } + + 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) + + +class BMSBackupEnginesQueryObject(msrest.serialization.Model): + """Query parameters to fetch list of backup engines. + + :ivar backup_management_type: Backup management type for the backup engine. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :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 = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'expand': {'key': 'expand', 'type': 'str'}, + } + + 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.activestamp.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) + self.expand = kwargs.get('expand', 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.activestamp.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.activestamp.models.Type + """ + super(BMSBackupSummariesQueryObject, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + + +class BMSContainerQueryObject(msrest.serialization.Model): + """The query filters that can be used with the list containers API. + + All required parameters must be populated in order to send to Azure. + + :ivar backup_management_type: Required. Backup management type for this container. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :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". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + } + + 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.activestamp.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.activestamp.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) + self.backup_engine_name = kwargs.get('backup_engine_name', None) + self.fabric_name = kwargs.get('fabric_name', None) + self.status = kwargs.get('status', None) + self.friendly_name = kwargs.get('friendly_name', None) + + +class BMSContainersInquiryQueryObject(msrest.serialization.Model): + """The query filters that can be used with the inquire container API. + + :ivar backup_management_type: Backup management type for this container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + } + + 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.activestamp.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.activestamp.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) + + +class BMSPOQueryObject(msrest.serialization.Model): + """Filters to list items that can be backed up. + + :ivar backup_management_type: Backup management type. Possible values include: "Invalid", + "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", + "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar workload_type: Workload type. 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.activestamp.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 = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + } + + 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.activestamp.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.activestamp.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) + self.container_name = kwargs.get('container_name', None) + self.status = kwargs.get('status', None) + self.friendly_name = kwargs.get('friendly_name', None) + + +class BMSRefreshContainersQueryObject(msrest.serialization.Model): + """The query filters that can be used with the refresh container API. + + :ivar backup_management_type: Backup management type for this container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + } + + 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.activestamp.models.BackupManagementType + """ + super(BMSRefreshContainersQueryObject, self).__init__(**kwargs) + self.backup_management_type = kwargs.get('backup_management_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.activestamp.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.activestamp.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 BMSWorkloadItemQueryObject(msrest.serialization.Model): + """Filters to list items that can be backed up. + + :ivar backup_management_type: Backup management type. Possible values include: "Invalid", + "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", + "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar workload_item_type: Workload Item type. Possible values include: "Invalid", + "SQLInstance", "SQLDataBase", "SAPHanaSystem", "SAPHanaDatabase", "SAPAseSystem", + "SAPAseDatabase". + :vartype workload_item_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + :ivar protection_status: Backup status query parameter. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :vartype protection_status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionStatus + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + } + + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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) + self.workload_type = kwargs.get('workload_type', None) + self.protection_status = kwargs.get('protection_status', None) + + +class ClientDiscoveryDisplay(msrest.serialization.Model): + """Localized display information of an operation. + + :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 = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + 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) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class ClientDiscoveryForLogSpecification(msrest.serialization.Model): + """Class to represent shoebox log specification in json client discovery. + + :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 = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + 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) + self.blob_duration = kwargs.get('blob_duration', None) + + +class ClientDiscoveryForProperties(msrest.serialization.Model): + """Class to represent shoebox properties in json client discovery. + + :ivar service_specification: Operation properties. + :vartype service_specification: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ClientDiscoveryForServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_specification: Operation properties. + :paramtype service_specification: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ClientDiscoveryForServiceSpecification + """ + super(ClientDiscoveryForProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) + + +class ClientDiscoveryForServiceSpecification(msrest.serialization.Model): + """Class to represent shoebox service specification in json client discovery. + + :ivar log_specifications: List of log specifications of this operation. + :vartype log_specifications: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ClientDiscoveryForLogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword log_specifications: List of log specifications of this operation. + :paramtype log_specifications: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ClientDiscoveryForLogSpecification] + """ + super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) + + +class ClientDiscoveryResponse(msrest.serialization.Model): + """Operations List response which contains list of available APIs. + + :ivar value: List of available operations. + :vartype value: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ClientDiscoveryValueForSingleApi] + :ivar next_link: Link to the next chunk of Response. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ClientDiscoveryValueForSingleApi]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: List of available operations. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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) + + +class ClientDiscoveryValueForSingleApi(msrest.serialization.Model): + """Available operation details. + + :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.activestamp.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. + :vartype origin: str + :ivar properties: ShoeBox properties for the given operation. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ClientDiscoveryForProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, + } + + 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.activestamp.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.activestamp.models.ClientDiscoveryForProperties + """ + super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', 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 CloudErrorBody(msrest.serialization.Model): + """An error response from the Container Instance service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for display in a user + interface. + :vartype message: str + :ivar target: The target of the particular error. For example, the name of the property in + error. + :vartype target: str + :ivar details: A list of additional details about the error. + :vartype details: list[~azure.mgmt.recoveryservicesbackup.activestamp.models.CloudErrorBody] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(CloudErrorBody, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ContainerIdentityInfo(msrest.serialization.Model): + """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 = { + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, + 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, + 'audience': {'key': 'audience', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :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) + self.service_principal_client_id = kwargs.get('service_principal_client_id', None) + self.audience = kwargs.get('audience', None) + + +class DailyRetentionFormat(msrest.serialization.Model): + """Daily retention format. + + :ivar days_of_the_month: List of days of the month. + :vartype days_of_the_month: list[~azure.mgmt.recoveryservicesbackup.activestamp.models.Day] + """ + + _attribute_map = { + 'days_of_the_month': {'key': 'daysOfTheMonth', 'type': '[Day]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword days_of_the_month: List of days of the month. + :paramtype days_of_the_month: list[~azure.mgmt.recoveryservicesbackup.activestamp.models.Day] + """ + super(DailyRetentionFormat, self).__init__(**kwargs) + self.days_of_the_month = kwargs.get('days_of_the_month', None) + + +class DailyRetentionSchedule(msrest.serialization.Model): + """Daily retention schedule. + + :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.activestamp.models.RetentionDuration + """ + + _attribute_map = { + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + 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.activestamp.models.RetentionDuration + """ + super(DailyRetentionSchedule, self).__init__(**kwargs) + self.retention_times = kwargs.get('retention_times', None) + self.retention_duration = kwargs.get('retention_duration', None) + + +class Day(msrest.serialization.Model): + """Day of the week. + + :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 = { + 'date': {'key': 'date', 'type': 'int'}, + 'is_last': {'key': 'isLast', 'type': 'bool'}, + } + + 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) + + +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 DistributedNodesInfo(msrest.serialization.Model): + """This is used to represent the various nodes of the distributed container. + + :ivar node_name: Name of the node under a distributed container. + :vartype node_name: str + :ivar status: Status of this Node. + Failed | Succeeded. + :vartype status: str + :ivar error_detail: Error Details if the Status is non-success. + :vartype error_detail: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ErrorDetail + """ + + _attribute_map = { + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + } + + 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.activestamp.models.ErrorDetail + """ + super(DistributedNodesInfo, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.status = kwargs.get('status', None) + self.error_detail = kwargs.get('error_detail', None) + + +class DpmBackupEngine(BackupEngineBase): + """Data Protection Manager (DPM) specific backup engine. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Registration 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}. + :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". + :vartype backup_engine_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupEngineType + :ivar can_re_register: Flag indicating if the backup engine be registered, once already + registered. + :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.activestamp.models.BackupEngineExtendedInfo + """ + + _validation = { + 'backup_engine_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + } + + 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.activestamp.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.activestamp.models.BackupEngineExtendedInfo + """ + super(DpmBackupEngine, self).__init__(**kwargs) + self.backup_engine_type = 'DpmBackupEngine' # type: str + + +class DPMContainerExtendedInfo(msrest.serialization.Model): + """Additional information of the DPMContainer. + + :ivar last_refreshed_at: Last refresh time of the DPMContainer. + :vartype last_refreshed_at: ~datetime.datetime + """ + + _attribute_map = { + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + } + + 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) + + +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.activestamp.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.activestamp.models.JobSupportedAction] + :ivar error_details: The errors. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.DpmErrorInfo] + :ivar extended_info: Additional information for this job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.JobSupportedAction] + :keyword error_details: The errors. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.DpmErrorInfo] + :keyword extended_info: Additional information for this job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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 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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectedItemState + :ivar extended_info: Extended info of the backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemState + :keyword extended_info: Extended info of the backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 OperationResultInfoBase(msrest.serialization.Model): + """Base class for operation result info. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExportJobsOperationResultInfo, OperationResultInfo. + + 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': {'ExportJobsOperationResultInfo': 'ExportJobsOperationResultInfo', 'OperationResultInfo': 'OperationResultInfo'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(OperationResultInfoBase, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class ExportJobsOperationResultInfo(OperationResultInfoBase): + """This class is used to send blob details after exporting 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 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 = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'blob_url': {'key': 'blobUrl', 'type': 'str'}, + 'blob_sas_key': {'key': 'blobSasKey', 'type': 'str'}, + 'excel_file_blob_url': {'key': 'excelFileBlobUrl', 'type': 'str'}, + 'excel_file_blob_sas_key': {'key': 'excelFileBlobSasKey', 'type': 'str'}, + } + + 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) + self.blob_sas_key = kwargs.get('blob_sas_key', None) + self.excel_file_blob_url = kwargs.get('excel_file_blob_url', None) + self.excel_file_blob_sas_key = kwargs.get('excel_file_blob_sas_key', 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.activestamp.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.activestamp.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): + """Base class for generic container of backup items. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.GenericContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + } + + 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.activestamp.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.activestamp.models.GenericContainerExtendedInfo + """ + super(GenericContainer, self).__init__(**kwargs) + self.container_type = 'GenericContainer' # type: str + self.fabric_name = kwargs.get('fabric_name', None) + self.extended_information = kwargs.get('extended_information', None) + + +class GenericContainerExtendedInfo(msrest.serialization.Model): + """Container extended information. + + :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.activestamp.models.ContainerIdentityInfo + :ivar service_endpoints: Azure Backup Service Endpoints for the container. + :vartype service_endpoints: dict[str, str] + """ + + _attribute_map = { + 'raw_cert_data': {'key': 'rawCertData', 'type': 'str'}, + 'container_identity_info': {'key': 'containerIdentityInfo', 'type': 'ContainerIdentityInfo'}, + 'service_endpoints': {'key': 'serviceEndpoints', 'type': '{str}'}, + } + + 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.activestamp.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) + self.service_endpoints = kwargs.get('service_endpoints', 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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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]'}, + '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'}, + '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.activestamp.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.activestamp.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.activestamp.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.activestamp.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 GenericProtectionPolicy(ProtectionPolicy): + """Azure VM (Mercury) workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :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. + :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. + :vartype sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.SubProtectionPolicy] + :ivar time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard + Time". + :vartype time_zone: str + :ivar fabric_name: Name of this policy's fabric. + :vartype fabric_name: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + } + + 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.activestamp.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) + self.time_zone = kwargs.get('time_zone', 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 GetProtectedItemQueryObject(msrest.serialization.Model): + """Filters to list backup items. + + :ivar expand: Specifies if the additional information should be provided for this item. + :vartype expand: str + """ + + _attribute_map = { + 'expand': {'key': 'expand', 'type': 'str'}, + } + + 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. + + :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_expiry_time_in_utc: Backup copy will expire after the time specified + (UTC). + :vartype recovery_point_expiry_time_in_utc: ~datetime.datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + 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) + + +class IaasVMILRRegistrationRequest(ILRRequest): + """Restore files/folders from a backup copy of IaaS VM. + + 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 IaaS VM backup copy from where the files/folders have to be + restored. + :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. + :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. + :vartype renew_existing_registration: bool + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + '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 + ): + """ + :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 IaasVMRecoveryPoint(RecoveryPoint): + """IaaS VM workload specific 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 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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': '[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, + **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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.RecoveryPointMoveReadinessInfo] + """ + super(IaasVMRecoveryPoint, self).__init__(**kwargs) + self.object_type = 'IaasVMRecoveryPoint' # type: str + self.recovery_point_type = kwargs.get('recovery_point_type', None) + self.recovery_point_time = kwargs.get('recovery_point_time', None) + self.recovery_point_additional_info = kwargs.get('recovery_point_additional_info', None) + self.source_vm_storage_type = kwargs.get('source_vm_storage_type', None) + self.is_source_vm_encrypted = kwargs.get('is_source_vm_encrypted', None) + self.key_and_secret = kwargs.get('key_and_secret', None) + self.is_instant_ilr_session_active = kwargs.get('is_instant_ilr_session_active', None) + self.recovery_point_tier_details = kwargs.get('recovery_point_tier_details', None) + self.is_managed_virtual_machine = kwargs.get('is_managed_virtual_machine', None) + self.virtual_machine_size = kwargs.get('virtual_machine_size', None) + self.original_storage_account_option = kwargs.get('original_storage_account_option', None) + self.os_type = kwargs.get('os_type', None) + self.recovery_point_disk_configuration = kwargs.get('recovery_point_disk_configuration', None) + self.zones = kwargs.get('zones', None) + self.recovery_point_move_readiness_info = kwargs.get('recovery_point_move_readiness_info', None) + + +class 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. + + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.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'}, + } + + _subtype_map = { + 'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'} + } + + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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 IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest): + """IaaS VM workload-specific restore with integrated rehydration of recovery point. + + All required parameters must be populated in order to send to Azure. + + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.IdentityBasedRestoreDetails + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, + 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, + 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, + 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, + 'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'}, + 'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'}, + 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'}, + 'identity_based_restore_details': {'key': 'identityBasedRestoreDetails', 'type': 'IdentityBasedRestoreDetails'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.IdentityBasedRestoreDetails + :keyword recovery_point_rehydration_info: RP Rehydration Info. + :paramtype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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) + + +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 ILRRequestResource(Resource): + """Parameters to Provision ILR API. + + 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: ILRRequestResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ILRRequest + """ + + _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': 'ILRRequest'}, + } + + 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.activestamp.models.ILRRequest + """ + super(ILRRequestResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class InquiryInfo(msrest.serialization.Model): + """Details about inquired protectable items under a given container. + + :ivar status: Inquiry Status for this container such as + InProgress | Failed | Succeeded. + :vartype status: str + :ivar error_detail: Error Details if the Status is non-success. + :vartype error_detail: ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :vartype inquiry_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadInquiryDetails] + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + 'inquiry_details': {'key': 'inquiryDetails', 'type': '[WorkloadInquiryDetails]'}, + } + + 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.activestamp.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.activestamp.models.WorkloadInquiryDetails] + """ + super(InquiryInfo, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.error_detail = kwargs.get('error_detail', None) + self.inquiry_details = kwargs.get('inquiry_details', None) + + +class InquiryValidation(msrest.serialization.Model): + """Validation for inquired protectable items under a given container. + + Variables are only populated by the server, and will be ignored when sending a request. + + :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.activestamp.models.ErrorDetail + :ivar additional_detail: Error Additional Detail in case the status is non-success. + :vartype additional_detail: str + """ + + _validation = { + 'additional_detail': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + 'additional_detail': {'key': 'additionalDetail', 'type': 'str'}, + } + + 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.activestamp.models.ErrorDetail + """ + super(InquiryValidation, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.error_detail = kwargs.get('error_detail', None) + self.additional_detail = 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.activestamp.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.activestamp.models.ClientScriptForConnect] + """ + super(InstantItemRecoveryTarget, self).__init__(**kwargs) + self.client_scripts = kwargs.get('client_scripts', None) + + +class InstantRPAdditionalDetails(msrest.serialization.Model): + """InstantRPAdditionalDetails. + + :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 = { + 'azure_backup_rg_name_prefix': {'key': 'azureBackupRGNamePrefix', 'type': 'str'}, + 'azure_backup_rg_name_suffix': {'key': 'azureBackupRGNameSuffix', 'type': 'str'}, + } + + 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) + + +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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.Job + """ + super(JobResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', 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.activestamp.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.activestamp.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.activestamp.models.KEKDetails + :ivar bek_details: BEK is bitlocker encryption key. + :vartype bek_details: ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.KEKDetails + :keyword bek_details: BEK is bitlocker encryption key. + :paramtype bek_details: ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.ResourceHealthStatus + :ivar resource_health_details: Resource Health Status. + :vartype resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.ResourceHealthStatus + :keyword resource_health_details: Resource Health Status. + :paramtype resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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 ListRecoveryPointsRecommendedForMoveRequest(msrest.serialization.Model): + """ListRecoveryPointsRecommendedForMoveRequest Request. + + :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 = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'excluded_rp_list': {'key': 'excludedRPList', 'type': '[str]'}, + } + + 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) + + +class SchedulePolicy(msrest.serialization.Model): + """Base class for backup schedule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LogSchedulePolicy, LongTermSchedulePolicy, SimpleSchedulePolicy. + + All required parameters must be populated in order to send to Azure. + + :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. + :vartype schedule_policy_type: str + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + } + + _subtype_map = { + 'schedule_policy_type': {'LogSchedulePolicy': 'LogSchedulePolicy', 'LongTermSchedulePolicy': 'LongTermSchedulePolicy', 'SimpleSchedulePolicy': 'SimpleSchedulePolicy'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SchedulePolicy, self).__init__(**kwargs) + self.schedule_policy_type = None # type: Optional[str] + + +class LogSchedulePolicy(SchedulePolicy): + """Log policy schedule. + + All required parameters must be populated in order to send to Azure. + + :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. + :vartype schedule_policy_type: str + :ivar schedule_frequency_in_mins: Frequency of the log schedule operation of this policy in + minutes. + :vartype schedule_frequency_in_mins: int + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + 'schedule_frequency_in_mins': {'key': 'scheduleFrequencyInMins', 'type': 'int'}, + } + + 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) + + +class RetentionPolicy(msrest.serialization.Model): + """Base class for retention policy. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LongTermRetentionPolicy, SimpleRetentionPolicy. + + All required parameters must be populated in order to send to Azure. + + :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. + :vartype retention_policy_type: str + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, + } + + _subtype_map = { + 'retention_policy_type': {'LongTermRetentionPolicy': 'LongTermRetentionPolicy', 'SimpleRetentionPolicy': 'SimpleRetentionPolicy'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(RetentionPolicy, self).__init__(**kwargs) + self.retention_policy_type = None # type: Optional[str] + + +class LongTermRetentionPolicy(RetentionPolicy): + """Long term retention policy. + + All required parameters must be populated in order to send to Azure. + + :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. + :vartype retention_policy_type: str + :ivar daily_schedule: Daily retention schedule of the protection policy. + :vartype daily_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DailyRetentionSchedule + :ivar weekly_schedule: Weekly retention schedule of the protection policy. + :vartype weekly_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WeeklyRetentionSchedule + :ivar monthly_schedule: Monthly retention schedule of the protection policy. + :vartype monthly_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.MonthlyRetentionSchedule + :ivar yearly_schedule: Yearly retention schedule of the protection policy. + :vartype yearly_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.YearlyRetentionSchedule + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, + 'daily_schedule': {'key': 'dailySchedule', 'type': 'DailyRetentionSchedule'}, + 'weekly_schedule': {'key': 'weeklySchedule', 'type': 'WeeklyRetentionSchedule'}, + 'monthly_schedule': {'key': 'monthlySchedule', 'type': 'MonthlyRetentionSchedule'}, + 'yearly_schedule': {'key': 'yearlySchedule', 'type': 'YearlyRetentionSchedule'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword daily_schedule: Daily retention schedule of the protection policy. + :paramtype daily_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DailyRetentionSchedule + :keyword weekly_schedule: Weekly retention schedule of the protection policy. + :paramtype weekly_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WeeklyRetentionSchedule + :keyword monthly_schedule: Monthly retention schedule of the protection policy. + :paramtype monthly_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.MonthlyRetentionSchedule + :keyword yearly_schedule: Yearly retention schedule of the protection policy. + :paramtype yearly_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.YearlyRetentionSchedule + """ + super(LongTermRetentionPolicy, self).__init__(**kwargs) + self.retention_policy_type = 'LongTermRetentionPolicy' # type: str + self.daily_schedule = kwargs.get('daily_schedule', None) + self.weekly_schedule = kwargs.get('weekly_schedule', None) + self.monthly_schedule = kwargs.get('monthly_schedule', None) + self.yearly_schedule = kwargs.get('yearly_schedule', None) + + +class LongTermSchedulePolicy(SchedulePolicy): + """Long term policy schedule. + + All required parameters must be populated in order to send to Azure. + + :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. + :vartype schedule_policy_type: str + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(LongTermSchedulePolicy, self).__init__(**kwargs) + self.schedule_policy_type = 'LongTermSchedulePolicy' # type: str + + +class MabContainer(ProtectionContainer): + """Container with items backed up using MAB backup engine. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.MabContainerExtendedInfo + :ivar mab_container_health_details: Health details on this mab container. + :vartype mab_container_health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.MABContainerHealthDetails] + :ivar container_health_state: Health state of mab container. + :vartype container_health_state: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + 'agent_version': {'key': 'agentVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'MabContainerExtendedInfo'}, + 'mab_container_health_details': {'key': 'mabContainerHealthDetails', 'type': '[MABContainerHealthDetails]'}, + 'container_health_state': {'key': 'containerHealthState', '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.activestamp.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.activestamp.models.MabContainerExtendedInfo + :keyword mab_container_health_details: Health details on this mab container. + :paramtype mab_container_health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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) + self.container_id = kwargs.get('container_id', None) + self.protected_item_count = kwargs.get('protected_item_count', None) + self.agent_version = kwargs.get('agent_version', None) + self.extended_info = kwargs.get('extended_info', None) + self.mab_container_health_details = kwargs.get('mab_container_health_details', None) + self.container_health_state = kwargs.get('container_health_state', None) + + +class MabContainerExtendedInfo(msrest.serialization.Model): + """Additional information of the container. + + :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". + :vartype backup_item_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + 'backup_item_type': {'key': 'backupItemType', 'type': 'str'}, + 'backup_items': {'key': 'backupItems', 'type': '[str]'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + } + + 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.activestamp.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) + self.backup_items = kwargs.get('backup_items', None) + self.policy_name = kwargs.get('policy_name', None) + self.last_backup_status = kwargs.get('last_backup_status', None) + + +class MABContainerHealthDetails(msrest.serialization.Model): + """MAB workload-specific Health Details. + + :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 = { + 'code': {'key': 'code', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + 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) + self.message = kwargs.get('message', None) + self.recommendations = kwargs.get('recommendations', 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.activestamp.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.activestamp.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.activestamp.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 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.activestamp.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]'}, + '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'}, + '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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.WorkloadType + :ivar error_details: The errors. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.MabErrorInfo] + :ivar extended_info: Additional information on the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.WorkloadType + :keyword error_details: The errors. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.MabErrorInfo] + :keyword extended_info: Additional information on the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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 MabProtectionPolicy(ProtectionPolicy): + """Mab container-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :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. + :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.activestamp.models.SchedulePolicy + :ivar retention_policy: Retention policy details. + :vartype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionPolicy + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + 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.activestamp.models.SchedulePolicy + :keyword retention_policy: Retention policy details. + :paramtype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionPolicy + """ + super(MabProtectionPolicy, self).__init__(**kwargs) + self.backup_management_type = 'MAB' # type: str + self.schedule_policy = kwargs.get('schedule_policy', None) + self.retention_policy = kwargs.get('retention_policy', None) + + +class MonthlyRetentionSchedule(msrest.serialization.Model): + """Monthly retention schedule. + + :ivar retention_schedule_format_type: Retention schedule format type for monthly retention + policy. Possible values include: "Invalid", "Daily", "Weekly". + :vartype retention_schedule_format_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionScheduleFormat + :ivar retention_schedule_daily: Daily retention format for monthly retention policy. + :vartype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DailyRetentionFormat + :ivar retention_schedule_weekly: Weekly retention format for monthly retention policy. + :vartype retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WeeklyRetentionFormat + :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.activestamp.models.RetentionDuration + """ + + _attribute_map = { + 'retention_schedule_format_type': {'key': 'retentionScheduleFormatType', 'type': 'str'}, + 'retention_schedule_daily': {'key': 'retentionScheduleDaily', 'type': 'DailyRetentionFormat'}, + 'retention_schedule_weekly': {'key': 'retentionScheduleWeekly', 'type': 'WeeklyRetentionFormat'}, + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + 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.activestamp.models.RetentionScheduleFormat + :keyword retention_schedule_daily: Daily retention format for monthly retention policy. + :paramtype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DailyRetentionFormat + :keyword retention_schedule_weekly: Weekly retention format for monthly retention policy. + :paramtype retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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) + self.retention_schedule_weekly = kwargs.get('retention_schedule_weekly', None) + self.retention_times = kwargs.get('retention_times', None) + self.retention_duration = kwargs.get('retention_duration', None) + + +class MoveRPAcrossTiersRequest(msrest.serialization.Model): + """MoveRPAcrossTiersRequest. + + :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". + :vartype source_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RecoveryPointTierType + :ivar target_tier_type: Target tier where RP needs to be moved. Possible values include: + "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". + :vartype target_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RecoveryPointTierType + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'source_tier_type': {'key': 'sourceTierType', 'type': 'str'}, + 'target_tier_type': {'key': 'targetTierType', 'type': 'str'}, + } + + 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.activestamp.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.activestamp.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) + self.target_tier_type = kwargs.get('target_tier_type', 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.activestamp.models.NewErrorResponseError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'NewErrorResponseError'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.NewErrorResponse] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[NewErrorResponse]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NewErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class OperationResultInfo(OperationResultInfoBase): + """Operation result info. + + 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_list: List of jobs created by this operation. + :vartype job_list: list[str] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_list': {'key': 'jobList', 'type': '[str]'}, + } + + 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) + + +class OperationWorkerResponse(msrest.serialization.Model): + """This is the base class for operation result responses. + + :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", + "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". + :vartype status_code: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.HttpStatusCode + :ivar headers: HTTP headers associated with this operation. + :vartype headers: dict[str, list[str]] + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + } + + 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.activestamp.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) + + +class OperationResultInfoBaseResource(OperationWorkerResponse): + """Base class for operation result info. + + :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", + "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". + :vartype status_code: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.OperationResultInfoBase + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + 'operation': {'key': 'operation', 'type': 'OperationResultInfoBase'}, + } + + 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.activestamp.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.activestamp.models.OperationResultInfoBase + """ + super(OperationResultInfoBaseResource, self).__init__(**kwargs) + self.operation = kwargs.get('operation', 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.activestamp.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.activestamp.models.OperationStatusError + :ivar properties: Additional information associated with this operation. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.OperationStatusError + :keyword properties: Additional information associated with this operation. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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, OperationStatusValidateOperationExtendedInfo. + + 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', 'OperationStatusValidateOperationExtendedInfo': 'OperationStatusValidateOperationExtendedInfo'} + } + + 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.activestamp.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.activestamp.models.InstantItemRecoveryTarget + """ + super(OperationStatusProvisionILRExtendedInfo, self).__init__(**kwargs) + self.object_type = 'OperationStatusProvisionILRExtendedInfo' # type: str + self.recovery_target = kwargs.get('recovery_target', None) + + +class OperationStatusValidateOperationExtendedInfo(OperationStatusExtendedInfo): + """Operation status extended info for ValidateOperation 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 validate_operation_response: Gets the validation operation response. + :vartype validate_operation_response: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ValidateOperationResponse + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'validate_operation_response': {'key': 'validateOperationResponse', 'type': 'ValidateOperationResponse'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword validate_operation_response: Gets the validation operation response. + :paramtype validate_operation_response: + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + + :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 PreBackupValidation(msrest.serialization.Model): + """Pre-backup validation for Azure VM Workload provider. + + :ivar status: Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values + include: "Invalid", "Success", "Failed". + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'status': {'key': 'status', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + 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.activestamp.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) + self.message = kwargs.get('message', None) + + +class PrepareDataMoveRequest(msrest.serialization.Model): + """Prepare DataMove Request. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype data_move_level: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DataMoveLevel + :ivar source_container_arm_ids: Source Container ArmIds + This needs to be populated only if DataMoveLevel is set to container. + :vartype source_container_arm_ids: list[str] + :ivar ignore_moved: Ignore the artifacts which are already moved. + :vartype ignore_moved: bool + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'target_region': {'required': True}, + 'data_move_level': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'target_region': {'key': 'targetRegion', 'type': 'str'}, + 'data_move_level': {'key': 'dataMoveLevel', 'type': 'str'}, + 'source_container_arm_ids': {'key': 'sourceContainerArmIds', 'type': '[str]'}, + 'ignore_moved': {'key': 'ignoreMoved', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :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.activestamp.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'] + self.data_move_level = kwargs['data_move_level'] + self.source_container_arm_ids = kwargs.get('source_container_arm_ids', None) + self.ignore_moved = kwargs.get('ignore_moved', None) + + +class VaultStorageConfigOperationResultResponse(msrest.serialization.Model): + """Operation result response for Vault Storage Config. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PrepareDataMoveResponse. + + All required parameters must be populated in order to send to Azure. + + :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': {'PrepareDataMoveResponse': 'PrepareDataMoveResponse'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(VaultStorageConfigOperationResultResponse, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class PrepareDataMoveResponse(VaultStorageConfigOperationResultResponse): + """Prepare DataMove Response. + + 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 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 = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'source_vault_properties': {'key': 'sourceVaultProperties', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :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) + self.source_vault_properties = kwargs.get('source_vault_properties', None) + + +class PreValidateEnableBackupRequest(msrest.serialization.Model): + """Contract to validate if backup can be enabled on the given resource in a given vault and given configuration. +It will validate followings + + +#. Vault capacity +#. VM is already protected +#. Any VM related configuration passed in properties. + + :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". + :vartype resource_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'str'}, + } + + 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.activestamp.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) + self.vault_id = kwargs.get('vault_id', None) + self.properties = kwargs.get('properties', None) + + +class PreValidateEnableBackupResponse(msrest.serialization.Model): + """Response contract for enable backup validation request. + + :ivar status: Validation Status. Possible values include: "Invalid", "Succeeded", "Failed". + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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. + :vartype protected_item_name: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'recommendation': {'key': 'recommendation', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword status: Validation Status. Possible values include: "Invalid", "Succeeded", "Failed". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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) + self.error_message = kwargs.get('error_message', None) + self.recommendation = kwargs.get('recommendation', None) + self.container_name = kwargs.get('container_name', None) + self.protected_item_name = kwargs.get('protected_item_name', None) + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint network resource that is linked to the Private Endpoint connection. + + :ivar id: Gets or sets id. + :vartype id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Gets or sets id. + :paramtype id: str + """ + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class PrivateEndpointConnection(msrest.serialization.Model): + """Private Endpoint Connection Response Properties. + + :ivar provisioning_state: Gets or sets provisioning state of the private endpoint connection. + Possible values include: "Succeeded", "Deleting", "Failed", "Pending". + :vartype provisioning_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProvisioningState + :ivar private_endpoint: Gets or sets private endpoint associated with the private endpoint + connection. + :vartype private_endpoint: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.PrivateEndpoint + :ivar private_link_service_connection_state: Gets or sets private link service connection + state. + :vartype private_link_service_connection_state: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.PrivateLinkServiceConnectionState + """ + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + } + + 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.activestamp.models.ProvisioningState + :keyword private_endpoint: Gets or sets private endpoint associated with the private endpoint + connection. + :paramtype private_endpoint: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.PrivateLinkServiceConnectionState + """ + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + + +class PrivateEndpointConnectionResource(Resource): + """Private Endpoint Connection Response Properties. + + 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: PrivateEndpointConnectionResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.PrivateEndpointConnection + """ + + _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': 'PrivateEndpointConnection'}, + } + + 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.activestamp.models.PrivateEndpointConnection + """ + super(PrivateEndpointConnectionResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """Private Link Service Connection State. + + :ivar status: Gets or sets the status. Possible values include: "Pending", "Approved", + "Rejected", "Disconnected". + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'action_required': {'key': 'actionRequired', 'type': 'str'}, + } + + 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.activestamp.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) + self.action_required = kwargs.get('action_required', None) + + +class ProtectableContainerResource(Resource): + """Protectable Container 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: ProtectableContainerResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectableContainer + """ + + _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': 'ProtectableContainer'}, + } + + 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.activestamp.models.ProtectableContainer + """ + super(ProtectableContainerResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ProtectableContainerResourceList(ResourceList): + """List of ProtectableContainer 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.activestamp.models.ProtectableContainerResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ProtectableContainerResource]'}, + } + + 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.activestamp.models.ProtectableContainerResource] + """ + super(ProtectableContainerResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemResource] + """ + super(ProtectedItemResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ProtectionContainerResource(Resource): + """Base class for container with backup items. Containers with specific workloads 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: ProtectionContainerResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionContainer + """ + + _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': 'ProtectionContainer'}, + } + + 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.activestamp.models.ProtectionContainer + """ + super(ProtectionContainerResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ProtectionContainerResourceList(ResourceList): + """List of ProtectionContainer 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.activestamp.models.ProtectionContainerResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ProtectionContainerResource]'}, + } + + 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.activestamp.models.ProtectionContainerResource] + """ + super(ProtectionContainerResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ProtectionIntentQueryObject(msrest.serialization.Model): + """Filters to list protection intent. + + :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.activestamp.models.BackupManagementType + :ivar item_type: Type of workload this item represents. Possible values include: "Invalid", + "SQLInstance", "SQLAvailabilityGroupContainer". + :vartype item_type: str or ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'item_type': {'key': 'itemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'item_name': {'key': 'itemName', '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.activestamp.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.activestamp.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) + self.parent_name = kwargs.get('parent_name', None) + self.item_name = kwargs.get('item_name', None) + + +class ProtectionIntentResource(Resource): + """Base class for backup ProtectionIntent. + + 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: ProtectionIntentResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionIntent + """ + + _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': 'ProtectionIntent'}, + } + + 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.activestamp.models.ProtectionIntent + """ + super(ProtectionIntentResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ProtectionIntentResourceList(ResourceList): + """List of ProtectionIntent 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.activestamp.models.ProtectionIntentResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ProtectionIntentResource]'}, + } + + 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.activestamp.models.ProtectionIntentResource] + """ + super(ProtectionIntentResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ProtectionPolicyQueryObject(msrest.serialization.Model): + """Filters the list backup policies API. + + :ivar backup_management_type: Backup management type for the backup policy. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + } + + 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.activestamp.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.activestamp.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) + self.workload_type = kwargs.get('workload_type', None) + + +class ProtectionPolicyResource(Resource): + """Base class for backup policy. Workload-specific backup policies 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: ProtectionPolicyResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionPolicy + """ + + _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': 'ProtectionPolicy'}, + } + + 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.activestamp.models.ProtectionPolicy + """ + super(ProtectionPolicyResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ProtectionPolicyResourceList(ResourceList): + """List of ProtectionPolicy 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.activestamp.models.ProtectionPolicyResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ProtectionPolicyResource]'}, + } + + 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.activestamp.models.ProtectionPolicyResource] + """ + super(ProtectionPolicyResourceList, 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.activestamp.models.DiskInformation] + :ivar excluded_disk_list: Information of disks excluded from backup. + :vartype excluded_disk_list: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.DiskInformation] + :keyword excluded_disk_list: Information of disks excluded from backup. + :paramtype excluded_disk_list: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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 RecoveryPointRehydrationInfo(msrest.serialization.Model): + """RP Rehydration Info. + + :ivar rehydration_retention_duration: How long the rehydrated RP should be kept + Should be ISO8601 Duration format e.g. "P7D". + :vartype rehydration_retention_duration: str + :ivar rehydration_priority: Rehydration Priority. Possible values include: "Standard", "High". + :vartype rehydration_priority: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RehydrationPriority + """ + + _attribute_map = { + 'rehydration_retention_duration': {'key': 'rehydrationRetentionDuration', 'type': 'str'}, + 'rehydration_priority': {'key': 'rehydrationPriority', 'type': 'str'}, + } + + 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.activestamp.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) + + +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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.RecoveryPointTierType + :ivar status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointTierType + :keyword status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointTierType + :ivar status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointTierType + :keyword status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + + :ivar vault_critical_operation: + :vartype vault_critical_operation: str + :ivar default_resource_request: + :vartype default_resource_request: str + """ + + _attribute_map = { + 'vault_critical_operation': {'key': 'vaultCriticalOperation', 'type': 'str'}, + 'default_resource_request': {'key': 'defaultResourceRequest', 'type': 'str'}, + } + + 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) + + +class ResourceGuardProxyBase(msrest.serialization.Model): + """ResourceGuardProxyBase. + + :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.activestamp.models.ResourceGuardOperationDetail] + :ivar last_updated_time: + :vartype last_updated_time: str + :ivar description: + :vartype description: str + """ + + _attribute_map = { + 'resource_guard_resource_id': {'key': 'resourceGuardResourceId', 'type': 'str'}, + 'resource_guard_operation_details': {'key': 'resourceGuardOperationDetails', 'type': '[ResourceGuardOperationDetail]'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + 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.activestamp.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) + self.last_updated_time = kwargs.get('last_updated_time', None) + self.description = kwargs.get('description', None) + + +class ResourceGuardProxyBaseResource(Resource): + """ResourceGuardProxyBaseResource. + + 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: ResourceGuardProxyBaseResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ResourceGuardProxyBase + """ + + _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': 'ResourceGuardProxyBase'}, + } + + 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.activestamp.models.ResourceGuardProxyBase + """ + super(ResourceGuardProxyBaseResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ResourceGuardProxyBaseResourceList(ResourceList): + """List of ResourceGuardProxyBase 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.activestamp.models.ResourceGuardProxyBaseResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ResourceGuardProxyBaseResource]'}, + } + + 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.activestamp.models.ResourceGuardProxyBaseResource] + """ + super(ResourceGuardProxyBaseResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', 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 RestoreRequestResource(Resource): + """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. + + :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: RestoreRequestResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.RestoreRequest + """ + + _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': 'RestoreRequest'}, + } + + 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.activestamp.models.RestoreRequest + """ + super(RestoreRequestResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class RetentionDuration(msrest.serialization.Model): + """Retention duration. + + :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. + :vartype count: int + :ivar duration_type: Retention duration type of retention policy. Possible values include: + "Invalid", "Days", "Weeks", "Months", "Years". + :vartype duration_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionDurationType + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'duration_type': {'key': 'durationType', 'type': 'str'}, + } + + 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.activestamp.models.RetentionDurationType + """ + super(RetentionDuration, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.duration_type = kwargs.get('duration_type', None) + + +class SecurityPinBase(msrest.serialization.Model): + """Base class for get security pin request body. + + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + """ + + _attribute_map = { + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + } + + 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) + + +class Settings(msrest.serialization.Model): + """Common settings field for backup management. + + :ivar time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard + Time". + :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. + :vartype is_compression: bool + """ + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'issqlcompression': {'key': 'issqlcompression', 'type': 'bool'}, + 'is_compression': {'key': 'isCompression', 'type': 'bool'}, + } + + 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) + self.is_compression = kwargs.get('is_compression', None) + + +class SimpleRetentionPolicy(RetentionPolicy): + """Simple policy retention. + + All required parameters must be populated in order to send to Azure. + + :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. + :vartype retention_policy_type: str + :ivar retention_duration: Retention duration of the protection policy. + :vartype retention_duration: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionDuration + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword retention_duration: Retention duration of the protection policy. + :paramtype retention_duration: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionDuration + """ + super(SimpleRetentionPolicy, self).__init__(**kwargs) + self.retention_policy_type = 'SimpleRetentionPolicy' # type: str + self.retention_duration = kwargs.get('retention_duration', None) + + +class SimpleSchedulePolicy(SchedulePolicy): + """Simple policy schedule. + + All required parameters must be populated in order to send to Azure. + + :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. + :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.activestamp.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.activestamp.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.activestamp.models.HourlySchedule + :ivar schedule_weekly_frequency: At every number weeks this schedule has to be run. + :vartype schedule_weekly_frequency: int + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + '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'}, + } + + 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.activestamp.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.activestamp.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.activestamp.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. + + :ivar type: Type of data directory mapping. Possible values include: "Invalid", "Data", "Log". + :vartype type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.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 SubProtectionPolicy(msrest.serialization.Model): + """Sub-protection policy which includes schedule and retention. + + :ivar policy_type: Type of backup policy type. Possible values include: "Invalid", "Full", + "Differential", "Log", "CopyOnlyFull", "Incremental". + :vartype policy_type: str or ~azure.mgmt.recoveryservicesbackup.activestamp.models.PolicyType + :ivar schedule_policy: Backup schedule specified as part of backup policy. + :vartype schedule_policy: ~azure.mgmt.recoveryservicesbackup.activestamp.models.SchedulePolicy + :ivar retention_policy: Retention policy with the details on backup copy retention ranges. + :vartype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionPolicy + """ + + _attribute_map = { + 'policy_type': {'key': 'policyType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + 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.activestamp.models.PolicyType + :keyword schedule_policy: Backup schedule specified as part of backup policy. + :paramtype schedule_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.SchedulePolicy + :keyword retention_policy: Retention policy with the details on backup copy retention ranges. + :paramtype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionPolicy + """ + super(SubProtectionPolicy, self).__init__(**kwargs) + self.policy_type = kwargs.get('policy_type', None) + self.schedule_policy = kwargs.get('schedule_policy', None) + self.retention_policy = kwargs.get('retention_policy', 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.activestamp.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.activestamp.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 TokenInformation(msrest.serialization.Model): + """The token information details. + + :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 = { + 'token': {'key': 'token', 'type': 'str'}, + 'expiry_time_in_utc_ticks': {'key': 'expiryTimeInUtcTicks', 'type': 'long'}, + 'security_pin': {'key': 'securityPIN', 'type': 'str'}, + } + + 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) + self.security_pin = kwargs.get('security_pin', None) + + +class TriggerDataMoveRequest(msrest.serialization.Model): + """Trigger DataMove Request. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype data_move_level: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'source_resource_id': {'required': True}, + 'source_region': {'required': True}, + 'data_move_level': {'required': True}, + 'correlation_id': {'required': True}, + } + + _attribute_map = { + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'source_region': {'key': 'sourceRegion', 'type': 'str'}, + 'data_move_level': {'key': 'dataMoveLevel', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'source_container_arm_ids': {'key': 'sourceContainerArmIds', 'type': '[str]'}, + 'pause_gc': {'key': 'pauseGC', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :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.activestamp.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'] + self.data_move_level = kwargs['data_move_level'] + self.correlation_id = kwargs['correlation_id'] + self.source_container_arm_ids = kwargs.get('source_container_arm_ids', None) + self.pause_gc = kwargs.get('pause_gc', None) + + +class UnlockDeleteRequest(msrest.serialization.Model): + """Request body of unlock delete API. + + :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 = { + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'resource_to_be_deleted': {'key': 'resourceToBeDeleted', 'type': 'str'}, + } + + 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) + + +class UnlockDeleteResponse(msrest.serialization.Model): + """Response of Unlock Delete API. + + :ivar unlock_delete_expiry_time: This is the time when unlock delete privileges will get + expired. + :vartype unlock_delete_expiry_time: str + """ + + _attribute_map = { + 'unlock_delete_expiry_time': {'key': 'unlockDeleteExpiryTime', 'type': 'str'}, + } + + 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) + + +class ValidateOperationRequest(msrest.serialization.Model): + """Base class for validate operation request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ValidateRestoreOperationRequest. + + 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': {'ValidateRestoreOperationRequest': 'ValidateRestoreOperationRequest'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ValidateOperationRequest, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class ValidateRestoreOperationRequest(ValidateOperationRequest): + """AzureRestoreValidation request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ValidateIaasVMRestoreOperationRequest. + + 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 restore_request: Sets restore request to be validated. + :vartype restore_request: ~azure.mgmt.recoveryservicesbackup.activestamp.models.RestoreRequest + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_request': {'key': 'restoreRequest', 'type': 'RestoreRequest'}, + } + + _subtype_map = { + 'object_type': {'ValidateIaasVMRestoreOperationRequest': 'ValidateIaasVMRestoreOperationRequest'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword restore_request: Sets restore request to be validated. + :paramtype restore_request: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RestoreRequest + """ + super(ValidateRestoreOperationRequest, self).__init__(**kwargs) + self.object_type = 'ValidateRestoreOperationRequest' # type: str + self.restore_request = kwargs.get('restore_request', None) + + +class ValidateIaasVMRestoreOperationRequest(ValidateRestoreOperationRequest): + """AzureRestoreValidation 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 restore_request: Sets restore request to be validated. + :vartype restore_request: ~azure.mgmt.recoveryservicesbackup.activestamp.models.RestoreRequest + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_request': {'key': 'restoreRequest', 'type': 'RestoreRequest'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword restore_request: Sets restore request to be validated. + :paramtype restore_request: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RestoreRequest + """ + super(ValidateIaasVMRestoreOperationRequest, self).__init__(**kwargs) + self.object_type = 'ValidateIaasVMRestoreOperationRequest' # type: str + + +class ValidateOperationResponse(msrest.serialization.Model): + """Base class for validate operation response. + + :ivar validation_results: Gets the validation result. + :vartype validation_results: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ErrorDetail] + """ + + _attribute_map = { + 'validation_results': {'key': 'validationResults', 'type': '[ErrorDetail]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword validation_results: Gets the validation result. + :paramtype validation_results: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ErrorDetail] + """ + super(ValidateOperationResponse, self).__init__(**kwargs) + self.validation_results = kwargs.get('validation_results', None) + + +class ValidateOperationsResponse(msrest.serialization.Model): + """ValidateOperationsResponse. + + :ivar validate_operation_response: Base class for validate operation response. + :vartype validate_operation_response: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ValidateOperationResponse + """ + + _attribute_map = { + 'validate_operation_response': {'key': 'validateOperationResponse', 'type': 'ValidateOperationResponse'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword validate_operation_response: Base class for validate operation response. + :paramtype validate_operation_response: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ValidateOperationResponse + """ + super(ValidateOperationsResponse, self).__init__(**kwargs) + self.validate_operation_response = kwargs.get('validate_operation_response', None) + + +class VaultJob(Job): + """Vault level Job. + + All required parameters must be populated in order to send to Azure. + + :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.activestamp.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.activestamp.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.VaultJobErrorInfo] + :ivar extended_info: Additional information about the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.VaultJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[str]'}, + 'error_details': {'key': 'errorDetails', 'type': '[VaultJobErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'VaultJobExtendedInfo'}, + } + + 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.activestamp.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.activestamp.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.VaultJobErrorInfo] + :keyword extended_info: Additional information about the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.VaultJobExtendedInfo + """ + super(VaultJob, self).__init__(**kwargs) + self.job_type = 'VaultJob' # 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.extended_info = kwargs.get('extended_info', None) + + +class VaultJobErrorInfo(msrest.serialization.Model): + """Vault Job 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(VaultJobErrorInfo, self).__init__(**kwargs) + self.error_code = kwargs.get('error_code', None) + self.error_string = kwargs.get('error_string', None) + self.recommendations = kwargs.get('recommendations', None) + + +class VaultJobExtendedInfo(msrest.serialization.Model): + """Vault Job for CMK - has CMK specific info. + + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] + """ + + _attribute_map = { + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + } + + 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) + + +class WeeklyRetentionFormat(msrest.serialization.Model): + """Weekly retention format. + + :ivar days_of_the_week: List of days of the week. + :vartype days_of_the_week: list[str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DayOfWeek] + :ivar weeks_of_the_month: List of weeks of month. + :vartype weeks_of_the_month: list[str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WeekOfMonth] + """ + + _attribute_map = { + 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[str]'}, + 'weeks_of_the_month': {'key': 'weeksOfTheMonth', 'type': '[str]'}, + } + + 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.activestamp.models.DayOfWeek] + :keyword weeks_of_the_month: List of weeks of month. + :paramtype weeks_of_the_month: list[str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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) + + +class WeeklyRetentionSchedule(msrest.serialization.Model): + """Weekly retention schedule. + + :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.activestamp.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.activestamp.models.RetentionDuration + """ + + _attribute_map = { + 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[str]'}, + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + 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.activestamp.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.activestamp.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 WorkloadInquiryDetails(msrest.serialization.Model): + """Details of an inquired protectable item. + + :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.activestamp.models.InquiryValidation + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'item_count': {'key': 'itemCount', 'type': 'long'}, + 'inquiry_validation': {'key': 'inquiryValidation', 'type': 'InquiryValidation'}, + } + + 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.activestamp.models.InquiryValidation + """ + super(WorkloadInquiryDetails, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.item_count = kwargs.get('item_count', None) + self.inquiry_validation = kwargs.get('inquiry_validation', None) + + +class WorkloadItemResource(Resource): + """Base class for backup item. Workload-specific backup items 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: WorkloadItemResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadItem + """ + + _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': 'WorkloadItem'}, + } + + 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.activestamp.models.WorkloadItem + """ + super(WorkloadItemResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class WorkloadItemResourceList(ResourceList): + """List of WorkloadItem 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.activestamp.models.WorkloadItemResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[WorkloadItemResource]'}, + } + + 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.activestamp.models.WorkloadItemResource] + """ + super(WorkloadItemResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class WorkloadProtectableItemResource(Resource): + """Base class for backup item. Workload-specific backup items 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: WorkloadProtectableItemResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadProtectableItem + """ + + _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': 'WorkloadProtectableItem'}, + } + + 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.activestamp.models.WorkloadProtectableItem + """ + super(WorkloadProtectableItemResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class WorkloadProtectableItemResourceList(ResourceList): + """List of WorkloadProtectableItem 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.activestamp.models.WorkloadProtectableItemResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[WorkloadProtectableItemResource]'}, + } + + 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.activestamp.models.WorkloadProtectableItemResource] + """ + super(WorkloadProtectableItemResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class YearlyRetentionSchedule(msrest.serialization.Model): + """Yearly retention schedule. + + :ivar retention_schedule_format_type: Retention schedule format for yearly retention policy. + Possible values include: "Invalid", "Daily", "Weekly". + :vartype retention_schedule_format_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionScheduleFormat + :ivar months_of_year: List of months of year of yearly retention policy. + :vartype months_of_year: list[str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.MonthOfYear] + :ivar retention_schedule_daily: Daily retention format for yearly retention policy. + :vartype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DailyRetentionFormat + :ivar retention_schedule_weekly: Weekly retention format for yearly retention policy. + :vartype retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WeeklyRetentionFormat + :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.activestamp.models.RetentionDuration + """ + + _attribute_map = { + 'retention_schedule_format_type': {'key': 'retentionScheduleFormatType', 'type': 'str'}, + 'months_of_year': {'key': 'monthsOfYear', 'type': '[str]'}, + 'retention_schedule_daily': {'key': 'retentionScheduleDaily', 'type': 'DailyRetentionFormat'}, + 'retention_schedule_weekly': {'key': 'retentionScheduleWeekly', 'type': 'WeeklyRetentionFormat'}, + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + 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.activestamp.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.activestamp.models.MonthOfYear] + :keyword retention_schedule_daily: Daily retention format for yearly retention policy. + :paramtype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DailyRetentionFormat + :keyword retention_schedule_weekly: Weekly retention format for yearly retention policy. + :paramtype retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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) + self.retention_schedule_daily = kwargs.get('retention_schedule_daily', None) + self.retention_schedule_weekly = kwargs.get('retention_schedule_weekly', None) + self.retention_times = kwargs.get('retention_times', None) + self.retention_duration = kwargs.get('retention_duration', None) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/_models_py3.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/_models_py3.py new file mode 100644 index 000000000000..bdcbfdf0a272 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/_models_py3.py @@ -0,0 +1,19871 @@ +# 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 ._recovery_services_backup_client_enums import * + + +class FeatureSupportRequest(msrest.serialization.Model): + """Base class for feature request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupGoalFeatureSupportRequest, AzureVMResourceFeatureSupportRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar feature_type: Required. backup support feature type.Constant filled by server. + :vartype feature_type: str + """ + + _validation = { + 'feature_type': {'required': True}, + } + + _attribute_map = { + 'feature_type': {'key': 'featureType', 'type': 'str'}, + } + + _subtype_map = { + 'feature_type': {'AzureBackupGoals': 'AzureBackupGoalFeatureSupportRequest', 'AzureVMResourceBackup': 'AzureVMResourceFeatureSupportRequest'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(FeatureSupportRequest, self).__init__(**kwargs) + self.feature_type = None # type: Optional[str] + + +class AzureBackupGoalFeatureSupportRequest(FeatureSupportRequest): + """Azure backup goal feature specific request. + + All required parameters must be populated in order to send to Azure. + + :ivar feature_type: Required. backup support feature type.Constant filled by server. + :vartype feature_type: str + """ + + _validation = { + 'feature_type': {'required': True}, + } + + _attribute_map = { + 'feature_type': {'key': 'featureType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AzureBackupGoalFeatureSupportRequest, self).__init__(**kwargs) + self.feature_type = 'AzureBackupGoals' # type: str + + +class ProtectionContainer(msrest.serialization.Model): + """Base class for container with backup items. Containers with specific workloads are derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureSqlContainer, AzureWorkloadContainer, DpmContainer, GenericContainer, IaaSVMContainer, AzureStorageContainer, MabContainer. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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 = { + 'container_type': {'AzureSqlContainer': 'AzureSqlContainer', 'AzureWorkloadContainer': 'AzureWorkloadContainer', 'DPMContainer': 'DpmContainer', 'GenericContainer': 'GenericContainer', 'IaaSVMContainer': 'IaaSVMContainer', 'StorageContainer': 'AzureStorageContainer', 'Windows': 'MabContainer'} + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + registration_status: Optional[str] = None, + health_status: Optional[str] = None, + 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.activestamp.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): + """DPM workload-specific protection container. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupServerContainer. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.DPMContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, + 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, + 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, + } + + _subtype_map = { + 'container_type': {'AzureBackupServerContainer': 'AzureBackupServerContainer'} + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + 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, + dpm_agent_version: Optional[str] = None, + dpm_servers: Optional[List[str]] = None, + upgrade_available: Optional[bool] = None, + protection_status: Optional[str] = None, + extended_info: Optional["DPMContainerExtendedInfo"] = 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.activestamp.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.activestamp.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 + self.protected_item_count = protected_item_count + self.dpm_agent_version = dpm_agent_version + self.dpm_servers = dpm_servers + self.upgrade_available = upgrade_available + self.protection_status = protection_status + self.extended_info = extended_info + + +class AzureBackupServerContainer(DpmContainer): + """AzureBackupServer (DPMVenus) workload-specific protection container. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.DPMContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, + 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, + 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + 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, + dpm_agent_version: Optional[str] = None, + dpm_servers: Optional[List[str]] = None, + upgrade_available: Optional[bool] = None, + protection_status: Optional[str] = None, + extended_info: Optional["DPMContainerExtendedInfo"] = 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.activestamp.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.activestamp.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 + + +class BackupEngineBase(msrest.serialization.Model): + """The base backup engine class. All workload specific backup engines derive from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupServerEngine, DpmBackupEngine. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Registration 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}. + :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". + :vartype backup_engine_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupEngineType + :ivar can_re_register: Flag indicating if the backup engine be registered, once already + registered. + :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.activestamp.models.BackupEngineExtendedInfo + """ + + _validation = { + 'backup_engine_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + } + + _subtype_map = { + 'backup_engine_type': {'AzureBackupServerEngine': 'AzureBackupServerEngine', 'DpmBackupEngine': 'DpmBackupEngine'} + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + registration_status: Optional[str] = None, + backup_engine_state: Optional[str] = None, + health_status: Optional[str] = None, + can_re_register: Optional[bool] = None, + backup_engine_id: Optional[str] = None, + dpm_version: Optional[str] = None, + azure_backup_agent_version: Optional[str] = None, + is_azure_backup_agent_upgrade_available: Optional[bool] = None, + is_dpm_upgrade_available: Optional[bool] = None, + 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.activestamp.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.activestamp.models.BackupEngineExtendedInfo + """ + super(BackupEngineBase, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.backup_management_type = backup_management_type + self.registration_status = registration_status + self.backup_engine_state = backup_engine_state + self.health_status = health_status + self.backup_engine_type = None # type: Optional[str] + self.can_re_register = can_re_register + self.backup_engine_id = backup_engine_id + self.dpm_version = dpm_version + self.azure_backup_agent_version = azure_backup_agent_version + self.is_azure_backup_agent_upgrade_available = is_azure_backup_agent_upgrade_available + self.is_dpm_upgrade_available = is_dpm_upgrade_available + self.extended_info = extended_info + + +class AzureBackupServerEngine(BackupEngineBase): + """Backup engine type when Azure Backup Server is used to manage the backups. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Registration 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}. + :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". + :vartype backup_engine_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupEngineType + :ivar can_re_register: Flag indicating if the backup engine be registered, once already + registered. + :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.activestamp.models.BackupEngineExtendedInfo + """ + + _validation = { + 'backup_engine_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + registration_status: Optional[str] = None, + backup_engine_state: Optional[str] = None, + health_status: Optional[str] = None, + can_re_register: Optional[bool] = None, + backup_engine_id: Optional[str] = None, + dpm_version: Optional[str] = None, + azure_backup_agent_version: Optional[str] = None, + is_azure_backup_agent_upgrade_available: Optional[bool] = None, + is_dpm_upgrade_available: Optional[bool] = None, + 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.activestamp.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.activestamp.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 + + +class BackupRequest(msrest.serialization.Model): + """Base class for backup request. Workload-specific backup requests are derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareBackupRequest, AzureWorkloadBackupRequest, IaasVMBackupRequest. + + 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': {'AzureFileShareBackupRequest': 'AzureFileShareBackupRequest', 'AzureWorkloadBackupRequest': 'AzureWorkloadBackupRequest', 'IaasVMBackupRequest': 'IaasVMBackupRequest'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(BackupRequest, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureFileShareBackupRequest(BackupRequest): + """AzureFileShare workload-specific backup 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_expiry_time_in_utc: Backup copy will expire after the time specified + (UTC). + :vartype recovery_point_expiry_time_in_utc: ~datetime.datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + 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 + + +class WorkloadProtectableItem(msrest.serialization.Model): + """Base class for backup item. Workload-specific backup items are derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareProtectableItem, AzureVmWorkloadProtectableItem, IaaSVMProtectableItem. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionStatus + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + } + + _subtype_map = { + 'protectable_item_type': {'AzureFileShare': 'AzureFileShareProtectableItem', 'AzureVmWorkloadProtectableItem': 'AzureVmWorkloadProtectableItem', 'IaaSVMProtectableItem': 'IaaSVMProtectableItem'} + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + 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.activestamp.models.ProtectionStatus + """ + super(WorkloadProtectableItem, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.workload_type = workload_type + self.protectable_item_type = None # type: Optional[str] + self.friendly_name = friendly_name + self.protection_state = protection_state + + +class AzureFileShareProtectableItem(WorkloadProtectableItem): + """Protectable item for Azure Fileshare workloads. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionStatus + :ivar parent_container_fabric_id: Full Fabric ID of container to which this protectable item + belongs. For example, ARM ID. + :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.activestamp.models.AzureFileShareType + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_container_fabric_id': {'key': 'parentContainerFabricId', 'type': 'str'}, + 'parent_container_friendly_name': {'key': 'parentContainerFriendlyName', 'type': 'str'}, + 'azure_file_share_type': {'key': 'azureFileShareType', 'type': 'str'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_container_fabric_id: Optional[str] = None, + parent_container_friendly_name: Optional[str] = None, + 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.activestamp.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.activestamp.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 + self.parent_container_friendly_name = parent_container_friendly_name + self.azure_file_share_type = azure_file_share_type + + +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.activestamp.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.activestamp.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.activestamp.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 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 = { + '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]'}, + 'is_archive_enabled': {'key': 'isArchiveEnabled', 'type': 'bool'}, + 'policy_name': {'key': 'policyName', '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, + 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.activestamp.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.activestamp.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.activestamp.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 + 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 + self.is_archive_enabled = is_archive_enabled + self.policy_name = policy_name + + +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.activestamp.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.activestamp.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.activestamp.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 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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.KPIResourceHealthDetails] + :ivar extended_info: Additional information with this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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, + 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, + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.KPIResourceHealthDetails] + :keyword extended_info: Additional information with this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.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 ProtectionPolicy(msrest.serialization.Model): + """Base class for backup policy. Workload-specific backup policies are derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSVMProtectionPolicy, AzureSqlProtectionPolicy, AzureFileShareProtectionPolicy, AzureVmWorkloadProtectionPolicy, GenericProtectionPolicy, MabProtectionPolicy. + + All required parameters must be populated in order to send to Azure. + + :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. + :vartype backup_management_type: str + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + } + + _subtype_map = { + 'backup_management_type': {'AzureIaasVM': 'AzureIaaSVMProtectionPolicy', 'AzureSql': 'AzureSqlProtectionPolicy', 'AzureStorage': 'AzureFileShareProtectionPolicy', 'AzureWorkload': 'AzureVmWorkloadProtectionPolicy', 'GenericProtectionPolicy': 'GenericProtectionPolicy', 'MAB': 'MabProtectionPolicy'} + } + + def __init__( + self, + *, + protected_items_count: Optional[int] = None, + 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] + self.resource_guard_operation_requests = resource_guard_operation_requests + + +class AzureFileShareProtectionPolicy(ProtectionPolicy): + """AzureStorage backup policy. + + All required parameters must be populated in order to send to Azure. + + :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. + :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". + :vartype work_load_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + :ivar schedule_policy: Backup schedule specified as part of backup policy. + :vartype schedule_policy: ~azure.mgmt.recoveryservicesbackup.activestamp.models.SchedulePolicy + :ivar retention_policy: Retention policy with the details on backup copy retention ranges. + :vartype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionPolicy + :ivar time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard + Time". + :vartype time_zone: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + def __init__( + self, + *, + protected_items_count: Optional[int] = None, + resource_guard_operation_requests: Optional[List[str]] = None, + work_load_type: Optional[Union[str, "WorkloadType"]] = None, + schedule_policy: Optional["SchedulePolicy"] = None, + retention_policy: Optional["RetentionPolicy"] = None, + 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.activestamp.models.WorkloadType + :keyword schedule_policy: Backup schedule specified as part of backup policy. + :paramtype schedule_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.SchedulePolicy + :keyword retention_policy: Retention policy with the details on backup copy retention ranges. + :paramtype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + self.schedule_policy = schedule_policy + self.retention_policy = retention_policy + self.time_zone = time_zone + + +class ILRRequest(msrest.serialization.Model): + """Parameters to Provision ILR API. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureFileShareProvisionILRRequest, IaasVMILRRegistrationRequest. + + 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': {'AzureFileShareProvisionILRRequest': 'AzureFileShareProvisionILRRequest', 'IaasVMILRRegistrationRequest': 'IaasVMILRRegistrationRequest'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ILRRequest, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureFileShareProvisionILRRequest(ILRRequest): + """Update snapshot Uri with the correct friendly Name of the source Azure file share. + + 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: Recovery point ID. + :vartype recovery_point_id: str + :ivar source_resource_id: Source Storage account ARM Id. + :vartype source_resource_id: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + recovery_point_id: Optional[str] = None, + 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 + self.source_resource_id = source_resource_id + + +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. + + 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}, + } + + _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, + *, + recovery_point_type: Optional[str] = None, + recovery_point_time: Optional[datetime.datetime] = None, + file_share_snapshot_uri: Optional[str] = None, + 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 + self.recovery_point_time = recovery_point_time + self.file_share_snapshot_uri = file_share_snapshot_uri + self.recovery_point_size_in_gb = recovery_point_size_in_gb + + +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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.RestoreFileSpecs] + :ivar target_details: Target File Share Details. + :vartype target_details: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.RestoreFileSpecs] + :keyword target_details: Target File Share Details. + :paramtype target_details: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 IaaSVMContainer(ProtectionContainer): + """IaaS VM workload-specific container. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMContainer, AzureIaaSComputeVMContainer. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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 = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + } + + _subtype_map = { + 'container_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMContainer', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMContainer'} + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + 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 + ): + """ + :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.activestamp.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 + self.resource_group = resource_group + + +class AzureIaaSClassicComputeVMContainer(IaaSVMContainer): + """IaaS VM workload-specific backup item representing a classic virtual machine. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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 = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + 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 + ): + """ + :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.activestamp.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 + + +class IaaSVMProtectableItem(WorkloadProtectableItem): + """IaaS VM workload-specific backup item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureIaaSClassicComputeVMProtectableItem, AzureIaaSComputeVMProtectableItem. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + '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 = { + 'protectable_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectableItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectableItem'} + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + 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.activestamp.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): + """IaaS VM workload-specific backup item representing the Classic Compute VM. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + '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, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + 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.activestamp.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 + + +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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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.activestamp.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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, + 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, + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + 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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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.activestamp.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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, + 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, + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + + +class AzureIaaSComputeVMContainer(IaaSVMContainer): + """IaaS VM workload-specific backup item representing an Azure Resource Manager virtual machine. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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 = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + 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 + ): + """ + :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.activestamp.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 + + +class AzureIaaSComputeVMProtectableItem(IaaSVMProtectableItem): + """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 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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + '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, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + 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.activestamp.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 + + +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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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.activestamp.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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, + 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, + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + + +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, AzureIaaSVMJobV2, AzureStorageJob, AzureWorkloadJob, DpmJob, MabJob, VaultJob. + + 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.activestamp.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', 'AzureIaaSVMJobV2': 'AzureIaaSVMJobV2', 'AzureStorageJob': 'AzureStorageJob', 'AzureWorkloadJob': 'AzureWorkloadJob', 'DpmJob': 'DpmJob', 'MabJob': 'MabJob', 'VaultJob': 'VaultJob'} + } + + 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.activestamp.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.activestamp.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.activestamp.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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 = { + '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'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'is_user_triggered': {'key': 'isUserTriggered', 'type': 'bool'}, + } + + 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, + 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.activestamp.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.activestamp.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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 + self.actions_info = actions_info + 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. + + :ivar tasks_list: List of tasks associated with this job. + :vartype tasks_list: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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. + + :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 AzureIaaSVMProtectionPolicy(ProtectionPolicy): + """IaaS VM workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :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. + :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.activestamp.models.InstantRPAdditionalDetails + :ivar schedule_policy: Backup schedule specified as part of backup policy. + :vartype schedule_policy: ~azure.mgmt.recoveryservicesbackup.activestamp.models.SchedulePolicy + :ivar retention_policy: Retention policy with the details on backup copy retention ranges. + :vartype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.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". + :vartype time_zone: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'instant_rp_details': {'key': 'instantRPDetails', 'type': 'InstantRPAdditionalDetails'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'instant_rp_retention_range_in_days': {'key': 'instantRpRetentionRangeInDays', 'type': 'int'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + def __init__( + self, + *, + protected_items_count: Optional[int] = None, + resource_guard_operation_requests: Optional[List[str]] = None, + instant_rp_details: Optional["InstantRPAdditionalDetails"] = None, + schedule_policy: Optional["SchedulePolicy"] = None, + retention_policy: Optional["RetentionPolicy"] = None, + instant_rp_retention_range_in_days: Optional[int] = None, + 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.activestamp.models.InstantRPAdditionalDetails + :keyword schedule_policy: Backup schedule specified as part of backup policy. + :paramtype schedule_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.SchedulePolicy + :keyword retention_policy: Retention policy with the details on backup copy retention ranges. + :paramtype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + self.schedule_policy = schedule_policy + self.retention_policy = retention_policy + self.instant_rp_retention_range_in_days = instant_rp_retention_range_in_days + self.time_zone = time_zone + + +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, AzureWorkloadContainerAutoProtectionIntent, AzureRecoveryServiceVaultProtectionIntent. + + 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.activestamp.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.activestamp.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.activestamp.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'}, + } + + _subtype_map = { + 'protection_intent_item_type': {'AzureResourceItem': 'AzureResourceProtectionIntent', 'AzureWorkloadContainerAutoProtectionIntent': 'AzureWorkloadContainerAutoProtectionIntent', 'RecoveryServiceVaultItem': 'AzureRecoveryServiceVaultProtectionIntent'} + } + + def __init__( + self, + *, + 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.activestamp.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.activestamp.models.ProtectionStatus + """ + super(ProtectionIntent, self).__init__(**kwargs) + self.protection_intent_item_type = None # type: Optional[str] + self.backup_management_type = backup_management_type + self.source_resource_id = source_resource_id + self.item_id = item_id + self.policy_id = policy_id + self.protection_state = protection_state + + +class AzureRecoveryServiceVaultProtectionIntent(ProtectionIntent): + """Azure Recovery Services Vault specific protection intent item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadAutoProtectionIntent. + + 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.activestamp.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.activestamp.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.activestamp.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'}, + } + + _subtype_map = { + 'protection_intent_item_type': {'AzureWorkloadAutoProtectionIntent': 'AzureWorkloadAutoProtectionIntent'} + } + + def __init__( + self, + *, + 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.activestamp.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.activestamp.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 + + +class AzureResourceProtectionIntent(ProtectionIntent): + """IaaS VM specific backup 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.activestamp.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.activestamp.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.activestamp.models.ProtectionStatus + :ivar friendly_name: Friendly name of the VM represented by this backup item. + :vartype friendly_name: str + """ + + _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'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + } + + def __init__( + self, + *, + 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, + 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.activestamp.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.activestamp.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 + + +class AzureWorkloadContainer(ProtectionContainer): + """Container for the workloads running inside Azure Compute or Classic Compute. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureSQLAGWorkloadContainerProtectionContainer, AzureVMAppContainerProtectionContainer. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.AzureWorkloadContainerExtendedInfo + :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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + :ivar operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :vartype operation_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.OperationType + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'operation_type': {'key': 'operationType', 'type': 'str'}, + } + + _subtype_map = { + 'container_type': {'SQLAGWorkLoadContainer': 'AzureSQLAGWorkloadContainerProtectionContainer', 'VMAppContainer': 'AzureVMAppContainerProtectionContainer'} + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + 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, + workload_type: Optional[Union[str, "WorkloadType"]] = None, + operation_type: Optional[Union[str, "OperationType"]] = 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.activestamp.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.activestamp.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.activestamp.models.WorkloadType + :keyword operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :paramtype operation_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + self.extended_info = extended_info + self.workload_type = workload_type + self.operation_type = operation_type + + +class AzureSQLAGWorkloadContainerProtectionContainer(AzureWorkloadContainer): + """Container for SQL workloads under SQL Availability Group. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.AzureWorkloadContainerExtendedInfo + :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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + :ivar operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :vartype operation_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.OperationType + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'operation_type': {'key': 'operationType', 'type': 'str'}, + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + 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, + workload_type: Optional[Union[str, "WorkloadType"]] = None, + operation_type: Optional[Union[str, "OperationType"]] = 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.activestamp.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.activestamp.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.activestamp.models.WorkloadType + :keyword operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :paramtype operation_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + + +class AzureSqlContainer(ProtectionContainer): + """Azure Sql workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ContainerType + :ivar protectable_object_type: Type of the protectable object associated with this container. + :vartype protectable_object_type: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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, + *, + friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + registration_status: Optional[str] = None, + health_status: Optional[str] = None, + 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.activestamp.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 + + +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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.models.ProtectedItemState + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + } + + 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, + 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 + ): + """ + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemState + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + 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 AzureSqlProtectionPolicy(ProtectionPolicy): + """Azure SQL workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :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. + :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.activestamp.models.RetentionPolicy + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__( + self, + *, + protected_items_count: Optional[int] = None, + resource_guard_operation_requests: Optional[List[str]] = None, + 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.activestamp.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 + + +class AzureStorageContainer(ProtectionContainer): + """Azure Storage Account workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AcquireStorageAccountLock + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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__( + self, + *, + friendly_name: Optional[str] = None, + 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, + 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.activestamp.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.activestamp.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. + + :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.activestamp.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.activestamp.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.AzureStorageJobExtendedInfo + :ivar is_user_triggered: Indicated that whether the job is adhoc(true) or scheduled(false). + :vartype is_user_triggered: bool + """ + + _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'}, + 'is_user_triggered': {'key': 'isUserTriggered', 'type': 'bool'}, + } + + 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, + 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.activestamp.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.activestamp.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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 + 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 + self.is_user_triggered = is_user_triggered + + +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.activestamp.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.activestamp.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 ProtectableContainer(msrest.serialization.Model): + """Protectable Container Class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureStorageProtectableContainer, AzureVMAppContainerProtectableContainer. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :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", + "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", + "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", + "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype protectable_container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ContainerType + :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 = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + } + + _subtype_map = { + 'protectable_container_type': {'StorageContainer': 'AzureStorageProtectableContainer', 'VMAppContainer': 'AzureVMAppContainerProtectableContainer'} + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + health_status: Optional[str] = None, + 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.activestamp.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 + self.protectable_container_type = None # type: Optional[str] + self.health_status = health_status + self.container_id = container_id + + +class AzureStorageProtectableContainer(ProtectableContainer): + """Azure Storage-specific protectable containers. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :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", + "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", + "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", + "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype protectable_container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ContainerType + :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 = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + health_status: Optional[str] = None, + 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.activestamp.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 + + +class AzureVMAppContainerProtectableContainer(ProtectableContainer): + """Azure workload-specific container. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :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", + "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", + "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", + "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype protectable_container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ContainerType + :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 = { + 'protectable_container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'container_id': {'key': 'containerId', 'type': 'str'}, + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + health_status: Optional[str] = None, + 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.activestamp.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 + + +class AzureVMAppContainerProtectionContainer(AzureWorkloadContainer): + """Container for SQL workloads under Azure Virtual Machines. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.AzureWorkloadContainerExtendedInfo + :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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + :ivar operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :vartype operation_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.OperationType + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'operation_type': {'key': 'operationType', 'type': 'str'}, + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + 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, + workload_type: Optional[Union[str, "WorkloadType"]] = None, + operation_type: Optional[Union[str, "OperationType"]] = 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.activestamp.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.activestamp.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.activestamp.models.WorkloadType + :keyword operation_type: Re-Do Operation. Possible values include: "Invalid", "Register", + "Reregister". + :paramtype operation_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + + +class AzureVMResourceFeatureSupportRequest(FeatureSupportRequest): + """AzureResource(IaaS VM) Specific feature support request. + + All required parameters must be populated in order to send to Azure. + + :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 = { + 'feature_type': {'required': True}, + } + + _attribute_map = { + 'feature_type': {'key': 'featureType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_sku': {'key': 'vmSku', 'type': 'str'}, + } + + def __init__( + self, + *, + vm_size: Optional[str] = None, + 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 + self.vm_sku = vm_sku + + +class AzureVMResourceFeatureSupportResponse(msrest.serialization.Model): + """Response for feature support requests for Azure IaasVm. + + :ivar support_status: Support status of feature. Possible values include: "Invalid", + "Supported", "DefaultOFF", "DefaultON", "NotSupported". + :vartype support_status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.SupportStatus + """ + + _attribute_map = { + 'support_status': {'key': 'supportStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + 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.activestamp.models.SupportStatus + """ + super(AzureVMResourceFeatureSupportResponse, self).__init__(**kwargs) + self.support_status = support_status + + +class WorkloadItem(msrest.serialization.Model): + """Base class for backup item. Workload-specific backup items are derived from this class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadItem. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionStatus + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + } + + _subtype_map = { + 'workload_item_type': {'AzureVmWorkloadItem': 'AzureVmWorkloadItem'} + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + 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.activestamp.models.ProtectionStatus + """ + super(WorkloadItem, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.workload_type = workload_type + self.workload_item_type = None # type: Optional[str] + self.friendly_name = friendly_name + self.protection_state = protection_state + + +class AzureVmWorkloadItem(WorkloadItem): + """Azure VM workload-specific workload item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadSAPAseDatabaseWorkloadItem, AzureVmWorkloadSAPAseSystemWorkloadItem, AzureVmWorkloadSAPHanaDatabaseWorkloadItem, AzureVmWorkloadSAPHanaSystemWorkloadItem, AzureVmWorkloadSQLDatabaseWorkloadItem, AzureVmWorkloadSQLInstanceWorkloadItem. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + _subtype_map = { + 'workload_item_type': {'SAPAseDatabase': 'AzureVmWorkloadSAPAseDatabaseWorkloadItem', 'SAPAseSystem': 'AzureVmWorkloadSAPAseSystemWorkloadItem', 'SAPHanaDatabase': 'AzureVmWorkloadSAPHanaDatabaseWorkloadItem', 'SAPHanaSystem': 'AzureVmWorkloadSAPHanaSystemWorkloadItem', 'SQLDataBase': 'AzureVmWorkloadSQLDatabaseWorkloadItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceWorkloadItem'} + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_name: Optional[str] = None, + server_name: Optional[str] = None, + is_auto_protectable: Optional[bool] = None, + subinquireditemcount: Optional[int] = None, + 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.activestamp.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 + self.server_name = server_name + self.is_auto_protectable = is_auto_protectable + self.subinquireditemcount = subinquireditemcount + self.sub_workload_item_count = sub_workload_item_count + + +class AzureVmWorkloadProtectableItem(WorkloadProtectableItem): + """Azure VM workload-specific protectable item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureVmWorkloadSAPAseSystemProtectableItem, AzureVmWorkloadSAPHanaDatabaseProtectableItem, AzureVmWorkloadSAPHanaSystemProtectableItem, AzureVmWorkloadSQLAvailabilityGroupProtectableItem, AzureVmWorkloadSQLDatabaseProtectableItem, AzureVmWorkloadSQLInstanceProtectableItem. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + _subtype_map = { + 'protectable_item_type': {'SAPAseSystem': 'AzureVmWorkloadSAPAseSystemProtectableItem', 'SAPHanaDatabase': 'AzureVmWorkloadSAPHanaDatabaseProtectableItem', 'SAPHanaSystem': 'AzureVmWorkloadSAPHanaSystemProtectableItem', 'SQLAvailabilityGroupContainer': 'AzureVmWorkloadSQLAvailabilityGroupProtectableItem', 'SQLDataBase': 'AzureVmWorkloadSQLDatabaseProtectableItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceProtectableItem'} + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_name: Optional[str] = None, + parent_unique_name: Optional[str] = None, + server_name: Optional[str] = None, + is_auto_protectable: Optional[bool] = None, + is_auto_protected: Optional[bool] = None, + subinquireditemcount: Optional[int] = None, + subprotectableitemcount: Optional[int] = None, + 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.activestamp.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.activestamp.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 + self.parent_unique_name = parent_unique_name + self.server_name = server_name + self.is_auto_protectable = is_auto_protectable + self.is_auto_protected = is_auto_protected + self.subinquireditemcount = subinquireditemcount + self.subprotectableitemcount = subprotectableitemcount + self.prebackupvalidation = prebackupvalidation + + +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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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, + 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, + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + 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 + :ivar recovery_model: Indicates consistency of policy object and policy applied to this backup + item. + :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, + *, + oldest_recovery_point: Optional[datetime.datetime] = None, + recovery_point_count: Optional[int] = None, + policy_state: Optional[str] = None, + 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): + """Azure VM (Mercury) workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :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. + :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". + :vartype work_load_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + :ivar settings: Common settings for the backup management. + :vartype settings: ~azure.mgmt.recoveryservicesbackup.activestamp.models.Settings + :ivar sub_protection_policy: List of sub-protection policies which includes schedule and + retention. + :vartype sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.SubProtectionPolicy] + :ivar make_policy_consistent: Fix the policy inconsistency. + :vartype make_policy_consistent: bool + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, + 'settings': {'key': 'settings', 'type': 'Settings'}, + 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, + 'make_policy_consistent': {'key': 'makePolicyConsistent', 'type': 'bool'}, + } + + def __init__( + self, + *, + protected_items_count: Optional[int] = None, + resource_guard_operation_requests: Optional[List[str]] = None, + work_load_type: Optional[Union[str, "WorkloadType"]] = None, + settings: Optional["Settings"] = None, + sub_protection_policy: Optional[List["SubProtectionPolicy"]] = None, + 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.activestamp.models.WorkloadType + :keyword settings: Common settings for the backup management. + :paramtype settings: ~azure.mgmt.recoveryservicesbackup.activestamp.models.Settings + :keyword sub_protection_policy: List of sub-protection policies which includes schedule and + retention. + :paramtype sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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 + self.settings = settings + self.sub_protection_policy = sub_protection_policy + self.make_policy_consistent = make_policy_consistent + + +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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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, + 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, + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + + +class AzureVmWorkloadSAPAseDatabaseWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SAP ASE Database. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_name: Optional[str] = None, + server_name: Optional[str] = None, + is_auto_protectable: Optional[bool] = None, + subinquireditemcount: Optional[int] = None, + 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.activestamp.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 + + +class AzureVmWorkloadSAPAseSystemProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SAP ASE System. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_name: Optional[str] = None, + parent_unique_name: Optional[str] = None, + server_name: Optional[str] = None, + is_auto_protectable: Optional[bool] = None, + is_auto_protected: Optional[bool] = None, + subinquireditemcount: Optional[int] = None, + subprotectableitemcount: Optional[int] = None, + 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.activestamp.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.activestamp.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 + + +class AzureVmWorkloadSAPAseSystemWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SAP ASE System. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_name: Optional[str] = None, + server_name: Optional[str] = None, + is_auto_protectable: Optional[bool] = None, + subinquireditemcount: Optional[int] = None, + 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.activestamp.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 + + +class AzureVmWorkloadSAPHanaDatabaseProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SAP HANA Database. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_name: Optional[str] = None, + parent_unique_name: Optional[str] = None, + server_name: Optional[str] = None, + is_auto_protectable: Optional[bool] = None, + is_auto_protected: Optional[bool] = None, + subinquireditemcount: Optional[int] = None, + subprotectableitemcount: Optional[int] = None, + 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.activestamp.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.activestamp.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 + + +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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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, + 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, + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + + +class AzureVmWorkloadSAPHanaDatabaseWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SAP HANA Database. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_name: Optional[str] = None, + server_name: Optional[str] = None, + is_auto_protectable: Optional[bool] = None, + subinquireditemcount: Optional[int] = None, + 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.activestamp.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 + + +class AzureVmWorkloadSAPHanaSystemProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SAP HANA System. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_name: Optional[str] = None, + parent_unique_name: Optional[str] = None, + server_name: Optional[str] = None, + is_auto_protectable: Optional[bool] = None, + is_auto_protected: Optional[bool] = None, + subinquireditemcount: Optional[int] = None, + subprotectableitemcount: Optional[int] = None, + 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.activestamp.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.activestamp.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 + + +class AzureVmWorkloadSAPHanaSystemWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SAP HANA System. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_name: Optional[str] = None, + server_name: Optional[str] = None, + is_auto_protectable: Optional[bool] = None, + subinquireditemcount: Optional[int] = None, + 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.activestamp.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 + + +class AzureVmWorkloadSQLAvailabilityGroupProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Availability Group. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_name: Optional[str] = None, + parent_unique_name: Optional[str] = None, + server_name: Optional[str] = None, + is_auto_protectable: Optional[bool] = None, + is_auto_protected: Optional[bool] = None, + subinquireditemcount: Optional[int] = None, + subprotectableitemcount: Optional[int] = None, + 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.activestamp.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.activestamp.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 + + +class AzureVmWorkloadSQLDatabaseProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_name: Optional[str] = None, + parent_unique_name: Optional[str] = None, + server_name: Optional[str] = None, + is_auto_protectable: Optional[bool] = None, + is_auto_protected: Optional[bool] = None, + subinquireditemcount: Optional[int] = None, + subprotectableitemcount: Optional[int] = None, + 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.activestamp.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.activestamp.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 + + +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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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, + 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, + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + + +class AzureVmWorkloadSQLDatabaseWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SQL Database. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_name: Optional[str] = None, + server_name: Optional[str] = None, + is_auto_protectable: Optional[bool] = None, + subinquireditemcount: Optional[int] = None, + 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.activestamp.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 + + +class AzureVmWorkloadSQLInstanceProtectableItem(AzureVmWorkloadProtectableItem): + """Azure VM workload-specific protectable item representing SQL Instance. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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.activestamp.models.PreBackupValidation + """ + + _validation = { + 'protectable_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, + 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_name: Optional[str] = None, + parent_unique_name: Optional[str] = None, + server_name: Optional[str] = None, + is_auto_protectable: Optional[bool] = None, + is_auto_protected: Optional[bool] = None, + subinquireditemcount: Optional[int] = None, + subprotectableitemcount: Optional[int] = None, + 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.activestamp.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.activestamp.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 + + +class AzureVmWorkloadSQLInstanceWorkloadItem(AzureVmWorkloadItem): + """Azure VM workload-specific workload item representing SQL Instance. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.SQLDataDirectory] + """ + + _validation = { + 'workload_item_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'protection_state': {'key': 'protectionState', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, + 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, + 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, + 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[str] = None, + workload_type: Optional[str] = None, + friendly_name: Optional[str] = None, + protection_state: Optional[Union[str, "ProtectionStatus"]] = None, + parent_name: Optional[str] = None, + server_name: Optional[str] = None, + is_auto_protectable: Optional[bool] = None, + subinquireditemcount: Optional[int] = None, + sub_workload_item_count: Optional[int] = None, + 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.activestamp.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.activestamp.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 + + +class AzureWorkloadAutoProtectionIntent(AzureRecoveryServiceVaultProtectionIntent): + """Azure Recovery Services Vault specific protection intent item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLAutoProtectionIntent. + + 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.activestamp.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.activestamp.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.activestamp.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'}, + } + + _subtype_map = { + 'protection_intent_item_type': {'AzureWorkloadSQLAutoProtectionIntent': 'AzureWorkloadSQLAutoProtectionIntent'} + } + + def __init__( + self, + *, + 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.activestamp.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.activestamp.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 + + +class AzureWorkloadBackupRequest(BackupRequest): + """AzureWorkload workload-specific backup 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 backup_type: Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible + values include: "Invalid", "Full", "Differential", "Log", "CopyOnlyFull", "Incremental". + :vartype backup_type: str or ~azure.mgmt.recoveryservicesbackup.activestamp.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). + :vartype recovery_point_expiry_time_in_utc: ~datetime.datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + 'enable_compression': {'key': 'enableCompression', 'type': 'bool'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + backup_type: Optional[Union[str, "BackupType"]] = None, + enable_compression: Optional[bool] = None, + 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.activestamp.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 + self.enable_compression = enable_compression + self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc + + +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.activestamp.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.activestamp.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.activestamp.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, + *, + 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.activestamp.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.activestamp.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.activestamp.models.InquiryInfo + :ivar nodes_list: List of the nodes in case of distributed container. + :vartype nodes_list: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.InquiryInfo + :keyword nodes_list: List of the nodes in case of distributed container. + :paramtype nodes_list: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.DistributedNodesInfo] + """ + super(AzureWorkloadContainerExtendedInfo, self).__init__(**kwargs) + self.host_server_name = host_server_name + self.inquiry_info = inquiry_info + self.nodes_list = nodes_list + + +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.activestamp.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.activestamp.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureWorkloadErrorInfo] + :ivar extended_info: Additional information about the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.AzureWorkloadErrorInfo] + :keyword extended_info: Additional information about the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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. + + 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.activestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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': '[RecoveryPointTierInformationV2]'}, + 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadPointInTimeRecoveryPoint': 'AzureWorkloadPointInTimeRecoveryPoint', 'AzureWorkloadSAPHanaRecoveryPoint': 'AzureWorkloadSAPHanaRecoveryPoint', 'AzureWorkloadSQLRecoveryPoint': 'AzureWorkloadSQLRecoveryPoint'} + } + + def __init__( + self, + *, + 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 + ): + """ + :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.activestamp.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointMoveReadinessInfo] + """ + super(AzureWorkloadRecoveryPoint, self).__init__(**kwargs) + self.object_type = 'AzureWorkloadRecoveryPoint' # type: str + self.recovery_point_time_in_utc = recovery_point_time_in_utc + self.type = type + 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. + + 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.activestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointMoveReadinessInfo] + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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': '[RecoveryPointTierInformationV2]'}, + '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["RecoveryPointTierInformationV2"]] = None, + recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = 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.activestamp.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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 + + +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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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. + + 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.activestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointMoveReadinessInfo] + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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': '[RecoveryPointTierInformationV2]'}, + '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["RecoveryPointTierInformationV2"]] = None, + recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = 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.activestamp.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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 + + +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, AzureWorkloadSAPHanaRestoreWithRehydrateRequest. + + 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.activestamp.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.activestamp.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.activestamp.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', 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest': 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest'} + } + + 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.activestamp.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.activestamp.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.activestamp.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. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. + + All required parameters must be populated in order to send to Azure. + + :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.activestamp.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.activestamp.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.activestamp.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'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest'} + } + + 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.activestamp.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.activestamp.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.activestamp.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 AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSAPHanaPointInTimeRestoreRequest): + """AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. + + All required parameters must be populated in order to send to Azure. + + :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.activestamp.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.activestamp.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.activestamp.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 + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__( + self, + *, + recovery_type: 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, + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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 + + +class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): + """SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints. + + 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.activestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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': '[RecoveryPointTierInformationV2]'}, + '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["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.activestamp.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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 + + +class AzureWorkloadSAPHanaRestoreWithRehydrateRequest(AzureWorkloadSAPHanaRestoreRequest): + """AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. + + All required parameters must be populated in order to send to Azure. + + :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.activestamp.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.activestamp.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.activestamp.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 recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__( + self, + *, + recovery_type: 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, + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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 + + +class AzureWorkloadSQLAutoProtectionIntent(AzureWorkloadAutoProtectionIntent): + """Azure Workload SQL Auto 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.activestamp.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.activestamp.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.activestamp.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". + :vartype workload_item_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadItemType + """ + + _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'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + } + + def __init__( + self, + *, + 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, + 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.activestamp.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.activestamp.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.activestamp.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 + + +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. + + 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.activestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.AzureWorkloadSQLRecoveryPointExtendedInfo + """ + + _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': '[RecoveryPointTierInformationV2]'}, + '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_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, + 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.activestamp.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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 + + +class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): + """Recovery point specific to PointInTime. + + 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.activestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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': '[RecoveryPointTierInformationV2]'}, + '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_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, + 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.activestamp.models.RestorePointType + :keyword recovery_point_tier_details: Recovery point tier information. + :paramtype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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 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, AzureWorkloadSQLRestoreWithRehydrateRequest. + + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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', 'AzureWorkloadSQLRestoreWithRehydrateRequest': 'AzureWorkloadSQLRestoreWithRehydrateRequest'} + } + + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. + + All required parameters must be populated in order to send to Azure. + + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.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'}, + } + + _subtype_map = { + 'object_type': {'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest': 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest'} + } + + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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 AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSQLPointInTimeRestoreRequest): + """AzureWorkload SQL-specific restore with integrated rehydration of 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 recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.models.SQLDataDirectoryMapping] + :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.activestamp.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__( + self, + *, + recovery_type: 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, + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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 + + +class AzureWorkloadSQLRecoveryPointExtendedInfo(msrest.serialization.Model): + """Extended info class details. + + :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.activestamp.models.SQLDataDirectory] + """ + + _attribute_map = { + 'data_directory_time_in_utc': {'key': 'dataDirectoryTimeInUTC', 'type': 'iso-8601'}, + 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, + } + + def __init__( + self, + *, + data_directory_time_in_utc: Optional[datetime.datetime] = None, + 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.activestamp.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 AzureWorkloadSQLRestoreWithRehydrateRequest(AzureWorkloadSQLRestoreRequest): + """AzureWorkload SQL-specific restore with integrated rehydration of 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 recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :vartype recovery_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.models.SQLDataDirectoryMapping] + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, + 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, + 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, + 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + def __init__( + self, + *, + recovery_type: 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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.SQLDataDirectoryMapping] + :keyword recovery_point_rehydration_info: RP Rehydration Info. + :paramtype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + ): + """ + :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): + """The base backup engine class. All workload specific backup engines derive 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: BackupEngineBaseResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupEngineBase + """ + + _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': 'BackupEngineBase'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.BackupEngineBase + """ + super(BackupEngineBaseResource, 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 BackupEngineBaseResourceList(ResourceList): + """List of BackupEngineBase 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.activestamp.models.BackupEngineBaseResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BackupEngineBaseResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + 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.activestamp.models.BackupEngineBaseResource] + """ + super(BackupEngineBaseResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class BackupEngineExtendedInfo(msrest.serialization.Model): + """Additional information on backup engine. + + :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 = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'protected_servers_count': {'key': 'protectedServersCount', 'type': 'int'}, + 'disk_count': {'key': 'diskCount', 'type': 'int'}, + 'used_disk_space': {'key': 'usedDiskSpace', 'type': 'float'}, + 'available_disk_space': {'key': 'availableDiskSpace', 'type': 'float'}, + 'refreshed_at': {'key': 'refreshedAt', 'type': 'iso-8601'}, + 'azure_protected_instances': {'key': 'azureProtectedInstances', 'type': 'int'}, + } + + def __init__( + self, + *, + database_name: Optional[str] = None, + protected_items_count: Optional[int] = None, + protected_servers_count: Optional[int] = None, + disk_count: Optional[int] = None, + used_disk_space: Optional[float] = None, + available_disk_space: Optional[float] = None, + refreshed_at: Optional[datetime.datetime] = None, + 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 + self.protected_servers_count = protected_servers_count + self.disk_count = disk_count + self.used_disk_space = used_disk_space + self.available_disk_space = available_disk_space + self.refreshed_at = refreshed_at + self.azure_protected_instances = azure_protected_instances + + +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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.BackupManagementUsage] + """ + super(BackupManagementUsageList, self).__init__(**kwargs) + self.value = value + + +class BackupRequestResource(Resource): + """Base class for backup request. Workload-specific backup requests 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: BackupRequestResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupRequest + """ + + _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': 'BackupRequest'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.BackupRequest + """ + super(BackupRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +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.activestamp.models.StorageType + :ivar storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :vartype storage_type: str or ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.DedupState + :ivar xcool_state: Vault x-cool state. Possible values include: "Invalid", "Enabled", + "Disabled". + :vartype xcool_state: str or ~azure.mgmt.recoveryservicesbackup.activestamp.models.XcoolState + """ + + _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'}, + 'dedup_state': {'key': 'dedupState', 'type': 'str'}, + 'xcool_state': {'key': 'xcoolState', 'type': 'str'}, + } + + 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, + 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.activestamp.models.StorageType + :keyword storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.DedupState + :keyword xcool_state: Vault x-cool state. Possible values include: "Invalid", "Enabled", + "Disabled". + :paramtype xcool_state: str or ~azure.mgmt.recoveryservicesbackup.activestamp.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): + """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.activestamp.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.activestamp.models.BackupResourceConfig + """ + super(BackupResourceConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class BackupResourceEncryptionConfig(msrest.serialization.Model): + """BackupResourceEncryptionConfig. + + :ivar encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", + "MicrosoftManaged", "CustomerManaged". + :vartype encryption_at_rest_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.EncryptionAtRestType + :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". + :vartype last_update_status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.LastUpdateStatus + :ivar infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + "Enabled". + :vartype infrastructure_encryption_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.InfrastructureEncryptionState + """ + + _attribute_map = { + 'encryption_at_rest_type': {'key': 'encryptionAtRestType', 'type': 'str'}, + 'key_uri': {'key': 'keyUri', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'last_update_status': {'key': 'lastUpdateStatus', 'type': 'str'}, + 'infrastructure_encryption_state': {'key': 'infrastructureEncryptionState', 'type': 'str'}, + } + + def __init__( + self, + *, + encryption_at_rest_type: Optional[Union[str, "EncryptionAtRestType"]] = None, + key_uri: Optional[str] = None, + subscription_id: Optional[str] = None, + last_update_status: Optional[Union[str, "LastUpdateStatus"]] = None, + 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.activestamp.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.activestamp.models.LastUpdateStatus + :keyword infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + "Enabled". + :paramtype infrastructure_encryption_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.InfrastructureEncryptionState + """ + super(BackupResourceEncryptionConfig, self).__init__(**kwargs) + self.encryption_at_rest_type = encryption_at_rest_type + self.key_uri = key_uri + self.subscription_id = subscription_id + self.last_update_status = last_update_status + self.infrastructure_encryption_state = infrastructure_encryption_state + + +class BackupResourceEncryptionConfigExtended(BackupResourceEncryptionConfig): + """BackupResourceEncryptionConfigExtended. + + :ivar encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", + "MicrosoftManaged", "CustomerManaged". + :vartype encryption_at_rest_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.EncryptionAtRestType + :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". + :vartype last_update_status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.LastUpdateStatus + :ivar infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + "Enabled". + :vartype infrastructure_encryption_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.InfrastructureEncryptionState + :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 = { + 'encryption_at_rest_type': {'key': 'encryptionAtRestType', 'type': 'str'}, + 'key_uri': {'key': 'keyUri', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'last_update_status': {'key': 'lastUpdateStatus', 'type': 'str'}, + 'infrastructure_encryption_state': {'key': 'infrastructureEncryptionState', 'type': 'str'}, + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + 'use_system_assigned_identity': {'key': 'useSystemAssignedIdentity', 'type': 'bool'}, + } + + def __init__( + self, + *, + encryption_at_rest_type: Optional[Union[str, "EncryptionAtRestType"]] = None, + key_uri: Optional[str] = None, + subscription_id: Optional[str] = None, + last_update_status: Optional[Union[str, "LastUpdateStatus"]] = None, + infrastructure_encryption_state: Optional[Union[str, "InfrastructureEncryptionState"]] = None, + user_assigned_identity: Optional[str] = None, + 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.activestamp.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.activestamp.models.LastUpdateStatus + :keyword infrastructure_encryption_state: Possible values include: "Invalid", "Disabled", + "Enabled". + :paramtype infrastructure_encryption_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + + +class BackupResourceEncryptionConfigExtendedResource(Resource): + """BackupResourceEncryptionConfigExtendedResource. + + 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: BackupResourceEncryptionConfigExtendedResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupResourceEncryptionConfigExtended + """ + + _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': 'BackupResourceEncryptionConfigExtended'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.BackupResourceEncryptionConfigExtended + """ + super(BackupResourceEncryptionConfigExtendedResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class BackupResourceEncryptionConfigResource(Resource): + """BackupResourceEncryptionConfigResource. + + 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: BackupResourceEncryptionConfigResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupResourceEncryptionConfig + """ + + _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': 'BackupResourceEncryptionConfig'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.BackupResourceEncryptionConfig + """ + super(BackupResourceEncryptionConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class BackupResourceVaultConfig(msrest.serialization.Model): + """Backup resource vault config details. + + :ivar storage_model_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :vartype storage_model_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.StorageType + :ivar storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :vartype storage_type: str or ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.StorageTypeState + :ivar enhanced_security_state: Enabled or Disabled. Possible values include: "Invalid", + "Enabled", "Disabled". + :vartype enhanced_security_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.EnhancedSecurityState + :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.activestamp.models.SoftDeleteFeatureState + :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 = { + 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'}, + 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, + 'enhanced_security_state': {'key': 'enhancedSecurityState', 'type': 'str'}, + 'soft_delete_feature_state': {'key': 'softDeleteFeatureState', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'is_soft_delete_feature_state_editable': {'key': 'isSoftDeleteFeatureStateEditable', '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, + 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, + 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.activestamp.models.StorageType + :keyword storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.StorageTypeState + :keyword enhanced_security_state: Enabled or Disabled. Possible values include: "Invalid", + "Enabled", "Disabled". + :paramtype enhanced_security_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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 + self.storage_type_state = storage_type_state + 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): + """Backup resource vault config details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :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.activestamp.models.BackupResourceVaultConfig + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BackupResourceVaultConfig'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.BackupResourceVaultConfig + """ + super(BackupResourceVaultConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class BackupStatusRequest(msrest.serialization.Model): + """BackupStatus request. + + :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". + :vartype resource_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'po_logical_name': {'key': 'poLogicalName', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_type: Optional[Union[str, "DataSourceType"]] = None, + resource_id: Optional[str] = None, + 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.activestamp.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 + self.po_logical_name = po_logical_name + + +class BackupStatusResponse(msrest.serialization.Model): + """BackupStatus response. + + :ivar protection_status: Specifies whether the container is registered or not. Possible values + include: "Invalid", "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :vartype protection_status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.FabricName + :ivar container_name: Specifies the product specific container name. E.g. + iaasvmcontainer;iaasvmcontainer;csname;vmname. + :vartype container_name: str + :ivar protected_item_name: Specifies the product specific ds name. E.g. + vm;iaasvmcontainer;csname;vmname. + :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 = { + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + protection_status: Optional[Union[str, "ProtectionStatus"]] = None, + vault_id: Optional[str] = None, + fabric_name: Optional[Union[str, "FabricName"]] = None, + container_name: Optional[str] = None, + protected_item_name: Optional[str] = None, + error_code: Optional[str] = None, + error_message: Optional[str] = None, + policy_name: Optional[str] = None, + 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.activestamp.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.activestamp.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 + self.fabric_name = fabric_name + self.container_name = container_name + self.protected_item_name = protected_item_name + self.error_code = error_code + self.error_message = error_message + self.policy_name = policy_name + self.registration_status = registration_status + + +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 BMSBackupEngineQueryObject(msrest.serialization.Model): + """Query parameters to fetch list of backup engines. + + :ivar expand: attribute to add extended info. + :vartype expand: str + """ + + _attribute_map = { + 'expand': {'key': 'expand', 'type': 'str'}, + } + + def __init__( + self, + *, + expand: Optional[str] = None, + **kwargs + ): + """ + :keyword expand: attribute to add extended info. + :paramtype expand: str + """ + super(BMSBackupEngineQueryObject, self).__init__(**kwargs) + self.expand = expand + + +class BMSBackupEnginesQueryObject(msrest.serialization.Model): + """Query parameters to fetch list of backup engines. + + :ivar backup_management_type: Backup management type for the backup engine. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :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 = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'expand': {'key': 'expand', 'type': 'str'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + friendly_name: Optional[str] = None, + 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.activestamp.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 + self.expand = expand + + +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.activestamp.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.activestamp.models.Type + """ + super(BMSBackupSummariesQueryObject, self).__init__(**kwargs) + self.type = type + + +class BMSContainerQueryObject(msrest.serialization.Model): + """The query filters that can be used with the list containers API. + + All required parameters must be populated in order to send to Azure. + + :ivar backup_management_type: Required. Backup management type for this container. Possible + values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :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". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + } + + def __init__( + self, + *, + backup_management_type: Union[str, "BackupManagementType"], + container_type: Optional[Union[str, "ContainerType"]] = None, + backup_engine_name: Optional[str] = None, + fabric_name: Optional[str] = None, + status: Optional[str] = None, + 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.activestamp.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.activestamp.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 + self.backup_engine_name = backup_engine_name + self.fabric_name = fabric_name + self.status = status + self.friendly_name = friendly_name + + +class BMSContainersInquiryQueryObject(msrest.serialization.Model): + """The query filters that can be used with the inquire container API. + + :ivar backup_management_type: Backup management type for this container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + 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.activestamp.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.activestamp.models.WorkloadType + """ + super(BMSContainersInquiryQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.workload_type = workload_type + + +class BMSPOQueryObject(msrest.serialization.Model): + """Filters to list items that can be backed up. + + :ivar backup_management_type: Backup management type. Possible values include: "Invalid", + "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", + "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar workload_type: Workload type. 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.activestamp.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 = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + workload_type: Optional[Union[str, "WorkloadType"]] = None, + container_name: Optional[str] = None, + status: Optional[str] = None, + 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.activestamp.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.activestamp.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 + self.container_name = container_name + self.status = status + self.friendly_name = friendly_name + + +class BMSRefreshContainersQueryObject(msrest.serialization.Model): + """The query filters that can be used with the refresh container API. + + :ivar backup_management_type: Backup management type for this container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 this container. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :paramtype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + """ + super(BMSRefreshContainersQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_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.activestamp.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.activestamp.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 BMSWorkloadItemQueryObject(msrest.serialization.Model): + """Filters to list items that can be backed up. + + :ivar backup_management_type: Backup management type. Possible values include: "Invalid", + "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", + "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar workload_item_type: Workload Item type. Possible values include: "Invalid", + "SQLInstance", "SQLDataBase", "SAPHanaSystem", "SAPHanaDatabase", "SAPAseSystem", + "SAPAseDatabase". + :vartype workload_item_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + :ivar protection_status: Backup status query parameter. Possible values include: "Invalid", + "NotProtected", "Protecting", "Protected", "ProtectionFailed". + :vartype protection_status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionStatus + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + workload_item_type: Optional[Union[str, "WorkloadItemType"]] = None, + workload_type: Optional[Union[str, "WorkloadType"]] = None, + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectionStatus + """ + super(BMSWorkloadItemQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.workload_item_type = workload_item_type + self.workload_type = workload_type + self.protection_status = protection_status + + +class ClientDiscoveryDisplay(msrest.serialization.Model): + """Localized display information of an operation. + + :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 = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + 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 + self.operation = operation + self.description = description + + +class ClientDiscoveryForLogSpecification(msrest.serialization.Model): + """Class to represent shoebox log specification in json client discovery. + + :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 = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + 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 + self.blob_duration = blob_duration + + +class ClientDiscoveryForProperties(msrest.serialization.Model): + """Class to represent shoebox properties in json client discovery. + + :ivar service_specification: Operation properties. + :vartype service_specification: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ClientDiscoveryForServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, + } + + def __init__( + self, + *, + service_specification: Optional["ClientDiscoveryForServiceSpecification"] = None, + **kwargs + ): + """ + :keyword service_specification: Operation properties. + :paramtype service_specification: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ClientDiscoveryForServiceSpecification + """ + super(ClientDiscoveryForProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class ClientDiscoveryForServiceSpecification(msrest.serialization.Model): + """Class to represent shoebox service specification in json client discovery. + + :ivar log_specifications: List of log specifications of this operation. + :vartype log_specifications: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ClientDiscoveryForLogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, + } + + def __init__( + self, + *, + log_specifications: Optional[List["ClientDiscoveryForLogSpecification"]] = None, + **kwargs + ): + """ + :keyword log_specifications: List of log specifications of this operation. + :paramtype log_specifications: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ClientDiscoveryForLogSpecification] + """ + super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications + + +class ClientDiscoveryResponse(msrest.serialization.Model): + """Operations List response which contains list of available APIs. + + :ivar value: List of available operations. + :vartype value: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ClientDiscoveryValueForSingleApi] + :ivar next_link: Link to the next chunk of Response. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ClientDiscoveryValueForSingleApi]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ClientDiscoveryValueForSingleApi"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of available operations. + :paramtype value: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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 + + +class ClientDiscoveryValueForSingleApi(msrest.serialization.Model): + """Available operation details. + + :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.activestamp.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. + :vartype origin: str + :ivar properties: ShoeBox properties for the given operation. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ClientDiscoveryForProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional["ClientDiscoveryDisplay"] = None, + origin: Optional[str] = None, + 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.activestamp.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.activestamp.models.ClientDiscoveryForProperties + """ + super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + + +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 CloudErrorBody(msrest.serialization.Model): + """An error response from the Container Instance service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for display in a user + interface. + :vartype message: str + :ivar target: The target of the particular error. For example, the name of the property in + error. + :vartype target: str + :ivar details: A list of additional details about the error. + :vartype details: list[~azure.mgmt.recoveryservicesbackup.activestamp.models.CloudErrorBody] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(CloudErrorBody, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ContainerIdentityInfo(msrest.serialization.Model): + """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 = { + '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 + ): + """ + :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. + + :ivar days_of_the_month: List of days of the month. + :vartype days_of_the_month: list[~azure.mgmt.recoveryservicesbackup.activestamp.models.Day] + """ + + _attribute_map = { + 'days_of_the_month': {'key': 'daysOfTheMonth', 'type': '[Day]'}, + } + + def __init__( + self, + *, + 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.activestamp.models.Day] + """ + super(DailyRetentionFormat, self).__init__(**kwargs) + self.days_of_the_month = days_of_the_month + + +class DailyRetentionSchedule(msrest.serialization.Model): + """Daily retention schedule. + + :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.activestamp.models.RetentionDuration + """ + + _attribute_map = { + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__( + self, + *, + retention_times: Optional[List[datetime.datetime]] = None, + 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.activestamp.models.RetentionDuration + """ + super(DailyRetentionSchedule, self).__init__(**kwargs) + self.retention_times = retention_times + self.retention_duration = retention_duration + + +class Day(msrest.serialization.Model): + """Day of the week. + + :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 = { + 'date': {'key': 'date', 'type': 'int'}, + 'is_last': {'key': 'isLast', 'type': 'bool'}, + } + + def __init__( + self, + *, + date: Optional[int] = None, + 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 + + +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 DistributedNodesInfo(msrest.serialization.Model): + """This is used to represent the various nodes of the distributed container. + + :ivar node_name: Name of the node under a distributed container. + :vartype node_name: str + :ivar status: Status of this Node. + Failed | Succeeded. + :vartype status: str + :ivar error_detail: Error Details if the Status is non-success. + :vartype error_detail: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ErrorDetail + """ + + _attribute_map = { + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + node_name: Optional[str] = None, + status: Optional[str] = None, + 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.activestamp.models.ErrorDetail + """ + super(DistributedNodesInfo, self).__init__(**kwargs) + self.node_name = node_name + self.status = status + self.error_detail = error_detail + + +class DpmBackupEngine(BackupEngineBase): + """Data Protection Manager (DPM) specific backup engine. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Registration 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}. + :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". + :vartype backup_engine_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupEngineType + :ivar can_re_register: Flag indicating if the backup engine be registered, once already + registered. + :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.activestamp.models.BackupEngineExtendedInfo + """ + + _validation = { + 'backup_engine_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, + 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, + 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, + 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, + 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, + 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, + 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, + 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + registration_status: Optional[str] = None, + backup_engine_state: Optional[str] = None, + health_status: Optional[str] = None, + can_re_register: Optional[bool] = None, + backup_engine_id: Optional[str] = None, + dpm_version: Optional[str] = None, + azure_backup_agent_version: Optional[str] = None, + is_azure_backup_agent_upgrade_available: Optional[bool] = None, + is_dpm_upgrade_available: Optional[bool] = None, + 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.activestamp.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.activestamp.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 + + +class DPMContainerExtendedInfo(msrest.serialization.Model): + """Additional information of the DPMContainer. + + :ivar last_refreshed_at: Last refresh time of the DPMContainer. + :vartype last_refreshed_at: ~datetime.datetime + """ + + _attribute_map = { + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + 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 + + +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.activestamp.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.activestamp.models.JobSupportedAction] + :ivar error_details: The errors. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.DpmErrorInfo] + :ivar extended_info: Additional information for this job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.JobSupportedAction] + :keyword error_details: The errors. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.DpmErrorInfo] + :keyword extended_info: Additional information for this job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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 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". + :vartype protection_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectedItemState + :ivar extended_info: Extended info of the backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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]'}, + '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'}, + '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, + 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 + ): + """ + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemState + :keyword extended_info: Extended info of the backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + 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 OperationResultInfoBase(msrest.serialization.Model): + """Base class for operation result info. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ExportJobsOperationResultInfo, OperationResultInfo. + + 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': {'ExportJobsOperationResultInfo': 'ExportJobsOperationResultInfo', 'OperationResultInfo': 'OperationResultInfo'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(OperationResultInfoBase, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class ExportJobsOperationResultInfo(OperationResultInfoBase): + """This class is used to send blob details after exporting 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 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 = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'blob_url': {'key': 'blobUrl', 'type': 'str'}, + 'blob_sas_key': {'key': 'blobSasKey', 'type': 'str'}, + 'excel_file_blob_url': {'key': 'excelFileBlobUrl', 'type': 'str'}, + 'excel_file_blob_sas_key': {'key': 'excelFileBlobSasKey', 'type': 'str'}, + } + + def __init__( + self, + *, + blob_url: Optional[str] = None, + blob_sas_key: Optional[str] = None, + excel_file_blob_url: Optional[str] = None, + 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 + self.blob_sas_key = blob_sas_key + self.excel_file_blob_url = excel_file_blob_url + self.excel_file_blob_sas_key = excel_file_blob_sas_key + + +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.activestamp.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.activestamp.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): + """Base class for generic container of backup items. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.GenericContainerExtendedInfo + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + 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 + ): + """ + :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.activestamp.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.activestamp.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 + + +class GenericContainerExtendedInfo(msrest.serialization.Model): + """Container extended information. + + :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.activestamp.models.ContainerIdentityInfo + :ivar service_endpoints: Azure Backup Service Endpoints for the container. + :vartype service_endpoints: dict[str, str] + """ + + _attribute_map = { + 'raw_cert_data': {'key': 'rawCertData', 'type': 'str'}, + 'container_identity_info': {'key': 'containerIdentityInfo', 'type': 'ContainerIdentityInfo'}, + 'service_endpoints': {'key': 'serviceEndpoints', 'type': '{str}'}, + } + + def __init__( + self, + *, + raw_cert_data: Optional[str] = None, + container_identity_info: Optional["ContainerIdentityInfo"] = None, + 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.activestamp.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 + self.service_endpoints = service_endpoints + + +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.activestamp.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.activestamp.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.activestamp.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 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. + :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.activestamp.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]'}, + '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'}, + '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, + 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, + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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 + self.protection_state = protection_state + self.protected_item_id = protected_item_id + self.source_associations = source_associations + self.fabric_name = fabric_name + + +class GenericProtectionPolicy(ProtectionPolicy): + """Azure VM (Mercury) workload-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :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. + :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. + :vartype sub_protection_policy: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.SubProtectionPolicy] + :ivar time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard + Time". + :vartype time_zone: str + :ivar fabric_name: Name of this policy's fabric. + :vartype fabric_name: str + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + } + + def __init__( + self, + *, + protected_items_count: Optional[int] = None, + resource_guard_operation_requests: Optional[List[str]] = None, + sub_protection_policy: Optional[List["SubProtectionPolicy"]] = None, + time_zone: Optional[str] = None, + 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.activestamp.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 + self.time_zone = time_zone + 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 GetProtectedItemQueryObject(msrest.serialization.Model): + """Filters to list backup items. + + :ivar expand: Specifies if the additional information should be provided for this item. + :vartype expand: str + """ + + _attribute_map = { + 'expand': {'key': 'expand', 'type': 'str'}, + } + + def __init__( + self, + *, + 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. + + :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_expiry_time_in_utc: Backup copy will expire after the time specified + (UTC). + :vartype recovery_point_expiry_time_in_utc: ~datetime.datetime + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + 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 + + +class IaasVMILRRegistrationRequest(ILRRequest): + """Restore files/folders from a backup copy of IaaS VM. + + 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 IaaS VM backup copy from where the files/folders have to be + restored. + :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. + :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. + :vartype renew_existing_registration: bool + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + '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, + *, + recovery_point_id: Optional[str] = None, + virtual_machine_id: Optional[str] = None, + initiator_name: Optional[str] = None, + 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 + self.virtual_machine_id = virtual_machine_id + self.initiator_name = initiator_name + self.renew_existing_registration = renew_existing_registration + + +class IaasVMRecoveryPoint(RecoveryPoint): + """IaaS VM workload specific 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 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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': '[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_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, + 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 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.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. + + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.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'}, + } + + _subtype_map = { + 'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'} + } + + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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 IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest): + """IaaS VM workload-specific restore with integrated rehydration of recovery point. + + All required parameters must be populated in order to send to Azure. + + :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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.IdentityBasedRestoreDetails + :ivar recovery_point_rehydration_info: RP Rehydration Info. + :vartype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RecoveryPointRehydrationInfo + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, + 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, + 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, + 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, + 'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'}, + 'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'}, + 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'}, + 'identity_based_restore_details': {'key': 'identityBasedRestoreDetails', 'type': 'IdentityBasedRestoreDetails'}, + 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, + } + + 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, + recovery_point_rehydration_info: Optional["RecoveryPointRehydrationInfo"] = 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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.IdentityBasedRestoreDetails + :keyword recovery_point_rehydration_info: RP Rehydration Info. + :paramtype recovery_point_rehydration_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + + +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 ILRRequestResource(Resource): + """Parameters to Provision ILR API. + + 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: ILRRequestResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ILRRequest + """ + + _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': 'ILRRequest'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.ILRRequest + """ + super(ILRRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class InquiryInfo(msrest.serialization.Model): + """Details about inquired protectable items under a given container. + + :ivar status: Inquiry Status for this container such as + InProgress | Failed | Succeeded. + :vartype status: str + :ivar error_detail: Error Details if the Status is non-success. + :vartype error_detail: ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :vartype inquiry_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadInquiryDetails] + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + 'inquiry_details': {'key': 'inquiryDetails', 'type': '[WorkloadInquiryDetails]'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + error_detail: Optional["ErrorDetail"] = None, + 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.activestamp.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.activestamp.models.WorkloadInquiryDetails] + """ + super(InquiryInfo, self).__init__(**kwargs) + self.status = status + self.error_detail = error_detail + self.inquiry_details = inquiry_details + + +class InquiryValidation(msrest.serialization.Model): + """Validation for inquired protectable items under a given container. + + Variables are only populated by the server, and will be ignored when sending a request. + + :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.activestamp.models.ErrorDetail + :ivar additional_detail: Error Additional Detail in case the status is non-success. + :vartype additional_detail: str + """ + + _validation = { + 'additional_detail': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, + 'additional_detail': {'key': 'additionalDetail', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + 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.activestamp.models.ErrorDetail + """ + super(InquiryValidation, self).__init__(**kwargs) + self.status = status + self.error_detail = error_detail + self.additional_detail = 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.activestamp.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.activestamp.models.ClientScriptForConnect] + """ + super(InstantItemRecoveryTarget, self).__init__(**kwargs) + self.client_scripts = client_scripts + + +class InstantRPAdditionalDetails(msrest.serialization.Model): + """InstantRPAdditionalDetails. + + :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 = { + 'azure_backup_rg_name_prefix': {'key': 'azureBackupRGNamePrefix', 'type': 'str'}, + 'azure_backup_rg_name_suffix': {'key': 'azureBackupRGNameSuffix', 'type': 'str'}, + } + + def __init__( + self, + *, + azure_backup_rg_name_prefix: Optional[str] = None, + 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 + + +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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.Job + """ + super(JobResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +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.activestamp.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.activestamp.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.activestamp.models.KEKDetails + :ivar bek_details: BEK is bitlocker encryption key. + :vartype bek_details: ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.KEKDetails + :keyword bek_details: BEK is bitlocker encryption key. + :paramtype bek_details: ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.ResourceHealthStatus + :ivar resource_health_details: Resource Health Status. + :vartype resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.ResourceHealthStatus + :keyword resource_health_details: Resource Health Status. + :paramtype resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ResourceHealthDetails] + """ + super(KPIResourceHealthDetails, self).__init__(**kwargs) + self.resource_health_status = resource_health_status + self.resource_health_details = resource_health_details + + +class ListRecoveryPointsRecommendedForMoveRequest(msrest.serialization.Model): + """ListRecoveryPointsRecommendedForMoveRequest Request. + + :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 = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'excluded_rp_list': {'key': 'excludedRPList', 'type': '[str]'}, + } + + def __init__( + self, + *, + object_type: Optional[str] = None, + 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 + + +class SchedulePolicy(msrest.serialization.Model): + """Base class for backup schedule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LogSchedulePolicy, LongTermSchedulePolicy, SimpleSchedulePolicy. + + All required parameters must be populated in order to send to Azure. + + :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. + :vartype schedule_policy_type: str + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + } + + _subtype_map = { + 'schedule_policy_type': {'LogSchedulePolicy': 'LogSchedulePolicy', 'LongTermSchedulePolicy': 'LongTermSchedulePolicy', 'SimpleSchedulePolicy': 'SimpleSchedulePolicy'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SchedulePolicy, self).__init__(**kwargs) + self.schedule_policy_type = None # type: Optional[str] + + +class LogSchedulePolicy(SchedulePolicy): + """Log policy schedule. + + All required parameters must be populated in order to send to Azure. + + :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. + :vartype schedule_policy_type: str + :ivar schedule_frequency_in_mins: Frequency of the log schedule operation of this policy in + minutes. + :vartype schedule_frequency_in_mins: int + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + 'schedule_frequency_in_mins': {'key': 'scheduleFrequencyInMins', 'type': 'int'}, + } + + def __init__( + self, + *, + 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 + + +class RetentionPolicy(msrest.serialization.Model): + """Base class for retention policy. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LongTermRetentionPolicy, SimpleRetentionPolicy. + + All required parameters must be populated in order to send to Azure. + + :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. + :vartype retention_policy_type: str + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, + } + + _subtype_map = { + 'retention_policy_type': {'LongTermRetentionPolicy': 'LongTermRetentionPolicy', 'SimpleRetentionPolicy': 'SimpleRetentionPolicy'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(RetentionPolicy, self).__init__(**kwargs) + self.retention_policy_type = None # type: Optional[str] + + +class LongTermRetentionPolicy(RetentionPolicy): + """Long term retention policy. + + All required parameters must be populated in order to send to Azure. + + :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. + :vartype retention_policy_type: str + :ivar daily_schedule: Daily retention schedule of the protection policy. + :vartype daily_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DailyRetentionSchedule + :ivar weekly_schedule: Weekly retention schedule of the protection policy. + :vartype weekly_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WeeklyRetentionSchedule + :ivar monthly_schedule: Monthly retention schedule of the protection policy. + :vartype monthly_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.MonthlyRetentionSchedule + :ivar yearly_schedule: Yearly retention schedule of the protection policy. + :vartype yearly_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.YearlyRetentionSchedule + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, + 'daily_schedule': {'key': 'dailySchedule', 'type': 'DailyRetentionSchedule'}, + 'weekly_schedule': {'key': 'weeklySchedule', 'type': 'WeeklyRetentionSchedule'}, + 'monthly_schedule': {'key': 'monthlySchedule', 'type': 'MonthlyRetentionSchedule'}, + 'yearly_schedule': {'key': 'yearlySchedule', 'type': 'YearlyRetentionSchedule'}, + } + + def __init__( + self, + *, + daily_schedule: Optional["DailyRetentionSchedule"] = None, + weekly_schedule: Optional["WeeklyRetentionSchedule"] = None, + monthly_schedule: Optional["MonthlyRetentionSchedule"] = None, + yearly_schedule: Optional["YearlyRetentionSchedule"] = None, + **kwargs + ): + """ + :keyword daily_schedule: Daily retention schedule of the protection policy. + :paramtype daily_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DailyRetentionSchedule + :keyword weekly_schedule: Weekly retention schedule of the protection policy. + :paramtype weekly_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WeeklyRetentionSchedule + :keyword monthly_schedule: Monthly retention schedule of the protection policy. + :paramtype monthly_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.MonthlyRetentionSchedule + :keyword yearly_schedule: Yearly retention schedule of the protection policy. + :paramtype yearly_schedule: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.YearlyRetentionSchedule + """ + super(LongTermRetentionPolicy, self).__init__(**kwargs) + self.retention_policy_type = 'LongTermRetentionPolicy' # type: str + self.daily_schedule = daily_schedule + self.weekly_schedule = weekly_schedule + self.monthly_schedule = monthly_schedule + self.yearly_schedule = yearly_schedule + + +class LongTermSchedulePolicy(SchedulePolicy): + """Long term policy schedule. + + All required parameters must be populated in order to send to Azure. + + :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. + :vartype schedule_policy_type: str + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(LongTermSchedulePolicy, self).__init__(**kwargs) + self.schedule_policy_type = 'LongTermSchedulePolicy' # type: str + + +class MabContainer(ProtectionContainer): + """Container with items backed up using MAB backup engine. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :ivar registration_status: Status of registration of the container with the Recovery Services + Vault. + :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", + "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", + "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", + "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". + :vartype container_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.MabContainerExtendedInfo + :ivar mab_container_health_details: Health details on this mab container. + :vartype mab_container_health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.MABContainerHealthDetails] + :ivar container_health_state: Health state of mab container. + :vartype container_health_state: str + """ + + _validation = { + 'container_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + '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'}, + 'agent_version': {'key': 'agentVersion', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'MabContainerExtendedInfo'}, + 'mab_container_health_details': {'key': 'mabContainerHealthDetails', 'type': '[MABContainerHealthDetails]'}, + 'container_health_state': {'key': 'containerHealthState', 'type': 'str'}, + } + + def __init__( + self, + *, + friendly_name: Optional[str] = None, + 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, + agent_version: Optional[str] = None, + extended_info: Optional["MabContainerExtendedInfo"] = None, + mab_container_health_details: Optional[List["MABContainerHealthDetails"]] = None, + container_health_state: 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.activestamp.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.activestamp.models.MabContainerExtendedInfo + :keyword mab_container_health_details: Health details on this mab container. + :paramtype mab_container_health_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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 + self.protected_item_count = protected_item_count + self.agent_version = agent_version + self.extended_info = extended_info + self.mab_container_health_details = mab_container_health_details + self.container_health_state = container_health_state + + +class MabContainerExtendedInfo(msrest.serialization.Model): + """Additional information of the container. + + :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". + :vartype backup_item_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, + 'backup_item_type': {'key': 'backupItemType', 'type': 'str'}, + 'backup_items': {'key': 'backupItems', 'type': '[str]'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + last_refreshed_at: Optional[datetime.datetime] = None, + backup_item_type: Optional[Union[str, "BackupItemType"]] = None, + backup_items: Optional[List[str]] = None, + policy_name: Optional[str] = None, + 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.activestamp.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 + self.backup_items = backup_items + self.policy_name = policy_name + self.last_backup_status = last_backup_status + + +class MABContainerHealthDetails(msrest.serialization.Model): + """MAB workload-specific Health Details. + + :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 = { + 'code': {'key': 'code', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommendations': {'key': 'recommendations', 'type': '[str]'}, + } + + def __init__( + self, + *, + code: Optional[int] = None, + title: Optional[str] = None, + message: Optional[str] = None, + 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 + self.message = message + self.recommendations = recommendations + + +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.activestamp.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.activestamp.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.activestamp.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 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.activestamp.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]'}, + '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'}, + '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, + 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, + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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 + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.WorkloadType + :ivar error_details: The errors. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.MabErrorInfo] + :ivar extended_info: Additional information on the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.WorkloadType + :keyword error_details: The errors. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.MabErrorInfo] + :keyword extended_info: Additional information on the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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 MabProtectionPolicy(ProtectionPolicy): + """Mab container-specific backup policy. + + All required parameters must be populated in order to send to Azure. + + :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. + :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.activestamp.models.SchedulePolicy + :ivar retention_policy: Retention policy details. + :vartype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionPolicy + """ + + _validation = { + 'backup_management_type': {'required': True}, + } + + _attribute_map = { + 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__( + self, + *, + protected_items_count: Optional[int] = None, + resource_guard_operation_requests: Optional[List[str]] = None, + schedule_policy: Optional["SchedulePolicy"] = None, + 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.activestamp.models.SchedulePolicy + :keyword retention_policy: Retention policy details. + :paramtype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + self.retention_policy = retention_policy + + +class MonthlyRetentionSchedule(msrest.serialization.Model): + """Monthly retention schedule. + + :ivar retention_schedule_format_type: Retention schedule format type for monthly retention + policy. Possible values include: "Invalid", "Daily", "Weekly". + :vartype retention_schedule_format_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionScheduleFormat + :ivar retention_schedule_daily: Daily retention format for monthly retention policy. + :vartype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DailyRetentionFormat + :ivar retention_schedule_weekly: Weekly retention format for monthly retention policy. + :vartype retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WeeklyRetentionFormat + :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.activestamp.models.RetentionDuration + """ + + _attribute_map = { + 'retention_schedule_format_type': {'key': 'retentionScheduleFormatType', 'type': 'str'}, + 'retention_schedule_daily': {'key': 'retentionScheduleDaily', 'type': 'DailyRetentionFormat'}, + 'retention_schedule_weekly': {'key': 'retentionScheduleWeekly', 'type': 'WeeklyRetentionFormat'}, + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__( + self, + *, + retention_schedule_format_type: Optional[Union[str, "RetentionScheduleFormat"]] = None, + retention_schedule_daily: Optional["DailyRetentionFormat"] = None, + retention_schedule_weekly: Optional["WeeklyRetentionFormat"] = None, + retention_times: Optional[List[datetime.datetime]] = None, + 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.activestamp.models.RetentionScheduleFormat + :keyword retention_schedule_daily: Daily retention format for monthly retention policy. + :paramtype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DailyRetentionFormat + :keyword retention_schedule_weekly: Weekly retention format for monthly retention policy. + :paramtype retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RetentionDuration + """ + super(MonthlyRetentionSchedule, self).__init__(**kwargs) + self.retention_schedule_format_type = retention_schedule_format_type + self.retention_schedule_daily = retention_schedule_daily + self.retention_schedule_weekly = retention_schedule_weekly + self.retention_times = retention_times + self.retention_duration = retention_duration + + +class MoveRPAcrossTiersRequest(msrest.serialization.Model): + """MoveRPAcrossTiersRequest. + + :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". + :vartype source_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RecoveryPointTierType + :ivar target_tier_type: Target tier where RP needs to be moved. Possible values include: + "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". + :vartype target_tier_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RecoveryPointTierType + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'source_tier_type': {'key': 'sourceTierType', 'type': 'str'}, + 'target_tier_type': {'key': 'targetTierType', 'type': 'str'}, + } + + def __init__( + self, + *, + object_type: Optional[str] = None, + source_tier_type: Optional[Union[str, "RecoveryPointTierType"]] = None, + 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.activestamp.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.activestamp.models.RecoveryPointTierType + """ + super(MoveRPAcrossTiersRequest, self).__init__(**kwargs) + self.object_type = object_type + self.source_tier_type = source_tier_type + self.target_tier_type = target_tier_type + + +class NameInfo(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.activestamp.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.activestamp.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.activestamp.models.NewErrorResponse] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[NewErrorResponse]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NewErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class OperationResultInfo(OperationResultInfoBase): + """Operation result info. + + 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_list: List of jobs created by this operation. + :vartype job_list: list[str] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_list': {'key': 'jobList', 'type': '[str]'}, + } + + def __init__( + self, + *, + 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 + + +class OperationWorkerResponse(msrest.serialization.Model): + """This is the base class for operation result responses. + + :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", + "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". + :vartype status_code: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.HttpStatusCode + :ivar headers: HTTP headers associated with this operation. + :vartype headers: dict[str, list[str]] + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + } + + def __init__( + self, + *, + status_code: Optional[Union[str, "HttpStatusCode"]] = None, + 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.activestamp.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 + + +class OperationResultInfoBaseResource(OperationWorkerResponse): + """Base class for operation result info. + + :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", + "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". + :vartype status_code: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.OperationResultInfoBase + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + 'operation': {'key': 'operation', 'type': 'OperationResultInfoBase'}, + } + + def __init__( + self, + *, + status_code: Optional[Union[str, "HttpStatusCode"]] = None, + headers: Optional[Dict[str, List[str]]] = None, + 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.activestamp.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.activestamp.models.OperationResultInfoBase + """ + super(OperationResultInfoBaseResource, self).__init__(status_code=status_code, headers=headers, **kwargs) + self.operation = operation + + +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.activestamp.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.activestamp.models.OperationStatusError + :ivar properties: Additional information associated with this operation. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.models.OperationStatusError + :keyword properties: Additional information associated with this operation. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.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, OperationStatusValidateOperationExtendedInfo. + + 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', 'OperationStatusValidateOperationExtendedInfo': 'OperationStatusValidateOperationExtendedInfo'} + } + + 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.activestamp.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.activestamp.models.InstantItemRecoveryTarget + """ + super(OperationStatusProvisionILRExtendedInfo, self).__init__(**kwargs) + self.object_type = 'OperationStatusProvisionILRExtendedInfo' # type: str + self.recovery_target = recovery_target + + +class OperationStatusValidateOperationExtendedInfo(OperationStatusExtendedInfo): + """Operation status extended info for ValidateOperation 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 validate_operation_response: Gets the validation operation response. + :vartype validate_operation_response: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ValidateOperationResponse + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'validate_operation_response': {'key': 'validateOperationResponse', 'type': 'ValidateOperationResponse'}, + } + + def __init__( + self, + *, + validate_operation_response: Optional["ValidateOperationResponse"] = None, + **kwargs + ): + """ + :keyword validate_operation_response: Gets the validation operation response. + :paramtype validate_operation_response: + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + + :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 PreBackupValidation(msrest.serialization.Model): + """Pre-backup validation for Azure VM Workload provider. + + :ivar status: Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values + include: "Invalid", "Success", "Failed". + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'status': {'key': 'status', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "InquiryStatus"]] = None, + code: Optional[str] = None, + 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.activestamp.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 + self.message = message + + +class PrepareDataMoveRequest(msrest.serialization.Model): + """Prepare DataMove Request. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype data_move_level: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DataMoveLevel + :ivar source_container_arm_ids: Source Container ArmIds + This needs to be populated only if DataMoveLevel is set to container. + :vartype source_container_arm_ids: list[str] + :ivar ignore_moved: Ignore the artifacts which are already moved. + :vartype ignore_moved: bool + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'target_region': {'required': True}, + 'data_move_level': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'target_region': {'key': 'targetRegion', 'type': 'str'}, + 'data_move_level': {'key': 'dataMoveLevel', 'type': 'str'}, + 'source_container_arm_ids': {'key': 'sourceContainerArmIds', 'type': '[str]'}, + 'ignore_moved': {'key': 'ignoreMoved', 'type': 'bool'}, + } + + def __init__( + self, + *, + target_resource_id: str, + target_region: str, + data_move_level: Union[str, "DataMoveLevel"], + source_container_arm_ids: Optional[List[str]] = None, + 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.activestamp.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 + self.data_move_level = data_move_level + self.source_container_arm_ids = source_container_arm_ids + self.ignore_moved = ignore_moved + + +class VaultStorageConfigOperationResultResponse(msrest.serialization.Model): + """Operation result response for Vault Storage Config. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PrepareDataMoveResponse. + + All required parameters must be populated in order to send to Azure. + + :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': {'PrepareDataMoveResponse': 'PrepareDataMoveResponse'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(VaultStorageConfigOperationResultResponse, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class PrepareDataMoveResponse(VaultStorageConfigOperationResultResponse): + """Prepare DataMove Response. + + 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 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 = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'source_vault_properties': {'key': 'sourceVaultProperties', 'type': '{str}'}, + } + + def __init__( + self, + *, + correlation_id: Optional[str] = None, + 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 + self.source_vault_properties = source_vault_properties + + +class PreValidateEnableBackupRequest(msrest.serialization.Model): + """Contract to validate if backup can be enabled on the given resource in a given vault and given configuration. +It will validate followings + + +#. Vault capacity +#. VM is already protected +#. Any VM related configuration passed in properties. + + :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". + :vartype resource_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_type: Optional[Union[str, "DataSourceType"]] = None, + resource_id: Optional[str] = None, + vault_id: Optional[str] = None, + 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.activestamp.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 + self.vault_id = vault_id + self.properties = properties + + +class PreValidateEnableBackupResponse(msrest.serialization.Model): + """Response contract for enable backup validation request. + + :ivar status: Validation Status. Possible values include: "Invalid", "Succeeded", "Failed". + :vartype status: str or ~azure.mgmt.recoveryservicesbackup.activestamp.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. + :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. + :vartype protected_item_name: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'recommendation': {'key': 'recommendation', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "ValidationStatus"]] = None, + error_code: Optional[str] = None, + error_message: Optional[str] = None, + recommendation: Optional[str] = None, + container_name: Optional[str] = None, + protected_item_name: Optional[str] = None, + **kwargs + ): + """ + :keyword status: Validation Status. Possible values include: "Invalid", "Succeeded", "Failed". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + self.error_message = error_message + self.recommendation = recommendation + self.container_name = container_name + self.protected_item_name = protected_item_name + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint network resource that is linked to the Private Endpoint connection. + + :ivar id: Gets or sets id. + :vartype id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Gets or sets id. + :paramtype id: str + """ + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = id + + +class PrivateEndpointConnection(msrest.serialization.Model): + """Private Endpoint Connection Response Properties. + + :ivar provisioning_state: Gets or sets provisioning state of the private endpoint connection. + Possible values include: "Succeeded", "Deleting", "Failed", "Pending". + :vartype provisioning_state: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProvisioningState + :ivar private_endpoint: Gets or sets private endpoint associated with the private endpoint + connection. + :vartype private_endpoint: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.PrivateEndpoint + :ivar private_link_service_connection_state: Gets or sets private link service connection + state. + :vartype private_link_service_connection_state: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.PrivateLinkServiceConnectionState + """ + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + } + + def __init__( + self, + *, + provisioning_state: Optional[Union[str, "ProvisioningState"]] = None, + private_endpoint: Optional["PrivateEndpoint"] = None, + 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.activestamp.models.ProvisioningState + :keyword private_endpoint: Gets or sets private endpoint associated with the private endpoint + connection. + :paramtype private_endpoint: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.PrivateLinkServiceConnectionState + """ + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.provisioning_state = provisioning_state + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateEndpointConnectionResource(Resource): + """Private Endpoint Connection Response Properties. + + 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: PrivateEndpointConnectionResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.PrivateEndpointConnection + """ + + _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': 'PrivateEndpointConnection'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.PrivateEndpointConnection + """ + super(PrivateEndpointConnectionResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """Private Link Service Connection State. + + :ivar status: Gets or sets the status. Possible values include: "Pending", "Approved", + "Rejected", "Disconnected". + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'action_required': {'key': 'actionRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "PrivateEndpointConnectionStatus"]] = None, + description: Optional[str] = None, + 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.activestamp.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 + self.action_required = action_required + + +class ProtectableContainerResource(Resource): + """Protectable Container 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: ProtectableContainerResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectableContainer + """ + + _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': 'ProtectableContainer'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.ProtectableContainer + """ + super(ProtectableContainerResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class ProtectableContainerResourceList(ResourceList): + """List of ProtectableContainer 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.activestamp.models.ProtectableContainerResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ProtectableContainerResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + 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.activestamp.models.ProtectableContainerResource] + """ + super(ProtectableContainerResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.ProtectedItemResource] + """ + super(ProtectedItemResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class ProtectionContainerResource(Resource): + """Base class for container with backup items. Containers with specific workloads 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: ProtectionContainerResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionContainer + """ + + _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': 'ProtectionContainer'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.ProtectionContainer + """ + super(ProtectionContainerResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class ProtectionContainerResourceList(ResourceList): + """List of ProtectionContainer 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.activestamp.models.ProtectionContainerResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ProtectionContainerResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + 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.activestamp.models.ProtectionContainerResource] + """ + super(ProtectionContainerResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class ProtectionIntentQueryObject(msrest.serialization.Model): + """Filters to list protection intent. + + :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.activestamp.models.BackupManagementType + :ivar item_type: Type of workload this item represents. Possible values include: "Invalid", + "SQLInstance", "SQLAvailabilityGroupContainer". + :vartype item_type: str or ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'item_type': {'key': 'itemType', 'type': 'str'}, + 'parent_name': {'key': 'parentName', 'type': 'str'}, + 'item_name': {'key': 'itemName', 'type': 'str'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + item_type: Optional[Union[str, "IntentItemType"]] = None, + parent_name: Optional[str] = None, + 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.activestamp.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.activestamp.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 + self.parent_name = parent_name + self.item_name = item_name + + +class ProtectionIntentResource(Resource): + """Base class for backup ProtectionIntent. + + 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: ProtectionIntentResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionIntent + """ + + _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': 'ProtectionIntent'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.ProtectionIntent + """ + super(ProtectionIntentResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class ProtectionIntentResourceList(ResourceList): + """List of ProtectionIntent 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.activestamp.models.ProtectionIntentResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ProtectionIntentResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + 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.activestamp.models.ProtectionIntentResource] + """ + super(ProtectionIntentResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class ProtectionPolicyQueryObject(msrest.serialization.Model): + """Filters the list backup policies API. + + :ivar backup_management_type: Backup management type for the backup policy. Possible values + include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", + "AzureStorage", "AzureWorkload", "DefaultBackup". + :vartype backup_management_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementType + :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". + :vartype workload_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadType + """ + + _attribute_map = { + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'fabric_name': {'key': 'fabricName', 'type': 'str'}, + 'workload_type': {'key': 'workloadType', 'type': 'str'}, + } + + def __init__( + self, + *, + backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, + fabric_name: Optional[str] = None, + 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.activestamp.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.activestamp.models.WorkloadType + """ + super(ProtectionPolicyQueryObject, self).__init__(**kwargs) + self.backup_management_type = backup_management_type + self.fabric_name = fabric_name + self.workload_type = workload_type + + +class ProtectionPolicyResource(Resource): + """Base class for backup policy. Workload-specific backup policies 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: ProtectionPolicyResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionPolicy + """ + + _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': 'ProtectionPolicy'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.ProtectionPolicy + """ + super(ProtectionPolicyResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class ProtectionPolicyResourceList(ResourceList): + """List of ProtectionPolicy 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.activestamp.models.ProtectionPolicyResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ProtectionPolicyResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + 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.activestamp.models.ProtectionPolicyResource] + """ + super(ProtectionPolicyResourceList, 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.activestamp.models.DiskInformation] + :ivar excluded_disk_list: Information of disks excluded from backup. + :vartype excluded_disk_list: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.DiskInformation] + :keyword excluded_disk_list: Information of disks excluded from backup. + :paramtype excluded_disk_list: + list[~azure.mgmt.recoveryservicesbackup.activestamp.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 RecoveryPointRehydrationInfo(msrest.serialization.Model): + """RP Rehydration Info. + + :ivar rehydration_retention_duration: How long the rehydrated RP should be kept + Should be ISO8601 Duration format e.g. "P7D". + :vartype rehydration_retention_duration: str + :ivar rehydration_priority: Rehydration Priority. Possible values include: "Standard", "High". + :vartype rehydration_priority: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RehydrationPriority + """ + + _attribute_map = { + 'rehydration_retention_duration': {'key': 'rehydrationRetentionDuration', 'type': 'str'}, + 'rehydration_priority': {'key': 'rehydrationPriority', 'type': 'str'}, + } + + def __init__( + self, + *, + rehydration_retention_duration: Optional[str] = None, + 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.activestamp.models.RehydrationPriority + """ + super(RecoveryPointRehydrationInfo, self).__init__(**kwargs) + self.rehydration_retention_duration = rehydration_retention_duration + self.rehydration_priority = rehydration_priority + + +class RecoveryPointResource(Resource): + """Base class for backup copies. Workload-specific backup copies are derived from this class. + + 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.activestamp.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.activestamp.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.activestamp.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.activestamp.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.activestamp.models.RecoveryPointTierType + :ivar status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointTierType + :keyword status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointTierType + :ivar status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RecoveryPointTierType + :keyword status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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. + + :ivar vault_critical_operation: + :vartype vault_critical_operation: str + :ivar default_resource_request: + :vartype default_resource_request: str + """ + + _attribute_map = { + 'vault_critical_operation': {'key': 'vaultCriticalOperation', 'type': 'str'}, + 'default_resource_request': {'key': 'defaultResourceRequest', 'type': 'str'}, + } + + def __init__( + self, + *, + vault_critical_operation: Optional[str] = None, + 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 + + +class ResourceGuardProxyBase(msrest.serialization.Model): + """ResourceGuardProxyBase. + + :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.activestamp.models.ResourceGuardOperationDetail] + :ivar last_updated_time: + :vartype last_updated_time: str + :ivar description: + :vartype description: str + """ + + _attribute_map = { + 'resource_guard_resource_id': {'key': 'resourceGuardResourceId', 'type': 'str'}, + 'resource_guard_operation_details': {'key': 'resourceGuardOperationDetails', 'type': '[ResourceGuardOperationDetail]'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_guard_resource_id: Optional[str] = None, + resource_guard_operation_details: Optional[List["ResourceGuardOperationDetail"]] = None, + last_updated_time: Optional[str] = None, + 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.activestamp.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 + self.last_updated_time = last_updated_time + self.description = description + + +class ResourceGuardProxyBaseResource(Resource): + """ResourceGuardProxyBaseResource. + + 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: ResourceGuardProxyBaseResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ResourceGuardProxyBase + """ + + _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': 'ResourceGuardProxyBase'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.ResourceGuardProxyBase + """ + super(ResourceGuardProxyBaseResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class ResourceGuardProxyBaseResourceList(ResourceList): + """List of ResourceGuardProxyBase 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.activestamp.models.ResourceGuardProxyBaseResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ResourceGuardProxyBaseResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + 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.activestamp.models.ResourceGuardProxyBaseResource] + """ + super(ResourceGuardProxyBaseResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +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 RestoreRequestResource(Resource): + """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. + + :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: RestoreRequestResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.RestoreRequest + """ + + _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': 'RestoreRequest'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.RestoreRequest + """ + super(RestoreRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class RetentionDuration(msrest.serialization.Model): + """Retention duration. + + :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. + :vartype count: int + :ivar duration_type: Retention duration type of retention policy. Possible values include: + "Invalid", "Days", "Weeks", "Months", "Years". + :vartype duration_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionDurationType + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'duration_type': {'key': 'durationType', 'type': 'str'}, + } + + def __init__( + self, + *, + count: Optional[int] = None, + 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.activestamp.models.RetentionDurationType + """ + super(RetentionDuration, self).__init__(**kwargs) + self.count = count + self.duration_type = duration_type + + +class SecurityPinBase(msrest.serialization.Model): + """Base class for get security pin request body. + + :ivar resource_guard_operation_requests: ResourceGuard Operation Requests. + :vartype resource_guard_operation_requests: list[str] + """ + + _attribute_map = { + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + } + + def __init__( + self, + *, + 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 + + +class Settings(msrest.serialization.Model): + """Common settings field for backup management. + + :ivar time_zone: TimeZone optional input as string. For example: TimeZone = "Pacific Standard + Time". + :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. + :vartype is_compression: bool + """ + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'issqlcompression': {'key': 'issqlcompression', 'type': 'bool'}, + 'is_compression': {'key': 'isCompression', 'type': 'bool'}, + } + + def __init__( + self, + *, + time_zone: Optional[str] = None, + issqlcompression: Optional[bool] = None, + 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 + self.is_compression = is_compression + + +class SimpleRetentionPolicy(RetentionPolicy): + """Simple policy retention. + + All required parameters must be populated in order to send to Azure. + + :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. + :vartype retention_policy_type: str + :ivar retention_duration: Retention duration of the protection policy. + :vartype retention_duration: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionDuration + """ + + _validation = { + 'retention_policy_type': {'required': True}, + } + + _attribute_map = { + 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__( + self, + *, + retention_duration: Optional["RetentionDuration"] = None, + **kwargs + ): + """ + :keyword retention_duration: Retention duration of the protection policy. + :paramtype retention_duration: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionDuration + """ + super(SimpleRetentionPolicy, self).__init__(**kwargs) + self.retention_policy_type = 'SimpleRetentionPolicy' # type: str + self.retention_duration = retention_duration + + +class SimpleSchedulePolicy(SchedulePolicy): + """Simple policy schedule. + + All required parameters must be populated in order to send to Azure. + + :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. + :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.activestamp.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.activestamp.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.activestamp.models.HourlySchedule + :ivar schedule_weekly_frequency: At every number weeks this schedule has to be run. + :vartype schedule_weekly_frequency: int + """ + + _validation = { + 'schedule_policy_type': {'required': True}, + } + + _attribute_map = { + 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, + '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'}, + } + + def __init__( + self, + *, + 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.activestamp.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.activestamp.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.activestamp.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. + + :ivar type: Type of data directory mapping. Possible values include: "Invalid", "Data", "Log". + :vartype type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.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.activestamp.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.activestamp.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 SubProtectionPolicy(msrest.serialization.Model): + """Sub-protection policy which includes schedule and retention. + + :ivar policy_type: Type of backup policy type. Possible values include: "Invalid", "Full", + "Differential", "Log", "CopyOnlyFull", "Incremental". + :vartype policy_type: str or ~azure.mgmt.recoveryservicesbackup.activestamp.models.PolicyType + :ivar schedule_policy: Backup schedule specified as part of backup policy. + :vartype schedule_policy: ~azure.mgmt.recoveryservicesbackup.activestamp.models.SchedulePolicy + :ivar retention_policy: Retention policy with the details on backup copy retention ranges. + :vartype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionPolicy + """ + + _attribute_map = { + 'policy_type': {'key': 'policyType', 'type': 'str'}, + 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__( + self, + *, + policy_type: Optional[Union[str, "PolicyType"]] = None, + schedule_policy: Optional["SchedulePolicy"] = None, + 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.activestamp.models.PolicyType + :keyword schedule_policy: Backup schedule specified as part of backup policy. + :paramtype schedule_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.SchedulePolicy + :keyword retention_policy: Retention policy with the details on backup copy retention ranges. + :paramtype retention_policy: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionPolicy + """ + super(SubProtectionPolicy, self).__init__(**kwargs) + self.policy_type = policy_type + self.schedule_policy = schedule_policy + self.retention_policy = retention_policy + + +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.activestamp.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.activestamp.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 TokenInformation(msrest.serialization.Model): + """The token information details. + + :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 = { + 'token': {'key': 'token', 'type': 'str'}, + 'expiry_time_in_utc_ticks': {'key': 'expiryTimeInUtcTicks', 'type': 'long'}, + 'security_pin': {'key': 'securityPIN', 'type': 'str'}, + } + + def __init__( + self, + *, + token: Optional[str] = None, + expiry_time_in_utc_ticks: Optional[int] = None, + 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 + self.security_pin = security_pin + + +class TriggerDataMoveRequest(msrest.serialization.Model): + """Trigger DataMove Request. + + All required parameters must be populated in order to send to Azure. + + :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". + :vartype data_move_level: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 = { + 'source_resource_id': {'required': True}, + 'source_region': {'required': True}, + 'data_move_level': {'required': True}, + 'correlation_id': {'required': True}, + } + + _attribute_map = { + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'source_region': {'key': 'sourceRegion', 'type': 'str'}, + 'data_move_level': {'key': 'dataMoveLevel', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'source_container_arm_ids': {'key': 'sourceContainerArmIds', 'type': '[str]'}, + 'pause_gc': {'key': 'pauseGC', 'type': 'bool'}, + } + + def __init__( + self, + *, + source_resource_id: str, + source_region: str, + data_move_level: Union[str, "DataMoveLevel"], + correlation_id: str, + source_container_arm_ids: Optional[List[str]] = None, + 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.activestamp.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 + self.data_move_level = data_move_level + self.correlation_id = correlation_id + self.source_container_arm_ids = source_container_arm_ids + self.pause_gc = pause_gc + + +class UnlockDeleteRequest(msrest.serialization.Model): + """Request body of unlock delete API. + + :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 = { + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'resource_to_be_deleted': {'key': 'resourceToBeDeleted', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_guard_operation_requests: Optional[List[str]] = None, + 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 + + +class UnlockDeleteResponse(msrest.serialization.Model): + """Response of Unlock Delete API. + + :ivar unlock_delete_expiry_time: This is the time when unlock delete privileges will get + expired. + :vartype unlock_delete_expiry_time: str + """ + + _attribute_map = { + 'unlock_delete_expiry_time': {'key': 'unlockDeleteExpiryTime', 'type': 'str'}, + } + + def __init__( + self, + *, + 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 + + +class ValidateOperationRequest(msrest.serialization.Model): + """Base class for validate operation request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ValidateRestoreOperationRequest. + + 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': {'ValidateRestoreOperationRequest': 'ValidateRestoreOperationRequest'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ValidateOperationRequest, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class ValidateRestoreOperationRequest(ValidateOperationRequest): + """AzureRestoreValidation request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ValidateIaasVMRestoreOperationRequest. + + 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 restore_request: Sets restore request to be validated. + :vartype restore_request: ~azure.mgmt.recoveryservicesbackup.activestamp.models.RestoreRequest + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_request': {'key': 'restoreRequest', 'type': 'RestoreRequest'}, + } + + _subtype_map = { + 'object_type': {'ValidateIaasVMRestoreOperationRequest': 'ValidateIaasVMRestoreOperationRequest'} + } + + def __init__( + self, + *, + restore_request: Optional["RestoreRequest"] = None, + **kwargs + ): + """ + :keyword restore_request: Sets restore request to be validated. + :paramtype restore_request: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RestoreRequest + """ + super(ValidateRestoreOperationRequest, self).__init__(**kwargs) + self.object_type = 'ValidateRestoreOperationRequest' # type: str + self.restore_request = restore_request + + +class ValidateIaasVMRestoreOperationRequest(ValidateRestoreOperationRequest): + """AzureRestoreValidation 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 restore_request: Sets restore request to be validated. + :vartype restore_request: ~azure.mgmt.recoveryservicesbackup.activestamp.models.RestoreRequest + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_request': {'key': 'restoreRequest', 'type': 'RestoreRequest'}, + } + + def __init__( + self, + *, + restore_request: Optional["RestoreRequest"] = None, + **kwargs + ): + """ + :keyword restore_request: Sets restore request to be validated. + :paramtype restore_request: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RestoreRequest + """ + super(ValidateIaasVMRestoreOperationRequest, self).__init__(restore_request=restore_request, **kwargs) + self.object_type = 'ValidateIaasVMRestoreOperationRequest' # type: str + + +class ValidateOperationResponse(msrest.serialization.Model): + """Base class for validate operation response. + + :ivar validation_results: Gets the validation result. + :vartype validation_results: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ErrorDetail] + """ + + _attribute_map = { + 'validation_results': {'key': 'validationResults', 'type': '[ErrorDetail]'}, + } + + def __init__( + self, + *, + validation_results: Optional[List["ErrorDetail"]] = None, + **kwargs + ): + """ + :keyword validation_results: Gets the validation result. + :paramtype validation_results: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.ErrorDetail] + """ + super(ValidateOperationResponse, self).__init__(**kwargs) + self.validation_results = validation_results + + +class ValidateOperationsResponse(msrest.serialization.Model): + """ValidateOperationsResponse. + + :ivar validate_operation_response: Base class for validate operation response. + :vartype validate_operation_response: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ValidateOperationResponse + """ + + _attribute_map = { + 'validate_operation_response': {'key': 'validateOperationResponse', 'type': 'ValidateOperationResponse'}, + } + + def __init__( + self, + *, + validate_operation_response: Optional["ValidateOperationResponse"] = None, + **kwargs + ): + """ + :keyword validate_operation_response: Base class for validate operation response. + :paramtype validate_operation_response: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ValidateOperationResponse + """ + super(ValidateOperationsResponse, self).__init__(**kwargs) + self.validate_operation_response = validate_operation_response + + +class VaultJob(Job): + """Vault level Job. + + All required parameters must be populated in order to send to Azure. + + :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.activestamp.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.activestamp.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.VaultJobErrorInfo] + :ivar extended_info: Additional information about the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.VaultJobExtendedInfo + """ + + _validation = { + 'job_type': {'required': True}, + } + + _attribute_map = { + 'entity_friendly_name': {'key': 'entityFriendlyName', 'type': 'str'}, + 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'duration'}, + 'actions_info': {'key': 'actionsInfo', 'type': '[str]'}, + 'error_details': {'key': 'errorDetails', 'type': '[VaultJobErrorInfo]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'VaultJobExtendedInfo'}, + } + + 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["VaultJobErrorInfo"]] = None, + 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.activestamp.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.activestamp.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.activestamp.models.VaultJobErrorInfo] + :keyword extended_info: Additional information about the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + self.actions_info = actions_info + self.error_details = error_details + self.extended_info = extended_info + + +class VaultJobErrorInfo(msrest.serialization.Model): + """Vault Job 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(VaultJobErrorInfo, self).__init__(**kwargs) + self.error_code = error_code + self.error_string = error_string + self.recommendations = recommendations + + +class VaultJobExtendedInfo(msrest.serialization.Model): + """Vault Job for CMK - has CMK specific info. + + :ivar property_bag: Job properties. + :vartype property_bag: dict[str, str] + """ + + _attribute_map = { + 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, + } + + def __init__( + self, + *, + 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 + + +class WeeklyRetentionFormat(msrest.serialization.Model): + """Weekly retention format. + + :ivar days_of_the_week: List of days of the week. + :vartype days_of_the_week: list[str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DayOfWeek] + :ivar weeks_of_the_month: List of weeks of month. + :vartype weeks_of_the_month: list[str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WeekOfMonth] + """ + + _attribute_map = { + 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[str]'}, + 'weeks_of_the_month': {'key': 'weeksOfTheMonth', 'type': '[str]'}, + } + + def __init__( + self, + *, + days_of_the_week: Optional[List[Union[str, "DayOfWeek"]]] = None, + 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.activestamp.models.DayOfWeek] + :keyword weeks_of_the_month: List of weeks of month. + :paramtype weeks_of_the_month: list[str or + ~azure.mgmt.recoveryservicesbackup.activestamp.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 + + +class WeeklyRetentionSchedule(msrest.serialization.Model): + """Weekly retention schedule. + + :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.activestamp.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.activestamp.models.RetentionDuration + """ + + _attribute_map = { + 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[str]'}, + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__( + self, + *, + days_of_the_week: Optional[List[Union[str, "DayOfWeek"]]] = None, + retention_times: Optional[List[datetime.datetime]] = None, + 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.activestamp.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.activestamp.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 WorkloadInquiryDetails(msrest.serialization.Model): + """Details of an inquired protectable item. + + :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.activestamp.models.InquiryValidation + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'item_count': {'key': 'itemCount', 'type': 'long'}, + 'inquiry_validation': {'key': 'inquiryValidation', 'type': 'InquiryValidation'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + item_count: Optional[int] = None, + 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.activestamp.models.InquiryValidation + """ + super(WorkloadInquiryDetails, self).__init__(**kwargs) + self.type = type + self.item_count = item_count + self.inquiry_validation = inquiry_validation + + +class WorkloadItemResource(Resource): + """Base class for backup item. Workload-specific backup items 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: WorkloadItemResource properties. + :vartype properties: ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadItem + """ + + _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': 'WorkloadItem'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.WorkloadItem + """ + super(WorkloadItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class WorkloadItemResourceList(ResourceList): + """List of WorkloadItem 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.activestamp.models.WorkloadItemResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[WorkloadItemResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + 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.activestamp.models.WorkloadItemResource] + """ + super(WorkloadItemResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class WorkloadProtectableItemResource(Resource): + """Base class for backup item. Workload-specific backup items 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: WorkloadProtectableItemResource properties. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadProtectableItem + """ + + _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': 'WorkloadProtectableItem'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + 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.activestamp.models.WorkloadProtectableItem + """ + super(WorkloadProtectableItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class WorkloadProtectableItemResourceList(ResourceList): + """List of WorkloadProtectableItem 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.activestamp.models.WorkloadProtectableItemResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[WorkloadProtectableItemResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + 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.activestamp.models.WorkloadProtectableItemResource] + """ + super(WorkloadProtectableItemResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class YearlyRetentionSchedule(msrest.serialization.Model): + """Yearly retention schedule. + + :ivar retention_schedule_format_type: Retention schedule format for yearly retention policy. + Possible values include: "Invalid", "Daily", "Weekly". + :vartype retention_schedule_format_type: str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.RetentionScheduleFormat + :ivar months_of_year: List of months of year of yearly retention policy. + :vartype months_of_year: list[str or + ~azure.mgmt.recoveryservicesbackup.activestamp.models.MonthOfYear] + :ivar retention_schedule_daily: Daily retention format for yearly retention policy. + :vartype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DailyRetentionFormat + :ivar retention_schedule_weekly: Weekly retention format for yearly retention policy. + :vartype retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.WeeklyRetentionFormat + :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.activestamp.models.RetentionDuration + """ + + _attribute_map = { + 'retention_schedule_format_type': {'key': 'retentionScheduleFormatType', 'type': 'str'}, + 'months_of_year': {'key': 'monthsOfYear', 'type': '[str]'}, + 'retention_schedule_daily': {'key': 'retentionScheduleDaily', 'type': 'DailyRetentionFormat'}, + 'retention_schedule_weekly': {'key': 'retentionScheduleWeekly', 'type': 'WeeklyRetentionFormat'}, + 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, + 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, + } + + def __init__( + self, + *, + retention_schedule_format_type: Optional[Union[str, "RetentionScheduleFormat"]] = None, + months_of_year: Optional[List[Union[str, "MonthOfYear"]]] = None, + retention_schedule_daily: Optional["DailyRetentionFormat"] = None, + retention_schedule_weekly: Optional["WeeklyRetentionFormat"] = None, + retention_times: Optional[List[datetime.datetime]] = None, + 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.activestamp.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.activestamp.models.MonthOfYear] + :keyword retention_schedule_daily: Daily retention format for yearly retention policy. + :paramtype retention_schedule_daily: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.DailyRetentionFormat + :keyword retention_schedule_weekly: Weekly retention format for yearly retention policy. + :paramtype retention_schedule_weekly: + ~azure.mgmt.recoveryservicesbackup.activestamp.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.activestamp.models.RetentionDuration + """ + super(YearlyRetentionSchedule, self).__init__(**kwargs) + self.retention_schedule_format_type = retention_schedule_format_type + self.months_of_year = months_of_year + self.retention_schedule_daily = retention_schedule_daily + self.retention_schedule_weekly = retention_schedule_weekly + self.retention_times = retention_times + self.retention_duration = retention_duration diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/_recovery_services_backup_client_enums.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/_recovery_services_backup_client_enums.py new file mode 100644 index 000000000000..7c4126e0e4d8 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/models/_recovery_services_backup_client_enums.py @@ -0,0 +1,709 @@ +# 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 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)): + """File Share type XSync or XSMB. + """ + + INVALID = "Invalid" + XSMB = "XSMB" + X_SYNC = "XSync" + +class BackupEngineType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of the backup engine. + """ + + INVALID = "Invalid" + DPM_BACKUP_ENGINE = "DpmBackupEngine" + AZURE_BACKUP_SERVER_ENGINE = "AzureBackupServerEngine" + +class BackupItemType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of backup items associated with this container. + """ + + 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 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 BackupType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of backup, viz. Full, Differential, Log or CopyOnlyFull + """ + + INVALID = "Invalid" + FULL = "Full" + DIFFERENTIAL = "Differential" + LOG = "Log" + COPY_ONLY_FULL = "CopyOnlyFull" + INCREMENTAL = "Incremental" + +class ContainerType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of container for filter + """ + + 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 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 DataMoveLevel(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """DataMove Level + """ + + INVALID = "Invalid" + VAULT = "Vault" + CONTAINER = "Container" + +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 DayOfWeek(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + SUNDAY = "Sunday" + MONDAY = "Monday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + THURSDAY = "Thursday" + FRIDAY = "Friday" + SATURDAY = "Saturday" + +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 + """ + + INVALID = "Invalid" + MICROSOFT_MANAGED = "MicrosoftManaged" + CUSTOMER_MANAGED = "CustomerManaged" + +class EnhancedSecurityState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enabled or Disabled. + """ + + INVALID = "Invalid" + ENABLED = "Enabled" + DISABLED = "Disabled" + +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)): + """Health State for the backed up item. + """ + + PASSED = "Passed" + ACTION_REQUIRED = "ActionRequired" + ACTION_SUGGESTED = "ActionSuggested" + INVALID = "Invalid" + +class HealthStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Health status of protected item. + """ + + PASSED = "Passed" + ACTION_REQUIRED = "ActionRequired" + ACTION_SUGGESTED = "ActionSuggested" + INVALID = "Invalid" + +class HttpStatusCode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """HTTP Status Code of the operation. + """ + + CONTINUE_ENUM = "Continue" + SWITCHING_PROTOCOLS = "SwitchingProtocols" + OK = "OK" + CREATED = "Created" + ACCEPTED = "Accepted" + NON_AUTHORITATIVE_INFORMATION = "NonAuthoritativeInformation" + NO_CONTENT = "NoContent" + RESET_CONTENT = "ResetContent" + PARTIAL_CONTENT = "PartialContent" + MULTIPLE_CHOICES = "MultipleChoices" + AMBIGUOUS = "Ambiguous" + MOVED_PERMANENTLY = "MovedPermanently" + MOVED = "Moved" + FOUND = "Found" + REDIRECT = "Redirect" + SEE_OTHER = "SeeOther" + REDIRECT_METHOD = "RedirectMethod" + NOT_MODIFIED = "NotModified" + USE_PROXY = "UseProxy" + UNUSED = "Unused" + TEMPORARY_REDIRECT = "TemporaryRedirect" + REDIRECT_KEEP_VERB = "RedirectKeepVerb" + BAD_REQUEST = "BadRequest" + UNAUTHORIZED = "Unauthorized" + PAYMENT_REQUIRED = "PaymentRequired" + FORBIDDEN = "Forbidden" + NOT_FOUND = "NotFound" + METHOD_NOT_ALLOWED = "MethodNotAllowed" + NOT_ACCEPTABLE = "NotAcceptable" + PROXY_AUTHENTICATION_REQUIRED = "ProxyAuthenticationRequired" + REQUEST_TIMEOUT = "RequestTimeout" + CONFLICT = "Conflict" + GONE = "Gone" + LENGTH_REQUIRED = "LengthRequired" + PRECONDITION_FAILED = "PreconditionFailed" + REQUEST_ENTITY_TOO_LARGE = "RequestEntityTooLarge" + REQUEST_URI_TOO_LONG = "RequestUriTooLong" + UNSUPPORTED_MEDIA_TYPE = "UnsupportedMediaType" + REQUESTED_RANGE_NOT_SATISFIABLE = "RequestedRangeNotSatisfiable" + EXPECTATION_FAILED = "ExpectationFailed" + UPGRADE_REQUIRED = "UpgradeRequired" + INTERNAL_SERVER_ERROR = "InternalServerError" + NOT_IMPLEMENTED = "NotImplemented" + BAD_GATEWAY = "BadGateway" + SERVICE_UNAVAILABLE = "ServiceUnavailable" + GATEWAY_TIMEOUT = "GatewayTimeout" + HTTP_VERSION_NOT_SUPPORTED = "HttpVersionNotSupported" + +class InfrastructureEncryptionState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + INVALID = "Invalid" + DISABLED = "Disabled" + ENABLED = "Enabled" + +class InquiryStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Status of protectable item, i.e. InProgress,Succeeded,Failed + """ + + INVALID = "Invalid" + SUCCESS = "Success" + FAILED = "Failed" + +class IntentItemType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of workload this item represents + """ + + INVALID = "Invalid" + SQL_INSTANCE = "SQLInstance" + SQL_AVAILABILITY_GROUP_CONTAINER = "SQLAvailabilityGroupContainer" + +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 LastUpdateStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + INVALID = "Invalid" + NOT_ENABLED = "NotEnabled" + PARTIALLY_SUCCEEDED = "PartiallySucceeded" + PARTIALLY_FAILED = "PartiallyFailed" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + INITIALIZED = "Initialized" + FIRST_INITIALIZATION = "FirstInitialization" + +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 MonthOfYear(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + INVALID = "Invalid" + JANUARY = "January" + FEBRUARY = "February" + MARCH = "March" + APRIL = "April" + MAY = "May" + JUNE = "June" + JULY = "July" + AUGUST = "August" + SEPTEMBER = "September" + OCTOBER = "October" + NOVEMBER = "November" + DECEMBER = "December" + +class OperationStatusValues(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Operation status. + """ + + INVALID = "Invalid" + IN_PROGRESS = "InProgress" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CANCELED = "Canceled" + +class OperationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Re-Do Operation + """ + + INVALID = "Invalid" + REGISTER = "Register" + REREGISTER = "Reregister" + +class OverwriteOptions(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Can Overwrite if Target DataBase already exists + """ + + INVALID = "Invalid" + FAIL_ON_CONFLICT = "FailOnConflict" + OVERWRITE = "Overwrite" + +class PolicyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of backup policy type + """ + + INVALID = "Invalid" + FULL = "Full" + DIFFERENTIAL = "Differential" + LOG = "Log" + COPY_ONLY_FULL = "CopyOnlyFull" + INCREMENTAL = "Incremental" + +class PrivateEndpointConnectionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Gets or sets the status + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + +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 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. + """ + + INVALID = "Invalid" + IR_PENDING = "IRPending" + PROTECTED = "Protected" + PROTECTION_ERROR = "ProtectionError" + PROTECTION_STOPPED = "ProtectionStopped" + PROTECTION_PAUSED = "ProtectionPaused" + +class ProtectionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specifies whether the container is registered or not + """ + + INVALID = "Invalid" + NOT_PROTECTED = "NotProtected" + PROTECTING = "Protecting" + PROTECTED = "Protected" + PROTECTION_FAILED = "ProtectionFailed" + +class ProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Gets or sets provisioning state of the private endpoint connection + """ + + SUCCEEDED = "Succeeded" + DELETING = "Deleting" + FAILED = "Failed" + PENDING = "Pending" + +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 RehydrationPriority(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Rehydration Priority + """ + + STANDARD = "Standard" + HIGH = "High" + +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 RetentionDurationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Retention duration type of retention policy. + """ + + INVALID = "Invalid" + DAYS = "Days" + WEEKS = "Weeks" + MONTHS = "Months" + YEARS = "Years" + +class RetentionScheduleFormat(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Retention schedule format type for monthly retention policy. + """ + + INVALID = "Invalid" + DAILY = "Daily" + WEEKLY = "Weekly" + +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)): + """Soft Delete feature state + """ + + INVALID = "Invalid" + ENABLED = "Enabled" + DISABLED = "Disabled" + +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 SupportStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Support status of feature + """ + + INVALID = "Invalid" + SUPPORTED = "Supported" + DEFAULT_OFF = "DefaultOFF" + DEFAULT_ON = "DefaultON" + NOT_SUPPORTED = "NotSupported" + +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 ValidationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Validation Status + """ + + INVALID = "Invalid" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + +class WeekOfMonth(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + FIRST = "First" + SECOND = "Second" + THIRD = "Third" + FOURTH = "Fourth" + LAST = "Last" + INVALID = "Invalid" + +class WorkloadItemType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Workload item type of the item for which intent is to be set + """ + + INVALID = "Invalid" + SQL_INSTANCE = "SQLInstance" + SQL_DATA_BASE = "SQLDataBase" + SAP_HANA_SYSTEM = "SAPHanaSystem" + SAP_HANA_DATABASE = "SAPHanaDatabase" + SAP_ASE_SYSTEM = "SAPAseSystem" + SAP_ASE_DATABASE = "SAPAseDatabase" + +class WorkloadType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of workload for the backup management + """ + + 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 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/activestamp/operations/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/__init__.py new file mode 100644 index 000000000000..262a069be4dc --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/__init__.py @@ -0,0 +1,109 @@ +# 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_resource_storage_configs_non_crr_operations import BackupResourceStorageConfigsNonCRROperations +from ._protection_intent_operations import ProtectionIntentOperations +from ._backup_status_operations import BackupStatusOperations +from ._feature_support_operations import FeatureSupportOperations +from ._backup_protection_intent_operations import BackupProtectionIntentOperations +from ._backup_usage_summaries_operations import BackupUsageSummariesOperations +from ._operations import Operations +from ._backup_resource_vault_configs_operations import BackupResourceVaultConfigsOperations +from ._backup_resource_encryption_configs_operations import BackupResourceEncryptionConfigsOperations +from ._private_endpoint_connection_operations import PrivateEndpointConnectionOperations +from ._private_endpoint_operations import PrivateEndpointOperations +from ._recovery_services_backup_client_operations import RecoveryServicesBackupClientOperationsMixin +from ._bms_prepare_data_move_operation_result_operations import BMSPrepareDataMoveOperationResultOperations +from ._protected_items_operations import ProtectedItemsOperations +from ._protected_item_operation_results_operations import ProtectedItemOperationResultsOperations +from ._recovery_points_operations import RecoveryPointsOperations +from ._restores_operations import RestoresOperations +from ._backup_policies_operations import BackupPoliciesOperations +from ._protection_policies_operations import ProtectionPoliciesOperations +from ._protection_policy_operation_results_operations import ProtectionPolicyOperationResultsOperations +from ._backup_jobs_operations import BackupJobsOperations +from ._job_details_operations import JobDetailsOperations +from ._job_cancellations_operations import JobCancellationsOperations +from ._job_operation_results_operations import JobOperationResultsOperations +from ._export_jobs_operation_results_operations import ExportJobsOperationResultsOperations +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 +from ._protection_containers_operations import ProtectionContainersOperations +from ._backup_workload_items_operations import BackupWorkloadItemsOperations +from ._protection_container_operation_results_operations import ProtectionContainerOperationResultsOperations +from ._backups_operations import BackupsOperations +from ._protected_item_operation_statuses_operations import ProtectedItemOperationStatusesOperations +from ._item_level_recovery_connections_operations import ItemLevelRecoveryConnectionsOperations +from ._backup_operation_results_operations import BackupOperationResultsOperations +from ._backup_operation_statuses_operations import BackupOperationStatusesOperations +from ._protection_policy_operation_statuses_operations import ProtectionPolicyOperationStatusesOperations +from ._backup_protectable_items_operations import BackupProtectableItemsOperations +from ._backup_protection_containers_operations import BackupProtectionContainersOperations +from ._security_pins_operations import SecurityPINsOperations +from ._recovery_points_recommended_for_move_operations import RecoveryPointsRecommendedForMoveOperations +from ._resource_guard_proxies_operations import ResourceGuardProxiesOperations +from ._resource_guard_proxy_operations import ResourceGuardProxyOperations + +__all__ = [ + 'BackupResourceStorageConfigsNonCRROperations', + 'ProtectionIntentOperations', + 'BackupStatusOperations', + 'FeatureSupportOperations', + 'BackupProtectionIntentOperations', + 'BackupUsageSummariesOperations', + 'Operations', + 'BackupResourceVaultConfigsOperations', + 'BackupResourceEncryptionConfigsOperations', + 'PrivateEndpointConnectionOperations', + 'PrivateEndpointOperations', + 'RecoveryServicesBackupClientOperationsMixin', + 'BMSPrepareDataMoveOperationResultOperations', + 'ProtectedItemsOperations', + 'ProtectedItemOperationResultsOperations', + 'RecoveryPointsOperations', + 'RestoresOperations', + 'BackupPoliciesOperations', + 'ProtectionPoliciesOperations', + 'ProtectionPolicyOperationResultsOperations', + 'BackupJobsOperations', + 'JobDetailsOperations', + 'JobCancellationsOperations', + 'JobOperationResultsOperations', + 'ExportJobsOperationResultsOperations', + 'JobsOperations', + 'BackupProtectedItemsOperations', + 'OperationOperations', + 'ValidateOperationOperations', + 'ValidateOperationResultsOperations', + 'ValidateOperationStatusesOperations', + 'BackupEnginesOperations', + 'ProtectionContainerRefreshOperationResultsOperations', + 'ProtectableContainersOperations', + 'ProtectionContainersOperations', + 'BackupWorkloadItemsOperations', + 'ProtectionContainerOperationResultsOperations', + 'BackupsOperations', + 'ProtectedItemOperationStatusesOperations', + 'ItemLevelRecoveryConnectionsOperations', + 'BackupOperationResultsOperations', + 'BackupOperationStatusesOperations', + 'ProtectionPolicyOperationStatusesOperations', + 'BackupProtectableItemsOperations', + 'BackupProtectionContainersOperations', + 'SecurityPINsOperations', + 'RecoveryPointsRecommendedForMoveOperations', + 'ResourceGuardProxiesOperations', + 'ResourceGuardProxyOperations', +] diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_engines_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_engines_operations.py new file mode 100644 index 000000000000..0bdc0fe6d3ec --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_engines_operations.py @@ -0,0 +1,295 @@ +# 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.paging import ItemPaged +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, 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + filter=None, # type: Optional[str] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BackupEngineBaseResourceList"] + """Backup management servers registered to Recovery Services Vault. Returns a pageable list of + servers. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupEngineBaseResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupEngineBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupEngineBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + 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 + resource_group_name, # type: str + backup_engine_name, # type: str + filter=None, # type: Optional[str] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupEngineBaseResource" + """Returns backup management server registered to Recovery Services Vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param backup_engine_name: Name of the backup management server. + :type backup_engine_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupEngineBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupEngineBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupEngineBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + filter=filter, + skip_token=skip_token, + 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('BackupEngineBaseResource', pipeline_response) + + if cls: + 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/activestamp/operations/_backup_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_jobs_operations.py new file mode 100644 index 000000000000..f41febc7886d --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_jobs_operations.py @@ -0,0 +1,183 @@ +# 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.paging import ItemPaged +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, 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + filter=None, # type: Optional[str] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.JobResourceList"] + """Provides a pageable list of jobs. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_operation_results_operations.py new file mode 100644 index 000000000000..a14a3cb99288 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_operation_results_operations.py @@ -0,0 +1,150 @@ +# 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 = "2021-10-01" + 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. + + 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.activestamp.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: (...) -> None + """Provides the status of the delete operations such as deleting backed up item. Once the + operation has started, the + status code in the response would be Accepted. It will continue to be in this state till it + reaches completion. On + successful completion, the status code will be OK. This method expects OperationID as an + argument. OperationID is + part of the Location header of the operation response. + + :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. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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, 204]: + 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, {}) + + 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/activestamp/operations/_backup_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_operation_statuses_operations.py new file mode 100644 index 000000000000..59588bb6fe16 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_operation_statuses_operations.py @@ -0,0 +1,152 @@ +# 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 = "2021-10-01" + 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. + + 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.activestamp.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 an operation such as triggering a backup, restore. The status can be in + progress, completed + or failed. You can refer to the OperationStatus enum for all the possible states of an + operation. Some operations + create jobs. This method returns the list of jobs when the operation is complete. + + :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. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationStatus, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.activestamp.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', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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}/backupOperations/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_policies_operations.py new file mode 100644 index 000000000000..4af63a9eab19 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_policies_operations.py @@ -0,0 +1,178 @@ +# 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.paging import ItemPaged +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, 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProtectionPolicyResourceList"] + """Lists of backup policies associated with Recovery Services Vault. API provides pagination + parameters to fetch + scoped results. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :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.activestamp.models.ProtectionPolicyResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionPolicyResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protectable_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protectable_items_operations.py new file mode 100644 index 000000000000..13d1a4fa7fc8 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protectable_items_operations.py @@ -0,0 +1,186 @@ +# 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.paging import ItemPaged +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, 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + filter=None, # type: Optional[str] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WorkloadProtectableItemResourceList"] + """Provides a pageable list of protectable objects within your subscription according to the query + filter and the + pagination parameters. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkloadProtectableItemResourceList or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadProtectableItemResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadProtectableItemResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protected_items_operations.py new file mode 100644 index 000000000000..478b7b474768 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protected_items_operations.py @@ -0,0 +1,184 @@ +# 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.paging import ItemPaged +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, 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + filter=None, # type: Optional[str] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProtectedItemResourceList"] + """Provides a pageable list of all items that are backed up within a vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProtectedItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectedItemResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectedItemResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protection_containers_operations.py new file mode 100644 index 000000000000..f4c09d37619f --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protection_containers_operations.py @@ -0,0 +1,176 @@ +# 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.paging import ItemPaged +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, 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProtectionContainerResourceList"] + """Lists the containers registered to Recovery Services Vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :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.activestamp.models.ProtectionContainerResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionContainerResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protection_intent_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protection_intent_operations.py new file mode 100644 index 000000000000..5f77003f3380 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_protection_intent_operations.py @@ -0,0 +1,184 @@ +# 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.paging import ItemPaged +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, 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + filter=None, # type: Optional[str] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProtectionIntentResourceList"] + """Provides a pageable list of all intents that are present within a vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProtectionIntentResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionIntentResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionIntentResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_resource_encryption_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_resource_encryption_configs_operations.py new file mode 100644 index 000000000000..8956523f1c80 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_resource_encryption_configs_operations.py @@ -0,0 +1,243 @@ +# 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 = "2021-10-01" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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.BackupResourceEncryptionConfigExtendedResource" + """Fetches Vault Encryption 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: BackupResourceEncryptionConfigExtendedResource, or the result of cls(response) + :rtype: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupResourceEncryptionConfigExtendedResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceEncryptionConfigExtendedResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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('BackupResourceEncryptionConfigExtendedResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + parameters, # type: "_models.BackupResourceEncryptionConfigResource" + **kwargs # type: Any + ): + # type: (...) -> None + """Updates Vault encryption config. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: Vault encryption input config request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupResourceEncryptionConfigResource + :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', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupResourceEncryptionConfigResource') + + request = build_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + + 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/activestamp/operations/_backup_resource_storage_configs_non_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_resource_storage_configs_non_crr_operations.py new file mode 100644 index 000000000000..d91a2e6edeeb --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_resource_storage_configs_non_crr_operations.py @@ -0,0 +1,345 @@ +# 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 = "2021-10-01" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 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.activestamp.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', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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.activestamp.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.activestamp.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', {})) + + 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, + 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.activestamp.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', {})) + + 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, + 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/activestamp/operations/_backup_resource_vault_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_resource_vault_configs_operations.py new file mode 100644 index 000000000000..97530c553a92 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_resource_vault_configs_operations.py @@ -0,0 +1,349 @@ +# 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 = "2021-10-01" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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.BackupResourceVaultConfigResource" + """Fetches resource vault config. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :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.activestamp.models.BackupResourceVaultConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceVaultConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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('BackupResourceVaultConfigResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + parameters, # type: "_models.BackupResourceVaultConfigResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupResourceVaultConfigResource" + """Updates vault security config. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: resource config request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupResourceVaultConfigResource + :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.activestamp.models.BackupResourceVaultConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceVaultConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupResourceVaultConfigResource') + + request = build_update_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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('BackupResourceVaultConfigResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + parameters, # type: "_models.BackupResourceVaultConfigResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupResourceVaultConfigResource" + """Updates vault security config. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: resource config request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupResourceVaultConfigResource + :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.activestamp.models.BackupResourceVaultConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceVaultConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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, + content_type=content_type, + json=_json, + template_url=self.put.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('BackupResourceVaultConfigResource', pipeline_response) + + if cls: + 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/activestamp/operations/_backup_status_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_status_operations.py new file mode 100644 index 000000000000..beb194b3090a --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_status_operations.py @@ -0,0 +1,149 @@ +# 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( + azure_region, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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, + azure_region, # type: str + parameters, # type: "_models.BackupStatusRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupStatusResponse" + """Get the container backup status. + + Get the container backup status. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param parameters: Container Backup Status Request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupStatusRequest + :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.activestamp.models.BackupStatusResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupStatusResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackupStatusRequest') + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + 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 + + 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('BackupStatusResponse', pipeline_response) + + if cls: + 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/activestamp/operations/_backup_usage_summaries_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_usage_summaries_operations.py new file mode 100644 index 000000000000..f37d734210da --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_usage_summaries_operations.py @@ -0,0 +1,184 @@ +# 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.paging import ItemPaged +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, 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + filter=None, # type: Optional[str] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BackupManagementUsageList"] + """Fetches the backup management usage summaries of the vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupManagementUsageList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupManagementUsageList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupManagementUsageList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_workload_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_workload_items_operations.py new file mode 100644 index 000000000000..53ca751da345 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backup_workload_items_operations.py @@ -0,0 +1,200 @@ +# 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.paging import ItemPaged +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, 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + fabric_name, # type: str + container_name, # type: str + filter=None, # type: Optional[str] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WorkloadItemResourceList"] + """Provides a pageable list of workload item of a specific container according to the query filter + and the pagination + parameters. + + :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 filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkloadItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.WorkloadItemResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkloadItemResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + 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, + 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: + + 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, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backups_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backups_operations.py new file mode 100644 index 000000000000..0d87b2800369 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_backups_operations.py @@ -0,0 +1,170 @@ +# 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_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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 trigger( + self, + vault_name, # type: str + resource_group_name, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + parameters, # type: "_models.BackupRequestResource" + **kwargs # type: Any + ): + # type: (...) -> None + """Triggers backup for specified backed up item. This is an asynchronous operation. To know the + status of the + operation, call GetProtectedItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backup item. + :type fabric_name: str + :param container_name: Container name associated with the backup item. + :type container_name: str + :param protected_item_name: Backup item for which backup needs to be triggered. + :type protected_item_name: str + :param parameters: resource backup request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupRequestResource + :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', {})) + + 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, + content_type=content_type, + json=_json, + template_url=self.trigger.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.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/activestamp/operations/_bms_prepare_data_move_operation_result_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_bms_prepare_data_move_operation_result_operations.py new file mode 100644 index 000000000000..9794ceb44880 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_bms_prepare_data_move_operation_result_operations.py @@ -0,0 +1,153 @@ +# 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 = "2021-10-01" + 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. + + 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.activestamp.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.VaultStorageConfigOperationResultResponse"] + """Fetches Operation Result for Prepare Data Move. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param operation_id: + :type operation_id: str + :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.activestamp.models.VaultStorageConfigOperationResultResponse + or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VaultStorageConfigOperationResultResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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) + 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('VaultStorageConfigOperationResultResponse', 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/operationResults/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_export_jobs_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_export_jobs_operation_results_operations.py new file mode 100644 index 000000000000..8390ffebd92e --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_export_jobs_operation_results_operations.py @@ -0,0 +1,155 @@ +# 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, 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 = "2021-10-01" + 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. + + 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.activestamp.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.OperationResultInfoBaseResource" + """Gets the operation result of operation triggered by Export Jobs API. If the operation is + successful, then it also + contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in + JSON serialized format. + + :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 export job. + :type operation_id: 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.activestamp.models.OperationResultInfoBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationResultInfoBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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) + + if response.status_code == 200: + deserialized = self._deserialize('OperationResultInfoBaseResource', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('OperationResultInfoBaseResource', pipeline_response) + + if cls: + 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/activestamp/operations/_feature_support_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_feature_support_operations.py new file mode 100644 index 000000000000..799f995ace0d --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_feature_support_operations.py @@ -0,0 +1,150 @@ +# 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_validate_request( + azure_region, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 validate( + self, + azure_region, # type: str + parameters, # type: "_models.FeatureSupportRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.AzureVMResourceFeatureSupportResponse" + """It will validate if given feature with resource properties is supported in service. + + It will validate if given feature with resource properties is supported in service. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param parameters: Feature support request object. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.FeatureSupportRequest + :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.activestamp.models.AzureVMResourceFeatureSupportResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureVMResourceFeatureSupportResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'FeatureSupportRequest') + + request = build_validate_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + template_url=self.validate.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('AzureVMResourceFeatureSupportResponse', pipeline_response) + + if cls: + 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/activestamp/operations/_item_level_recovery_connections_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_item_level_recovery_connections_operations.py new file mode 100644 index 000000000000..c6fb06b49b5f --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_item_level_recovery_connections_operations.py @@ -0,0 +1,293 @@ +# 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_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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 = "2021-10-01" + 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. + + 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.activestamp.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 provision( + 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.ILRRequestResource" + **kwargs # type: Any + ): + # type: (...) -> None + """Provisions a script which invokes an iSCSI connection to the backup data. Executing this script + opens a file + explorer displaying all the recoverable files and folders. This is an asynchronous operation. + To know the status of + provisioning, call GetProtectedItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up items. + :type fabric_name: str + :param container_name: Container name associated with the backed up items. + :type container_name: str + :param protected_item_name: Backed up item name whose files/folders are to be restored. + :type protected_item_name: str + :param recovery_point_id: Recovery point ID which represents backed up data. iSCSI connection + will be provisioned + for this backed up data. + :type recovery_point_id: str + :param parameters: resource ILR request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ILRRequestResource + :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', {})) + + 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, + content_type=content_type, + json=_json, + template_url=self.provision.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, {}) + + 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 + resource_group_name, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + recovery_point_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Revokes an iSCSI connection which can be used to download a script. Executing this script opens + a file explorer + displaying all recoverable files and folders. This is an asynchronous 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 fabric_name: Fabric name associated with the backed up items. + :type fabric_name: str + :param container_name: Container name associated with the backed up items. + :type container_name: str + :param protected_item_name: Backed up item name whose files/folders are to be restored. + :type protected_item_name: str + :param recovery_point_id: Recovery point ID which represents backed up data. iSCSI connection + will be revoked for + this backed up data. + :type recovery_point_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + template_url=self.revoke.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, {}) + + 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/activestamp/operations/_job_cancellations_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_job_cancellations_operations.py new file mode 100644 index 000000000000..72eb681809ba --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_job_cancellations_operations.py @@ -0,0 +1,145 @@ +# 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_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 = "2021-10-01" + 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. + + 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.activestamp.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 trigger( + self, + vault_name, # type: str + resource_group_name, # type: str + job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call + GetCancelOperationResult 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 job_name: Name of the job to cancel. + :type job_name: 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', {})) + + + request = build_trigger_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + job_name=job_name, + template_url=self.trigger.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.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/activestamp/operations/_job_details_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_job_details_operations.py new file mode 100644 index 000000000000..a6d83599e452 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_job_details_operations.py @@ -0,0 +1,148 @@ +# 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 + job_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2021-10-01" + 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. + + 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.activestamp.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 + job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.JobResource" + """Gets extended information associated with the job. + + :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 job_name: Name of the job whose details are to be fetched. + :type job_name: 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.activestamp.models.JobResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + job_name=job_name, + 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('JobResource', pipeline_response) + + if cls: + 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/activestamp/operations/_job_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_job_operation_results_operations.py new file mode 100644 index 000000000000..5d43cd97cb5c --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_job_operation_results_operations.py @@ -0,0 +1,150 @@ +# 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 + job_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2021-10-01" + 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. + + 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.activestamp.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 + job_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Fetches the result of any 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 job_name: Job name whose operation result has to be fetched. + :type job_name: str + :param operation_id: OperationID which represents the operation whose result has to be fetched. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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, 204]: + 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, {}) + + 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/activestamp/operations/_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_jobs_operations.py new file mode 100644 index 000000000000..24d00eb4df4d --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_jobs_operations.py @@ -0,0 +1,146 @@ +# 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_export_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + filter = kwargs.pop('filter', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 export( + self, + vault_name, # type: str + resource_group_name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + """Triggers export of jobs specified by filters and returns an OperationID to track. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :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', {})) + + + request = build_export_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + filter=filter, + template_url=self.export.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, {}) + + 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/activestamp/operations/_operation_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_operation_operations.py new file mode 100644 index 000000000000..b3de486deccc --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_operation_operations.py @@ -0,0 +1,155 @@ +# 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_validate_request( + vault_name, # type: str + resource_group_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 validate( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.ValidateOperationRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.ValidateOperationsResponse" + """Validate operation for specified backed up item. This is a synchronous operation. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: resource validate operation request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ValidateOperationRequest + :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.activestamp.models.ValidateOperationsResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateOperationsResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ValidateOperationRequest') + + request = build_validate_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + template_url=self.validate.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('ValidateOperationsResponse', pipeline_response) + + if cls: + 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/activestamp/operations/_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_operations.py new file mode 100644 index 000000000000..ea5624b4ba44 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_operations.py @@ -0,0 +1,144 @@ +# 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.paging import ItemPaged +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 + +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 = "2021-10-01" + 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. + + 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.activestamp.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 list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ClientDiscoveryResponse"] + """Returns the list of available operations. + + :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.activestamp.models.ClientDiscoveryResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClientDiscoveryResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.RecoveryServices/operations'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_private_endpoint_connection_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_private_endpoint_connection_operations.py new file mode 100644 index 000000000000..2a34c9877457 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_private_endpoint_connection_operations.py @@ -0,0 +1,467 @@ +# 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_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 = "2021-10-01" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 = "2021-10-01" + 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. + + 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.activestamp.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 + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnectionResource" + """Get Private Endpoint Connection. This call is made by Backup Admin. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :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.activestamp.models.PrivateEndpointConnectionResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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('PrivateEndpointConnectionResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnectionResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnectionResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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, + 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) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnectionResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.PrivateEndpointConnectionResource"] + """Approve or Reject Private Endpoint requests. This call is made by Backup Admin. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: Request body for operation. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.PrivateEndpointConnectionResource + :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 PrivateEndpointConnectionResource or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.recoveryservicesbackup.activestamp.models.PrivateEndpointConnectionResource] + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._put_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + private_endpoint_connection_name=private_endpoint_connection_name, + parameters=parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', 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 + + + 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_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _delete_initial( + self, + vault_name, # type: str + resource_group_name, # type: str + private_endpoint_connection_name, # type: str + **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', {})) + + + 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, + template_url=self._delete_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 [200, 202, 204]: + 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, {}) + + _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 + resource_group_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete Private Endpoint requests. This call is made by Backup Admin. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, 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._delete_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + private_endpoint_connection_name=private_endpoint_connection_name, + 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_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/activestamp/operations/_private_endpoint_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_private_endpoint_operations.py new file mode 100644 index 000000000000..438a30dbd17e --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_private_endpoint_operations.py @@ -0,0 +1,157 @@ +# 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_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 = "2021-10-01" + 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. + + 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.activestamp.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_operation_status( + self, + vault_name, # type: str + resource_group_name, # type: str + private_endpoint_connection_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.OperationStatus" + """Gets the operation status for a private endpoint connection. + + Gets the operation status for a private endpoint connection. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param operation_id: Operation id. + :type operation_id: str + :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.activestamp.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', {})) + + + 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, + template_url=self.get_operation_status.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('OperationStatus', pipeline_response) + + if cls: + 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/activestamp/operations/_protectable_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protectable_containers_operations.py new file mode 100644 index 000000000000..f4cac367a984 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protectable_containers_operations.py @@ -0,0 +1,183 @@ +# 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.paging import ItemPaged +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, 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + fabric_name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProtectableContainerResourceList"] + """Lists the containers that can be registered to Recovery Services Vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: + :type fabric_name: str + :param filter: OData filter options. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProtectableContainerResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectableContainerResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectableContainerResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protected_item_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protected_item_operation_results_operations.py new file mode 100644 index 000000000000..b07a66e134bc --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protected_item_operation_results_operations.py @@ -0,0 +1,169 @@ +# 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 + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2021-10-01" + 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. + + 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.activestamp.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 + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ProtectedItemResource"] + """Fetches the result of any operation on the backup item. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backup item. + :type fabric_name: str + :param container_name: Container name associated with the backup item. + :type container_name: str + :param protected_item_name: Backup item name whose details are to be fetched. + :type protected_item_name: str + :param operation_id: OperationID which represents the operation whose result needs to be + fetched. + :type operation_id: 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.activestamp.models.ProtectedItemResource or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectedItemResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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, 204]: + 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('ProtectedItemResource', pipeline_response) + + if cls: + 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/activestamp/operations/_protected_item_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protected_item_operation_statuses_operations.py new file mode 100644 index 000000000000..2c5c8d977803 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protected_item_operation_statuses_operations.py @@ -0,0 +1,170 @@ +# 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 + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2021-10-01" + 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. + + 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.activestamp.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 + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.OperationStatus" + """Fetches the status of an operation such as triggering a backup, restore. The status can be in + progress, completed + or failed. You can refer to the OperationStatus enum for all the possible states of the + operation. Some operations + create jobs. This method returns the list of jobs associated with 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 fabric_name: Fabric name associated with the backup item. + :type fabric_name: str + :param container_name: Container name associated with the backup item. + :type container_name: str + :param protected_item_name: Backup item name whose details are to be fetched. + :type protected_item_name: str + :param operation_id: OperationID represents the operation whose status needs to be fetched. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationStatus, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.activestamp.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', {})) + + + 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, + 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}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protected_items_operations.py new file mode 100644 index 000000000000..e69073607d46 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protected_items_operations.py @@ -0,0 +1,399 @@ +# 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 + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + filter = kwargs.pop('filter', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 = "2021-10-01" + 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. + + 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.activestamp.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 + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.ProtectedItemResource" + """Provides the details of the backed up item. This is an asynchronous operation. To know the + status of the operation, + call the GetItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up item. + :type fabric_name: str + :param container_name: Container name associated with the backed up item. + :type container_name: str + :param protected_item_name: Backed up item name whose details are to be fetched. + :type protected_item_name: str + :param filter: OData filter options. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProtectedItemResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectedItemResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectedItemResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + filter=filter, + 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('ProtectedItemResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + parameters, # type: "_models.ProtectedItemResource" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ProtectedItemResource"] + """Enables backup of an item or to modifies the backup policy information of an already backed up + item. This is an + asynchronous operation. To know the status of the operation, call the GetItemOperationResult + API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backup item. + :type fabric_name: str + :param container_name: Container name associated with the backup item. + :type container_name: str + :param protected_item_name: Item name to be backed up. + :type protected_item_name: str + :param parameters: resource backed up item. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectedItemResource + :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.activestamp.models.ProtectedItemResource or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectedItemResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + 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, + 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) + + 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('ProtectedItemResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Used to disable backup of an item within a container. This is an asynchronous operation. To + know the status of the + request, call the GetItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up item. + :type fabric_name: str + :param container_name: Container name associated with the backed up item. + :type container_name: str + :param protected_item_name: Backed up item to be deleted. + :type protected_item_name: 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', {})) + + + 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, + template_url=self.delete.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, 204]: + 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, {}) + + 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/activestamp/operations/_protection_container_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_container_operation_results_operations.py new file mode 100644 index 000000000000..5ee2a9ec19d4 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_container_operation_results_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 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 + fabric_name, # type: str + container_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2021-10-01" + 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. + + 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.activestamp.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 + fabric_name, # type: str + container_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ProtectionContainerResource"] + """Fetches the result of any operation on the container. + + :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: Container name whose information should be fetched. + :type container_name: str + :param operation_id: Operation ID which represents the operation whose result needs to be + fetched. + :type operation_id: 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.activestamp.models.ProtectionContainerResource or + None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectionContainerResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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, 204]: + 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('ProtectionContainerResource', pipeline_response) + + if cls: + 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/activestamp/operations/_protection_container_refresh_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_container_refresh_operation_results_operations.py new file mode 100644 index 000000000000..f63e370c0f14 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_container_refresh_operation_results_operations.py @@ -0,0 +1,151 @@ +# 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 + fabric_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2021-10-01" + 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. + + 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.activestamp.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 + fabric_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Provides the result of the refresh operation triggered by the BeginRefresh 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 fabric_name: Fabric name associated with the container. + :type fabric_name: str + :param operation_id: Operation ID associated with the operation whose result needs to be + fetched. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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 [202, 204]: + 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, {}) + + 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/activestamp/operations/_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_containers_operations.py new file mode 100644 index 000000000000..d6d54a48075d --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_containers_operations.py @@ -0,0 +1,585 @@ +# 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 + fabric_name, # type: str + container_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2021-10-01" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 = "2021-10-01" + 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 + fabric_name, # type: str + container_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ProtectionContainerResource" + """Gets details of the specific container registered to your Recovery Services Vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Name of the fabric where the container belongs. + :type fabric_name: str + :param container_name: Name of the container whose details need to be fetched. + :type container_name: 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.activestamp.models.ProtectionContainerResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionContainerResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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('ProtectionContainerResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + fabric_name, # type: str + container_name, # type: str + parameters, # type: "_models.ProtectionContainerResource" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ProtectionContainerResource"] + """Registers the container with Recovery Services vault. + This is an asynchronous operation. To track the operation status, use location header to call + get latest status of + 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 fabric_name: Fabric name associated with the container. + :type fabric_name: str + :param container_name: Name of the container to be registered. + :type container_name: str + :param parameters: Request body for operation. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionContainerResource + :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.activestamp.models.ProtectionContainerResource or + None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectionContainerResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + 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, + content_type=content_type, + json=_json, + template_url=self.register.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('ProtectionContainerResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + fabric_name, # type: str + container_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Unregisters the given container from your Recovery Services Vault. This is an asynchronous + operation. To determine + whether the backend service has finished processing the request, call Get Container Operation + Result API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Name of the fabric where the container belongs. + :type fabric_name: str + :param container_name: Name of the container which needs to be unregistered from the Recovery + Services Vault. + :type container_name: 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', {})) + + + 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, + template_url=self.unregister.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, 204]: + 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, {}) + + 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 + resource_group_name, # type: str + fabric_name, # type: str + container_name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + """Inquires all the protectable items under the given container. + + This is an async operation and the results should be tracked using location header or + Azure-async-url. + + :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 in which inquiry needs to be triggered. + :type container_name: str + :param filter: OData filter options. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: 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', {})) + + + 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, + filter=filter, + template_url=self.inquire.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, {}) + + 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 + resource_group_name, # type: str + fabric_name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + """Discovers all the containers in the subscription that can be backed up to Recovery Services + Vault. This is an + asynchronous operation. To know the status of the operation, call GetRefreshOperationResult + API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated the container. + :type fabric_name: str + :param filter: OData filter options. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: 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', {})) + + + request = build_refresh_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + fabric_name=fabric_name, + filter=filter, + template_url=self.refresh.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, {}) + + 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/activestamp/operations/_protection_intent_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_intent_operations.py new file mode 100644 index 000000000000..11146789b3d2 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_intent_operations.py @@ -0,0 +1,468 @@ +# 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_validate_request( + azure_region, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 = "2021-10-01" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 = "2021-10-01" + # 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. + + 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.activestamp.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 validate( + self, + azure_region, # type: str + parameters, # type: "_models.PreValidateEnableBackupRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.PreValidateEnableBackupResponse" + """It will validate followings + + + #. Vault capacity + #. VM is already protected + #. Any VM related configuration passed in properties. + + It will validate followings + + + #. Vault capacity + #. VM is already protected + #. Any VM related configuration passed in properties. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param parameters: Enable backup validation request on Virtual Machine. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.PreValidateEnableBackupRequest + :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.activestamp.models.PreValidateEnableBackupResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PreValidateEnableBackupResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PreValidateEnableBackupRequest') + + request = build_validate_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + template_url=self.validate.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('PreValidateEnableBackupResponse', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + fabric_name, # type: str + intent_object_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ProtectionIntentResource" + """Provides the details of the protection intent up item. This is an asynchronous operation. To + know the status of the operation, + call the GetItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up item. + :type fabric_name: str + :param intent_object_name: Backed up item name whose details are to be fetched. + :type intent_object_name: 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.activestamp.models.ProtectionIntentResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionIntentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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('ProtectionIntentResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + fabric_name, # type: str + intent_object_name, # type: str + parameters, # type: "_models.ProtectionIntentResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.ProtectionIntentResource" + """Create Intent for Enabling backup of an item. This is a synchronous 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 fabric_name: Fabric name associated with the backup item. + :type fabric_name: str + :param intent_object_name: Intent object name. + :type intent_object_name: str + :param parameters: resource backed up item. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionIntentResource + :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.activestamp.models.ProtectionIntentResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionIntentResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + 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, + 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) + + 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('ProtectionIntentResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + fabric_name, # type: str + intent_object_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Used to remove intent from an item. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the intent. + :type fabric_name: str + :param intent_object_name: Intent to be deleted. + :type intent_object_name: 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', {})) + + + 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, + template_url=self.delete.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) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + 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/activestamp/operations/_protection_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_policies_operations.py new file mode 100644 index 000000000000..6b9b7ede8cdb --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_policies_operations.py @@ -0,0 +1,409 @@ +# 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_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 = "2021-10-01" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 = "2021-10-01" + 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. + + 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.activestamp.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 + policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ProtectionPolicyResource" + """Provides the details of the backup policies associated to Recovery Services Vault. This is an + asynchronous + operation. Status of the operation can be fetched using GetPolicyOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param policy_name: Backup policy information to be fetched. + :type policy_name: 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.activestamp.models.ProtectionPolicyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionPolicyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + policy_name=policy_name, + 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('ProtectionPolicyResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + policy_name, # type: str + parameters, # type: "_models.ProtectionPolicyResource" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ProtectionPolicyResource"] + """Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation + can be fetched + using GetPolicyOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param policy_name: Backup policy to be created. + :type policy_name: str + :param parameters: resource backup policy. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ProtectionPolicyResource + :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.activestamp.models.ProtectionPolicyResource or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectionPolicyResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ProtectionPolicyResource') + + 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, + 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) + + 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('ProtectionPolicyResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + policy_name, # type: str + **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', {})) + + + 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, + template_url=self._delete_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 [200, 204]: + 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, {}) + + _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 + resource_group_name, # type: str + policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous + operation. Status of the + operation can be fetched using GetProtectionPolicyOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param policy_name: Backup policy to be deleted. + :type policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, 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._delete_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + policy_name=policy_name, + 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_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/activestamp/operations/_protection_policy_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_policy_operation_results_operations.py new file mode 100644 index 000000000000..ee2f14327374 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_policy_operation_results_operations.py @@ -0,0 +1,155 @@ +# 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 + policy_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2021-10-01" + 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. + + 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.activestamp.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 + policy_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ProtectionPolicyResource" + """Provides the result of an 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 policy_name: Backup policy name whose operation's result needs to be fetched. + :type policy_name: str + :param operation_id: Operation ID which represents the operation whose result needs to be + fetched. + :type operation_id: 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.activestamp.models.ProtectionPolicyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionPolicyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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('ProtectionPolicyResource', pipeline_response) + + if cls: + 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/activestamp/operations/_protection_policy_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_policy_operation_statuses_operations.py new file mode 100644 index 000000000000..9f4cef1602a9 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_protection_policy_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 + policy_name, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2021-10-01" + 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. + + 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.activestamp.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 + policy_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.OperationStatus" + """Provides the status of the asynchronous operations like backup, restore. The status can be in + progress, completed + or failed. You can refer to the Operation Status enum for all the possible states of an + operation. Some operations + create jobs. This method returns the list of jobs associated with 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 policy_name: Backup policy name whose operation's status needs to be fetched. + :type policy_name: str + :param operation_id: Operation ID which represents an operation whose status needs to be + fetched. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationStatus, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.activestamp.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', {})) + + + 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, + 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}/backupPolicies/{policyName}/operations/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_points_operations.py new file mode 100644 index 000000000000..ff92d98909ac --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_points_operations.py @@ -0,0 +1,312 @@ +# 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.paging import ItemPaged +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, 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 = "2021-10-01" + 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. + + 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.activestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RecoveryPointResourceList"] + """Lists the backup copies for the backed up item. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up item. + :type fabric_name: str + :param container_name: Container name associated with the backed up item. + :type container_name: str + :param protected_item_name: Backed up item whose backup copies are to be fetched. + :type protected_item_name: str + :param filter: OData filter options. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RecoveryPointResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.RecoveryPointResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + 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, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + 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, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints'} # type: ignore + + @distributed_trace + def get( + 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 + **kwargs # type: Any + ): + # type: (...) -> "_models.RecoveryPointResource" + """Provides the information of the backed up data identified using RecoveryPointID. This is an + asynchronous operation. + To know the status of the operation, call the GetProtectedItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with backed up item. + :type fabric_name: str + :param container_name: Container name associated with backed up item. + :type container_name: str + :param protected_item_name: Backed up item name whose backup data needs to be fetched. + :type protected_item_name: str + :param recovery_point_id: RecoveryPointID represents the backed up data to be fetched. + :type recovery_point_id: 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.activestamp.models.RecoveryPointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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('RecoveryPointResource', pipeline_response) + + if cls: + 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 + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_points_recommended_for_move_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_points_recommended_for_move_operations.py new file mode 100644 index 000000000000..84983fb9d7fd --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_points_recommended_for_move_operations.py @@ -0,0 +1,204 @@ +# 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.paging import ItemPaged +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, 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + parameters, # type: "_models.ListRecoveryPointsRecommendedForMoveRequest" + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RecoveryPointResourceList"] + """Lists the recovery points recommended for move to another tier. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: + :type fabric_name: str + :param container_name: + :type container_name: str + :param protected_item_name: + :type protected_item_name: str + :param parameters: List Recovery points Recommended for Move Request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.ListRecoveryPointsRecommendedForMoveRequest + :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.activestamp.models.RecoveryPointResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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', {})) + def prepare_request(next_link=None): + if not next_link: + _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, + 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: + _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, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPointsRecommendedForMove'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_services_backup_client_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_services_backup_client_operations.py new file mode 100644 index 000000000000..2fb4acf7af0b --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_services_backup_client_operations.py @@ -0,0 +1,619 @@ +# 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_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 = "2021-10-01" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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 + resource_group_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.OperationStatus" + """Fetches operation status for data move operation on vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param operation_id: + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationStatus, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.activestamp.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', {})) + + + 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, + template_url=self.get_operation_status.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('OperationStatus', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + parameters, # type: "_models.PrepareDataMoveRequest" + **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', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PrepareDataMoveRequest') + + request = build_bms_prepare_data_move_request_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + + 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) + + 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 + resource_group_name, # type: str + parameters, # type: "_models.PrepareDataMoveRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Prepares source vault for Data Move operation. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: Prepare data move request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.PrepareDataMoveRequest + :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 + """ + 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._bms_prepare_data_move_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + 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_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( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.TriggerDataMoveRequest" + **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', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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, + 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) + + 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) + + 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 + resource_group_name, # type: str + parameters, # type: "_models.TriggerDataMoveRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Triggers Data Move Operation on target vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: Trigger data move request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.TriggerDataMoveRequest + :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 + """ + 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._bms_trigger_data_move_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + 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_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( + 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.MoveRPAcrossTiersRequest" + **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', {})) + + 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, + 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) + + 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, {}) + + _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 + 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.MoveRPAcrossTiersRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Move recovery point from one datastore to another store. + + Move recovery point from one datastore to another store. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: + :type fabric_name: str + :param container_name: + :type container_name: str + :param protected_item_name: + :type protected_item_name: str + :param recovery_point_id: + :type recovery_point_id: str + :param parameters: Move Resource Across Tiers Request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.activestamp.models.MoveRPAcrossTiersRequest + :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 + """ + 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._move_recovery_point_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + parameters=parameters, + 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_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/activestamp/operations/_resource_guard_proxies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_resource_guard_proxies_operations.py new file mode 100644 index 000000000000..4e2349802cec --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_resource_guard_proxies_operations.py @@ -0,0 +1,167 @@ +# 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.paging import ItemPaged +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, 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 = "2021-10-01" + 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. + + 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.activestamp.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: (...) -> Iterable["_models.ResourceGuardProxyBaseResourceList"] + """List the ResourceGuardProxies under vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :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.activestamp.models.ResourceGuardProxyBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_resource_guard_proxy_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_resource_guard_proxy_operations.py new file mode 100644 index 000000000000..0db32949d9e6 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_resource_guard_proxy_operations.py @@ -0,0 +1,442 @@ +# 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 + resource_guard_proxy_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2021-10-01" + 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 = "2021-10-01" + 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 = "2021-10-01" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 + resource_guard_proxy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ResourceGuardProxyBaseResource" + """Returns ResourceGuardProxy under vault and with the name referenced in request. + + :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 resource_guard_proxy_name: + :type resource_guard_proxy_name: 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.activestamp.models.ResourceGuardProxyBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + 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('ResourceGuardProxyBaseResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + resource_guard_proxy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ResourceGuardProxyBaseResource" + """Add or Update ResourceGuardProxy under vault + Secures vault critical operations. + + :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 resource_guard_proxy_name: + :type resource_guard_proxy_name: 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.activestamp.models.ResourceGuardProxyBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + 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, + template_url=self.put.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('ResourceGuardProxyBaseResource', pipeline_response) + + if cls: + 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 + resource_group_name, # type: str + resource_guard_proxy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete ResourceGuardProxy under vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param resource_guard_proxy_name: + :type resource_guard_proxy_name: 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', {})) + + + 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, + template_url=self.delete.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, 204]: + 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, {}) + + 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 + resource_group_name, # type: str + resource_guard_proxy_name, # type: str + parameters, # type: "_models.UnlockDeleteRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.UnlockDeleteResponse" + """Secures delete ResourceGuardProxy operations. + + :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 resource_guard_proxy_name: + :type resource_guard_proxy_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.UnlockDeleteRequest + :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.activestamp.models.UnlockDeleteResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UnlockDeleteResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[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, + 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) + + 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('UnlockDeleteResponse', pipeline_response) + + if cls: + 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/activestamp/operations/_restores_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_restores_operations.py new file mode 100644 index 000000000000..3b2a7c732442 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_restores_operations.py @@ -0,0 +1,240 @@ +# 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 + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + recovery_point_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + recovery_point_id, # type: str + parameters, # type: "_models.RestoreRequestResource" + **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', {})) + + 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, + 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}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'} # type: ignore + + + @distributed_trace + def begin_trigger( + 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.RestoreRequestResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Restores the specified backed up data. This is an asynchronous operation. To know the status of + this API call, use + GetProtectedItemOperationResult API. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up items. + :type fabric_name: str + :param container_name: Container name associated with the backed up items. + :type container_name: str + :param protected_item_name: Backed up item to be restored. + :type protected_item_name: str + :param recovery_point_id: Recovery point ID which represents the backed up data to be restored. + :type recovery_point_id: str + :param parameters: resource restore request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.RestoreRequestResource + :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 + """ + 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, + fabric_name=fabric_name, + container_name=container_name, + protected_item_name=protected_item_name, + recovery_point_id=recovery_point_id, + parameters=parameters, + 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}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_security_pins_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_security_pins_operations.py new file mode 100644 index 000000000000..d3da470cee1a --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_security_pins_operations.py @@ -0,0 +1,157 @@ +# 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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. + + 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.activestamp.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 + parameters=None, # type: Optional["_models.SecurityPinBase"] + **kwargs # type: Any + ): + # type: (...) -> "_models.TokenInformation" + """Get the security PIN. + + :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: security pin request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.activestamp.models.SecurityPinBase + :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.activestamp.models.TokenInformation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TokenInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'SecurityPinBase') + else: + _json = None + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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 + + 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('TokenInformation', pipeline_response) + + if cls: + 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/activestamp/operations/_validate_operation_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_validate_operation_operations.py new file mode 100644 index 000000000000..7a4404cb9598 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_validate_operation_operations.py @@ -0,0 +1,208 @@ +# 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + 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.activestamp.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', {})) + + 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, + 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.activestamp.models.ValidateOperationRequest + :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 + """ + 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, + 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/activestamp/operations/_validate_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_validate_operation_results_operations.py new file mode 100644 index 000000000000..1dfe2d2329e8 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_validate_operation_results_operations.py @@ -0,0 +1,152 @@ +# 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 = "2021-10-01" + 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.activestamp.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 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.activestamp.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', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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/activestamp/operations/_validate_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_validate_operation_statuses_operations.py new file mode 100644 index 000000000000..a225f5e3c6a2 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_validate_operation_statuses_operations.py @@ -0,0 +1,152 @@ +# 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 = "2021-10-01" + 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.activestamp.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 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.activestamp.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', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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 + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/py.typed b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/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/passivestamp/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/__init__.py new file mode 100644 index 000000000000..9121c742cc5c --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/__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 ._recovery_services_backup_passive_client import RecoveryServicesBackupPassiveClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['RecoveryServicesBackupPassiveClient'] + +# `._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/passivestamp/_configuration.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_configuration.py new file mode 100644 index 000000000000..416ea76d96f9 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_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 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 RecoveryServicesBackupPassiveClientConfiguration(Configuration): + """Configuration for RecoveryServicesBackupPassiveClient. + + 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 + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + super(RecoveryServicesBackupPassiveClientConfiguration, self).__init__(**kwargs) + 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 = "2018-12-20" + 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/passivestamp/_metadata.json b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_metadata.json new file mode 100644 index 000000000000..4c1ba10b1b64 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_metadata.json @@ -0,0 +1,112 @@ +{ + "chosen_version": "2018-12-20", + "total_api_version_list": ["2018-12-20"], + "client": { + "name": "RecoveryServicesBackupPassiveClient", + "filename": "_recovery_services_backup_passive_client", + "description": "Open API 2.0 Specs for Azure RecoveryServices Backup service.", + "host_value": "\"https://management.azure.com\"", + "parameterized_host_template": 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\": [\"RecoveryServicesBackupPassiveClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"RecoveryServicesBackupPassiveClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + }, + "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=\"https://management.azure.com\", # type: 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: str = \"https://management.azure.com\",", + "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_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", + "credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"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\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "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", + "recovery_points": "RecoveryPointsOperations", + "backup_resource_storage_configs": "BackupResourceStorageConfigsOperations", + "recovery_points_crr": "RecoveryPointsCrrOperations", + "backup_protected_items_crr": "BackupProtectedItemsCrrOperations" + } +} \ No newline at end of file diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_patch.py new file mode 100644 index 000000000000..74e48ecd07cf --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_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/passivestamp/_recovery_services_backup_passive_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_recovery_services_backup_passive_client.py new file mode 100644 index 000000000000..bb127fd66eee --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_recovery_services_backup_passive_client.py @@ -0,0 +1,138 @@ +# 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 RecoveryServicesBackupPassiveClientConfiguration +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 RecoveryServicesBackupPassiveClient(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.passivestamp.operations.BackupUsageSummariesCRROperations + :ivar aad_properties: AadPropertiesOperations operations + :vartype aad_properties: + azure.mgmt.recoveryservicesbackup.passivestamp.operations.AadPropertiesOperations + :ivar cross_region_restore: CrossRegionRestoreOperations operations + :vartype cross_region_restore: + azure.mgmt.recoveryservicesbackup.passivestamp.operations.CrossRegionRestoreOperations + :ivar backup_crr_job_details: BackupCrrJobDetailsOperations operations + :vartype backup_crr_job_details: + azure.mgmt.recoveryservicesbackup.passivestamp.operations.BackupCrrJobDetailsOperations + :ivar backup_crr_jobs: BackupCrrJobsOperations operations + :vartype backup_crr_jobs: + azure.mgmt.recoveryservicesbackup.passivestamp.operations.BackupCrrJobsOperations + :ivar crr_operation_results: CrrOperationResultsOperations operations + :vartype crr_operation_results: + azure.mgmt.recoveryservicesbackup.passivestamp.operations.CrrOperationResultsOperations + :ivar crr_operation_status: CrrOperationStatusOperations operations + :vartype crr_operation_status: + azure.mgmt.recoveryservicesbackup.passivestamp.operations.CrrOperationStatusOperations + :ivar recovery_points: RecoveryPointsOperations operations + :vartype recovery_points: + azure.mgmt.recoveryservicesbackup.passivestamp.operations.RecoveryPointsOperations + :ivar backup_resource_storage_configs: BackupResourceStorageConfigsOperations operations + :vartype backup_resource_storage_configs: + azure.mgmt.recoveryservicesbackup.passivestamp.operations.BackupResourceStorageConfigsOperations + :ivar recovery_points_crr: RecoveryPointsCrrOperations operations + :vartype recovery_points_crr: + azure.mgmt.recoveryservicesbackup.passivestamp.operations.RecoveryPointsCrrOperations + :ivar backup_protected_items_crr: BackupProtectedItemsCrrOperations operations + :vartype backup_protected_items_crr: + azure.mgmt.recoveryservicesbackup.passivestamp.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 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 = RecoveryServicesBackupPassiveClientConfiguration(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: () -> RecoveryServicesBackupPassiveClient + 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/passivestamp/_vendor.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_vendor.py new file mode 100644 index 000000000000..138f663c53a4 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_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/passivestamp/_version.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_version.py new file mode 100644 index 000000000000..e5754a47ce68 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_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/passivestamp/aio/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/__init__.py new file mode 100644 index 000000000000..1b19979c9cee --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/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 ._recovery_services_backup_passive_client import RecoveryServicesBackupPassiveClient +__all__ = ['RecoveryServicesBackupPassiveClient'] + +# `._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/passivestamp/aio/_configuration.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_configuration.py new file mode 100644 index 000000000000..a72531fc2778 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_configuration.py @@ -0,0 +1,67 @@ +# 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 RecoveryServicesBackupPassiveClientConfiguration(Configuration): + """Configuration for RecoveryServicesBackupPassiveClient. + + 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 + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + super(RecoveryServicesBackupPassiveClientConfiguration, self).__init__(**kwargs) + 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 = "2018-12-20" + 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/passivestamp/aio/_patch.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_patch.py new file mode 100644 index 000000000000..74e48ecd07cf --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/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/passivestamp/aio/_recovery_services_backup_passive_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_recovery_services_backup_passive_client.py new file mode 100644 index 000000000000..091a7867903b --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/_recovery_services_backup_passive_client.py @@ -0,0 +1,131 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +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 RecoveryServicesBackupPassiveClientConfiguration +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 RecoveryServicesBackupPassiveClient: + """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.passivestamp.aio.operations.BackupUsageSummariesCRROperations + :ivar aad_properties: AadPropertiesOperations operations + :vartype aad_properties: + azure.mgmt.recoveryservicesbackup.passivestamp.aio.operations.AadPropertiesOperations + :ivar cross_region_restore: CrossRegionRestoreOperations operations + :vartype cross_region_restore: + azure.mgmt.recoveryservicesbackup.passivestamp.aio.operations.CrossRegionRestoreOperations + :ivar backup_crr_job_details: BackupCrrJobDetailsOperations operations + :vartype backup_crr_job_details: + azure.mgmt.recoveryservicesbackup.passivestamp.aio.operations.BackupCrrJobDetailsOperations + :ivar backup_crr_jobs: BackupCrrJobsOperations operations + :vartype backup_crr_jobs: + azure.mgmt.recoveryservicesbackup.passivestamp.aio.operations.BackupCrrJobsOperations + :ivar crr_operation_results: CrrOperationResultsOperations operations + :vartype crr_operation_results: + azure.mgmt.recoveryservicesbackup.passivestamp.aio.operations.CrrOperationResultsOperations + :ivar crr_operation_status: CrrOperationStatusOperations operations + :vartype crr_operation_status: + azure.mgmt.recoveryservicesbackup.passivestamp.aio.operations.CrrOperationStatusOperations + :ivar recovery_points: RecoveryPointsOperations operations + :vartype recovery_points: + azure.mgmt.recoveryservicesbackup.passivestamp.aio.operations.RecoveryPointsOperations + :ivar backup_resource_storage_configs: BackupResourceStorageConfigsOperations operations + :vartype backup_resource_storage_configs: + azure.mgmt.recoveryservicesbackup.passivestamp.aio.operations.BackupResourceStorageConfigsOperations + :ivar recovery_points_crr: RecoveryPointsCrrOperations operations + :vartype recovery_points_crr: + azure.mgmt.recoveryservicesbackup.passivestamp.aio.operations.RecoveryPointsCrrOperations + :ivar backup_protected_items_crr: BackupProtectedItemsCrrOperations operations + :vartype backup_protected_items_crr: + azure.mgmt.recoveryservicesbackup.passivestamp.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 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 = RecoveryServicesBackupPassiveClientConfiguration(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) -> "RecoveryServicesBackupPassiveClient": + 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/passivestamp/aio/operations/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/__init__.py new file mode 100644 index 000000000000..7ac30ce43fb3 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/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/passivestamp/aio/operations/_aad_properties_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_aad_properties_operations.py new file mode 100644 index 000000000000..4c6802c4888d --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_aad_properties_operations.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import 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._aad_properties_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AadPropertiesOperations: + """AadPropertiesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.recoveryservicesbackup.passivestamp.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, + azure_region: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> "_models.AADPropertiesResource": + """Fetches the AAD properties from target region BCM stamp. + + Fetches the AAD properties from target region BCM stamp. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param filter: OData filter options. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AADPropertiesResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AADPropertiesResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AADPropertiesResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + filter=filter, + 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AADPropertiesResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_crr_job_details_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_crr_job_details_operations.py new file mode 100644 index 000000000000..6f73a7828d24 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_crr_job_details_operations.py @@ -0,0 +1,103 @@ +# 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._backup_crr_job_details_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BackupCrrJobDetailsOperations: + """BackupCrrJobDetailsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.recoveryservicesbackup.passivestamp.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, + azure_region: str, + parameters: "_models.CrrJobRequest", + **kwargs: Any + ) -> "_models.JobResource": + """Get CRR job details from target region. + + Get CRR job details from target region. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param parameters: CRR Job request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.passivestamp.models.CrrJobRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JobResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.passivestamp.models.JobResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'CrrJobRequest') + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + 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 + + 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('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_crr_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_crr_jobs_operations.py new file mode 100644 index 000000000000..54bf05af55fd --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_crr_jobs_operations.py @@ -0,0 +1,140 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import 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 +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]] + +class BackupCrrJobsOperations: + """BackupCrrJobsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.recoveryservicesbackup.passivestamp.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 + def list( + self, + azure_region: str, + parameters: "_models.CrrJobRequest", + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.JobResourceList"]: + """Gets the list of CRR jobs from the target region. + + Gets the list of CRR jobs from the target region. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param parameters: Backup CRR Job request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.passivestamp.models.CrrJobRequest + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.passivestamp.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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', {})) + def prepare_request(next_link=None): + if not next_link: + _json = self._serialize.body(parameters, 'CrrJobRequest') + + request = build_list_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + 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: + _json = self._serialize.body(parameters, 'CrrJobRequest') + + request = build_list_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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 + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_protected_items_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_protected_items_crr_operations.py new file mode 100644 index 000000000000..668a5df02e8f --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_protected_items_crr_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, 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 +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]] + +class BackupProtectedItemsCrrOperations: + """BackupProtectedItemsCrrOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.recoveryservicesbackup.passivestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ProtectedItemResourceList"]: + """Provides a pageable list of all items that are backed up within a vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProtectedItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.passivestamp.models.ProtectedItemResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectedItemResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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 + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_resource_storage_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_resource_storage_configs_operations.py new file mode 100644 index 000000000000..1f74de2fc940 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_resource_storage_configs_operations.py @@ -0,0 +1,218 @@ +# 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._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]] + +class BackupResourceStorageConfigsOperations: + """BackupResourceStorageConfigsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.recoveryservicesbackup.passivestamp.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, + **kwargs: Any + ) -> "_models.BackupResourceConfigResource": + """Fetches resource storage config. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupResourceConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.passivestamp.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', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + 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_async + async def update( + self, + vault_name: str, + resource_group_name: str, + parameters: "_models.BackupResourceConfigResource", + **kwargs: Any + ) -> "_models.BackupResourceConfigResource": + """Updates vault storage model type. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: Vault storage config request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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', {})) + + 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, + 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 = 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, 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_async + async def patch( + self, + vault_name: str, + resource_group_name: str, + parameters: "_models.BackupResourceConfigResource", + **kwargs: Any + ) -> None: + """Updates vault storage model type. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: Vault storage config request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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', {})) + + 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, + 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 = 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, 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/passivestamp/aio/operations/_backup_usage_summaries_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_usage_summaries_crr_operations.py new file mode 100644 index 000000000000..f5ee7ec87b30 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_backup_usage_summaries_crr_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, 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 +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]] + +class BackupUsageSummariesCRROperations: + """BackupUsageSummariesCRROperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.recoveryservicesbackup.passivestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.BackupManagementUsageList"]: + """Fetches the backup management usage summaries of the vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupManagementUsageList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.passivestamp.models.BackupManagementUsageList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupManagementUsageList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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 + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_cross_region_restore_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_cross_region_restore_operations.py new file mode 100644 index 000000000000..60a67ea5f89d --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_cross_region_restore_operations.py @@ -0,0 +1,154 @@ +# 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._cross_region_restore_operations import build_trigger_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CrossRegionRestoreOperations: + """CrossRegionRestoreOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.recoveryservicesbackup.passivestamp.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _trigger_initial( + self, + azure_region: str, + parameters: "_models.CrossRegionRestoreRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'CrossRegionRestoreRequest') + + request = build_trigger_request_initial( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + 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 [200, 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}/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. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param parameters: resource cross region restore request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.CrossRegionRestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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( + azure_region=azure_region, + parameters=parameters, + 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, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_crr_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_crr_operation_results_operations.py new file mode 100644 index 000000000000..c7aa83f3d5c0 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_crr_operation_results_operations.py @@ -0,0 +1,93 @@ +# 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._crr_operation_results_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CrrOperationResultsOperations: + """CrrOperationResultsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.recoveryservicesbackup.passivestamp.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, + azure_region: str, + operation_id: str, + **kwargs: Any + ) -> None: + """get. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param operation_id: + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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) + 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/passivestamp/aio/operations/_crr_operation_status_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_crr_operation_status_operations.py new file mode 100644 index 000000000000..d9830ee8d705 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_crr_operation_status_operations.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import 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._crr_operation_status_operations import build_get_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CrrOperationStatusOperations: + """CrrOperationStatusOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.recoveryservicesbackup.passivestamp.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, + azure_region: str, + operation_id: str, + **kwargs: Any + ) -> "_models.OperationStatus": + """get. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param operation_id: + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationStatus, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.passivestamp.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', {})) + + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_recovery_points_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_recovery_points_crr_operations.py new file mode 100644 index 000000000000..7fead857df18 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_recovery_points_crr_operations.py @@ -0,0 +1,144 @@ +# 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, 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 +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]] + +class RecoveryPointsCrrOperations: + """RecoveryPointsCrrOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.recoveryservicesbackup.passivestamp.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 + def list( + self, + vault_name: str, + resource_group_name: str, + fabric_name: str, + container_name: str, + protected_item_name: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.RecoveryPointResourceList"]: + """Lists the backup copies for the backed up item. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up item. + :type fabric_name: str + :param container_name: Container name associated with the backed up item. + :type container_name: str + :param protected_item_name: Backed up item whose backup copies are to be fetched. + :type protected_item_name: str + :param filter: OData filter options. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RecoveryPointResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.passivestamp.models.RecoveryPointResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + 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, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + 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, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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 + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_recovery_points_operations.py new file mode 100644 index 000000000000..383faa27fece --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/aio/operations/_recovery_points_operations.py @@ -0,0 +1,126 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import 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.passivestamp.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.passivestamp.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.passivestamp.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', {})) + + 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, + 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/passivestamp/models/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/models/__init__.py new file mode 100644 index 000000000000..3519a6dde96d --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/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 ._recovery_services_backup_passive_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/passivestamp/models/_models.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/models/_models.py new file mode 100644 index 000000000000..dd542d3d0ef9 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/models/_models.py @@ -0,0 +1,8447 @@ +# 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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.KPIResourceHealthDetails] + :ivar extended_info: Additional information with this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.KPIResourceHealthDetails] + :keyword extended_info: Additional information with this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestoreFileSpecs] + :ivar target_details: Target File Share Details. + :vartype target_details: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestoreFileSpecs] + :keyword target_details: Target File Share Details. + :paramtype target_details: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemState + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemState + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureWorkloadErrorInfo] + :ivar extended_info: Additional information about the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureWorkloadErrorInfo] + :keyword extended_info: Additional information about the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.RecoveryPointMoveReadinessInfo] + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.RecoveryPointMoveReadinessInfo] + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.StorageType + :ivar storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :vartype storage_type: str or + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.StorageType + :keyword storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_type: str or + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.CrrAccessToken + :ivar restore_request: Request object for triggering restore. + :vartype restore_request: ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.CrrAccessToken + :keyword restore_request: Request object for triggering restore. + :paramtype restore_request: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :ivar error_details: The errors. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.DpmErrorInfo] + :ivar extended_info: Additional information for this job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :keyword error_details: The errors. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.DpmErrorInfo] + :keyword extended_info: Additional information for this job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemState + :ivar extended_info: Extended info of the backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemState + :keyword extended_info: Extended info of the backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.KEKDetails + :ivar bek_details: BEK is bitlocker encryption key. + :vartype bek_details: ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.KEKDetails + :keyword bek_details: BEK is bitlocker encryption key. + :paramtype bek_details: ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.ResourceHealthStatus + :ivar resource_health_details: Resource Health Status. + :vartype resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.ResourceHealthStatus + :keyword resource_health_details: Resource Health Status. + :paramtype resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.WorkloadType + :ivar error_details: The errors. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.MabErrorInfo] + :ivar extended_info: Additional information on the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.WorkloadType + :keyword error_details: The errors. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.MabErrorInfo] + :keyword extended_info: Additional information on the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.NewErrorResponseError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'NewErrorResponseError'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.NewErrorResponse] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.OperationStatusError + :ivar properties: Additional information associated with this operation. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.OperationStatusError + :keyword properties: Additional information associated with this operation. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.DiskInformation] + :ivar excluded_disk_list: Information of disks excluded from backup. + :vartype excluded_disk_list: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.DiskInformation] + :keyword excluded_disk_list: Information of disks excluded from backup. + :paramtype excluded_disk_list: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RecoveryPointTierType + :ivar status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.RecoveryPointTierType + :keyword status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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/passivestamp/models/_models_py3.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/models/_models_py3.py new file mode 100644 index 000000000000..e405dd73cdbf --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/models/_models_py3.py @@ -0,0 +1,9332 @@ +# 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 ._recovery_services_backup_passive_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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.KPIResourceHealthDetails] + :ivar extended_info: Additional information with this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.KPIResourceHealthDetails] + :keyword extended_info: Additional information with this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestoreFileSpecs] + :ivar target_details: Target File Share Details. + :vartype target_details: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestoreFileSpecs] + :keyword target_details: Target File Share Details. + :paramtype target_details: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.HealthStatus + :ivar health_details: Health details on this backup item. + :vartype health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureIaaSVMHealthDetails] + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :ivar extended_properties: Extended Properties for Azure IaasVM Backup. + :vartype extended_properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.HealthStatus + :keyword health_details: Health details on this backup item. + :paramtype health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureIaaSVMHealthDetails] + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.AzureIaaSVMProtectedItemExtendedInfo + :keyword extended_properties: Extended Properties for Azure IaasVM Backup. + :paramtype extended_properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemState + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemState + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :ivar extended_info: Additional information for this backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :ivar kpis_healths: Health details of different KPIs. + :vartype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemHealthStatus + :keyword extended_info: Additional information for this backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureVmWorkloadProtectedItemExtendedInfo + :keyword kpis_healths: Health details of different KPIs. + :paramtype kpis_healths: dict[str, + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :ivar error_details: Error details on execution of this job. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureWorkloadErrorInfo] + :ivar extended_info: Additional information about the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :keyword error_details: Error details on execution of this job. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.AzureWorkloadErrorInfo] + :keyword extended_info: Additional information about the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.RecoveryPointMoveReadinessInfo] + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.RecoveryPointMoveReadinessInfo] + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.RecoveryPointMoveReadinessInfo] + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RestorePointType + :ivar recovery_point_tier_details: Recovery point tier information. + :vartype recovery_point_tier_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :ivar time_ranges: List of log ranges. + :vartype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.AzureWorkloadSQLRecoveryPointExtendedInfo + :keyword time_ranges: List of log ranges. + :paramtype time_ranges: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.StorageType + :ivar storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :vartype storage_type: str or + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.StorageType + :keyword storage_type: Storage type. Possible values include: "Invalid", "GeoRedundant", + "LocallyRedundant", "ZoneRedundant", "ReadAccessGeoZoneRedundant". + :paramtype storage_type: str or + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.CrrAccessToken + :ivar restore_request: Request object for triggering restore. + :vartype restore_request: ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.CrrAccessToken + :keyword restore_request: Request object for triggering restore. + :paramtype restore_request: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :ivar error_details: The errors. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.DpmErrorInfo] + :ivar extended_info: Additional information for this job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.JobSupportedAction] + :keyword error_details: The errors. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.DpmErrorInfo] + :keyword extended_info: Additional information for this job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemState + :ivar extended_info: Extended info of the backup item. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.ProtectedItemState + :keyword extended_info: Extended info of the backup item. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.KEKDetails + :ivar bek_details: BEK is bitlocker encryption key. + :vartype bek_details: ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.KEKDetails + :keyword bek_details: BEK is bitlocker encryption key. + :paramtype bek_details: ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.ResourceHealthStatus + :ivar resource_health_details: Resource Health Status. + :vartype resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.ResourceHealthStatus + :keyword resource_health_details: Resource Health Status. + :paramtype resource_health_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.WorkloadType + :ivar error_details: The errors. + :vartype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.MabErrorInfo] + :ivar extended_info: Additional information on the job. + :vartype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.WorkloadType + :keyword error_details: The errors. + :paramtype error_details: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.MabErrorInfo] + :keyword extended_info: Additional information on the job. + :paramtype extended_info: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.NewErrorResponse] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.OperationStatusError + :ivar properties: Additional information associated with this operation. + :vartype properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.models.OperationStatusError + :keyword properties: Additional information associated with this operation. + :paramtype properties: + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.DiskInformation] + :ivar excluded_disk_list: Information of disks excluded from backup. + :vartype excluded_disk_list: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.DiskInformation] + :keyword excluded_disk_list: Information of disks excluded from backup. + :paramtype excluded_disk_list: + list[~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.models.RecoveryPointTierType + :ivar status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :vartype status: str or + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.models.RecoveryPointTierType + :keyword status: Recovery point tier status. Possible values include: "Invalid", "Valid", + "Disabled", "Deleted", "Rehydrated". + :paramtype status: str or + ~azure.mgmt.recoveryservicesbackup.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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.passivestamp.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/passivestamp/models/_recovery_services_backup_passive_client_enums.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/models/_recovery_services_backup_passive_client_enums.py new file mode 100644 index 000000000000..a8be240f6e5e --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/models/_recovery_services_backup_passive_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/passivestamp/operations/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/__init__.py new file mode 100644 index 000000000000..7ac30ce43fb3 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/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/passivestamp/operations/_aad_properties_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_aad_properties_operations.py new file mode 100644 index 000000000000..cde1383f677b --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_aad_properties_operations.py @@ -0,0 +1,146 @@ +# 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( + azure_region, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + filter = kwargs.pop('filter', None) # type: Optional[str] + + api_version = "2018-12-20" + 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. + + 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.passivestamp.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, + azure_region, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.AADPropertiesResource" + """Fetches the AAD properties from target region BCM stamp. + + Fetches the AAD properties from target region BCM stamp. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param filter: OData filter options. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AADPropertiesResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.passivestamp.models.AADPropertiesResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AADPropertiesResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + filter=filter, + 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('AADPropertiesResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_crr_job_details_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_crr_job_details_operations.py new file mode 100644 index 000000000000..ac9375080206 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_crr_job_details_operations.py @@ -0,0 +1,150 @@ +# 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( + azure_region, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2018-12-20" + 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. + + 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.passivestamp.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, + azure_region, # type: str + parameters, # type: "_models.CrrJobRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.JobResource" + """Get CRR job details from target region. + + Get CRR job details from target region. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param parameters: CRR Job request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.passivestamp.models.CrrJobRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JobResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.passivestamp.models.JobResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'CrrJobRequest') + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + 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 + + 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('JobResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_crr_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_crr_jobs_operations.py new file mode 100644 index 000000000000..54fb5d8b0cb2 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_crr_jobs_operations.py @@ -0,0 +1,192 @@ +# 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.paging import ItemPaged +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, 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 + 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] + + api_version = "2018-12-20" + 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. + + 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.passivestamp.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 list( + self, + azure_region, # type: str + parameters, # type: "_models.CrrJobRequest" + filter=None, # type: Optional[str] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.JobResourceList"] + """Gets the list of CRR jobs from the target region. + + Gets the list of CRR jobs from the target region. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param parameters: Backup CRR Job request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.passivestamp.models.CrrJobRequest + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobResourceList or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.passivestamp.models.JobResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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', {})) + def prepare_request(next_link=None): + if not next_link: + _json = self._serialize.body(parameters, 'CrrJobRequest') + + request = build_list_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + 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: + _json = self._serialize.body(parameters, 'CrrJobRequest') + + request = build_list_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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 + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_protected_items_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_protected_items_crr_operations.py new file mode 100644 index 000000000000..869974dbdf1f --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_protected_items_crr_operations.py @@ -0,0 +1,185 @@ +# 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.paging import ItemPaged +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, 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + api_version = "2018-12-20" + 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. + + 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.passivestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + filter=None, # type: Optional[str] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ProtectedItemResourceList"] + """Provides a pageable list of all items that are backed up within a vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProtectedItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.passivestamp.models.ProtectedItemResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectedItemResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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 + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_resource_storage_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_resource_storage_configs_operations.py new file mode 100644 index 000000000000..7dfed8ae1de1 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_resource_storage_configs_operations.py @@ -0,0 +1,345 @@ +# 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 = "2018-12-20" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2018-12-20" + 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2018-12-20" + 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.passivestamp.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 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.passivestamp.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', {})) + + + request = build_get_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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.passivestamp.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.passivestamp.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', {})) + + 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, + 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.passivestamp.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', {})) + + 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, + 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/passivestamp/operations/_backup_usage_summaries_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_usage_summaries_crr_operations.py new file mode 100644 index 000000000000..cac742b2e05a --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_usage_summaries_crr_operations.py @@ -0,0 +1,185 @@ +# 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.paging import ItemPaged +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, 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + api_version = "2018-12-20" + 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. + + 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.passivestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + filter=None, # type: Optional[str] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BackupManagementUsageList"] + """Fetches the backup management usage summaries of the vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupManagementUsageList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.passivestamp.models.BackupManagementUsageList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupManagementUsageList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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: + + request = build_list_request( + vault_name=vault_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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 + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_cross_region_restore_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_cross_region_restore_operations.py new file mode 100644 index 000000000000..527508dbe864 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_cross_region_restore_operations.py @@ -0,0 +1,202 @@ +# 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( + azure_region, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2018-12-20" + 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. + + 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.passivestamp.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _trigger_initial( + self, + azure_region, # type: str + parameters, # type: "_models.CrossRegionRestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'CrossRegionRestoreRequest') + + request = build_trigger_request_initial( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + 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 [200, 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}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore'} # type: ignore + + + @distributed_trace + def begin_trigger( + self, + azure_region, # type: str + parameters, # type: "_models.CrossRegionRestoreRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Restores the specified backed up data in a different region as compared to where the data is + backed up. + + Restores the specified backed up data in a different region as compared to where the data is + backed up. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param parameters: resource cross region restore request. + :type parameters: + ~azure.mgmt.recoveryservicesbackup.passivestamp.models.CrossRegionRestoreRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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( + azure_region=azure_region, + parameters=parameters, + 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, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_crr_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_crr_operation_results_operations.py new file mode 100644 index 000000000000..6f757948187c --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_crr_operation_results_operations.py @@ -0,0 +1,138 @@ +# 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( + azure_region, # type: str + subscription_id, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2018-12-20" + 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. + + 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.passivestamp.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, + azure_region, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """get. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param operation_id: + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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) + 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/passivestamp/operations/_crr_operation_status_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_crr_operation_status_operations.py new file mode 100644 index 000000000000..dfbff3ef0d28 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_crr_operation_status_operations.py @@ -0,0 +1,142 @@ +# 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( + azure_region, # type: str + subscription_id, # type: str + operation_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2018-12-20" + 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. + + 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.passivestamp.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, + azure_region, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.OperationStatus" + """get. + + :param azure_region: Azure region to hit Api. + :type azure_region: str + :param operation_id: + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationStatus, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.passivestamp.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', {})) + + + request = build_get_request( + azure_region=azure_region, + subscription_id=self._config.subscription_id, + operation_id=operation_id, + 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('OperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}'} # type: ignore + diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_recovery_points_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_recovery_points_crr_operations.py new file mode 100644 index 000000000000..a5959d1fc9cc --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_recovery_points_crr_operations.py @@ -0,0 +1,198 @@ +# 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.paging import ItemPaged +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, 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 + filter = kwargs.pop('filter', None) # type: Optional[str] + + api_version = "2018-12-20" + 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. + + 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.passivestamp.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 list( + self, + vault_name, # type: str + resource_group_name, # type: str + fabric_name, # type: str + container_name, # type: str + protected_item_name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RecoveryPointResourceList"] + """Lists the backup copies for the backed up item. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param fabric_name: Fabric name associated with the backed up item. + :type fabric_name: str + :param container_name: Container name associated with the backed up item. + :type container_name: str + :param protected_item_name: Backed up item whose backup copies are to be fetched. + :type protected_item_name: str + :param filter: OData filter options. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RecoveryPointResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.passivestamp.models.RecoveryPointResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + 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, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + 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, + 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) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + 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 + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_recovery_points_operations.py new file mode 100644 index 000000000000..35750d073e81 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_recovery_points_operations.py @@ -0,0 +1,183 @@ +# 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 + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2018-12-20" + 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.passivestamp.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.passivestamp.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.passivestamp.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', {})) + + 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, + 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/passivestamp/py.typed b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file From 89e334f03d2ebd33bbf876433dbc650e59f45c02 Mon Sep 17 00:00:00 2001 From: PythonSdkPipelines Date: Tue, 21 Dec 2021 07:31:03 +0000 Subject: [PATCH 2/3] version,CHANGELOG --- .../azure-mgmt-recoveryservicesbackup/CHANGELOG.md | 4 ++++ .../azure/mgmt/recoveryservicesbackup/_version.py | 2 +- .../azure/mgmt/recoveryservicesbackup/activestamp/_version.py | 2 +- .../mgmt/recoveryservicesbackup/passivestamp/_version.py | 2 +- .../azure-mgmt-recoveryservicesbackup/setup.py | 2 +- shared_requirements.txt | 2 ++ 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/CHANGELOG.md b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/CHANGELOG.md index a6cb10ac0dd1..bb0ff51a893a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/CHANGELOG.md +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 0.0.0 (2021-12-21) + + + ## 3.0.0 (2021-10-19) **Features** 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..9bd4c9b55137 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 = "0.0.0" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_version.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_version.py index e5754a47ce68..9bd4c9b55137 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_version.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "0.0.0" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_version.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_version.py index e5754a47ce68..9bd4c9b55137 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_version.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "0.0.0" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/setup.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/setup.py index a60f239b7fde..71442cadabc3 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/setup.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/setup.py @@ -83,7 +83,7 @@ install_requires=[ 'msrest>=0.6.21', 'azure-common~=1.1', - 'azure-mgmt-core>=1.2.0,<2.0.0', + 'azure-mgmt-core>=1.3.0,<2.0.0', ], extras_require={ ":python_version<'3.0'": ['azure-mgmt-nspkg'], diff --git a/shared_requirements.txt b/shared_requirements.txt index 75a3be5b099d..c4b3cb4171fa 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -234,3 +234,5 @@ opentelemetry-sdk<2.0.0,>=1.5.0,!=1.10a0 #override azure-mgmt-applicationinsights msrest>=0.6.21 #override azure-mgmt-redis msrest>=0.6.21 #override azure-mgmt-redis azure-mgmt-core>=1.3.0,<2.0.0 +#override azure-mgmt-recoveryservicesbackup msrest>=0.6.21 +#override azure-mgmt-recoveryservicesbackup azure-mgmt-core>=1.3.0,<2.0.0 From 9bd35307f19d13e7dec548fbbfe14081121157ac Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Tue, 21 Dec 2021 15:39:20 +0800 Subject: [PATCH 3/3] delete unnecessary files and update changelog --- .../CHANGELOG.md | 4 +- .../mgmt/recoveryservicesbackup/__init__.py | 20 +- .../recoveryservicesbackup/_configuration.py | 70 - .../recoveryservicesbackup/_metadata.json | 247 - .../_recovery_services_backup_client.py | 360 - .../mgmt/recoveryservicesbackup/_version.py | 2 +- .../activestamp/_version.py | 2 +- .../recoveryservicesbackup/aio/__init__.py | 10 - .../aio/_configuration.py | 66 - .../aio/_recovery_services_backup_client.py | 353 - .../aio/operations/__init__.py | 123 - .../operations/_aad_properties_operations.py | 103 - .../_backup_crr_job_details_operations.py | 106 - .../operations/_backup_crr_jobs_operations.py | 136 - .../operations/_backup_engines_operations.py | 201 - .../aio/operations/_backup_jobs_operations.py | 127 - .../_backup_operation_results_operations.py | 107 - .../_backup_operation_statuses_operations.py | 108 - .../operations/_backup_policies_operations.py | 124 - .../_backup_protectable_items_operations.py | 129 - .../_backup_protected_items_crr_operations.py | 128 - .../_backup_protected_items_operations.py | 127 - ...backup_protection_containers_operations.py | 122 - .../_backup_protection_intent_operations.py | 127 - ..._resource_encryption_configs_operations.py | 166 - ...urce_storage_configs_non_crr_operations.py | 234 - ...kup_resource_storage_configs_operations.py | 234 - ...ackup_resource_vault_configs_operations.py | 237 - .../operations/_backup_status_operations.py | 105 - .../_backup_usage_summaries_crr_operations.py | 128 - .../_backup_usage_summaries_operations.py | 127 - .../_backup_workload_items_operations.py | 137 - .../aio/operations/_backups_operations.py | 119 - ...e_data_move_operation_result_operations.py | 107 - .../_cross_region_restore_operations.py | 158 - .../_crr_operation_results_operations.py | 97 - .../_crr_operation_status_operations.py | 100 - ...xport_jobs_operation_results_operations.py | 111 - .../operations/_feature_support_operations.py | 105 - ...m_level_recovery_connections_operations.py | 203 - .../_job_cancellations_operations.py | 102 - .../aio/operations/_job_details_operations.py | 104 - .../_job_operation_results_operations.py | 105 - .../aio/operations/_jobs_operations.py | 102 - .../aio/operations/_operation_operations.py | 108 - .../aio/operations/_operations.py | 104 - ..._private_endpoint_connection_operations.py | 359 - .../_private_endpoint_operations.py | 111 - .../_protectable_containers_operations.py | 126 - ...ected_item_operation_results_operations.py | 119 - ...cted_item_operation_statuses_operations.py | 120 - .../operations/_protected_items_operations.py | 273 - ..._container_operation_results_operations.py | 115 - ...er_refresh_operation_results_operations.py | 106 - .../_protection_containers_operations.py | 396 - .../_protection_intent_operations.py | 321 - .../_protection_policies_operations.py | 301 - ...ion_policy_operation_results_operations.py | 109 - ...on_policy_operation_statuses_operations.py | 113 - .../_recovery_points_crr_operations.py | 135 - .../operations/_recovery_points_operations.py | 299 - ..._points_recommended_for_move_operations.py | 140 - ...overy_services_backup_client_operations.py | 476 - .../_resource_guard_proxies_operations.py | 117 - .../_resource_guard_proxy_operations.py | 299 - .../aio/operations/_restores_operations.py | 192 - .../operations/_security_pins_operations.py | 111 - .../recoveryservicesbackup/models/__init__.py | 1057 - .../recoveryservicesbackup/models/_models.py | 13959 -------------- .../models/_models_py3.py | 15883 ---------------- .../_recovery_services_backup_client_enums.py | 691 - .../operations/__init__.py | 123 - .../operations/_aad_properties_operations.py | 108 - .../_backup_crr_job_details_operations.py | 111 - .../operations/_backup_crr_jobs_operations.py | 141 - .../operations/_backup_engines_operations.py | 207 - .../operations/_backup_jobs_operations.py | 132 - .../_backup_operation_results_operations.py | 112 - .../_backup_operation_statuses_operations.py | 113 - .../operations/_backup_policies_operations.py | 129 - .../_backup_protectable_items_operations.py | 134 - .../_backup_protected_items_crr_operations.py | 133 - .../_backup_protected_items_operations.py | 132 - ...backup_protection_containers_operations.py | 127 - .../_backup_protection_intent_operations.py | 132 - ..._resource_encryption_configs_operations.py | 172 - ...urce_storage_configs_non_crr_operations.py | 241 - ...kup_resource_storage_configs_operations.py | 241 - ...ackup_resource_vault_configs_operations.py | 244 - .../operations/_backup_status_operations.py | 110 - .../_backup_usage_summaries_crr_operations.py | 133 - .../_backup_usage_summaries_operations.py | 132 - .../_backup_workload_items_operations.py | 142 - .../operations/_backups_operations.py | 124 - ...e_data_move_operation_result_operations.py | 112 - .../_cross_region_restore_operations.py | 164 - .../_crr_operation_results_operations.py | 102 - .../_crr_operation_status_operations.py | 105 - ...xport_jobs_operation_results_operations.py | 116 - .../operations/_feature_support_operations.py | 110 - ...m_level_recovery_connections_operations.py | 209 - .../_job_cancellations_operations.py | 107 - .../operations/_job_details_operations.py | 109 - .../_job_operation_results_operations.py | 110 - .../operations/_jobs_operations.py | 107 - .../operations/_operation_operations.py | 113 - .../operations/_operations.py | 109 - ..._private_endpoint_connection_operations.py | 368 - .../_private_endpoint_operations.py | 116 - .../_protectable_containers_operations.py | 131 - ...ected_item_operation_results_operations.py | 124 - ...cted_item_operation_statuses_operations.py | 125 - .../operations/_protected_items_operations.py | 280 - ..._container_operation_results_operations.py | 120 - ...er_refresh_operation_results_operations.py | 111 - .../_protection_containers_operations.py | 405 - .../_protection_intent_operations.py | 329 - .../_protection_policies_operations.py | 309 - ...ion_policy_operation_results_operations.py | 114 - ...on_policy_operation_statuses_operations.py | 118 - .../_recovery_points_crr_operations.py | 140 - .../operations/_recovery_points_operations.py | 306 - ..._points_recommended_for_move_operations.py | 145 - ...overy_services_backup_client_operations.py | 487 - .../_resource_guard_proxies_operations.py | 122 - .../_resource_guard_proxy_operations.py | 307 - .../operations/_restores_operations.py | 198 - .../operations/_security_pins_operations.py | 116 - .../passivestamp/_version.py | 2 +- .../mgmt/recoveryservicesbackup/py.typed | 1 - 130 files changed, 7 insertions(+), 51236 deletions(-) delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_configuration.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_metadata.json delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_recovery_services_backup_client.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/__init__.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_configuration.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_recovery_services_backup_client.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/__init__.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_aad_properties_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_job_details_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_jobs_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_engines_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_jobs_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_statuses_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_policies_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protectable_items_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_crr_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_containers_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_intent_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_encryption_configs_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_non_crr_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_vault_configs_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_status_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_crr_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_workload_items_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backups_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_bms_prepare_data_move_operation_result_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_cross_region_restore_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_status_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_export_jobs_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_feature_support_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_item_level_recovery_connections_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_cancellations_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_details_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_jobs_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operation_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_connection_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protectable_containers_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_statuses_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_items_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_refresh_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_containers_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_intent_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policies_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_statuses_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_crr_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_recommended_for_move_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_services_backup_client_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxies_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxy_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_restores_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_security_pins_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models_py3.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_recovery_services_backup_client_enums.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_aad_properties_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_job_details_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_jobs_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_jobs_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_statuses_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_policies_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protectable_items_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_crr_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_intent_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_encryption_configs_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_non_crr_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_vault_configs_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_status_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_crr_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backups_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_cross_region_restore_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_status_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_feature_support_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_item_level_recovery_connections_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_cancellations_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_details_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_jobs_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operation_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_connection_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protectable_containers_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_statuses_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_items_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_refresh_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_containers_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_intent_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policies_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_results_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_statuses_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_crr_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_recommended_for_move_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_services_backup_client_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxies_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxy_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_restores_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_security_pins_operations.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/py.typed diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/CHANGELOG.md b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/CHANGELOG.md index bb0ff51a893a..1ff40ce508f9 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/CHANGELOG.md +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/CHANGELOG.md @@ -1,8 +1,10 @@ # Release History -## 0.0.0 (2021-12-21) +## 4.0.0 (2021-12-21) +**Breaking changes** + - namespace splitted from `azure.mgmt.recoveryservicesbackup` to `azure.mgmt.recoveryservicesbackup.activestamp` and `azure.mgmt.recoveryservicesbackup.passivestamp` ## 3.0.0 (2021-10-19) 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..8db66d3d0f0f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/__init__.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/__init__.py @@ -1,19 +1 @@ -# 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 ._recovery_services_backup_client import RecoveryServicesBackupClient -from ._version import VERSION - -__version__ = VERSION -__all__ = ['RecoveryServicesBackupClient'] - -try: - from ._patch import patch_sdk # type: ignore - patch_sdk() -except ImportError: - pass +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_configuration.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_configuration.py deleted file mode 100644 index 520604f0d762..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_configuration.py +++ /dev/null @@ -1,70 +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 - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import 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 RecoveryServicesBackupClientConfiguration(Configuration): - """Configuration for RecoveryServicesBackupClient. - - 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 - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - 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.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 = policies.BearerTokenCredentialPolicy(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/_recovery_services_backup_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_recovery_services_backup_client.py deleted file mode 100644 index 117a2c2f0d77..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_recovery_services_backup_client.py +++ /dev/null @@ -1,360 +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 - -from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer - -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 - - -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 protection_intent: ProtectionIntentOperations operations - :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 - :ivar backup_usage_summaries: BackupUsageSummariesOperations operations - :vartype backup_usage_summaries: azure.mgmt.recoveryservicesbackup.operations.BackupUsageSummariesOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.recoveryservicesbackup.operations.Operations - :ivar backup_resource_vault_configs: BackupResourceVaultConfigsOperations operations - :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 - :ivar private_endpoint_connection: PrivateEndpointConnectionOperations operations - :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 - :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 - :ivar recovery_points: RecoveryPointsOperations operations - :vartype recovery_points: azure.mgmt.recoveryservicesbackup.operations.RecoveryPointsOperations - :ivar restores: RestoresOperations operations - :vartype restores: azure.mgmt.recoveryservicesbackup.operations.RestoresOperations - :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 - :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 - :ivar job_operation_results: JobOperationResultsOperations operations - :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 - :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 - :ivar operation: OperationOperations operations - :vartype operation: azure.mgmt.recoveryservicesbackup.operations.OperationOperations - :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 protectable_containers: ProtectableContainersOperations operations - :vartype protectable_containers: azure.mgmt.recoveryservicesbackup.operations.ProtectableContainersOperations - :ivar protection_containers: ProtectionContainersOperations operations - :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 - :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 - :ivar item_level_recovery_connections: ItemLevelRecoveryConnectionsOperations operations - :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 - :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 - :ivar backup_protectable_items: BackupProtectableItemsOperations operations - :vartype backup_protectable_items: azure.mgmt.recoveryservicesbackup.operations.BackupProtectableItemsOperations - :ivar backup_protection_containers: BackupProtectionContainersOperations operations - :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 resource_guard_proxies: ResourceGuardProxiesOperations operations - :vartype resource_guard_proxies: azure.mgmt.recoveryservicesbackup.operations.ResourceGuardProxiesOperations - :ivar resource_guard_proxy: ResourceGuardProxyOperations operations - :vartype resource_guard_proxy: azure.mgmt.recoveryservicesbackup.operations.ResourceGuardProxyOperations - :ivar backup_usage_summaries_crr: BackupUsageSummariesCRROperations operations - :vartype backup_usage_summaries_crr: azure.mgmt.recoveryservicesbackup.operations.BackupUsageSummariesCRROperations - :ivar aad_properties: AadPropertiesOperations operations - :vartype aad_properties: azure.mgmt.recoveryservicesbackup.operations.AadPropertiesOperations - :ivar cross_region_restore: CrossRegionRestoreOperations operations - :vartype cross_region_restore: azure.mgmt.recoveryservicesbackup.operations.CrossRegionRestoreOperations - :ivar backup_crr_job_details: BackupCrrJobDetailsOperations operations - :vartype backup_crr_job_details: azure.mgmt.recoveryservicesbackup.operations.BackupCrrJobDetailsOperations - :ivar backup_crr_jobs: BackupCrrJobsOperations operations - :vartype backup_crr_jobs: azure.mgmt.recoveryservicesbackup.operations.BackupCrrJobsOperations - :ivar crr_operation_results: CrrOperationResultsOperations operations - :vartype crr_operation_results: azure.mgmt.recoveryservicesbackup.operations.CrrOperationResultsOperations - :ivar crr_operation_status: CrrOperationStatusOperations operations - :vartype crr_operation_status: azure.mgmt.recoveryservicesbackup.operations.CrrOperationStatusOperations - :ivar backup_resource_storage_configs: BackupResourceStorageConfigsOperations operations - :vartype backup_resource_storage_configs: azure.mgmt.recoveryservicesbackup.operations.BackupResourceStorageConfigsOperations - :ivar recovery_points_crr: RecoveryPointsCrrOperations operations - :vartype recovery_points_crr: azure.mgmt.recoveryservicesbackup.operations.RecoveryPointsCrrOperations - :ivar backup_protected_items_crr: BackupProtectedItemsCrrOperations operations - :vartype backup_protected_items_crr: azure.mgmt.recoveryservicesbackup.operations.BackupProtectedItemsCrrOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The subscription Id. - :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. - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - base_url=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - if not base_url: - base_url = 'https://management.azure.com' - self._config = RecoveryServicesBackupClientConfiguration(credential, 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.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 - """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. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.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 - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> RecoveryServicesBackupClient - 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/_version.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_version.py index 9bd4c9b55137..77f53a3589c6 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 = "0.0.0" +VERSION = "4.0.0" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_version.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_version.py index 9bd4c9b55137..77f53a3589c6 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_version.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "0.0.0" +VERSION = "4.0.0" 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 deleted file mode 100644 index d1e0d338ce58..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/__init__.py +++ /dev/null @@ -1,10 +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 ._recovery_services_backup_client import RecoveryServicesBackupClient -__all__ = ['RecoveryServicesBackupClient'] 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 deleted file mode 100644 index 5a12c5529e40..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_configuration.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy - -from .._version import VERSION - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - - -class RecoveryServicesBackupClientConfiguration(Configuration): - """Configuration for RecoveryServicesBackupClient. - - 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 - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: - 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.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 = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_recovery_services_backup_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_recovery_services_backup_client.py deleted file mode 100644 index 005ca4363a81..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_recovery_services_backup_client.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, Optional, TYPE_CHECKING - -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer - -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 protection_intent: ProtectionIntentOperations operations - :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 - :ivar backup_protection_intent: BackupProtectionIntentOperations operations - :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 - :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 - :ivar backup_resource_encryption_configs: BackupResourceEncryptionConfigsOperations operations - :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 - :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 - :ivar protected_items: ProtectedItemsOperations operations - :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 - :ivar recovery_points: RecoveryPointsOperations operations - :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 - :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 - :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 - :ivar job_operation_results: JobOperationResultsOperations operations - :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 - :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 - :ivar operation: OperationOperations operations - :vartype operation: azure.mgmt.recoveryservicesbackup.aio.operations.OperationOperations - :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 - :ivar protectable_containers: ProtectableContainersOperations operations - :vartype protectable_containers: azure.mgmt.recoveryservicesbackup.aio.operations.ProtectableContainersOperations - :ivar protection_containers: ProtectionContainersOperations operations - :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 - :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 - :ivar item_level_recovery_connections: ItemLevelRecoveryConnectionsOperations operations - :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 - :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 - :ivar backup_protectable_items: BackupProtectableItemsOperations operations - :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 - :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 resource_guard_proxies: ResourceGuardProxiesOperations operations - :vartype resource_guard_proxies: azure.mgmt.recoveryservicesbackup.aio.operations.ResourceGuardProxiesOperations - :ivar resource_guard_proxy: ResourceGuardProxyOperations operations - :vartype resource_guard_proxy: azure.mgmt.recoveryservicesbackup.aio.operations.ResourceGuardProxyOperations - :ivar backup_usage_summaries_crr: BackupUsageSummariesCRROperations operations - :vartype backup_usage_summaries_crr: azure.mgmt.recoveryservicesbackup.aio.operations.BackupUsageSummariesCRROperations - :ivar aad_properties: AadPropertiesOperations operations - :vartype aad_properties: azure.mgmt.recoveryservicesbackup.aio.operations.AadPropertiesOperations - :ivar cross_region_restore: CrossRegionRestoreOperations operations - :vartype cross_region_restore: azure.mgmt.recoveryservicesbackup.aio.operations.CrossRegionRestoreOperations - :ivar backup_crr_job_details: BackupCrrJobDetailsOperations operations - :vartype backup_crr_job_details: azure.mgmt.recoveryservicesbackup.aio.operations.BackupCrrJobDetailsOperations - :ivar backup_crr_jobs: BackupCrrJobsOperations operations - :vartype backup_crr_jobs: azure.mgmt.recoveryservicesbackup.aio.operations.BackupCrrJobsOperations - :ivar crr_operation_results: CrrOperationResultsOperations operations - :vartype crr_operation_results: azure.mgmt.recoveryservicesbackup.aio.operations.CrrOperationResultsOperations - :ivar crr_operation_status: CrrOperationStatusOperations operations - :vartype crr_operation_status: azure.mgmt.recoveryservicesbackup.aio.operations.CrrOperationStatusOperations - :ivar backup_resource_storage_configs: BackupResourceStorageConfigsOperations operations - :vartype backup_resource_storage_configs: azure.mgmt.recoveryservicesbackup.aio.operations.BackupResourceStorageConfigsOperations - :ivar recovery_points_crr: RecoveryPointsCrrOperations operations - :vartype recovery_points_crr: azure.mgmt.recoveryservicesbackup.aio.operations.RecoveryPointsCrrOperations - :ivar backup_protected_items_crr: BackupProtectedItemsCrrOperations operations - :vartype backup_protected_items_crr: azure.mgmt.recoveryservicesbackup.aio.operations.BackupProtectedItemsCrrOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The subscription Id. - :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. - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: Optional[str] = None, - **kwargs: Any - ) -> None: - if not base_url: - base_url = 'https://management.azure.com' - self._config = RecoveryServicesBackupClientConfiguration(credential, 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.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: - """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. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.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 - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "RecoveryServicesBackupClient": - 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/aio/operations/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/__init__.py deleted file mode 100644 index 18922f7c05ca..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/__init__.py +++ /dev/null @@ -1,123 +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 ._backup_resource_storage_configs_non_crr_operations import BackupResourceStorageConfigsNonCRROperations -from ._protection_intent_operations import ProtectionIntentOperations -from ._backup_status_operations import BackupStatusOperations -from ._feature_support_operations import FeatureSupportOperations -from ._backup_protection_intent_operations import BackupProtectionIntentOperations -from ._backup_usage_summaries_operations import BackupUsageSummariesOperations -from ._operations import Operations -from ._backup_resource_vault_configs_operations import BackupResourceVaultConfigsOperations -from ._backup_resource_encryption_configs_operations import BackupResourceEncryptionConfigsOperations -from ._private_endpoint_connection_operations import PrivateEndpointConnectionOperations -from ._private_endpoint_operations import PrivateEndpointOperations -from ._recovery_services_backup_client_operations import RecoveryServicesBackupClientOperationsMixin -from ._bms_prepare_data_move_operation_result_operations import BMSPrepareDataMoveOperationResultOperations -from ._protected_items_operations import ProtectedItemsOperations -from ._protected_item_operation_results_operations import ProtectedItemOperationResultsOperations -from ._recovery_points_operations import RecoveryPointsOperations -from ._restores_operations import RestoresOperations -from ._backup_policies_operations import BackupPoliciesOperations -from ._protection_policies_operations import ProtectionPoliciesOperations -from ._protection_policy_operation_results_operations import ProtectionPolicyOperationResultsOperations -from ._backup_jobs_operations import BackupJobsOperations -from ._job_details_operations import JobDetailsOperations -from ._job_cancellations_operations import JobCancellationsOperations -from ._job_operation_results_operations import JobOperationResultsOperations -from ._export_jobs_operation_results_operations import ExportJobsOperationResultsOperations -from ._jobs_operations import JobsOperations -from ._backup_protected_items_operations import BackupProtectedItemsOperations -from ._operation_operations import OperationOperations -from ._backup_engines_operations import BackupEnginesOperations -from ._protection_container_refresh_operation_results_operations import ProtectionContainerRefreshOperationResultsOperations -from ._protectable_containers_operations import ProtectableContainersOperations -from ._protection_containers_operations import ProtectionContainersOperations -from ._backup_workload_items_operations import BackupWorkloadItemsOperations -from ._protection_container_operation_results_operations import ProtectionContainerOperationResultsOperations -from ._backups_operations import BackupsOperations -from ._protected_item_operation_statuses_operations import ProtectedItemOperationStatusesOperations -from ._item_level_recovery_connections_operations import ItemLevelRecoveryConnectionsOperations -from ._backup_operation_results_operations import BackupOperationResultsOperations -from ._backup_operation_statuses_operations import BackupOperationStatusesOperations -from ._protection_policy_operation_statuses_operations import ProtectionPolicyOperationStatusesOperations -from ._backup_protectable_items_operations import BackupProtectableItemsOperations -from ._backup_protection_containers_operations import BackupProtectionContainersOperations -from ._security_pins_operations import SecurityPINsOperations -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', - 'ProtectionIntentOperations', - 'BackupStatusOperations', - 'FeatureSupportOperations', - 'BackupProtectionIntentOperations', - 'BackupUsageSummariesOperations', - 'Operations', - 'BackupResourceVaultConfigsOperations', - 'BackupResourceEncryptionConfigsOperations', - 'PrivateEndpointConnectionOperations', - 'PrivateEndpointOperations', - 'RecoveryServicesBackupClientOperationsMixin', - 'BMSPrepareDataMoveOperationResultOperations', - 'ProtectedItemsOperations', - 'ProtectedItemOperationResultsOperations', - 'RecoveryPointsOperations', - 'RestoresOperations', - 'BackupPoliciesOperations', - 'ProtectionPoliciesOperations', - 'ProtectionPolicyOperationResultsOperations', - 'BackupJobsOperations', - 'JobDetailsOperations', - 'JobCancellationsOperations', - 'JobOperationResultsOperations', - 'ExportJobsOperationResultsOperations', - 'JobsOperations', - 'BackupProtectedItemsOperations', - 'OperationOperations', - 'BackupEnginesOperations', - 'ProtectionContainerRefreshOperationResultsOperations', - 'ProtectableContainersOperations', - 'ProtectionContainersOperations', - 'BackupWorkloadItemsOperations', - 'ProtectionContainerOperationResultsOperations', - 'BackupsOperations', - 'ProtectedItemOperationStatusesOperations', - 'ItemLevelRecoveryConnectionsOperations', - 'BackupOperationResultsOperations', - 'BackupOperationStatusesOperations', - 'ProtectionPolicyOperationStatusesOperations', - 'BackupProtectableItemsOperations', - 'BackupProtectionContainersOperations', - 'SecurityPINsOperations', - 'RecoveryPointsRecommendedForMoveOperations', - 'ResourceGuardProxiesOperations', - 'ResourceGuardProxyOperations', - 'BackupUsageSummariesCRROperations', - 'AadPropertiesOperations', - 'CrossRegionRestoreOperations', - 'BackupCrrJobDetailsOperations', - 'BackupCrrJobsOperations', - 'CrrOperationResultsOperations', - 'CrrOperationStatusOperations', - 'BackupResourceStorageConfigsOperations', - 'RecoveryPointsCrrOperations', - 'BackupProtectedItemsCrrOperations', -] diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_aad_properties_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_aad_properties_operations.py deleted file mode 100644 index f45f457700ec..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_aad_properties_operations.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class AadPropertiesOperations: - """AadPropertiesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - azure_region: str, - filter: Optional[str] = None, - **kwargs: Any - ) -> "_models.AADPropertiesResource": - """Fetches the AAD properties from target region BCM stamp. - - Fetches the AAD properties from target region BCM stamp. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AADPropertiesResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.AADPropertiesResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AADPropertiesResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AADPropertiesResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_job_details_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_job_details_operations.py deleted file mode 100644 index 0992760723dc..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_job_details_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupCrrJobDetailsOperations: - """BackupCrrJobDetailsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - azure_region: str, - parameters: "_models.CrrJobRequest", - **kwargs: Any - ) -> "_models.JobResource": - """Get CRR job details from target region. - - Get CRR job details from target region. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: CRR Job request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.CrrJobRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :return: JobResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.JobResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrrJobRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('JobResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_jobs_operations.py deleted file mode 100644 index 83a0be7b14f8..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_crr_jobs_operations.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupCrrJobsOperations: - """BackupCrrJobsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - azure_region: str, - parameters: "_models.CrrJobRequest", - filter: Optional[str] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.JobResourceList"]: - """Gets the list of CRR jobs from the target region. - - Gets the list of CRR jobs from the target region. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: Backup CRR Job request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.CrrJobRequest - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.JobResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = "application/json" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrrJobRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrrJobRequest') - body_content_kwargs['content'] = body_content - request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('JobResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_engines_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_engines_operations.py deleted file mode 100644 index 1ce4e0ebec45..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_engines_operations.py +++ /dev/null @@ -1,201 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupEnginesOperations: - """BackupEnginesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - filter: Optional[str] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.BackupEngineBaseResourceList"]: - """Backup management servers registered to Recovery Services Vault. Returns a pageable list of - servers. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either BackupEngineBaseResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('BackupEngineBaseResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines'} # type: ignore - - async def get( - self, - vault_name: str, - resource_group_name: str, - backup_engine_name: str, - filter: Optional[str] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> "_models.BackupEngineBaseResource": - """Returns backup management server registered to Recovery Services Vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param backup_engine_name: Name of the backup management server. - :type backup_engine_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupEngineBaseResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupEngineBaseResource"] - error_map = { - 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') - - 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupEngineBaseResource', pipeline_response) - - if cls: - 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 deleted file mode 100644 index 430595b7536c..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_jobs_operations.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupJobsOperations: - """BackupJobsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - filter: Optional[str] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.JobResourceList"]: - """Provides a pageable list of jobs. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.JobResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('JobResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs'} # type: ignore 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 deleted file mode 100644 index 95133fff9367..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_results_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupOperationResultsOperations: - """BackupOperationResultsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - operation_id: str, - **kwargs: Any - ) -> None: - """Provides the status of the delete operations such as deleting backed up item. Once the - operation has started, the - status code in the response would be Accepted. It will continue to be in this state till it - reaches completion. On - successful completion, the status code will be OK. This method expects OperationID as an - argument. OperationID is - part of the Location header of the operation response. - - :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. - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - 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, {}) - - 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 deleted file mode 100644 index 8cd176c631cf..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_statuses_operations.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupOperationStatusesOperations: - """BackupOperationStatusesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - operation_id: str, - **kwargs: Any - ) -> "_models.OperationStatus": - """Fetches the status of an operation such as triggering a backup, restore. The status can be in - progress, completed - or failed. You can refer to the OperationStatus enum for all the possible states of an - operation. Some operations - create jobs. This method returns the list of jobs when the operation is complete. - - :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. - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationStatus, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - 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}/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 deleted file mode 100644 index 3967929896a4..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_policies_operations.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupPoliciesOperations: - """BackupPoliciesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - filter: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.ProtectionPolicyResourceList"]: - """Lists of backup policies associated with Recovery Services Vault. API provides pagination - parameters to fetch - scoped results. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :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] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectionPolicyResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies'} # type: ignore 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 deleted file mode 100644 index 21bae8c191ff..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protectable_items_operations.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupProtectableItemsOperations: - """BackupProtectableItemsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - filter: Optional[str] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.WorkloadProtectableItemResourceList"]: - """Provides a pageable list of protectable objects within your subscription according to the query - filter and the - pagination parameters. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadProtectableItemResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadProtectableItemResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_crr_operations.py deleted file mode 100644 index 44ae0174fe20..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_crr_operations.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupProtectedItemsCrrOperations: - """BackupProtectedItemsCrrOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - filter: Optional[str] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.ProtectedItemResourceList"]: - """Provides a pageable list of all items that are backed up within a vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectedItemResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectedItemResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectedItemResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_operations.py deleted file mode 100644 index c7bad3d93cee..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_operations.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupProtectedItemsOperations: - """BackupProtectedItemsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - filter: Optional[str] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.ProtectedItemResourceList"]: - """Provides a pageable list of all items that are backed up within a vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectedItemResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectedItemResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectedItemResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_containers_operations.py deleted file mode 100644 index 29ee2e76da4f..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_containers_operations.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupProtectionContainersOperations: - """BackupProtectionContainersOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - filter: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.ProtectionContainerResourceList"]: - """Lists the containers registered to Recovery Services Vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :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] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectionContainerResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers'} # type: ignore 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 deleted file mode 100644 index 05f6e525d95b..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_intent_operations.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupProtectionIntentOperations: - """BackupProtectionIntentOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - filter: Optional[str] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.ProtectionIntentResourceList"]: - """Provides a pageable list of all intents that are present within a vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectionIntentResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectionIntentResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents'} # type: ignore 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 deleted file mode 100644 index 68c83bd32ee8..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_encryption_configs_operations.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupResourceEncryptionConfigsOperations: - """BackupResourceEncryptionConfigsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - **kwargs: Any - ) -> "_models.BackupResourceEncryptionConfigExtendedResource": - """Fetches Vault Encryption 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: BackupResourceEncryptionConfigExtendedResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtendedResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceEncryptionConfigExtendedResource"] - error_map = { - 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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceEncryptionConfigExtendedResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig'} # type: ignore - - async def update( - self, - vault_name: str, - resource_group_name: str, - parameters: "_models.BackupResourceEncryptionConfigResource", - **kwargs: Any - ) -> None: - """Updates Vault encryption config. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: Vault encryption input config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource - :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 = "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') - - # 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, '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) - 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 deleted file mode 100644 index 788b63884e92..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_non_crr_operations.py +++ /dev/null @@ -1,234 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupResourceStorageConfigsNonCRROperations: - """BackupResourceStorageConfigsNonCRROperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - **kwargs: Any - ) -> "_models.BackupResourceConfigResource": - """Fetches resource storage config. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupResourceConfigResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore - - async def update( - self, - vault_name: str, - resource_group_name: str, - parameters: "_models.BackupResourceConfigResource", - **kwargs: Any - ) -> "_models.BackupResourceConfigResource": - """Updates vault storage model type. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: Vault storage config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupResourceConfigResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupResourceConfigResource') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore - - async def patch( - self, - vault_name: str, - resource_group_name: str, - parameters: "_models.BackupResourceConfigResource", - **kwargs: Any - ) -> None: - """Updates vault storage model type. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: Vault storage config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupResourceConfigResource') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, 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_storage_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_operations.py deleted file mode 100644 index 23f9e273638a..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_operations.py +++ /dev/null @@ -1,234 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupResourceStorageConfigsOperations: - """BackupResourceStorageConfigsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - **kwargs: Any - ) -> "_models.BackupResourceConfigResource": - """Fetches resource storage config. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupResourceConfigResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore - - async def update( - self, - vault_name: str, - resource_group_name: str, - parameters: "_models.BackupResourceConfigResource", - **kwargs: Any - ) -> "_models.BackupResourceConfigResource": - """Updates vault storage model type. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: Vault storage config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupResourceConfigResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.update.metadata['url'] # type: ignore - path_format_arguments = { - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupResourceConfigResource') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore - - async def patch( - self, - vault_name: str, - resource_group_name: str, - parameters: "_models.BackupResourceConfigResource", - **kwargs: Any - ) -> None: - """Updates vault storage model type. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: Vault storage config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.patch.metadata['url'] # type: ignore - path_format_arguments = { - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'BackupResourceConfigResource') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_vault_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_vault_configs_operations.py deleted file mode 100644 index b2e18c702187..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_vault_configs_operations.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupResourceVaultConfigsOperations: - """BackupResourceVaultConfigsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - **kwargs: Any - ) -> "_models.BackupResourceVaultConfigResource": - """Fetches resource vault config. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceVaultConfigResource"] - error_map = { - 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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} # type: ignore - - async def update( - self, - vault_name: str, - resource_group_name: str, - parameters: "_models.BackupResourceVaultConfigResource", - **kwargs: Any - ) -> "_models.BackupResourceVaultConfigResource": - """Updates vault security config. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: resource config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceVaultConfigResource"] - error_map = { - 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') - - # 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, '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) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} # type: ignore - - async def put( - self, - vault_name: str, - resource_group_name: str, - parameters: "_models.BackupResourceVaultConfigResource", - **kwargs: Any - ) -> "_models.BackupResourceVaultConfigResource": - """Updates vault security config. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: resource config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceVaultConfigResource"] - error_map = { - 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') - - # 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, '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) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) - - if cls: - 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 deleted file mode 100644 index dc0c7c2f02d1..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_status_operations.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupStatusOperations: - """BackupStatusOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - azure_region: str, - parameters: "_models.BackupStatusRequest", - **kwargs: Any - ) -> "_models.BackupStatusResponse": - """Get the container backup status. - - Get the container backup status. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: Container Backup Status Request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupStatusRequest - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupStatusResponse"] - error_map = { - 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') - - # 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, '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 - - 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('BackupStatusResponse', pipeline_response) - - if cls: - 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_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_crr_operations.py deleted file mode 100644 index c1db556c86ab..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_crr_operations.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupUsageSummariesCRROperations: - """BackupUsageSummariesCRROperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - filter: Optional[str] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.BackupManagementUsageList"]: - """Fetches the backup management usage summaries of the vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either BackupManagementUsageList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsageList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupManagementUsageList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('BackupManagementUsageList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_operations.py deleted file mode 100644 index bc52e2816490..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_operations.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupUsageSummariesOperations: - """BackupUsageSummariesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - filter: Optional[str] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.BackupManagementUsageList"]: - """Fetches the backup management usage summaries of the vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either BackupManagementUsageList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsageList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupManagementUsageList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('BackupManagementUsageList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_workload_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_workload_items_operations.py deleted file mode 100644 index 11e174ca0e70..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_workload_items_operations.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupWorkloadItemsOperations: - """BackupWorkloadItemsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - filter: Optional[str] = None, - skip_token: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.WorkloadItemResourceList"]: - """Provides a pageable list of workload item of a specific container according to the query filter - and the pagination - parameters. - - :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 filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadItemResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadItemResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items'} # type: ignore 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 deleted file mode 100644 index 11146ac1dccb..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backups_operations.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BackupsOperations: - """BackupsOperations 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( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - parameters: "_models.BackupRequestResource", - **kwargs: Any - ) -> None: - """Triggers backup for specified backed up item. This is an asynchronous operation. To know the - status of the - operation, call GetProtectedItemOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backup item. - :type fabric_name: str - :param container_name: Container name associated with the backup item. - :type container_name: str - :param protected_item_name: Backup item for which backup needs to be triggered. - :type protected_item_name: str - :param parameters: resource backup request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupRequestResource - :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 = "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') - - # 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 - - 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.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 deleted file mode 100644 index d14c3bbf0275..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_bms_prepare_data_move_operation_result_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BMSPrepareDataMoveOperationResultOperations: - """BMSPrepareDataMoveOperationResultOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - operation_id: str, - **kwargs: Any - ) -> Optional["_models.VaultStorageConfigOperationResultResponse"]: - """Fetches Operation Result for Prepare Data Move. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param operation_id: - :type operation_id: str - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VaultStorageConfigOperationResultResponse"]] - error_map = { - 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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VaultStorageConfigOperationResultResponse', 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/operationResults/{operationId}'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_cross_region_restore_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_cross_region_restore_operations.py deleted file mode 100644 index e4eb302bfc3b..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_cross_region_restore_operations.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class CrossRegionRestoreOperations: - """CrossRegionRestoreOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def _trigger_initial( - self, - azure_region: str, - parameters: "_models.CrossRegionRestoreRequest", - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._trigger_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrossRegionRestoreRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _trigger_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore'} # type: ignore - - async def begin_trigger( - self, - azure_region: str, - parameters: "_models.CrossRegionRestoreRequest", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Restores the specified backed up data in a different region as compared to where the data is backed up. - - Restores the specified backed up data in a different region as compared to where the data is - backed up. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: resource cross region restore request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.CrossRegionRestoreRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._trigger_initial( - azure_region=azure_region, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_results_operations.py deleted file mode 100644 index 973f001fc1cd..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_results_operations.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class CrrOperationResultsOperations: - """CrrOperationResultsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - azure_region: str, - operation_id: str, - **kwargs: Any - ) -> None: - """get. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param operation_id: - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_status_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_status_operations.py deleted file mode 100644 index c6c7274b8303..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_crr_operation_status_operations.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class CrrOperationStatusOperations: - """CrrOperationStatusOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - azure_region: str, - operation_id: str, - **kwargs: Any - ) -> "_models.OperationStatus": - """get. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param operation_id: - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationStatus, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('OperationStatus', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_export_jobs_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_export_jobs_operation_results_operations.py deleted file mode 100644 index c7997ded8267..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_export_jobs_operation_results_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import 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.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ExportJobsOperationResultsOperations: - """ExportJobsOperationResultsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - operation_id: str, - **kwargs: Any - ) -> "_models.OperationResultInfoBaseResource": - """Gets the operation result of operation triggered by Export Jobs API. If the operation is - successful, then it also - contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in - JSON serialized format. - - :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 export job. - :type operation_id: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationResultInfoBaseResource"] - error_map = { - 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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('OperationResultInfoBaseResource', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('OperationResultInfoBaseResource', pipeline_response) - - if cls: - 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 deleted file mode 100644 index 11b4fa1f718b..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_feature_support_operations.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class FeatureSupportOperations: - """FeatureSupportOperations 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 validate( - self, - azure_region: str, - parameters: "_models.FeatureSupportRequest", - **kwargs: Any - ) -> "_models.AzureVMResourceFeatureSupportResponse": - """It will validate if given feature with resource properties is supported in service. - - It will validate if given feature with resource properties is supported in service. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: Feature support request object. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.FeatureSupportRequest - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureVMResourceFeatureSupportResponse"] - error_map = { - 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') - - # 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, '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 - - 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('AzureVMResourceFeatureSupportResponse', pipeline_response) - - if cls: - 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 deleted file mode 100644 index 792f2c1d5a72..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_item_level_recovery_connections_operations.py +++ /dev/null @@ -1,203 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ItemLevelRecoveryConnectionsOperations: - """ItemLevelRecoveryConnectionsOperations 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 provision( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - recovery_point_id: str, - parameters: "_models.ILRRequestResource", - **kwargs: Any - ) -> None: - """Provisions a script which invokes an iSCSI connection to the backup data. Executing this script - opens a file - explorer displaying all the recoverable files and folders. This is an asynchronous operation. - To know the status of - provisioning, call GetProtectedItemOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up items. - :type fabric_name: str - :param container_name: Container name associated with the backed up items. - :type container_name: str - :param protected_item_name: Backed up item name whose files/folders are to be restored. - :type protected_item_name: str - :param recovery_point_id: Recovery point ID which represents backed up data. iSCSI connection - will be provisioned - for this backed up data. - :type recovery_point_id: str - :param parameters: resource ILR request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ILRRequestResource - :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 = "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') - - # 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 - - 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, {}) - - provision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery'} # type: ignore - - async def revoke( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - recovery_point_id: str, - **kwargs: Any - ) -> None: - """Revokes an iSCSI connection which can be used to download a script. Executing this script opens - a file explorer - displaying all recoverable files and folders. This is an asynchronous 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 fabric_name: Fabric name associated with the backed up items. - :type fabric_name: str - :param container_name: Container name associated with the backed up items. - :type container_name: str - :param protected_item_name: Backed up item name whose files/folders are to be restored. - :type protected_item_name: str - :param recovery_point_id: Recovery point ID which represents backed up data. iSCSI connection - will be revoked for - this backed up data. - :type recovery_point_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - 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 - - 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, {}) - - 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 deleted file mode 100644 index faf0003b1264..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_cancellations_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class JobCancellationsOperations: - """JobCancellationsOperations 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( - self, - vault_name: str, - resource_group_name: str, - job_name: str, - **kwargs: Any - ) -> None: - """Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call - GetCancelOperationResult 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 job_name: Name of the job to cancel. - :type job_name: 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 = "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') - - # 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 - - 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.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 deleted file mode 100644 index 2c414b6ef84f..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_details_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class JobDetailsOperations: - """JobDetailsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - job_name: str, - **kwargs: Any - ) -> "_models.JobResource": - """Gets extended information associated with the job. - - :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 job_name: Name of the job whose details are to be fetched. - :type job_name: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('JobResource', pipeline_response) - - if cls: - 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 deleted file mode 100644 index a1f8619f45fe..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_operation_results_operations.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class JobOperationResultsOperations: - """JobOperationResultsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - job_name: str, - operation_id: str, - **kwargs: Any - ) -> None: - """Fetches the result of any 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 job_name: Job name whose operation result has to be fetched. - :type job_name: str - :param operation_id: OperationID which represents the operation whose result has to be fetched. - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - 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, {}) - - 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 deleted file mode 100644 index 147c1894dd63..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_jobs_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class JobsOperations: - """JobsOperations 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 export( - self, - vault_name: str, - resource_group_name: str, - filter: Optional[str] = None, - **kwargs: Any - ) -> None: - """Triggers export of jobs specified by filters and returns an OperationID to track. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :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 = "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') - - # 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 - - 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, {}) - - 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 deleted file mode 100644 index 6e3cee0cc621..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operation_operations.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class OperationOperations: - """OperationOperations 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 validate( - self, - vault_name: str, - resource_group_name: str, - parameters: "_models.ValidateOperationRequest", - **kwargs: Any - ) -> "_models.ValidateOperationsResponse": - """Validate operation for specified backed up item. This is a synchronous operation. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: resource validate operation request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationRequest - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateOperationsResponse"] - error_map = { - 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') - - # 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, '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 - - 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('ValidateOperationsResponse', pipeline_response) - - if cls: - 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 deleted file mode 100644 index 05afdd6d1eb2..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operations.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class Operations: - """Operations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - **kwargs: Any - ) -> AsyncIterable["_models.ClientDiscoveryResponse"]: - """Returns the list of available operations. - - :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] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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 = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ClientDiscoveryResponse', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/providers/Microsoft.RecoveryServices/operations'} # type: ignore 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 deleted file mode 100644 index c2b3f37d920a..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_connection_operations.py +++ /dev/null @@ -1,359 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class PrivateEndpointConnectionOperations: - """PrivateEndpointConnectionOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - private_endpoint_connection_name: str, - **kwargs: Any - ) -> "_models.PrivateEndpointConnectionResource": - """Get Private Endpoint Connection. This call is made by Backup Admin. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. - :type private_endpoint_connection_name: str - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] - error_map = { - 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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) - - if cls: - 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, - resource_group_name: str, - private_endpoint_connection_name: str, - parameters: "_models.PrivateEndpointConnectionResource", - **kwargs: Any - ) -> "_models.PrivateEndpointConnectionResource": - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] - error_map = { - 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') - - # 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, '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 - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - - async def begin_put( - self, - vault_name: str, - resource_group_name: str, - private_endpoint_connection_name: str, - parameters: "_models.PrivateEndpointConnectionResource", - **kwargs: Any - ) -> AsyncLROPoller["_models.PrivateEndpointConnectionResource"]: - """Approve or Reject Private Endpoint requests. This call is made by Backup Admin. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. - :type private_endpoint_connection_name: str - :param parameters: Request body for operation. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionResource - :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 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] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] - 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._put_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - private_endpoint_connection_name=private_endpoint_connection_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - 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) - 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_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - - async def _delete_initial( - self, - vault_name: str, - resource_group_name: str, - private_endpoint_connection_name: str, - **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 = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - 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 - - if response.status_code not in [200, 202, 204]: - 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, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - - async def begin_delete( - self, - vault_name: str, - resource_group_name: str, - private_endpoint_connection_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete Private Endpoint requests. This call is made by Backup Admin. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. - :type private_endpoint_connection_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - private_endpoint_connection_name=private_endpoint_connection_name, - 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) - 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_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 deleted file mode 100644 index 854defc51872..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class PrivateEndpointOperations: - """PrivateEndpointOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get_operation_status( - self, - vault_name: str, - resource_group_name: str, - private_endpoint_connection_name: str, - operation_id: str, - **kwargs: Any - ) -> "_models.OperationStatus": - """Gets the operation status for a private endpoint connection. - - Gets the operation status for a private endpoint connection. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. - :type private_endpoint_connection_name: str - :param operation_id: Operation id. - :type operation_id: str - :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 = "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') - - 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) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('OperationStatus', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_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 deleted file mode 100644 index 8586ab983b2c..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protectable_containers_operations.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ProtectableContainersOperations: - """ProtectableContainersOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - filter: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.ProtectableContainerResourceList"]: - """Lists the containers that can be registered to Recovery Services Vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: - :type fabric_name: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectableContainerResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectableContainerResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers'} # type: ignore 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 deleted file mode 100644 index 8bc5e8d6d19c..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_results_operations.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ProtectedItemOperationResultsOperations: - """ProtectedItemOperationResultsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - operation_id: str, - **kwargs: Any - ) -> Optional["_models.ProtectedItemResource"]: - """Fetches the result of any operation on the backup item. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backup item. - :type fabric_name: str - :param container_name: Container name associated with the backup item. - :type container_name: str - :param protected_item_name: Backup item name whose details are to be fetched. - :type protected_item_name: str - :param operation_id: OperationID which represents the operation whose result needs to be - fetched. - :type operation_id: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectedItemResource"]] - error_map = { - 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') - - 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, 204]: - 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('ProtectedItemResource', pipeline_response) - - if cls: - 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 deleted file mode 100644 index 8bb130c80e31..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_statuses_operations.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ProtectedItemOperationStatusesOperations: - """ProtectedItemOperationStatusesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - operation_id: str, - **kwargs: Any - ) -> "_models.OperationStatus": - """Fetches the status of an operation such as triggering a backup, restore. The status can be in - progress, completed - or failed. You can refer to the OperationStatus enum for all the possible states of the - operation. Some operations - create jobs. This method returns the list of jobs associated with 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 fabric_name: Fabric name associated with the backup item. - :type fabric_name: str - :param container_name: Container name associated with the backup item. - :type container_name: str - :param protected_item_name: Backup item name whose details are to be fetched. - :type protected_item_name: str - :param operation_id: OperationID represents the operation whose status needs to be fetched. - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationStatus, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - 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) - 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}/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 deleted file mode 100644 index b07aeeee5605..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_items_operations.py +++ /dev/null @@ -1,273 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ProtectedItemsOperations: - """ProtectedItemsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - filter: Optional[str] = None, - **kwargs: Any - ) -> "_models.ProtectedItemResource": - """Provides the details of the backed up item. This is an asynchronous operation. To know the - status of the operation, - call the GetItemOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up item. - :type fabric_name: str - :param container_name: Container name associated with the backed up item. - :type container_name: str - :param protected_item_name: Backed up item name whose details are to be fetched. - :type protected_item_name: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ProtectedItemResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectedItemResource"] - error_map = { - 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') - - 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ProtectedItemResource', pipeline_response) - - if cls: - 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 - - async def create_or_update( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - parameters: "_models.ProtectedItemResource", - **kwargs: Any - ) -> Optional["_models.ProtectedItemResource"]: - """Enables backup of an item or to modifies the backup policy information of an already backed up - item. This is an - asynchronous operation. To know the status of the operation, call the GetItemOperationResult - API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backup item. - :type fabric_name: str - :param container_name: Container name associated with the backup item. - :type container_name: str - :param protected_item_name: Item name to be backed up. - :type protected_item_name: str - :param parameters: resource backed up item. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectedItemResource"]] - error_map = { - 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') - - # 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 - - 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('ProtectedItemResource', pipeline_response) - - if cls: - 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 - - async def delete( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - **kwargs: Any - ) -> None: - """Used to disable backup of an item within a container. This is an asynchronous operation. To - know the status of the - request, call the GetItemOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up item. - :type fabric_name: str - :param container_name: Container name associated with the backed up item. - :type container_name: str - :param protected_item_name: Backed up item to be deleted. - :type protected_item_name: 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 = "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') - - 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 - - if response.status_code not in [200, 202, 204]: - 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, {}) - - 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 deleted file mode 100644 index bd672d6b34c7..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_operation_results_operations.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ProtectionContainerOperationResultsOperations: - """ProtectionContainerOperationResultsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - operation_id: str, - **kwargs: Any - ) -> Optional["_models.ProtectionContainerResource"]: - """Fetches the result of any operation on the container. - - :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: Container name whose information should be fetched. - :type container_name: str - :param operation_id: Operation ID which represents the operation whose result needs to be - fetched. - :type operation_id: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectionContainerResource"]] - error_map = { - 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') - - 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, 204]: - 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('ProtectionContainerResource', pipeline_response) - - if cls: - 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 deleted file mode 100644 index bfd7be202c44..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_refresh_operation_results_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ProtectionContainerRefreshOperationResultsOperations: - """ProtectionContainerRefreshOperationResultsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - operation_id: str, - **kwargs: Any - ) -> None: - """Provides the result of the refresh operation triggered by the BeginRefresh 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 fabric_name: Fabric name associated with the container. - :type fabric_name: str - :param operation_id: Operation ID associated with the operation whose result needs to be - fetched. - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - 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, {}) - - 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 deleted file mode 100644 index 86a68423c19f..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_containers_operations.py +++ /dev/null @@ -1,396 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ProtectionContainersOperations: - """ProtectionContainersOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - **kwargs: Any - ) -> "_models.ProtectionContainerResource": - """Gets details of the specific container registered to your Recovery Services Vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Name of the fabric where the container belongs. - :type fabric_name: str - :param container_name: Name of the container whose details need to be fetched. - :type container_name: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionContainerResource"] - error_map = { - 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') - - 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ProtectionContainerResource', pipeline_response) - - if cls: - 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 - - async def register( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - parameters: "_models.ProtectionContainerResource", - **kwargs: Any - ) -> Optional["_models.ProtectionContainerResource"]: - """Registers the container with Recovery Services vault. - This is an asynchronous operation. To track the operation status, use location header to call - get latest status of - 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 fabric_name: Fabric name associated with the container. - :type fabric_name: str - :param container_name: Name of the container to be registered. - :type container_name: str - :param parameters: Request body for operation. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectionContainerResource"]] - error_map = { - 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') - - 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 - - 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('ProtectionContainerResource', pipeline_response) - - if cls: - 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 - - async def unregister( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - **kwargs: Any - ) -> None: - """Unregisters the given container from your Recovery Services Vault. This is an asynchronous - operation. To determine - whether the backend service has finished processing the request, call Get Container Operation - Result API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Name of the fabric where the container belongs. - :type fabric_name: str - :param container_name: Name of the container which needs to be unregistered from the Recovery - Services Vault. - :type container_name: 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 = "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') - - 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 - - if response.status_code not in [200, 202, 204]: - 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, {}) - - unregister.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} # type: ignore - - async def inquire( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - filter: Optional[str] = None, - **kwargs: Any - ) -> None: - """Inquires all the protectable items under the given container. - - This is an async operation and the results should be tracked using location header or - Azure-async-url. - - :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 in which inquiry needs to be triggered. - :type container_name: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: 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 = "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') - - 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 - - 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, {}) - - inquire.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire'} # type: ignore - - async def refresh( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - filter: Optional[str] = None, - **kwargs: Any - ) -> None: - """Discovers all the containers in the subscription that can be backed up to Recovery Services - Vault. This is an - asynchronous operation. To know the status of the operation, call GetRefreshOperationResult - API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated the container. - :type fabric_name: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: 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 = "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') - - # 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 - - 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, {}) - - 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 deleted file mode 100644 index 4bc44e635772..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_intent_operations.py +++ /dev/null @@ -1,321 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ProtectionIntentOperations: - """ProtectionIntentOperations 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 validate( - self, - azure_region: str, - parameters: "_models.PreValidateEnableBackupRequest", - **kwargs: Any - ) -> "_models.PreValidateEnableBackupResponse": - """It will validate followings - - - #. Vault capacity - #. VM is already protected - #. Any VM related configuration passed in properties. - - It will validate followings - - - #. Vault capacity - #. VM is already protected - #. Any VM related configuration passed in properties. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: Enable backup validation request on Virtual Machine. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.PreValidateEnableBackupRequest - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PreValidateEnableBackupResponse"] - error_map = { - 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') - - # 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, '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 - - 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('PreValidateEnableBackupResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - validate.metadata = {'url': '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection'} # type: ignore - - async def get( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - intent_object_name: str, - **kwargs: Any - ) -> "_models.ProtectionIntentResource": - """Provides the details of the protection intent up item. This is an asynchronous operation. To - know the status of the operation, - call the GetItemOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up item. - :type fabric_name: str - :param intent_object_name: Backed up item name whose details are to be fetched. - :type intent_object_name: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionIntentResource"] - error_map = { - 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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ProtectionIntentResource', pipeline_response) - - if cls: - 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 - - async def create_or_update( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - intent_object_name: str, - parameters: "_models.ProtectionIntentResource", - **kwargs: Any - ) -> "_models.ProtectionIntentResource": - """Create Intent for Enabling backup of an item. This is a synchronous 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 fabric_name: Fabric name associated with the backup item. - :type fabric_name: str - :param intent_object_name: Intent object name. - :type intent_object_name: str - :param parameters: resource backed up item. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionIntentResource"] - error_map = { - 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') - - # 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 - - 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('ProtectionIntentResource', pipeline_response) - - if cls: - 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 - - async def delete( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - intent_object_name: str, - **kwargs: Any - ) -> None: - """Used to remove intent from an item. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the intent. - :type fabric_name: str - :param intent_object_name: Intent to be deleted. - :type intent_object_name: 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 = "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') - - # 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 - - if response.status_code not in [204]: - 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, {}) - - 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 deleted file mode 100644 index 780f9cf3c709..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policies_operations.py +++ /dev/null @@ -1,301 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ProtectionPoliciesOperations: - """ProtectionPoliciesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - policy_name: str, - **kwargs: Any - ) -> "_models.ProtectionPolicyResource": - """Provides the details of the backup policies associated to Recovery Services Vault. This is an - asynchronous - operation. Status of the operation can be fetched using GetPolicyOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param policy_name: Backup policy information to be fetched. - :type policy_name: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionPolicyResource"] - error_map = { - 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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ProtectionPolicyResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} # type: ignore - - async def create_or_update( - self, - vault_name: str, - resource_group_name: str, - policy_name: str, - parameters: "_models.ProtectionPolicyResource", - **kwargs: Any - ) -> Optional["_models.ProtectionPolicyResource"]: - """Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation - can be fetched - using GetPolicyOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param policy_name: Backup policy to be created. - :type policy_name: str - :param parameters: resource backup policy. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectionPolicyResource"]] - error_map = { - 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') - - # 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, '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 - - 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('ProtectionPolicyResource', pipeline_response) - - if cls: - 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, - resource_group_name: str, - policy_name: str, - **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 = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - 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 - - if response.status_code not in [200, 204]: - 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, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} # type: ignore - - async def begin_delete( - self, - vault_name: str, - resource_group_name: str, - policy_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous - operation. Status of the - operation can be fetched using GetProtectionPolicyOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param policy_name: Backup policy to be deleted. - :type policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - policy_name=policy_name, - 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) - 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_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 deleted file mode 100644 index a55b144a34b7..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_results_operations.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ProtectionPolicyOperationResultsOperations: - """ProtectionPolicyOperationResultsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - policy_name: str, - operation_id: str, - **kwargs: Any - ) -> "_models.ProtectionPolicyResource": - """Provides the result of an 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 policy_name: Backup policy name whose operation's result needs to be fetched. - :type policy_name: str - :param operation_id: Operation ID which represents the operation whose result needs to be - fetched. - :type operation_id: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionPolicyResource"] - error_map = { - 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') - - 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ProtectionPolicyResource', pipeline_response) - - if cls: - 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 deleted file mode 100644 index 2516e3ee1c39..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_statuses_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ProtectionPolicyOperationStatusesOperations: - """ProtectionPolicyOperationStatusesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - policy_name: str, - operation_id: str, - **kwargs: Any - ) -> "_models.OperationStatus": - """Provides the status of the asynchronous operations like backup, restore. The status can be in - progress, completed - or failed. You can refer to the Operation Status enum for all the possible states of an - operation. Some operations - create jobs. This method returns the list of jobs associated with 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 policy_name: Backup policy name whose operation's status needs to be fetched. - :type policy_name: str - :param operation_id: Operation ID which represents an operation whose status needs to be - fetched. - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationStatus, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - 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) - 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}/backupPolicies/{policyName}/operations/{operationId}'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_crr_operations.py deleted file mode 100644 index 7c3fa9b1dd00..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_crr_operations.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class RecoveryPointsCrrOperations: - """RecoveryPointsCrrOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - filter: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.RecoveryPointResourceList"]: - """Lists the backup copies for the backed up item. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up item. - :type fabric_name: str - :param container_name: Container name associated with the backed up item. - :type container_name: str - :param protected_item_name: Backed up item whose backup copies are to be fetched. - :type protected_item_name: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RecoveryPointResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), - 'containerName': self._serialize.url("container_name", container_name, 'str'), - 'protectedItemName': self._serialize.url("protected_item_name", protected_item_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('RecoveryPointResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_operations.py deleted file mode 100644 index 95bb1a0d204a..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_operations.py +++ /dev/null @@ -1,299 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class 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.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - filter: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.RecoveryPointResourceList"]: - """Lists the backup copies for the backed up item. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up item. - :type fabric_name: str - :param container_name: Container name associated with the backed up item. - :type container_name: str - :param protected_item_name: Backed up item whose backup copies are to be fetched. - :type protected_item_name: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RecoveryPointResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('RecoveryPointResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints'} # type: ignore - - async def get( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - recovery_point_id: str, - **kwargs: Any - ) -> "_models.RecoveryPointResource": - """Provides the information of the backed up data identified using RecoveryPointID. This is an - asynchronous operation. - To know the status of the operation, call the GetProtectedItemOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with backed up item. - :type fabric_name: str - :param container_name: Container name associated with backed up item. - :type container_name: str - :param protected_item_name: Backed up item name whose backup data needs to be fetched. - :type protected_item_name: str - :param recovery_point_id: RecoveryPointID represents the backed up data to be fetched. - :type recovery_point_id: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResource"] - error_map = { - 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') - - 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RecoveryPointResource', pipeline_response) - - if cls: - 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, {}) - - 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 deleted file mode 100644 index 333dfbbb404e..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_recommended_for_move_operations.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class RecoveryPointsRecommendedForMoveOperations: - """RecoveryPointsRecommendedForMoveOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - parameters: "_models.ListRecoveryPointsRecommendedForMoveRequest", - **kwargs: Any - ) -> AsyncIterable["_models.RecoveryPointResourceList"]: - """Lists the recovery points recommended for move to another tier. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: - :type fabric_name: str - :param container_name: - :type container_name: str - :param protected_item_name: - :type protected_item_name: str - :param parameters: List Recovery points Recommended for Move Request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RecoveryPointResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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) - 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) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('RecoveryPointResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPointsRecommendedForMove'} # type: ignore 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 deleted file mode 100644 index 826126f917c1..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_services_backup_client_operations.py +++ /dev/null @@ -1,476 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class RecoveryServicesBackupClientOperationsMixin: - - async def get_operation_status( - self, - vault_name: str, - resource_group_name: str, - operation_id: str, - **kwargs: Any - ) -> "_models.OperationStatus": - """Fetches operation status for data move operation on vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param operation_id: - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationStatus, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('OperationStatus', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_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, - resource_group_name: str, - parameters: "_models.PrepareDataMoveRequest", - **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 = "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') - - # 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, '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) - - 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 - - async def begin_bms_prepare_data_move( - self, - vault_name: str, - resource_group_name: str, - parameters: "_models.PrepareDataMoveRequest", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Prepares source vault for Data Move operation. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: Prepare data move request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.PrepareDataMoveRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._bms_prepare_data_move_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - '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) - 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_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( - self, - vault_name: str, - resource_group_name: str, - parameters: "_models.TriggerDataMoveRequest", - **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 = "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') - - # 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, '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) - - 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 - - async def begin_bms_trigger_data_move( - self, - vault_name: str, - resource_group_name: str, - parameters: "_models.TriggerDataMoveRequest", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Triggers Data Move Operation on target vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: Trigger data move request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.TriggerDataMoveRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._bms_trigger_data_move_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - '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) - 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_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( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - recovery_point_id: str, - parameters: "_models.MoveRPAcrossTiersRequest", - **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 = "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') - - 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 - - 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, {}) - - _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 - - async def begin_move_recovery_point( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - recovery_point_id: str, - parameters: "_models.MoveRPAcrossTiersRequest", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Move recovery point from one datastore to another store. - - Move recovery point from one datastore to another store. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: - :type fabric_name: str - :param container_name: - :type container_name: str - :param protected_item_name: - :type protected_item_name: str - :param recovery_point_id: - :type recovery_point_id: str - :param parameters: Move Resource Across Tiers Request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.MoveRPAcrossTiersRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._move_recovery_point_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - fabric_name=fabric_name, - container_name=container_name, - protected_item_name=protected_item_name, - recovery_point_id=recovery_point_id, - parameters=parameters, - 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) - 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_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 deleted file mode 100644 index 10327e979ac2..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxies_operations.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ResourceGuardProxiesOperations: - """ResourceGuardProxiesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - vault_name: str, - resource_group_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.ResourceGuardProxyBaseResourceList"]: - """List the ResourceGuardProxies under vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :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] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ResourceGuardProxyBaseResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies'} # type: ignore 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 deleted file mode 100644 index a4729c9db30e..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxy_operations.py +++ /dev/null @@ -1,299 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ResourceGuardProxyOperations: - """ResourceGuardProxyOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - resource_guard_proxy_name: str, - **kwargs: Any - ) -> "_models.ResourceGuardProxyBaseResource": - """Returns ResourceGuardProxy under vault and with the name referenced in request. - - :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 resource_guard_proxy_name: - :type resource_guard_proxy_name: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResource"] - error_map = { - 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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ResourceGuardProxyBaseResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore - - async def put( - self, - vault_name: str, - resource_group_name: str, - resource_guard_proxy_name: str, - **kwargs: Any - ) -> "_models.ResourceGuardProxyBaseResource": - """Add or Update ResourceGuardProxy under vault - Secures vault critical operations. - - :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 resource_guard_proxy_name: - :type resource_guard_proxy_name: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResource"] - error_map = { - 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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - 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 - - 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('ResourceGuardProxyBaseResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore - - async def delete( - self, - vault_name: str, - resource_group_name: str, - resource_guard_proxy_name: str, - **kwargs: Any - ) -> None: - """Delete ResourceGuardProxy under vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param resource_guard_proxy_name: - :type resource_guard_proxy_name: 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 = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - 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 - - if response.status_code not in [200, 204]: - 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, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore - - async def unlock_delete( - self, - vault_name: str, - resource_group_name: str, - resource_guard_proxy_name: str, - parameters: "_models.UnlockDeleteRequest", - **kwargs: Any - ) -> "_models.UnlockDeleteResponse": - """Secures delete ResourceGuardProxy operations. - - :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 resource_guard_proxy_name: - :type resource_guard_proxy_name: str - :param parameters: Request body for operation. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.UnlockDeleteRequest - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UnlockDeleteResponse"] - error_map = { - 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') - - # 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, '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 - - 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('UnlockDeleteResponse', pipeline_response) - - if cls: - 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 deleted file mode 100644 index 33a0889d3743..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_restores_operations.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class RestoresOperations: - """RestoresOperations 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, - fabric_name: str, - container_name: str, - protected_item_name: str, - recovery_point_id: str, - parameters: "_models.RestoreRequestResource", - **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 = "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') - - 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 - - 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}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'} # type: ignore - - async def begin_trigger( - self, - vault_name: str, - resource_group_name: str, - fabric_name: str, - container_name: str, - protected_item_name: str, - recovery_point_id: str, - parameters: "_models.RestoreRequestResource", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Restores the specified backed up data. This is an asynchronous operation. To know the status of - this API call, use - GetProtectedItemOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up items. - :type fabric_name: str - :param container_name: Container name associated with the backed up items. - :type container_name: str - :param protected_item_name: Backed up item to be restored. - :type protected_item_name: str - :param recovery_point_id: Recovery point ID which represents the backed up data to be restored. - :type recovery_point_id: str - :param parameters: resource restore request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestResource - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._trigger_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - fabric_name=fabric_name, - container_name=container_name, - protected_item_name=protected_item_name, - recovery_point_id=recovery_point_id, - parameters=parameters, - 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) - 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}/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 deleted file mode 100644 index 65bb65fe414f..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_security_pins_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class SecurityPINsOperations: - """SecurityPINsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get( - self, - vault_name: str, - resource_group_name: str, - parameters: Optional["_models.SecurityPinBase"] = None, - **kwargs: Any - ) -> "_models.TokenInformation": - """Get the security PIN. - - :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: security pin request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.SecurityPinBase - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.TokenInformation"] - error_map = { - 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') - - body_content_kwargs = {} # type: Dict[str, Any] - if parameters is not None: - body_content = 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) - 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('TokenInformation', pipeline_response) - - if cls: - 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/models/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py deleted file mode 100644 index f41e1a2c24a3..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py +++ /dev/null @@ -1,1057 +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. -# -------------------------------------------------------------------------- - -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 - from ._models_py3 import AzureFileShareBackupRequest - from ._models_py3 import AzureFileShareProtectableItem - 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 - from ._models_py3 import AzureIaaSClassicComputeVMProtectedItem - from ._models_py3 import AzureIaaSComputeVMContainer - from ._models_py3 import AzureIaaSComputeVMProtectableItem - 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 AzureIaaSVMProtectionPolicy - from ._models_py3 import AzureRecoveryServiceVaultProtectionIntent - from ._models_py3 import AzureResourceProtectionIntent - from ._models_py3 import AzureSQLAGWorkloadContainerProtectionContainer - from ._models_py3 import AzureSqlContainer - from ._models_py3 import AzureSqlProtectedItem - from ._models_py3 import AzureSqlProtectedItemExtendedInfo - from ._models_py3 import AzureSqlProtectionPolicy - from ._models_py3 import AzureStorageContainer - from ._models_py3 import AzureStorageErrorInfo - from ._models_py3 import AzureStorageJob - from ._models_py3 import AzureStorageJobExtendedInfo - from ._models_py3 import AzureStorageJobTaskDetails - from ._models_py3 import AzureStorageProtectableContainer - from ._models_py3 import AzureVMAppContainerProtectableContainer - from ._models_py3 import AzureVMAppContainerProtectionContainer - from ._models_py3 import AzureVMResourceFeatureSupportRequest - from ._models_py3 import AzureVMResourceFeatureSupportResponse - from ._models_py3 import AzureVmWorkloadItem - from ._models_py3 import AzureVmWorkloadProtectableItem - from ._models_py3 import AzureVmWorkloadProtectedItem - from ._models_py3 import AzureVmWorkloadProtectedItemExtendedInfo - from ._models_py3 import AzureVmWorkloadProtectionPolicy - from ._models_py3 import AzureVmWorkloadSAPAseDatabaseProtectedItem - from ._models_py3 import AzureVmWorkloadSAPAseDatabaseWorkloadItem - from ._models_py3 import AzureVmWorkloadSAPAseSystemProtectableItem - from ._models_py3 import AzureVmWorkloadSAPAseSystemWorkloadItem - from ._models_py3 import AzureVmWorkloadSAPHanaDatabaseProtectableItem - from ._models_py3 import AzureVmWorkloadSAPHanaDatabaseProtectedItem - from ._models_py3 import AzureVmWorkloadSAPHanaDatabaseWorkloadItem - from ._models_py3 import AzureVmWorkloadSAPHanaSystemProtectableItem - from ._models_py3 import AzureVmWorkloadSAPHanaSystemWorkloadItem - from ._models_py3 import AzureVmWorkloadSQLAvailabilityGroupProtectableItem - from ._models_py3 import AzureVmWorkloadSQLDatabaseProtectableItem - from ._models_py3 import AzureVmWorkloadSQLDatabaseProtectedItem - from ._models_py3 import AzureVmWorkloadSQLDatabaseWorkloadItem - from ._models_py3 import AzureVmWorkloadSQLInstanceProtectableItem - from ._models_py3 import AzureVmWorkloadSQLInstanceWorkloadItem - from ._models_py3 import AzureWorkloadAutoProtectionIntent - from ._models_py3 import AzureWorkloadBackupRequest - from ._models_py3 import AzureWorkloadContainer - 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 - from ._models_py3 import BMSContainerQueryObject - from ._models_py3 import BMSContainersInquiryQueryObject - from ._models_py3 import BMSPOQueryObject - from ._models_py3 import BMSRPQueryObject - from ._models_py3 import BMSRefreshContainersQueryObject - from ._models_py3 import BMSWorkloadItemQueryObject - from ._models_py3 import BackupEngineBase - from ._models_py3 import BackupEngineBaseResource - from ._models_py3 import BackupEngineBaseResourceList - from ._models_py3 import BackupEngineExtendedInfo - from ._models_py3 import BackupManagementUsage - from ._models_py3 import BackupManagementUsageList - from ._models_py3 import BackupRequest - from ._models_py3 import BackupRequestResource - from ._models_py3 import BackupResourceConfig - from ._models_py3 import BackupResourceConfigResource - from ._models_py3 import BackupResourceEncryptionConfig - from ._models_py3 import BackupResourceEncryptionConfigExtended - from ._models_py3 import BackupResourceEncryptionConfigExtendedResource - from ._models_py3 import BackupResourceEncryptionConfigResource - from ._models_py3 import BackupResourceVaultConfig - from ._models_py3 import BackupResourceVaultConfigResource - from ._models_py3 import BackupStatusRequest - from ._models_py3 import BackupStatusResponse - from ._models_py3 import ClientDiscoveryDisplay - from ._models_py3 import ClientDiscoveryForLogSpecification - from ._models_py3 import ClientDiscoveryForProperties - from ._models_py3 import ClientDiscoveryForServiceSpecification - from ._models_py3 import ClientDiscoveryResponse - from ._models_py3 import ClientDiscoveryValueForSingleApi - 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 - from ._models_py3 import DailyRetentionFormat - from ._models_py3 import DailyRetentionSchedule - from ._models_py3 import Day - from ._models_py3 import DiskExclusionProperties - from ._models_py3 import DiskInformation - from ._models_py3 import DistributedNodesInfo - from ._models_py3 import DpmBackupEngine - from ._models_py3 import DpmContainer - 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 ExportJobsOperationResultInfo - from ._models_py3 import ExtendedProperties - from ._models_py3 import FeatureSupportRequest - from ._models_py3 import GenericContainer - from ._models_py3 import GenericContainerExtendedInfo - from ._models_py3 import GenericProtectedItem - from ._models_py3 import GenericProtectionPolicy - from ._models_py3 import GenericRecoveryPoint - from ._models_py3 import GetProtectedItemQueryObject - from ._models_py3 import ILRRequest - from ._models_py3 import ILRRequestResource - from ._models_py3 import IaaSVMContainer - from ._models_py3 import IaaSVMProtectableItem - from ._models_py3 import IaasVMBackupRequest - from ._models_py3 import IaasVMILRRegistrationRequest - from ._models_py3 import IaasVMRecoveryPoint - from ._models_py3 import IaasVMRecoveryPointAutoGenerated - from ._models_py3 import IaasVMRestoreRequest - from ._models_py3 import IaasVMRestoreRequestAutoGenerated - from ._models_py3 import IaasVMRestoreWithRehydrationRequest - from ._models_py3 import IdentityBasedRestoreDetails - from ._models_py3 import IdentityInfo - from ._models_py3 import InquiryInfo - from ._models_py3 import InquiryValidation - from ._models_py3 import InstantItemRecoveryTarget - from ._models_py3 import InstantRPAdditionalDetails - 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 ListRecoveryPointsRecommendedForMoveRequest - from ._models_py3 import LogSchedulePolicy - from ._models_py3 import LongTermRetentionPolicy - from ._models_py3 import LongTermSchedulePolicy - from ._models_py3 import MABContainerHealthDetails - from ._models_py3 import MabContainer - from ._models_py3 import MabContainerExtendedInfo - 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 MabProtectionPolicy - from ._models_py3 import MonthlyRetentionSchedule - 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 - 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 OperationWorkerResponse - from ._models_py3 import PointInTimeRange - from ._models_py3 import PreBackupValidation - from ._models_py3 import PreValidateEnableBackupRequest - from ._models_py3 import PreValidateEnableBackupResponse - from ._models_py3 import PrepareDataMoveRequest - from ._models_py3 import PrepareDataMoveResponse - from ._models_py3 import PrivateEndpoint - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointConnectionResource - from ._models_py3 import PrivateLinkServiceConnectionState - from ._models_py3 import ProtectableContainer - from ._models_py3 import ProtectableContainerResource - from ._models_py3 import ProtectableContainerResourceList - from ._models_py3 import ProtectedItem - from ._models_py3 import ProtectedItemQueryObject - from ._models_py3 import ProtectedItemResource - from ._models_py3 import ProtectedItemResourceList - from ._models_py3 import ProtectionContainer - from ._models_py3 import ProtectionContainerResource - from ._models_py3 import ProtectionContainerResourceList - from ._models_py3 import ProtectionIntent - from ._models_py3 import ProtectionIntentQueryObject - from ._models_py3 import ProtectionIntentResource - from ._models_py3 import ProtectionIntentResourceList - from ._models_py3 import ProtectionPolicy - from ._models_py3 import ProtectionPolicyQueryObject - from ._models_py3 import ProtectionPolicyResource - from ._models_py3 import ProtectionPolicyResourceList - from ._models_py3 import RecoveryPoint - from ._models_py3 import RecoveryPointDiskConfiguration - from ._models_py3 import RecoveryPointMoveReadinessInfo - from ._models_py3 import RecoveryPointRehydrationInfo - from ._models_py3 import RecoveryPointResource - from ._models_py3 import RecoveryPointResourceList - from ._models_py3 import RecoveryPointTierInformation - from ._models_py3 import Resource - from ._models_py3 import ResourceGuardOperationDetail - from ._models_py3 import ResourceGuardProxyBase - from ._models_py3 import ResourceGuardProxyBaseResource - from ._models_py3 import ResourceGuardProxyBaseResourceList - from ._models_py3 import ResourceHealthDetails - from ._models_py3 import ResourceList - from ._models_py3 import RestoreFileSpecs - from ._models_py3 import RestoreRequest - from ._models_py3 import RestoreRequestResource - from ._models_py3 import RetentionDuration - from ._models_py3 import RetentionPolicy - from ._models_py3 import SQLDataDirectory - from ._models_py3 import SQLDataDirectoryMapping - from ._models_py3 import SchedulePolicy - from ._models_py3 import SecurityPinBase - from ._models_py3 import Settings - from ._models_py3 import SimpleRetentionPolicy - from ._models_py3 import SimpleSchedulePolicy - from ._models_py3 import SubProtectionPolicy - from ._models_py3 import TargetAFSRestoreInfo - from ._models_py3 import TargetRestoreInfo - from ._models_py3 import TokenInformation - from ._models_py3 import TriggerDataMoveRequest - from ._models_py3 import UnlockDeleteRequest - from ._models_py3 import UnlockDeleteResponse - from ._models_py3 import ValidateIaasVMRestoreOperationRequest - from ._models_py3 import ValidateOperationRequest - from ._models_py3 import ValidateOperationResponse - from ._models_py3 import ValidateOperationsResponse - from ._models_py3 import ValidateRestoreOperationRequest - from ._models_py3 import VaultJob - from ._models_py3 import VaultJobErrorInfo - from ._models_py3 import VaultJobExtendedInfo - from ._models_py3 import VaultStorageConfigOperationResultResponse - from ._models_py3 import WeeklyRetentionFormat - from ._models_py3 import WeeklyRetentionSchedule - from ._models_py3 import WorkloadCrrAccessToken - from ._models_py3 import WorkloadInquiryDetails - from ._models_py3 import WorkloadItem - from ._models_py3 import WorkloadItemResource - from ._models_py3 import WorkloadItemResourceList - from ._models_py3 import WorkloadProtectableItem - from ._models_py3 import WorkloadProtectableItemResource - 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 - from ._models import AzureFileShareBackupRequest # type: ignore - from ._models import AzureFileShareProtectableItem # type: ignore - 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 - from ._models import AzureIaaSClassicComputeVMProtectedItem # type: ignore - from ._models import AzureIaaSComputeVMContainer # type: ignore - from ._models import AzureIaaSComputeVMProtectableItem # 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 AzureIaaSVMProtectionPolicy # type: ignore - from ._models import AzureRecoveryServiceVaultProtectionIntent # type: ignore - from ._models import AzureResourceProtectionIntent # type: ignore - from ._models import AzureSQLAGWorkloadContainerProtectionContainer # type: ignore - from ._models import AzureSqlContainer # type: ignore - from ._models import AzureSqlProtectedItem # type: ignore - from ._models import AzureSqlProtectedItemExtendedInfo # type: ignore - from ._models import AzureSqlProtectionPolicy # type: ignore - from ._models import AzureStorageContainer # 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 AzureStorageProtectableContainer # type: ignore - from ._models import AzureVMAppContainerProtectableContainer # type: ignore - from ._models import AzureVMAppContainerProtectionContainer # type: ignore - from ._models import AzureVMResourceFeatureSupportRequest # type: ignore - from ._models import AzureVMResourceFeatureSupportResponse # type: ignore - from ._models import AzureVmWorkloadItem # type: ignore - from ._models import AzureVmWorkloadProtectableItem # type: ignore - from ._models import AzureVmWorkloadProtectedItem # type: ignore - from ._models import AzureVmWorkloadProtectedItemExtendedInfo # type: ignore - from ._models import AzureVmWorkloadProtectionPolicy # type: ignore - from ._models import AzureVmWorkloadSAPAseDatabaseProtectedItem # type: ignore - from ._models import AzureVmWorkloadSAPAseDatabaseWorkloadItem # type: ignore - from ._models import AzureVmWorkloadSAPAseSystemProtectableItem # type: ignore - from ._models import AzureVmWorkloadSAPAseSystemWorkloadItem # type: ignore - from ._models import AzureVmWorkloadSAPHanaDatabaseProtectableItem # type: ignore - from ._models import AzureVmWorkloadSAPHanaDatabaseProtectedItem # type: ignore - from ._models import AzureVmWorkloadSAPHanaDatabaseWorkloadItem # type: ignore - from ._models import AzureVmWorkloadSAPHanaSystemProtectableItem # type: ignore - from ._models import AzureVmWorkloadSAPHanaSystemWorkloadItem # type: ignore - from ._models import AzureVmWorkloadSQLAvailabilityGroupProtectableItem # type: ignore - from ._models import AzureVmWorkloadSQLDatabaseProtectableItem # type: ignore - from ._models import AzureVmWorkloadSQLDatabaseProtectedItem # type: ignore - from ._models import AzureVmWorkloadSQLDatabaseWorkloadItem # type: ignore - from ._models import AzureVmWorkloadSQLInstanceProtectableItem # type: ignore - from ._models import AzureVmWorkloadSQLInstanceWorkloadItem # type: ignore - from ._models import AzureWorkloadAutoProtectionIntent # type: ignore - from ._models import AzureWorkloadBackupRequest # type: ignore - from ._models import AzureWorkloadContainer # 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 - from ._models import BMSContainerQueryObject # type: ignore - from ._models import BMSContainersInquiryQueryObject # type: ignore - from ._models import BMSPOQueryObject # type: ignore - from ._models import BMSRPQueryObject # type: ignore - from ._models import BMSRefreshContainersQueryObject # type: ignore - from ._models import BMSWorkloadItemQueryObject # type: ignore - from ._models import BackupEngineBase # type: ignore - from ._models import BackupEngineBaseResource # type: ignore - from ._models import BackupEngineBaseResourceList # type: ignore - from ._models import BackupEngineExtendedInfo # type: ignore - from ._models import BackupManagementUsage # type: ignore - from ._models import BackupManagementUsageList # type: ignore - from ._models import BackupRequest # type: ignore - from ._models import BackupRequestResource # type: ignore - from ._models import BackupResourceConfig # type: ignore - from ._models import BackupResourceConfigResource # type: ignore - from ._models import BackupResourceEncryptionConfig # type: ignore - from ._models import BackupResourceEncryptionConfigExtended # type: ignore - from ._models import BackupResourceEncryptionConfigExtendedResource # type: ignore - from ._models import BackupResourceEncryptionConfigResource # type: ignore - from ._models import BackupResourceVaultConfig # type: ignore - from ._models import BackupResourceVaultConfigResource # type: ignore - from ._models import BackupStatusRequest # type: ignore - from ._models import BackupStatusResponse # type: ignore - from ._models import ClientDiscoveryDisplay # type: ignore - from ._models import ClientDiscoveryForLogSpecification # type: ignore - from ._models import ClientDiscoveryForProperties # type: ignore - from ._models import ClientDiscoveryForServiceSpecification # type: ignore - from ._models import ClientDiscoveryResponse # type: ignore - from ._models import ClientDiscoveryValueForSingleApi # type: ignore - 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 - from ._models import DailyRetentionFormat # type: ignore - from ._models import DailyRetentionSchedule # type: ignore - from ._models import Day # type: ignore - from ._models import DiskExclusionProperties # type: ignore - from ._models import DiskInformation # type: ignore - from ._models import DistributedNodesInfo # type: ignore - from ._models import DpmBackupEngine # type: ignore - from ._models import DpmContainer # 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 ExportJobsOperationResultInfo # type: ignore - from ._models import ExtendedProperties # type: ignore - from ._models import FeatureSupportRequest # type: ignore - from ._models import GenericContainer # type: ignore - from ._models import GenericContainerExtendedInfo # type: ignore - from ._models import GenericProtectedItem # type: ignore - from ._models import GenericProtectionPolicy # type: ignore - from ._models import GenericRecoveryPoint # type: ignore - from ._models import GetProtectedItemQueryObject # type: ignore - from ._models import ILRRequest # type: ignore - from ._models import ILRRequestResource # type: ignore - from ._models import IaaSVMContainer # type: ignore - from ._models import IaaSVMProtectableItem # type: ignore - from ._models import IaasVMBackupRequest # type: ignore - from ._models import IaasVMILRRegistrationRequest # type: ignore - from ._models import IaasVMRecoveryPoint # type: ignore - from ._models import IaasVMRecoveryPointAutoGenerated # type: ignore - from ._models import IaasVMRestoreRequest # type: ignore - from ._models import IaasVMRestoreRequestAutoGenerated # type: ignore - from ._models import IaasVMRestoreWithRehydrationRequest # type: ignore - from ._models import IdentityBasedRestoreDetails # type: ignore - from ._models import IdentityInfo # type: ignore - from ._models import InquiryInfo # type: ignore - from ._models import InquiryValidation # type: ignore - from ._models import InstantItemRecoveryTarget # type: ignore - from ._models import InstantRPAdditionalDetails # 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 ListRecoveryPointsRecommendedForMoveRequest # type: ignore - from ._models import LogSchedulePolicy # type: ignore - from ._models import LongTermRetentionPolicy # type: ignore - from ._models import LongTermSchedulePolicy # type: ignore - from ._models import MABContainerHealthDetails # type: ignore - from ._models import MabContainer # type: ignore - from ._models import MabContainerExtendedInfo # 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 MabProtectionPolicy # type: ignore - from ._models import MonthlyRetentionSchedule # type: ignore - 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 - 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 OperationWorkerResponse # type: ignore - from ._models import PointInTimeRange # type: ignore - from ._models import PreBackupValidation # type: ignore - from ._models import PreValidateEnableBackupRequest # type: ignore - from ._models import PreValidateEnableBackupResponse # type: ignore - from ._models import PrepareDataMoveRequest # type: ignore - from ._models import PrepareDataMoveResponse # type: ignore - from ._models import PrivateEndpoint # type: ignore - from ._models import PrivateEndpointConnection # type: ignore - from ._models import PrivateEndpointConnectionResource # type: ignore - from ._models import PrivateLinkServiceConnectionState # type: ignore - from ._models import ProtectableContainer # type: ignore - from ._models import ProtectableContainerResource # type: ignore - from ._models import ProtectableContainerResourceList # 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 ProtectionContainer # type: ignore - from ._models import ProtectionContainerResource # type: ignore - from ._models import ProtectionContainerResourceList # type: ignore - from ._models import ProtectionIntent # type: ignore - from ._models import ProtectionIntentQueryObject # type: ignore - from ._models import ProtectionIntentResource # type: ignore - from ._models import ProtectionIntentResourceList # type: ignore - from ._models import ProtectionPolicy # type: ignore - from ._models import ProtectionPolicyQueryObject # type: ignore - from ._models import ProtectionPolicyResource # type: ignore - from ._models import ProtectionPolicyResourceList # type: ignore - from ._models import RecoveryPoint # type: ignore - from ._models import RecoveryPointDiskConfiguration # type: ignore - from ._models import RecoveryPointMoveReadinessInfo # type: ignore - from ._models import RecoveryPointRehydrationInfo # 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 ResourceGuardOperationDetail # type: ignore - from ._models import ResourceGuardProxyBase # type: ignore - from ._models import ResourceGuardProxyBaseResource # type: ignore - from ._models import ResourceGuardProxyBaseResourceList # 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 RestoreRequestResource # type: ignore - from ._models import RetentionDuration # type: ignore - from ._models import RetentionPolicy # type: ignore - from ._models import SQLDataDirectory # type: ignore - from ._models import SQLDataDirectoryMapping # type: ignore - from ._models import SchedulePolicy # type: ignore - from ._models import SecurityPinBase # type: ignore - from ._models import Settings # type: ignore - from ._models import SimpleRetentionPolicy # type: ignore - from ._models import SimpleSchedulePolicy # type: ignore - from ._models import SubProtectionPolicy # type: ignore - from ._models import TargetAFSRestoreInfo # type: ignore - from ._models import TargetRestoreInfo # type: ignore - from ._models import TokenInformation # type: ignore - from ._models import TriggerDataMoveRequest # type: ignore - from ._models import UnlockDeleteRequest # type: ignore - from ._models import UnlockDeleteResponse # type: ignore - from ._models import ValidateIaasVMRestoreOperationRequest # type: ignore - from ._models import ValidateOperationRequest # type: ignore - from ._models import ValidateOperationResponse # type: ignore - from ._models import ValidateOperationsResponse # type: ignore - from ._models import ValidateRestoreOperationRequest # type: ignore - from ._models import VaultJob # type: ignore - from ._models import VaultJobErrorInfo # type: ignore - from ._models import VaultJobExtendedInfo # type: ignore - 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 - from ._models import WorkloadItemResourceList # type: ignore - from ._models import WorkloadProtectableItem # type: ignore - from ._models import WorkloadProtectableItemResource # type: ignore - from ._models import WorkloadProtectableItemResourceList # type: ignore - from ._models import YearlyRetentionSchedule # type: ignore - -from ._recovery_services_backup_client_enums import ( - AzureFileShareType, - BackupEngineType, - BackupItemType, - BackupManagementType, - BackupType, - ContainerType, - CopyOptions, - CreateMode, - DataMoveLevel, - DataSourceType, - DayOfWeek, - EncryptionAtRestType, - EnhancedSecurityState, - FabricName, - HealthState, - HealthStatus, - HttpStatusCode, - InfrastructureEncryptionState, - InquiryStatus, - IntentItemType, - JobOperationType, - JobStatus, - JobSupportedAction, - LastBackupStatus, - LastUpdateStatus, - MabServerType, - MonthOfYear, - OperationStatusValues, - OperationType, - OverwriteOptions, - PolicyType, - PrivateEndpointConnectionStatus, - ProtectedItemHealthStatus, - ProtectedItemState, - ProtectionState, - ProtectionStatus, - ProvisioningState, - RecoveryMode, - RecoveryPointTierStatus, - RecoveryPointTierType, - RecoveryType, - RehydrationPriority, - ResourceHealthStatus, - RestorePointQueryType, - RestorePointType, - RestoreRequestType, - RetentionDurationType, - RetentionScheduleFormat, - SQLDataDirectoryType, - ScheduleRunType, - SoftDeleteFeatureState, - StorageType, - StorageTypeState, - SupportStatus, - Type, - UsagesUnit, - ValidationStatus, - WeekOfMonth, - WorkloadItemType, - WorkloadType, -) - -__all__ = [ - 'AADProperties', - 'AADPropertiesResource', - 'AzureBackupGoalFeatureSupportRequest', - 'AzureBackupServerContainer', - 'AzureBackupServerEngine', - 'AzureFileShareBackupRequest', - 'AzureFileShareProtectableItem', - 'AzureFileShareProtectionPolicy', - 'AzureFileShareProvisionILRRequest', - 'AzureFileShareRecoveryPoint', - 'AzureFileShareRecoveryPointAutoGenerated', - 'AzureFileShareRestoreRequest', - 'AzureFileshareProtectedItem', - 'AzureFileshareProtectedItemAutoGenerated', - 'AzureFileshareProtectedItemExtendedInfo', - 'AzureIaaSClassicComputeVMContainer', - 'AzureIaaSClassicComputeVMProtectableItem', - 'AzureIaaSClassicComputeVMProtectedItem', - 'AzureIaaSComputeVMContainer', - 'AzureIaaSComputeVMProtectableItem', - 'AzureIaaSComputeVMProtectedItem', - 'AzureIaaSVMErrorInfo', - 'AzureIaaSVMHealthDetails', - 'AzureIaaSVMJob', - 'AzureIaaSVMJobExtendedInfo', - 'AzureIaaSVMJobTaskDetails', - 'AzureIaaSVMProtectedItem', - 'AzureIaaSVMProtectedItemExtendedInfo', - 'AzureIaaSVMProtectionPolicy', - 'AzureRecoveryServiceVaultProtectionIntent', - 'AzureResourceProtectionIntent', - 'AzureSQLAGWorkloadContainerProtectionContainer', - 'AzureSqlContainer', - 'AzureSqlProtectedItem', - 'AzureSqlProtectedItemExtendedInfo', - 'AzureSqlProtectionPolicy', - 'AzureStorageContainer', - 'AzureStorageErrorInfo', - 'AzureStorageJob', - 'AzureStorageJobExtendedInfo', - 'AzureStorageJobTaskDetails', - 'AzureStorageProtectableContainer', - 'AzureVMAppContainerProtectableContainer', - 'AzureVMAppContainerProtectionContainer', - 'AzureVMResourceFeatureSupportRequest', - 'AzureVMResourceFeatureSupportResponse', - 'AzureVmWorkloadItem', - 'AzureVmWorkloadProtectableItem', - 'AzureVmWorkloadProtectedItem', - 'AzureVmWorkloadProtectedItemExtendedInfo', - 'AzureVmWorkloadProtectionPolicy', - 'AzureVmWorkloadSAPAseDatabaseProtectedItem', - 'AzureVmWorkloadSAPAseDatabaseWorkloadItem', - 'AzureVmWorkloadSAPAseSystemProtectableItem', - 'AzureVmWorkloadSAPAseSystemWorkloadItem', - 'AzureVmWorkloadSAPHanaDatabaseProtectableItem', - 'AzureVmWorkloadSAPHanaDatabaseProtectedItem', - 'AzureVmWorkloadSAPHanaDatabaseWorkloadItem', - 'AzureVmWorkloadSAPHanaSystemProtectableItem', - 'AzureVmWorkloadSAPHanaSystemWorkloadItem', - 'AzureVmWorkloadSQLAvailabilityGroupProtectableItem', - 'AzureVmWorkloadSQLDatabaseProtectableItem', - 'AzureVmWorkloadSQLDatabaseProtectedItem', - 'AzureVmWorkloadSQLDatabaseWorkloadItem', - 'AzureVmWorkloadSQLInstanceProtectableItem', - 'AzureVmWorkloadSQLInstanceWorkloadItem', - 'AzureWorkloadAutoProtectionIntent', - 'AzureWorkloadBackupRequest', - 'AzureWorkloadContainer', - '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', - 'BMSContainerQueryObject', - 'BMSContainersInquiryQueryObject', - 'BMSPOQueryObject', - 'BMSRPQueryObject', - 'BMSRefreshContainersQueryObject', - 'BMSWorkloadItemQueryObject', - 'BackupEngineBase', - 'BackupEngineBaseResource', - 'BackupEngineBaseResourceList', - 'BackupEngineExtendedInfo', - 'BackupManagementUsage', - 'BackupManagementUsageList', - 'BackupRequest', - 'BackupRequestResource', - 'BackupResourceConfig', - 'BackupResourceConfigResource', - 'BackupResourceEncryptionConfig', - 'BackupResourceEncryptionConfigExtended', - 'BackupResourceEncryptionConfigExtendedResource', - 'BackupResourceEncryptionConfigResource', - 'BackupResourceVaultConfig', - 'BackupResourceVaultConfigResource', - 'BackupStatusRequest', - 'BackupStatusResponse', - 'ClientDiscoveryDisplay', - 'ClientDiscoveryForLogSpecification', - 'ClientDiscoveryForProperties', - 'ClientDiscoveryForServiceSpecification', - 'ClientDiscoveryResponse', - 'ClientDiscoveryValueForSingleApi', - 'ClientScriptForConnect', - 'CloudErrorBody', - 'ContainerIdentityInfo', - 'CrossRegionRestoreRequest', - 'CrossRegionRestoreRequestResource', - 'CrrAccessToken', - 'CrrAccessTokenResource', - 'CrrJobRequest', - 'CrrJobRequestResource', - 'DPMContainerExtendedInfo', - 'DPMProtectedItem', - 'DPMProtectedItemExtendedInfo', - 'DailyRetentionFormat', - 'DailyRetentionSchedule', - 'Day', - 'DiskExclusionProperties', - 'DiskInformation', - 'DistributedNodesInfo', - 'DpmBackupEngine', - 'DpmContainer', - 'DpmErrorInfo', - 'DpmJob', - 'DpmJobExtendedInfo', - 'DpmJobTaskDetails', - 'EncryptionDetails', - 'ErrorAdditionalInfo', - 'ErrorDetail', - 'ExportJobsOperationResultInfo', - 'ExtendedProperties', - 'FeatureSupportRequest', - 'GenericContainer', - 'GenericContainerExtendedInfo', - 'GenericProtectedItem', - 'GenericProtectionPolicy', - 'GenericRecoveryPoint', - 'GetProtectedItemQueryObject', - 'ILRRequest', - 'ILRRequestResource', - 'IaaSVMContainer', - 'IaaSVMProtectableItem', - 'IaasVMBackupRequest', - 'IaasVMILRRegistrationRequest', - 'IaasVMRecoveryPoint', - 'IaasVMRecoveryPointAutoGenerated', - 'IaasVMRestoreRequest', - 'IaasVMRestoreRequestAutoGenerated', - 'IaasVMRestoreWithRehydrationRequest', - 'IdentityBasedRestoreDetails', - 'IdentityInfo', - 'InquiryInfo', - 'InquiryValidation', - 'InstantItemRecoveryTarget', - 'InstantRPAdditionalDetails', - 'Job', - 'JobQueryObject', - 'JobResource', - 'JobResourceList', - 'KEKDetails', - 'KPIResourceHealthDetails', - 'KeyAndSecretDetails', - 'ListRecoveryPointsRecommendedForMoveRequest', - 'LogSchedulePolicy', - 'LongTermRetentionPolicy', - 'LongTermSchedulePolicy', - 'MABContainerHealthDetails', - 'MabContainer', - 'MabContainerExtendedInfo', - 'MabErrorInfo', - 'MabFileFolderProtectedItem', - 'MabFileFolderProtectedItemExtendedInfo', - 'MabJob', - 'MabJobExtendedInfo', - 'MabJobTaskDetails', - 'MabProtectionPolicy', - 'MonthlyRetentionSchedule', - 'MoveRPAcrossTiersRequest', - 'NameInfo', - 'NewErrorResponse', - 'NewErrorResponseAutoGenerated', - 'NewErrorResponseError', - 'NewErrorResponseErrorAutoGenerated', - 'OperationResultInfo', - 'OperationResultInfoBase', - 'OperationResultInfoBaseResource', - 'OperationStatus', - 'OperationStatusError', - 'OperationStatusExtendedInfo', - 'OperationStatusJobExtendedInfo', - 'OperationStatusJobsExtendedInfo', - 'OperationStatusProvisionILRExtendedInfo', - 'OperationStatusRecoveryPointExtendedInfo', - 'OperationWorkerResponse', - 'PointInTimeRange', - 'PreBackupValidation', - 'PreValidateEnableBackupRequest', - 'PreValidateEnableBackupResponse', - 'PrepareDataMoveRequest', - 'PrepareDataMoveResponse', - 'PrivateEndpoint', - 'PrivateEndpointConnection', - 'PrivateEndpointConnectionResource', - 'PrivateLinkServiceConnectionState', - 'ProtectableContainer', - 'ProtectableContainerResource', - 'ProtectableContainerResourceList', - 'ProtectedItem', - 'ProtectedItemQueryObject', - 'ProtectedItemResource', - 'ProtectedItemResourceList', - 'ProtectionContainer', - 'ProtectionContainerResource', - 'ProtectionContainerResourceList', - 'ProtectionIntent', - 'ProtectionIntentQueryObject', - 'ProtectionIntentResource', - 'ProtectionIntentResourceList', - 'ProtectionPolicy', - 'ProtectionPolicyQueryObject', - 'ProtectionPolicyResource', - 'ProtectionPolicyResourceList', - 'RecoveryPoint', - 'RecoveryPointDiskConfiguration', - 'RecoveryPointMoveReadinessInfo', - 'RecoveryPointRehydrationInfo', - 'RecoveryPointResource', - 'RecoveryPointResourceList', - 'RecoveryPointTierInformation', - 'Resource', - 'ResourceGuardOperationDetail', - 'ResourceGuardProxyBase', - 'ResourceGuardProxyBaseResource', - 'ResourceGuardProxyBaseResourceList', - 'ResourceHealthDetails', - 'ResourceList', - 'RestoreFileSpecs', - 'RestoreRequest', - 'RestoreRequestResource', - 'RetentionDuration', - 'RetentionPolicy', - 'SQLDataDirectory', - 'SQLDataDirectoryMapping', - 'SchedulePolicy', - 'SecurityPinBase', - 'Settings', - 'SimpleRetentionPolicy', - 'SimpleSchedulePolicy', - 'SubProtectionPolicy', - 'TargetAFSRestoreInfo', - 'TargetRestoreInfo', - 'TokenInformation', - 'TriggerDataMoveRequest', - 'UnlockDeleteRequest', - 'UnlockDeleteResponse', - 'ValidateIaasVMRestoreOperationRequest', - 'ValidateOperationRequest', - 'ValidateOperationResponse', - 'ValidateOperationsResponse', - 'ValidateRestoreOperationRequest', - 'VaultJob', - 'VaultJobErrorInfo', - 'VaultJobExtendedInfo', - 'VaultStorageConfigOperationResultResponse', - 'WeeklyRetentionFormat', - 'WeeklyRetentionSchedule', - 'WorkloadCrrAccessToken', - 'WorkloadInquiryDetails', - 'WorkloadItem', - 'WorkloadItemResource', - 'WorkloadItemResourceList', - 'WorkloadProtectableItem', - 'WorkloadProtectableItemResource', - 'WorkloadProtectableItemResourceList', - 'YearlyRetentionSchedule', - 'AzureFileShareType', - 'BackupEngineType', - 'BackupItemType', - 'BackupManagementType', - 'BackupType', - 'ContainerType', - 'CopyOptions', - 'CreateMode', - 'DataMoveLevel', - 'DataSourceType', - 'DayOfWeek', - 'EncryptionAtRestType', - 'EnhancedSecurityState', - 'FabricName', - 'HealthState', - 'HealthStatus', - 'HttpStatusCode', - 'InfrastructureEncryptionState', - 'InquiryStatus', - 'IntentItemType', - 'JobOperationType', - 'JobStatus', - 'JobSupportedAction', - 'LastBackupStatus', - 'LastUpdateStatus', - 'MabServerType', - 'MonthOfYear', - 'OperationStatusValues', - 'OperationType', - 'OverwriteOptions', - 'PolicyType', - 'PrivateEndpointConnectionStatus', - 'ProtectedItemHealthStatus', - 'ProtectedItemState', - 'ProtectionState', - 'ProtectionStatus', - 'ProvisioningState', - 'RecoveryMode', - 'RecoveryPointTierStatus', - 'RecoveryPointTierType', - 'RecoveryType', - 'RehydrationPriority', - 'ResourceHealthStatus', - 'RestorePointQueryType', - 'RestorePointType', - 'RestoreRequestType', - 'RetentionDurationType', - 'RetentionScheduleFormat', - 'SQLDataDirectoryType', - 'ScheduleRunType', - 'SoftDeleteFeatureState', - 'StorageType', - 'StorageTypeState', - 'SupportStatus', - 'Type', - 'UsagesUnit', - 'ValidationStatus', - 'WeekOfMonth', - 'WorkloadItemType', - 'WorkloadType', -] 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 deleted file mode 100644 index d6c2ee83e4e7..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models.py +++ /dev/null @@ -1,13959 +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 azure.core.exceptions import HttpResponseError -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. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureBackupGoalFeatureSupportRequest, AzureVMResourceFeatureSupportRequest. - - 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 - """ - - _validation = { - 'feature_type': {'required': True}, - } - - _attribute_map = { - 'feature_type': {'key': 'featureType', 'type': 'str'}, - } - - _subtype_map = { - 'feature_type': {'AzureBackupGoals': 'AzureBackupGoalFeatureSupportRequest', 'AzureVMResourceBackup': 'AzureVMResourceFeatureSupportRequest'} - } - - def __init__( - self, - **kwargs - ): - super(FeatureSupportRequest, self).__init__(**kwargs) - self.feature_type = None # type: Optional[str] - - -class AzureBackupGoalFeatureSupportRequest(FeatureSupportRequest): - """Azure backup goal feature specific request. - - 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 - """ - - _validation = { - 'feature_type': {'required': True}, - } - - _attribute_map = { - 'feature_type': {'key': 'featureType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureBackupGoalFeatureSupportRequest, self).__init__(**kwargs) - self.feature_type = 'AzureBackupGoals' # type: str - - -class ProtectionContainer(msrest.serialization.Model): - """Base class for container with backup items. Containers with specific workloads are derived from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureSqlContainer, AzureWorkloadContainer, DpmContainer, GenericContainer, IaaSVMContainer, AzureStorageContainer, MabContainer. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", - "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", - "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - } - - _subtype_map = { - 'container_type': {'AzureSqlContainer': 'AzureSqlContainer', 'AzureWorkloadContainer': 'AzureWorkloadContainer', 'DPMContainer': 'DpmContainer', 'GenericContainer': 'GenericContainer', 'IaaSVMContainer': 'IaaSVMContainer', 'StorageContainer': 'AzureStorageContainer', 'Windows': 'MabContainer'} - } - - def __init__( - self, - **kwargs - ): - 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] - - -class DpmContainer(ProtectionContainer): - """DPM workload-specific protection container. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureBackupServerContainer. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, - 'container_id': {'key': 'containerId', 'type': 'str'}, - 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, - 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, - 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, - 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, - 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, - } - - _subtype_map = { - 'container_type': {'AzureBackupServerContainer': 'AzureBackupServerContainer'} - } - - def __init__( - self, - **kwargs - ): - super(DpmContainer, self).__init__(**kwargs) - self.container_type = 'DPMContainer' # type: str - self.can_re_register = kwargs.get('can_re_register', None) - self.container_id = kwargs.get('container_id', None) - self.protected_item_count = kwargs.get('protected_item_count', None) - self.dpm_agent_version = kwargs.get('dpm_agent_version', None) - self.dpm_servers = kwargs.get('dpm_servers', None) - self.upgrade_available = kwargs.get('upgrade_available', None) - self.protection_status = kwargs.get('protection_status', None) - self.extended_info = kwargs.get('extended_info', None) - - -class AzureBackupServerContainer(DpmContainer): - """AzureBackupServer (DPMVenus) workload-specific protection container. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, - 'container_id': {'key': 'containerId', 'type': 'str'}, - 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, - 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, - 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, - 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, - 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureBackupServerContainer, self).__init__(**kwargs) - self.container_type = 'AzureBackupServerContainer' # type: str - - -class BackupEngineBase(msrest.serialization.Model): - """The base backup engine class. All workload specific backup engines derive from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureBackupServerEngine, DpmBackupEngine. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. = - {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. - 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 - 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 - """ - - _validation = { - 'backup_engine_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, - 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, - 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, - 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, - 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, - 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, - 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, - } - - _subtype_map = { - 'backup_engine_type': {'AzureBackupServerEngine': 'AzureBackupServerEngine', 'DpmBackupEngine': 'DpmBackupEngine'} - } - - def __init__( - self, - **kwargs - ): - super(BackupEngineBase, 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.backup_engine_state = kwargs.get('backup_engine_state', None) - self.health_status = kwargs.get('health_status', None) - self.backup_engine_type = None # type: Optional[str] - self.can_re_register = kwargs.get('can_re_register', None) - self.backup_engine_id = kwargs.get('backup_engine_id', None) - self.dpm_version = kwargs.get('dpm_version', None) - self.azure_backup_agent_version = kwargs.get('azure_backup_agent_version', None) - self.is_azure_backup_agent_upgrade_available = kwargs.get('is_azure_backup_agent_upgrade_available', None) - self.is_dpm_upgrade_available = kwargs.get('is_dpm_upgrade_available', None) - self.extended_info = kwargs.get('extended_info', None) - - -class AzureBackupServerEngine(BackupEngineBase): - """Backup engine type when Azure Backup Server is used to manage the backups. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. = - {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. - 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 - 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 - """ - - _validation = { - 'backup_engine_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, - 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, - 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, - 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, - 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, - 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, - 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureBackupServerEngine, self).__init__(**kwargs) - self.backup_engine_type = 'AzureBackupServerEngine' # type: str - - -class BackupRequest(msrest.serialization.Model): - """Base class for backup request. Workload-specific backup requests are derived from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileShareBackupRequest, AzureWorkloadBackupRequest, IaasVMBackupRequest. - - 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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - } - - _subtype_map = { - 'object_type': {'AzureFileShareBackupRequest': 'AzureFileShareBackupRequest', 'AzureWorkloadBackupRequest': 'AzureWorkloadBackupRequest', 'IaasVMBackupRequest': 'IaasVMBackupRequest'} - } - - def __init__( - self, - **kwargs - ): - super(BackupRequest, self).__init__(**kwargs) - self.object_type = None # type: Optional[str] - - -class AzureFileShareBackupRequest(BackupRequest): - """AzureFileShare 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 - 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 - (UTC). - :type recovery_point_expiry_time_in_utc: ~datetime.datetime - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - 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) - - -class WorkloadProtectableItem(msrest.serialization.Model): - """Base class for backup item. Workload-specific backup items are derived from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileShareProtectableItem, AzureVmWorkloadProtectableItem, 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", - "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - } - - _subtype_map = { - 'protectable_item_type': {'AzureFileShare': 'AzureFileShareProtectableItem', 'AzureVmWorkloadProtectableItem': 'AzureVmWorkloadProtectableItem', 'IaaSVMProtectableItem': 'IaaSVMProtectableItem'} - } - - def __init__( - self, - **kwargs - ): - super(WorkloadProtectableItem, self).__init__(**kwargs) - self.backup_management_type = kwargs.get('backup_management_type', None) - self.workload_type = kwargs.get('workload_type', None) - self.protectable_item_type = None # type: Optional[str] - self.friendly_name = kwargs.get('friendly_name', None) - self.protection_state = kwargs.get('protection_state', None) - - -class AzureFileShareProtectableItem(WorkloadProtectableItem): - """Protectable item for Azure Fileshare workloads. - - 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", - "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 - 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 - ~azure.mgmt.recoveryservicesbackup.models.AzureFileShareType - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_container_fabric_id': {'key': 'parentContainerFabricId', 'type': 'str'}, - 'parent_container_friendly_name': {'key': 'parentContainerFriendlyName', 'type': 'str'}, - 'azure_file_share_type': {'key': 'azureFileShareType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureFileShareProtectableItem, self).__init__(**kwargs) - self.protectable_item_type = 'AzureFileShare' # type: str - self.parent_container_fabric_id = kwargs.get('parent_container_fabric_id', None) - self.parent_container_friendly_name = kwargs.get('parent_container_friendly_name', None) - self.azure_file_share_type = kwargs.get('azure_file_share_type', 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: AzureFileshareProtectedItemAutoGenerated, 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", - "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] - """ - - _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': 'AzureFileshareProtectedItemAutoGenerated', 'AzureIaaSVMProtectedItem': 'AzureIaaSVMProtectedItem', 'AzureVmWorkloadProtectedItem': 'AzureVmWorkloadProtectedItem', 'DPMProtectedItem': 'DPMProtectedItem', 'GenericProtectedItem': 'GenericProtectedItem', 'MabFileFolderProtectedItem': 'MabFileFolderProtectedItem', 'Microsoft.Sql/servers/databases': 'AzureSqlProtectedItem'} - } - - def __init__( - self, - **kwargs - ): - 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. - - :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, - **kwargs - ): - 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.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 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 - item. - :type 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 - ): - 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 ProtectionPolicy(msrest.serialization.Model): - """Base class for backup policy. Workload-specific backup policies are derived from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureIaaSVMProtectionPolicy, AzureSqlProtectionPolicy, AzureFileShareProtectionPolicy, AzureVmWorkloadProtectionPolicy, GenericProtectionPolicy, MabProtectionPolicy. - - 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 - 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] - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - } - - _subtype_map = { - 'backup_management_type': {'AzureIaasVM': 'AzureIaaSVMProtectionPolicy', 'AzureSql': 'AzureSqlProtectionPolicy', 'AzureStorage': 'AzureFileShareProtectionPolicy', 'AzureWorkload': 'AzureVmWorkloadProtectionPolicy', 'GenericProtectionPolicy': 'GenericProtectionPolicy', 'MAB': 'MabProtectionPolicy'} - } - - def __init__( - self, - **kwargs - ): - super(ProtectionPolicy, self).__init__(**kwargs) - self.protected_items_count = kwargs.get('protected_items_count', None) - self.backup_management_type = None # type: Optional[str] - self.resource_guard_operation_requests = kwargs.get('resource_guard_operation_requests', None) - - -class AzureFileShareProtectionPolicy(ProtectionPolicy): - """AzureStorage backup policy. - - 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 - 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: - "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 - Time". - :type time_zone: str - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, - 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, - 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureFileShareProtectionPolicy, self).__init__(**kwargs) - self.backup_management_type = 'AzureStorage' # type: str - self.work_load_type = kwargs.get('work_load_type', None) - self.schedule_policy = kwargs.get('schedule_policy', None) - self.retention_policy = kwargs.get('retention_policy', None) - self.time_zone = kwargs.get('time_zone', None) - - -class ILRRequest(msrest.serialization.Model): - """Parameters to Provision ILR API. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileShareProvisionILRRequest, IaasVMILRRegistrationRequest. - - 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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - } - - _subtype_map = { - 'object_type': {'AzureFileShareProvisionILRRequest': 'AzureFileShareProvisionILRRequest', 'IaasVMILRRegistrationRequest': 'IaasVMILRRegistrationRequest'} - } - - def __init__( - self, - **kwargs - ): - super(ILRRequest, self).__init__(**kwargs) - self.object_type = None # type: Optional[str] - - -class AzureFileShareProvisionILRRequest(ILRRequest): - """Update snapshot Uri with the correct friendly Name of the source Azure file share. - - 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: Recovery point ID. - :type recovery_point_id: str - :param source_resource_id: Source Storage account ARM Id. - :type source_resource_id: str - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureFileShareProvisionILRRequest, self).__init__(**kwargs) - self.object_type = 'AzureFileShareProvisionILRRequest' # type: str - self.recovery_point_id = kwargs.get('recovery_point_id', None) - self.source_resource_id = kwargs.get('source_resource_id', 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: AzureFileShareRecoveryPointAutoGenerated, AzureWorkloadRecoveryPointAutoGenerated, GenericRecoveryPoint, IaasVMRecoveryPointAutoGenerated. - - 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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - } - - _subtype_map = { - 'object_type': {'AzureFileShareRecoveryPoint': 'AzureFileShareRecoveryPointAutoGenerated', 'AzureWorkloadRecoveryPoint': 'AzureWorkloadRecoveryPointAutoGenerated', 'GenericRecoveryPoint': 'GenericRecoveryPoint', 'IaasVMRecoveryPoint': 'IaasVMRecoveryPointAutoGenerated'} - } - - 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. - - 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 - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_type: Type of the backup copy. Specifies whether it is a crash consistent - backup or app consistent. - :vartype recovery_point_type: str - :ivar recovery_point_time: Time at which this backup copy was created. - :vartype recovery_point_time: ~datetime.datetime - :ivar file_share_snapshot_uri: Contains Url to the snapshot of fileshare, if applicable. - :vartype file_share_snapshot_uri: str - :ivar recovery_point_size_in_gb: Contains recovery point size. - :vartype recovery_point_size_in_gb: int - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_type': {'readonly': True}, - 'recovery_point_time': {'readonly': True}, - 'file_share_snapshot_uri': {'readonly': True}, - 'recovery_point_size_in_gb': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, - 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, - 'file_share_snapshot_uri': {'key': 'fileShareSnapshotUri', 'type': 'str'}, - 'recovery_point_size_in_gb': {'key': 'recoveryPointSizeInGB', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureFileShareRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureFileShareRecoveryPoint' # type: str - self.recovery_point_type = None - self.recovery_point_time = None - self.file_share_snapshot_uri = None - self.recovery_point_size_in_gb = None - - -class RestoreRequest(msrest.serialization.Model): - """Base class for restore request. Workload-specific restore requests are derived from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, IaasVMRestoreRequestAutoGenerated. - - 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 - """ - - _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 - """ - - _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 - ): - 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 IaaSVMContainer(ProtectionContainer): - """IaaS VM workload-specific container. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureIaaSClassicComputeVMContainer, AzureIaaSComputeVMContainer. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - 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 - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, - 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - } - - _subtype_map = { - 'container_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMContainer', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMContainer'} - } - - def __init__( - self, - **kwargs - ): - super(IaaSVMContainer, self).__init__(**kwargs) - self.container_type = 'IaaSVMContainer' # 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 AzureIaaSClassicComputeVMContainer(IaaSVMContainer): - """IaaS VM workload-specific backup item representing a classic virtual machine. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - 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 - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', '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 - ): - super(AzureIaaSClassicComputeVMContainer, self).__init__(**kwargs) - self.container_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str - - -class IaaSVMProtectableItem(WorkloadProtectableItem): - """IaaS VM workload-specific backup item. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureIaaSClassicComputeVMProtectableItem, AzureIaaSComputeVMProtectableItem. - - 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", - "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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, - } - - _subtype_map = { - 'protectable_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectableItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectableItem'} - } - - def __init__( - self, - **kwargs - ): - super(IaaSVMProtectableItem, self).__init__(**kwargs) - self.protectable_item_type = 'IaaSVMProtectableItem' # type: str - self.virtual_machine_id = kwargs.get('virtual_machine_id', None) - - -class AzureIaaSClassicComputeVMProtectableItem(IaaSVMProtectableItem): - """IaaS VM workload-specific backup item representing the Classic Compute VM. - - 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", - "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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureIaaSClassicComputeVMProtectableItem, self).__init__(**kwargs) - self.protectable_item_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str - - -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. - - :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 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 - 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", - "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", - "ActionRequired", "ActionSuggested", "Invalid". - :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param last_backup_status: Last backup operation status. - :type last_backup_status: str - :param last_backup_time: Timestamp of the last backup operation on this 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: - ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo - :param extended_properties: Extended Properties for Azure IaasVM Backup. - :type extended_properties: ~azure.mgmt.recoveryservicesbackup.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 - ): - 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. - - :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 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 - 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", - "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", - "ActionRequired", "ActionSuggested", "Invalid". - :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param last_backup_status: Last backup operation status. - :type last_backup_status: str - :param last_backup_time: Timestamp of the last backup operation on this 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: - ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo - :param extended_properties: Extended Properties for Azure IaasVM Backup. - :type extended_properties: ~azure.mgmt.recoveryservicesbackup.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 - ): - super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(**kwargs) - self.protected_item_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str - - -class AzureIaaSComputeVMContainer(IaaSVMContainer): - """IaaS VM workload-specific backup item representing an Azure Resource Manager virtual machine. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - 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 - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', '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 - ): - super(AzureIaaSComputeVMContainer, self).__init__(**kwargs) - self.container_type = 'Microsoft.Compute/virtualMachines' # type: str - - -class AzureIaaSComputeVMProtectableItem(IaaSVMProtectableItem): - """IaaS VM workload-specific backup item representing the Azure Resource Manager VM. - - 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", - "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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureIaaSComputeVMProtectableItem, self).__init__(**kwargs) - self.protectable_item_type = 'Microsoft.Compute/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. - - :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 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 - 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", - "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", - "ActionRequired", "ActionSuggested", "Invalid". - :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param last_backup_status: Last backup operation status. - :type last_backup_status: str - :param last_backup_time: Timestamp of the last backup operation on this 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: - ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo - :param extended_properties: Extended Properties for Azure IaasVM Backup. - :type extended_properties: ~azure.mgmt.recoveryservicesbackup.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 - ): - 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, 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 - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.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 - specific types in the polymorphic chain of types.Constant filled by server. - :type 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', 'VaultJob': 'VaultJob'} - } - - def __init__( - self, - **kwargs - ): - 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. - - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.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 - 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 - Resource Manager VM. - :type virtual_machine_version: str - :param extended_info: Additional information for this job. - :type 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'}, - '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 - ): - 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. - - :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 - 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 - """ - - _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 - ): - 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. - - :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. - eg: number of bytes transferred etc. - :type 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 - ): - 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. - - :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 - inconsistent. - :type 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 - ): - 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 AzureIaaSVMProtectionPolicy(ProtectionPolicy): - """IaaS VM workload-specific backup policy. - - 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 - 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 - Time". - :type time_zone: str - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'instant_rp_details': {'key': 'instantRPDetails', 'type': 'InstantRPAdditionalDetails'}, - 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, - 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, - 'instant_rp_retention_range_in_days': {'key': 'instantRpRetentionRangeInDays', 'type': 'int'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureIaaSVMProtectionPolicy, self).__init__(**kwargs) - self.backup_management_type = 'AzureIaasVM' # type: str - self.instant_rp_details = kwargs.get('instant_rp_details', None) - self.schedule_policy = kwargs.get('schedule_policy', None) - self.retention_policy = kwargs.get('retention_policy', None) - self.instant_rp_retention_range_in_days = kwargs.get('instant_rp_retention_range_in_days', None) - self.time_zone = kwargs.get('time_zone', None) - - -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. - - 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", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type 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 - 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", - "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type 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'}, - } - - _subtype_map = { - 'protection_intent_item_type': {'AzureResourceItem': 'AzureResourceProtectionIntent', 'RecoveryServiceVaultItem': 'AzureRecoveryServiceVaultProtectionIntent'} - } - - def __init__( - self, - **kwargs - ): - super(ProtectionIntent, self).__init__(**kwargs) - self.protection_intent_item_type = None # type: Optional[str] - self.backup_management_type = kwargs.get('backup_management_type', None) - self.source_resource_id = kwargs.get('source_resource_id', None) - self.item_id = kwargs.get('item_id', None) - self.policy_id = kwargs.get('policy_id', None) - self.protection_state = kwargs.get('protection_state', None) - - -class AzureRecoveryServiceVaultProtectionIntent(ProtectionIntent): - """Azure Recovery Services Vault specific protection intent item. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: 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", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type 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 - 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", - "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type 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'}, - } - - _subtype_map = { - 'protection_intent_item_type': {'AzureWorkloadAutoProtectionIntent': 'AzureWorkloadAutoProtectionIntent'} - } - - def __init__( - self, - **kwargs - ): - super(AzureRecoveryServiceVaultProtectionIntent, self).__init__(**kwargs) - self.protection_intent_item_type = 'RecoveryServiceVaultItem' # type: str - - -class AzureResourceProtectionIntent(ProtectionIntent): - """IaaS VM specific backup protection intent item. - - 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", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type 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 - 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", - "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 - """ - - _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'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureResourceProtectionIntent, self).__init__(**kwargs) - self.protection_intent_item_type = 'AzureResourceItem' # type: str - self.friendly_name = kwargs.get('friendly_name', None) - - -class AzureWorkloadContainer(ProtectionContainer): - """Container for the workloads running inside Azure Compute or Classic Compute. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureSQLAGWorkloadContainerProtectionContainer, AzureVMAppContainerProtectionContainer. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - 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: - ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo - :param 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", - "Reregister". - :type operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - } - - _subtype_map = { - 'container_type': {'SQLAGWorkLoadContainer': 'AzureSQLAGWorkloadContainerProtectionContainer', 'VMAppContainer': 'AzureVMAppContainerProtectionContainer'} - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadContainer, self).__init__(**kwargs) - self.container_type = 'AzureWorkloadContainer' # type: str - self.source_resource_id = kwargs.get('source_resource_id', None) - self.last_updated_time = kwargs.get('last_updated_time', None) - self.extended_info = kwargs.get('extended_info', None) - self.workload_type = kwargs.get('workload_type', None) - self.operation_type = kwargs.get('operation_type', None) - - -class AzureSQLAGWorkloadContainerProtectionContainer(AzureWorkloadContainer): - """Container for SQL workloads under SQL Availability Group. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - 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: - ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo - :param 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", - "Reregister". - :type operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureSQLAGWorkloadContainerProtectionContainer, self).__init__(**kwargs) - self.container_type = 'SQLAGWorkLoadContainer' # type: str - - -class AzureSqlContainer(ProtectionContainer): - """Azure Sql workload-specific container. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", - "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", - "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureSqlContainer, self).__init__(**kwargs) - self.container_type = 'AzureSqlContainer' # type: str - - -class AzureSqlProtectedItem(ProtectedItem): - """Azure SQL 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 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: - ~azure.mgmt.recoveryservicesbackup.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 - ): - 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. - - :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 - """ - - _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 - ): - 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 AzureSqlProtectionPolicy(ProtectionPolicy): - """Azure SQL workload-specific backup policy. - - 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 - 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 - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureSqlProtectionPolicy, self).__init__(**kwargs) - self.backup_management_type = 'AzureSql' # type: str - self.retention_policy = kwargs.get('retention_policy', None) - - -class AzureStorageContainer(ProtectionContainer): - """Azure Storage Account workload-specific container. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', '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 - ): - 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) - - -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] - """ - - _attribute_map = { - 'error_code': {'key': 'errorCode', 'type': 'int'}, - 'error_string': {'key': 'errorString', 'type': 'str'}, - 'recommendations': {'key': 'recommendations', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - 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. - - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.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 - 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 - 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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :param task_id: The task display name. - :type task_id: str - :param status: The status. - :type status: str - """ - - _attribute_map = { - 'task_id': {'key': 'taskId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureStorageJobTaskDetails, self).__init__(**kwargs) - self.task_id = kwargs.get('task_id', None) - self.status = kwargs.get('status', None) - - -class ProtectableContainer(msrest.serialization.Model): - """Protectable Container Class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureStorageProtectableContainer, AzureVMAppContainerProtectableContainer. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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", - "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", - "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", - "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type 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 - """ - - _validation = { - 'protectable_container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_id': {'key': 'containerId', 'type': 'str'}, - } - - _subtype_map = { - 'protectable_container_type': {'StorageContainer': 'AzureStorageProtectableContainer', 'VMAppContainer': 'AzureVMAppContainerProtectableContainer'} - } - - def __init__( - self, - **kwargs - ): - super(ProtectableContainer, self).__init__(**kwargs) - self.friendly_name = kwargs.get('friendly_name', None) - self.backup_management_type = kwargs.get('backup_management_type', None) - self.protectable_container_type = None # type: Optional[str] - self.health_status = kwargs.get('health_status', None) - self.container_id = kwargs.get('container_id', None) - - -class AzureStorageProtectableContainer(ProtectableContainer): - """Azure Storage-specific protectable containers. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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", - "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", - "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", - "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type 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 - """ - - _validation = { - 'protectable_container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_id': {'key': 'containerId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureStorageProtectableContainer, self).__init__(**kwargs) - self.protectable_container_type = 'StorageContainer' # type: str - - -class AzureVMAppContainerProtectableContainer(ProtectableContainer): - """Azure workload-specific container. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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", - "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", - "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", - "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type 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 - """ - - _validation = { - 'protectable_container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_id': {'key': 'containerId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVMAppContainerProtectableContainer, self).__init__(**kwargs) - self.protectable_container_type = 'VMAppContainer' # type: str - - -class AzureVMAppContainerProtectionContainer(AzureWorkloadContainer): - """Container for SQL workloads under Azure Virtual Machines. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - 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: - ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo - :param 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", - "Reregister". - :type operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVMAppContainerProtectionContainer, self).__init__(**kwargs) - self.container_type = 'VMAppContainer' # type: str - - -class AzureVMResourceFeatureSupportRequest(FeatureSupportRequest): - """AzureResource(IaaS VM) Specific feature support request. - - 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 - """ - - _validation = { - 'feature_type': {'required': True}, - } - - _attribute_map = { - 'feature_type': {'key': 'featureType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'vm_sku': {'key': 'vmSku', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVMResourceFeatureSupportRequest, self).__init__(**kwargs) - self.feature_type = 'AzureVMResourceBackup' # type: str - self.vm_size = kwargs.get('vm_size', None) - self.vm_sku = kwargs.get('vm_sku', None) - - -class AzureVMResourceFeatureSupportResponse(msrest.serialization.Model): - """Response for feature support requests for Azure IaasVm. - - :param support_status: Support status of feature. Possible values include: "Invalid", - "Supported", "DefaultOFF", "DefaultON", "NotSupported". - :type support_status: str or ~azure.mgmt.recoveryservicesbackup.models.SupportStatus - """ - - _attribute_map = { - 'support_status': {'key': 'supportStatus', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVMResourceFeatureSupportResponse, self).__init__(**kwargs) - self.support_status = kwargs.get('support_status', None) - - -class WorkloadItem(msrest.serialization.Model): - """Base class for backup item. Workload-specific backup items are derived from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: 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", - "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - } - - _subtype_map = { - 'workload_item_type': {'AzureVmWorkloadItem': 'AzureVmWorkloadItem'} - } - - def __init__( - self, - **kwargs - ): - super(WorkloadItem, self).__init__(**kwargs) - self.backup_management_type = kwargs.get('backup_management_type', None) - self.workload_type = kwargs.get('workload_type', None) - self.workload_item_type = None # type: Optional[str] - self.friendly_name = kwargs.get('friendly_name', None) - self.protection_state = kwargs.get('protection_state', None) - - -class AzureVmWorkloadItem(WorkloadItem): - """Azure VM workload-specific workload item. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureVmWorkloadSAPAseDatabaseWorkloadItem, AzureVmWorkloadSAPAseSystemWorkloadItem, AzureVmWorkloadSAPHanaDatabaseWorkloadItem, AzureVmWorkloadSAPHanaSystemWorkloadItem, AzureVmWorkloadSQLDatabaseWorkloadItem, AzureVmWorkloadSQLInstanceWorkloadItem. - - 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", - "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 - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, - } - - _subtype_map = { - 'workload_item_type': {'SAPAseDatabase': 'AzureVmWorkloadSAPAseDatabaseWorkloadItem', 'SAPAseSystem': 'AzureVmWorkloadSAPAseSystemWorkloadItem', 'SAPHanaDatabase': 'AzureVmWorkloadSAPHanaDatabaseWorkloadItem', 'SAPHanaSystem': 'AzureVmWorkloadSAPHanaSystemWorkloadItem', 'SQLDataBase': 'AzureVmWorkloadSQLDatabaseWorkloadItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceWorkloadItem'} - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadItem, self).__init__(**kwargs) - self.workload_item_type = 'AzureVmWorkloadItem' # type: str - self.parent_name = kwargs.get('parent_name', None) - self.server_name = kwargs.get('server_name', None) - self.is_auto_protectable = kwargs.get('is_auto_protectable', None) - self.subinquireditemcount = kwargs.get('subinquireditemcount', None) - self.sub_workload_item_count = kwargs.get('sub_workload_item_count', None) - - -class AzureVmWorkloadProtectableItem(WorkloadProtectableItem): - """Azure VM workload-specific protectable item. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureVmWorkloadSAPAseSystemProtectableItem, AzureVmWorkloadSAPHanaDatabaseProtectableItem, AzureVmWorkloadSAPHanaSystemProtectableItem, AzureVmWorkloadSQLAvailabilityGroupProtectableItem, AzureVmWorkloadSQLDatabaseProtectableItem, AzureVmWorkloadSQLInstanceProtectableItem. - - 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", - "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 - 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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, - 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, - } - - _subtype_map = { - 'protectable_item_type': {'SAPAseSystem': 'AzureVmWorkloadSAPAseSystemProtectableItem', 'SAPHanaDatabase': 'AzureVmWorkloadSAPHanaDatabaseProtectableItem', 'SAPHanaSystem': 'AzureVmWorkloadSAPHanaSystemProtectableItem', 'SQLAvailabilityGroupContainer': 'AzureVmWorkloadSQLAvailabilityGroupProtectableItem', 'SQLDataBase': 'AzureVmWorkloadSQLDatabaseProtectableItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceProtectableItem'} - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadProtectableItem, self).__init__(**kwargs) - self.protectable_item_type = 'AzureVmWorkloadProtectableItem' # type: str - self.parent_name = kwargs.get('parent_name', None) - self.parent_unique_name = kwargs.get('parent_unique_name', None) - self.server_name = kwargs.get('server_name', None) - self.is_auto_protectable = kwargs.get('is_auto_protectable', None) - self.is_auto_protected = kwargs.get('is_auto_protected', None) - self.subinquireditemcount = kwargs.get('subinquireditemcount', None) - self.subprotectableitemcount = kwargs.get('subprotectableitemcount', None) - self.prebackupvalidation = kwargs.get('prebackupvalidation', 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. - - :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 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 - 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", - "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. - 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 - heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", - "IRPending". - :type protected_item_health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: - ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - """ - - _validation = { - '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 - ): - 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. - - :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 - item. - :type 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 - ): - 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 AzureVmWorkloadProtectionPolicy(ProtectionPolicy): - """Azure VM (Mercury) workload-specific backup policy. - - 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 - 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: - "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 - retention. - :type sub_protection_policy: - list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] - :param make_policy_consistent: Fix the policy inconsistency. - :type make_policy_consistent: bool - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, - 'settings': {'key': 'settings', 'type': 'Settings'}, - 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, - 'make_policy_consistent': {'key': 'makePolicyConsistent', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadProtectionPolicy, self).__init__(**kwargs) - self.backup_management_type = 'AzureWorkload' # type: str - self.work_load_type = kwargs.get('work_load_type', None) - self.settings = kwargs.get('settings', None) - self.sub_protection_policy = kwargs.get('sub_protection_policy', None) - self.make_policy_consistent = kwargs.get('make_policy_consistent', 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. - - :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 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 - 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", - "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. - 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 - heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", - "IRPending". - :type protected_item_health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: - ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - """ - - _validation = { - '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 - ): - super(AzureVmWorkloadSAPAseDatabaseProtectedItem, self).__init__(**kwargs) - self.protected_item_type = 'AzureVmWorkloadSAPAseDatabase' # type: str - - -class AzureVmWorkloadSAPAseDatabaseWorkloadItem(AzureVmWorkloadItem): - """Azure VM workload-specific workload item representing SAP ASE Database. - - 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", - "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 - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadSAPAseDatabaseWorkloadItem, self).__init__(**kwargs) - self.workload_item_type = 'SAPAseDatabase' # type: str - - -class AzureVmWorkloadSAPAseSystemProtectableItem(AzureVmWorkloadProtectableItem): - """Azure VM workload-specific protectable item representing SAP ASE System. - - 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", - "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 - 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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, - 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadSAPAseSystemProtectableItem, self).__init__(**kwargs) - self.protectable_item_type = 'SAPAseSystem' # type: str - - -class AzureVmWorkloadSAPAseSystemWorkloadItem(AzureVmWorkloadItem): - """Azure VM workload-specific workload item representing SAP ASE System. - - 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", - "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 - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadSAPAseSystemWorkloadItem, self).__init__(**kwargs) - self.workload_item_type = 'SAPAseSystem' # type: str - - -class AzureVmWorkloadSAPHanaDatabaseProtectableItem(AzureVmWorkloadProtectableItem): - """Azure VM workload-specific protectable item representing SAP HANA Database. - - 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", - "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 - 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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, - 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadSAPHanaDatabaseProtectableItem, self).__init__(**kwargs) - self.protectable_item_type = 'SAPHanaDatabase' # 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. - - :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 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 - 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", - "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. - 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 - heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", - "IRPending". - :type protected_item_health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: - ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - """ - - _validation = { - '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 - ): - super(AzureVmWorkloadSAPHanaDatabaseProtectedItem, self).__init__(**kwargs) - self.protected_item_type = 'AzureVmWorkloadSAPHanaDatabase' # type: str - - -class AzureVmWorkloadSAPHanaDatabaseWorkloadItem(AzureVmWorkloadItem): - """Azure VM workload-specific workload item representing SAP HANA Database. - - 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", - "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 - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadSAPHanaDatabaseWorkloadItem, self).__init__(**kwargs) - self.workload_item_type = 'SAPHanaDatabase' # type: str - - -class AzureVmWorkloadSAPHanaSystemProtectableItem(AzureVmWorkloadProtectableItem): - """Azure VM workload-specific protectable item representing SAP HANA System. - - 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", - "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 - 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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, - 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadSAPHanaSystemProtectableItem, self).__init__(**kwargs) - self.protectable_item_type = 'SAPHanaSystem' # type: str - - -class AzureVmWorkloadSAPHanaSystemWorkloadItem(AzureVmWorkloadItem): - """Azure VM workload-specific workload item representing SAP HANA System. - - 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", - "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 - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadSAPHanaSystemWorkloadItem, self).__init__(**kwargs) - self.workload_item_type = 'SAPHanaSystem' # type: str - - -class AzureVmWorkloadSQLAvailabilityGroupProtectableItem(AzureVmWorkloadProtectableItem): - """Azure VM workload-specific protectable item representing SQL Availability Group. - - 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", - "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 - 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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, - 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadSQLAvailabilityGroupProtectableItem, self).__init__(**kwargs) - self.protectable_item_type = 'SQLAvailabilityGroupContainer' # type: str - - -class AzureVmWorkloadSQLDatabaseProtectableItem(AzureVmWorkloadProtectableItem): - """Azure VM workload-specific protectable item representing SQL Database. - - 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", - "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 - 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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, - 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadSQLDatabaseProtectableItem, self).__init__(**kwargs) - self.protectable_item_type = 'SQLDataBase' # 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. - - :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 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 - 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", - "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. - 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 - heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", - "IRPending". - :type protected_item_health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: - ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - """ - - _validation = { - '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 - ): - super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(**kwargs) - self.protected_item_type = 'AzureVmWorkloadSQLDatabase' # type: str - - -class AzureVmWorkloadSQLDatabaseWorkloadItem(AzureVmWorkloadItem): - """Azure VM workload-specific workload item representing SQL Database. - - 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", - "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 - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadSQLDatabaseWorkloadItem, self).__init__(**kwargs) - self.workload_item_type = 'SQLDataBase' # type: str - - -class AzureVmWorkloadSQLInstanceProtectableItem(AzureVmWorkloadProtectableItem): - """Azure VM workload-specific protectable item representing SQL Instance. - - 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", - "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 - 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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, - 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadSQLInstanceProtectableItem, self).__init__(**kwargs) - self.protectable_item_type = 'SQLInstance' # type: str - - -class AzureVmWorkloadSQLInstanceWorkloadItem(AzureVmWorkloadItem): - """Azure VM workload-specific workload item representing SQL Instance. - - 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", - "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] - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, - 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureVmWorkloadSQLInstanceWorkloadItem, self).__init__(**kwargs) - self.workload_item_type = 'SQLInstance' # type: str - self.data_directory_paths = kwargs.get('data_directory_paths', None) - - -class AzureWorkloadAutoProtectionIntent(AzureRecoveryServiceVaultProtectionIntent): - """Azure Recovery Services Vault specific protection intent item. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSQLAutoProtectionIntent. - - 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", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type 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 - 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", - "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type 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'}, - } - - _subtype_map = { - 'protection_intent_item_type': {'AzureWorkloadSQLAutoProtectionIntent': 'AzureWorkloadSQLAutoProtectionIntent'} - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadAutoProtectionIntent, self).__init__(**kwargs) - self.protection_intent_item_type = 'AzureWorkloadAutoProtectionIntent' # type: str - - -class AzureWorkloadBackupRequest(BackupRequest): - """AzureWorkload 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 - 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 - 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 - (UTC). - :type recovery_point_expiry_time_in_utc: ~datetime.datetime - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'backup_type': {'key': 'backupType', 'type': 'str'}, - 'enable_compression': {'key': 'enableCompression', 'type': 'bool'}, - 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadBackupRequest, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadBackupRequest' # type: str - self.backup_type = kwargs.get('backup_type', None) - self.enable_compression = kwargs.get('enable_compression', None) - self.recovery_point_expiry_time_in_utc = kwargs.get('recovery_point_expiry_time_in_utc', None) - - -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 - 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] - """ - - _attribute_map = { - 'host_server_name': {'key': 'hostServerName', 'type': 'str'}, - 'inquiry_info': {'key': 'inquiryInfo', 'type': 'InquiryInfo'}, - 'nodes_list': {'key': 'nodesList', 'type': '[DistributedNodesInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadContainerExtendedInfo, self).__init__(**kwargs) - self.host_server_name = kwargs.get('host_server_name', None) - self.inquiry_info = kwargs.get('inquiry_info', None) - self.nodes_list = kwargs.get('nodes_list', None) - - -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 - """ - - _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 - ): - 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. - - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.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 - 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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :param task_id: The task display name. - :type task_id: str - :param status: The status. - :type status: str - """ - - _attribute_map = { - 'task_id': {'key': 'taskId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - 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. - - 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}'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadPointInTimeRecoveryPoint': 'AzureWorkloadPointInTimeRecoveryPoint', 'AzureWorkloadSAPHanaRecoveryPoint': 'AzureWorkloadSAPHanaRecoveryPoint', 'AzureWorkloadSQLRecoveryPoint': 'AzureWorkloadSQLRecoveryPoint'} - } - - def __init__( - self, - **kwargs - ): - 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) - self.type = kwargs.get('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. - - 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, - **kwargs - ): - 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. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadPointInTimeRecoveryPointAutoGenerated, AzureWorkloadSAPHanaRecoveryPointAutoGenerated, AzureWorkloadSQLRecoveryPointAutoGenerated. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadPointInTimeRecoveryPoint': 'AzureWorkloadPointInTimeRecoveryPointAutoGenerated', 'AzureWorkloadSAPHanaRecoveryPoint': 'AzureWorkloadSAPHanaRecoveryPointAutoGenerated', 'AzureWorkloadSQLRecoveryPoint': 'AzureWorkloadSQLRecoveryPointAutoGenerated'} - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadRecoveryPoint' # type: str - self.recovery_point_time_in_utc = None - self.type = None - self.recovery_point_tier_details = kwargs.get('recovery_point_tier_details', None) - self.recovery_point_move_readiness_info = kwargs.get('recovery_point_move_readiness_info', None) - - -class AzureWorkloadPointInTimeRecoveryPointAutoGenerated(AzureWorkloadRecoveryPointAutoGenerated): - """Recovery point specific to PointInTime. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - :param time_ranges: List of log ranges. - :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadSAPHanaPointInTimeRecoveryPoint': 'AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated'} - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadPointInTimeRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadPointInTimeRecoveryPoint' # type: str - self.time_ranges = kwargs.get('time_ranges', None) - - -class AzureWorkloadRestoreRequest(RestoreRequest): - """AzureWorkload-specific restore. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadPointInTimeRestoreRequest, AzureWorkloadSAPHanaRestoreRequest, AzureWorkloadSQLRestoreRequest. - - 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'}, - } - - def __init__( - self, - **kwargs - ): - 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. - - 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]'}, - } - - 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 - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - :param time_ranges: List of log ranges. - :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint' # type: str - - -class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): - """AzureWorkload SAP Hana-specific restore. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSAPHanaPointInTimeRestoreRequest, AzureWorkloadSAPHanaRestoreWithRehydrateRequest. - - 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': {'AzureWorkloadSAPHanaPointInTimeRestoreRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreRequest', 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest': 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest'} - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSAPHanaRestoreRequest, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSAPHanaRestoreRequest' # type: str - - -class AzureWorkloadSAPHanaPointInTimeRestoreRequest(AzureWorkloadSAPHanaRestoreRequest): - """AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. 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'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest'} - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSAPHanaPointInTimeRestoreRequest, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSAPHanaPointInTimeRestoreRequest' # type: str - self.point_in_time = kwargs.get('point_in_time', None) - - -class AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSAPHanaPointInTimeRestoreRequest): - """AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. 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 - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, - 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, - 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, - 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest' # type: str - self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) - - -class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): - """SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints. - - 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, - **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 - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSAPHanaRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSAPHanaRecoveryPoint' # type: str - - -class AzureWorkloadSAPHanaRestoreWithRehydrateRequest(AzureWorkloadSAPHanaRestoreRequest): - """AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. - - 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 recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, - 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, - 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSAPHanaRestoreWithRehydrateRequest, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest' # type: str - self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) - - -class AzureWorkloadSQLAutoProtectionIntent(AzureWorkloadAutoProtectionIntent): - """Azure Workload SQL Auto Protection intent item. - - 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", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type 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 - 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", - "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. - Possible values include: "Invalid", "SQLInstance", "SQLDataBase", "SAPHanaSystem", - "SAPHanaDatabase", "SAPAseSystem", "SAPAseDatabase". - :type workload_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType - """ - - _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'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSQLAutoProtectionIntent, self).__init__(**kwargs) - self.protection_intent_item_type = 'AzureWorkloadSQLAutoProtectionIntent' # type: str - self.workload_item_type = kwargs.get('workload_item_type', None) - - -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. - - 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 - """ - - _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'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadSQLPointInTimeRecoveryPoint': 'AzureWorkloadSQLPointInTimeRecoveryPoint'} - } - - def __init__( - self, - **kwargs - ): - 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. - - 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 - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - :param extended_info: Extended Info that provides data directory details. Will be populated in - two cases: - When a specific recovery point is accessed using GetRecoveryPoint - Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter. - :type extended_info: - ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated - :param time_ranges: List of log ranges. - :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadSQLRecoveryPointExtendedInfoAutoGenerated'}, - 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSQLPointInTimeRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSQLPointInTimeRecoveryPoint' # type: str - self.time_ranges = kwargs.get('time_ranges', None) - - -class AzureWorkloadSQLRestoreRequest(AzureWorkloadRestoreRequest): - """AzureWorkload SQL -specific restore. Specifically for full/diff restore. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSQLPointInTimeRestoreRequest, AzureWorkloadSQLRestoreWithRehydrateRequest. - - 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 should_use_alternate_target_location: Default option set to true. If this is set to - false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when - restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: - list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] - """ - - _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', 'AzureWorkloadSQLRestoreWithRehydrateRequest': 'AzureWorkloadSQLRestoreWithRehydrateRequest'} - } - - def __init__( - self, - **kwargs - ): - 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. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. 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 should_use_alternate_target_location: Default option set to true. If this is set to - false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when - restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: - list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] - :param point_in_time: PointInTime value. - :type point_in_time: ~datetime.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'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest': 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest'} - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSQLPointInTimeRestoreRequest, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSQLPointInTimeRestoreRequest' # type: str - self.point_in_time = kwargs.get('point_in_time', None) - - -class AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSQLPointInTimeRestoreRequest): - """AzureWorkload SQL-specific restore with integrated rehydration of recovery point. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. 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 should_use_alternate_target_location: Default option set to true. If this is set to - false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when - restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: - list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] - :param point_in_time: PointInTime value. - :type point_in_time: ~datetime.datetime - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, - 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, - 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, - 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, - 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, - 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, - 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest' # type: str - self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) - - -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]'}, - } - - 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 - 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 should_use_alternate_target_location: Default option set to true. If this is set to - false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when - restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: - list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, - 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, - 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, - 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, - 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, - 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureWorkloadSQLRestoreWithRehydrateRequest, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadSQLRestoreWithRehydrateRequest' # type: str - self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) - - -class BackupEngineBaseResource(Resource): - """The base backup engine class. All workload specific backup engines derive 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 - :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 - """ - - _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': 'BackupEngineBase'}, - } - - def __init__( - self, - **kwargs - ): - super(BackupEngineBaseResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -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 - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ResourceList, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[BackupEngineBaseResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(BackupEngineBaseResourceList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -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 - """ - - _attribute_map = { - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'protected_servers_count': {'key': 'protectedServersCount', 'type': 'int'}, - 'disk_count': {'key': 'diskCount', 'type': 'int'}, - 'used_disk_space': {'key': 'usedDiskSpace', 'type': 'float'}, - 'available_disk_space': {'key': 'availableDiskSpace', 'type': 'float'}, - 'refreshed_at': {'key': 'refreshedAt', 'type': 'iso-8601'}, - 'azure_protected_instances': {'key': 'azureProtectedInstances', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(BackupEngineExtendedInfo, self).__init__(**kwargs) - self.database_name = kwargs.get('database_name', None) - self.protected_items_count = kwargs.get('protected_items_count', None) - self.protected_servers_count = kwargs.get('protected_servers_count', None) - self.disk_count = kwargs.get('disk_count', None) - self.used_disk_space = kwargs.get('used_disk_space', None) - self.available_disk_space = kwargs.get('available_disk_space', None) - self.refreshed_at = kwargs.get('refreshed_at', None) - self.azure_protected_instances = kwargs.get('azure_protected_instances', None) - - -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 - """ - - _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 - ): - 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. - - :param value: The list of backup management usages for the given vault. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsage] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BackupManagementUsage]'}, - } - - def __init__( - self, - **kwargs - ): - super(BackupManagementUsageList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class BackupRequestResource(Resource): - """Base class for backup request. Workload-specific backup requests 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 - :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 - """ - - _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': 'BackupRequest'}, - } - - def __init__( - self, - **kwargs - ): - super(BackupRequestResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class BackupResourceConfig(msrest.serialization.Model): - """The resource storage details. - - :param 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", - "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, - 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 - """ - - _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 - ): - 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 - :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 - """ - - _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 - ): - super(BackupResourceConfigResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class BackupResourceEncryptionConfig(msrest.serialization.Model): - """BackupResourceEncryptionConfig. - - :param encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", - "MicrosoftManaged", "CustomerManaged". - :type 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", - "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", - "Enabled". - :type infrastructure_encryption_state: str or - ~azure.mgmt.recoveryservicesbackup.models.InfrastructureEncryptionState - """ - - _attribute_map = { - 'encryption_at_rest_type': {'key': 'encryptionAtRestType', 'type': 'str'}, - 'key_uri': {'key': 'keyUri', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'last_update_status': {'key': 'lastUpdateStatus', 'type': 'str'}, - 'infrastructure_encryption_state': {'key': 'infrastructureEncryptionState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - 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) - self.subscription_id = kwargs.get('subscription_id', None) - self.last_update_status = kwargs.get('last_update_status', None) - self.infrastructure_encryption_state = kwargs.get('infrastructure_encryption_state', None) - - -class BackupResourceEncryptionConfigExtended(BackupResourceEncryptionConfig): - """BackupResourceEncryptionConfigExtended. - - :param encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", - "MicrosoftManaged", "CustomerManaged". - :type 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", - "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", - "Enabled". - :type 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 - """ - - _attribute_map = { - 'encryption_at_rest_type': {'key': 'encryptionAtRestType', 'type': 'str'}, - 'key_uri': {'key': 'keyUri', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'last_update_status': {'key': 'lastUpdateStatus', 'type': 'str'}, - 'infrastructure_encryption_state': {'key': 'infrastructureEncryptionState', 'type': 'str'}, - 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, - 'use_system_assigned_identity': {'key': 'useSystemAssignedIdentity', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - 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) - - -class BackupResourceEncryptionConfigExtendedResource(Resource): - """BackupResourceEncryptionConfigExtendedResource. - - 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: BackupResourceEncryptionConfigExtendedResource properties. - :type properties: - ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtended - """ - - _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': 'BackupResourceEncryptionConfigExtended'}, - } - - def __init__( - self, - **kwargs - ): - super(BackupResourceEncryptionConfigExtendedResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class BackupResourceEncryptionConfigResource(Resource): - """BackupResourceEncryptionConfigResource. - - 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: BackupResourceEncryptionConfigResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfig - """ - - _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': 'BackupResourceEncryptionConfig'}, - } - - def __init__( - self, - **kwargs - ): - super(BackupResourceEncryptionConfigResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class BackupResourceVaultConfig(msrest.serialization.Model): - """Backup resource vault config details. - - :param 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", - "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, - the storageTypeState is always Locked. Possible values include: "Invalid", "Locked", - "Unlocked". - :type storage_type_state: str or ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState - :param enhanced_security_state: Enabled or Disabled. Possible values include: "Invalid", - "Enabled", "Disabled". - :type enhanced_security_state: str or - ~azure.mgmt.recoveryservicesbackup.models.EnhancedSecurityState - :param soft_delete_feature_state: Soft Delete feature state. Possible values include: - "Invalid", "Enabled", "Disabled". - :type soft_delete_feature_state: str or - ~azure.mgmt.recoveryservicesbackup.models.SoftDeleteFeatureState - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] - """ - - _attribute_map = { - 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, - 'enhanced_security_state': {'key': 'enhancedSecurityState', 'type': 'str'}, - 'soft_delete_feature_state': {'key': 'softDeleteFeatureState', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(BackupResourceVaultConfig, self).__init__(**kwargs) - self.storage_model_type = kwargs.get('storage_model_type', None) - self.storage_type = kwargs.get('storage_type', None) - self.storage_type_state = kwargs.get('storage_type_state', None) - self.enhanced_security_state = kwargs.get('enhanced_security_state', None) - self.soft_delete_feature_state = kwargs.get('soft_delete_feature_state', None) - self.resource_guard_operation_requests = kwargs.get('resource_guard_operation_requests', None) - - -class BackupResourceVaultConfigResource(Resource): - """Backup resource vault config details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id represents the complete path to the resource. - :vartype id: str - :ivar name: Resource name associated with the resource. - :vartype name: str - :ivar type: Resource type represents the complete path of the form - Namespace/ResourceType/ResourceType/... - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BackupResourceVaultConfig'}, - } - - def __init__( - self, - **kwargs - ): - super(BackupResourceVaultConfigResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class BackupStatusRequest(msrest.serialization.Model): - """BackupStatus request. - - :param 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 - """ - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'po_logical_name': {'key': 'poLogicalName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BackupStatusRequest, self).__init__(**kwargs) - self.resource_type = kwargs.get('resource_type', None) - self.resource_id = kwargs.get('resource_id', None) - self.po_logical_name = kwargs.get('po_logical_name', None) - - -class BackupStatusResponse(msrest.serialization.Model): - """BackupStatus response. - - :param 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. - iaasvmcontainer;iaasvmcontainer;csname;vmname. - :type container_name: str - :param 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 - """ - - _attribute_map = { - 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, - 'vault_id': {'key': 'vaultId', 'type': 'str'}, - 'fabric_name': {'key': 'fabricName', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, - 'error_code': {'key': 'errorCode', 'type': 'str'}, - 'error_message': {'key': 'errorMessage', 'type': 'str'}, - 'policy_name': {'key': 'policyName', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BackupStatusResponse, self).__init__(**kwargs) - self.protection_status = kwargs.get('protection_status', None) - self.vault_id = kwargs.get('vault_id', None) - self.fabric_name = kwargs.get('fabric_name', None) - self.container_name = kwargs.get('container_name', None) - self.protected_item_name = kwargs.get('protected_item_name', None) - self.error_code = kwargs.get('error_code', None) - self.error_message = kwargs.get('error_message', None) - self.policy_name = kwargs.get('policy_name', None) - self.registration_status = kwargs.get('registration_status', None) - - -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 - """ - - _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 - ): - 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 - """ - - _attribute_map = { - 'expand': {'key': 'expand', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BMSBackupEngineQueryObject, self).__init__(**kwargs) - self.expand = kwargs.get('expand', None) - - -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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type 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 - """ - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'expand': {'key': 'expand', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BMSBackupEnginesQueryObject, self).__init__(**kwargs) - self.backup_management_type = kwargs.get('backup_management_type', None) - self.friendly_name = kwargs.get('friendly_name', None) - self.expand = kwargs.get('expand', None) - - -class BMSBackupSummariesQueryObject(msrest.serialization.Model): - """Query parameters to fetch backup summaries. - - :param type: Backup management type for this container. Possible values include: "Invalid", - "BackupProtectedItemCountSummary", "BackupProtectionContainerCountSummary". - :type type: str or ~azure.mgmt.recoveryservicesbackup.models.Type - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BMSBackupSummariesQueryObject, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - - -class BMSContainerQueryObject(msrest.serialization.Model): - """The query filters that can be used with the list containers API. - - All required parameters must be populated in order to send to Azure. - - :param 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 - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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 - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, - 'fabric_name': {'key': 'fabricName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BMSContainerQueryObject, self).__init__(**kwargs) - self.backup_management_type = kwargs['backup_management_type'] - self.container_type = kwargs.get('container_type', None) - self.backup_engine_name = kwargs.get('backup_engine_name', None) - self.fabric_name = kwargs.get('fabric_name', None) - self.status = kwargs.get('status', None) - self.friendly_name = kwargs.get('friendly_name', None) - - -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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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 - """ - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BMSContainersInquiryQueryObject, self).__init__(**kwargs) - self.backup_management_type = kwargs.get('backup_management_type', None) - self.workload_type = kwargs.get('workload_type', None) - - -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", - "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", - "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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 - """ - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BMSPOQueryObject, self).__init__(**kwargs) - 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.status = kwargs.get('status', None) - self.friendly_name = kwargs.get('friendly_name', None) - - -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 - 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(BMSRefreshContainersQueryObject, self).__init__(**kwargs) - self.backup_management_type = kwargs.get('backup_management_type', None) - - -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", - "Log", "Differential", "FullAndDifferential", "All", "Incremental". - :type restore_point_query_type: str or - ~azure.mgmt.recoveryservicesbackup.models.RestorePointQueryType - :param extended_info: In Get Recovery Point, it tells whether extended information about - recovery point is asked. - :type extended_info: bool - :param move_ready_rp_only: Whether the RP can be moved to another tier. - :type move_ready_rp_only: bool - """ - - _attribute_map = { - '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 - ): - 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 BMSWorkloadItemQueryObject(msrest.serialization.Model): - """Filters to list items that can be backed up. - - :param backup_management_type: Backup management type. 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_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", - "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", - "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - """ - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - 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) - self.workload_type = kwargs.get('workload_type', None) - self.protection_status = kwargs.get('protection_status', None) - - -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 - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ClientDiscoveryDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) - - -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 - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.blob_duration = kwargs.get('blob_duration', None) - - -class ClientDiscoveryForProperties(msrest.serialization.Model): - """Class to represent shoebox properties in json client discovery. - - :param service_specification: Operation properties. - :type service_specification: - ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, - } - - def __init__( - self, - **kwargs - ): - super(ClientDiscoveryForProperties, self).__init__(**kwargs) - self.service_specification = kwargs.get('service_specification', None) - - -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: - list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification] - """ - - _attribute_map = { - 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, - } - - def __init__( - self, - **kwargs - ): - super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) - self.log_specifications = kwargs.get('log_specifications', None) - - -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 - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ClientDiscoveryValueForSingleApi]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ClientDiscoveryResponse, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -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 - 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 - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.origin = kwargs.get('origin', None) - self.properties = kwargs.get('properties', None) - - -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 , - .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 - 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 - given for download to user. - If its null or empty then , ignore it. - :type 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 - ): - 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 CloudErrorBody(msrest.serialization.Model): - """An error response from the Container Instance service. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed - programmatically. - :vartype code: str - :ivar message: A message describing the error, intended to be suitable for display in a user - interface. - :vartype message: str - :ivar target: The target of the particular error. For example, the name of the property in - error. - :vartype target: str - :ivar details: A list of additional details about the error. - :vartype details: list[~azure.mgmt.recoveryservicesbackup.models.CloudErrorBody] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.recoveryservicesbackup.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class ContainerIdentityInfo(msrest.serialization.Model): - """Container identity information. - - :param unique_name: Unique name of the container. - :type unique_name: str - :param aad_tenant_id: Protection container identity - AAD Tenant. - :type aad_tenant_id: str - :param service_principal_client_id: Protection container identity - AAD Service Principal. - :type service_principal_client_id: str - :param audience: Protection container identity - Audience. - :type audience: str - """ - - _attribute_map = { - 'unique_name': {'key': 'uniqueName', 'type': 'str'}, - 'aad_tenant_id': {'key': 'aadTenantId', 'type': 'str'}, - 'service_principal_client_id': {'key': 'servicePrincipalClientId', 'type': 'str'}, - 'audience': {'key': 'audience', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ContainerIdentityInfo, self).__init__(**kwargs) - self.unique_name = kwargs.get('unique_name', None) - self.aad_tenant_id = kwargs.get('aad_tenant_id', None) - self.service_principal_client_id = kwargs.get('service_principal_client_id', None) - self.audience = kwargs.get('audience', None) - - -class CrossRegionRestoreRequest(msrest.serialization.Model): - """CrossRegionRestoreRequest. - - :param cross_region_restore_access_details: Access details for cross region restore. - :type cross_region_restore_access_details: - ~azure.mgmt.recoveryservicesbackup.models.CrrAccessToken - :param restore_request: Request object for triggering restore. - :type restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest - """ - - _attribute_map = { - 'cross_region_restore_access_details': {'key': 'crossRegionRestoreAccessDetails', 'type': 'CrrAccessToken'}, - 'restore_request': {'key': 'restoreRequest', 'type': 'RestoreRequest'}, - } - - def __init__( - self, - **kwargs - ): - super(CrossRegionRestoreRequest, self).__init__(**kwargs) - self.cross_region_restore_access_details = kwargs.get('cross_region_restore_access_details', None) - self.restore_request = kwargs.get('restore_request', None) - - -class CrossRegionRestoreRequestResource(Resource): - """CrossRegionRestoreRequestResource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id represents the complete path to the resource. - :vartype id: str - :ivar name: Resource name associated with the resource. - :vartype name: str - :ivar type: Resource type represents the complete path of the form - Namespace/ResourceType/ResourceType/... - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param e_tag: Optional ETag. - :type e_tag: str - :param properties: CrossRegionRestoreRequestResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.CrossRegionRestoreRequest - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'CrossRegionRestoreRequest'}, - } - - def __init__( - self, - **kwargs - ): - super(CrossRegionRestoreRequestResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class CrrAccessToken(msrest.serialization.Model): - """CrrAccessToken. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: WorkloadCrrAccessToken. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. Type of the specific object - used for deserializing.Constant - filled by server. - :type object_type: str - :param access_token_string: Access token used for authentication. - :type access_token_string: str - :param subscription_id: Subscription Id of the source vault. - :type subscription_id: str - :param resource_group_name: Resource Group name of the source vault. - :type resource_group_name: str - :param resource_name: Resource Name of the source vault. - :type resource_name: str - :param resource_id: Resource Id of the source vault. - :type resource_id: str - :param protection_container_id: Protected item container id. - :type protection_container_id: long - :param recovery_point_id: Recovery Point Id. - :type recovery_point_id: str - :param recovery_point_time: Recovery Point Time. - :type recovery_point_time: str - :param container_name: Container Unique name. - :type container_name: str - :param container_type: Container Type. - :type container_type: str - :param backup_management_type: Backup Management Type. - :type backup_management_type: str - :param datasource_type: Datasource Type. - :type datasource_type: str - :param datasource_name: Datasource Friendly Name. - :type datasource_name: str - :param datasource_id: Datasource Id. - :type datasource_id: str - :param datasource_container_name: Datasource Container Unique Name. - :type datasource_container_name: str - :param coordinator_service_stamp_id: CoordinatorServiceStampId to be used by BCM in restore - call. - :type coordinator_service_stamp_id: str - :param coordinator_service_stamp_uri: CoordinatorServiceStampUri to be used by BCM in restore - call. - :type coordinator_service_stamp_uri: str - :param protection_service_stamp_id: ProtectionServiceStampId to be used by BCM in restore call. - :type protection_service_stamp_id: str - :param protection_service_stamp_uri: ProtectionServiceStampUri to be used by BCM in restore - call. - :type protection_service_stamp_uri: str - :param token_extended_information: Extended Information about the token like FileSpec etc. - :type token_extended_information: str - :param rp_tier_information: Recovery point Tier Information. - :type rp_tier_information: dict[str, str] - :param rp_original_sa_option: Recovery point information: Original SA option. - :type rp_original_sa_option: bool - :param rp_is_managed_virtual_machine: Recovery point information: Managed virtual machine. - :type rp_is_managed_virtual_machine: bool - :param rp_vm_size_description: Recovery point information: VM size description. - :type rp_vm_size_description: str - :param b_ms_active_region: Active region name of BMS Stamp. - :type b_ms_active_region: str - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'access_token_string': {'key': 'accessTokenString', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'protection_container_id': {'key': 'protectionContainerId', 'type': 'long'}, - 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, - 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'datasource_type': {'key': 'datasourceType', 'type': 'str'}, - 'datasource_name': {'key': 'datasourceName', 'type': 'str'}, - 'datasource_id': {'key': 'datasourceId', 'type': 'str'}, - 'datasource_container_name': {'key': 'datasourceContainerName', 'type': 'str'}, - 'coordinator_service_stamp_id': {'key': 'coordinatorServiceStampId', 'type': 'str'}, - 'coordinator_service_stamp_uri': {'key': 'coordinatorServiceStampUri', 'type': 'str'}, - 'protection_service_stamp_id': {'key': 'protectionServiceStampId', 'type': 'str'}, - 'protection_service_stamp_uri': {'key': 'protectionServiceStampUri', 'type': 'str'}, - 'token_extended_information': {'key': 'tokenExtendedInformation', 'type': 'str'}, - 'rp_tier_information': {'key': 'rpTierInformation', 'type': '{str}'}, - 'rp_original_sa_option': {'key': 'rpOriginalSAOption', 'type': 'bool'}, - 'rp_is_managed_virtual_machine': {'key': 'rpIsManagedVirtualMachine', 'type': 'bool'}, - 'rp_vm_size_description': {'key': 'rpVMSizeDescription', 'type': 'str'}, - 'b_ms_active_region': {'key': 'bMSActiveRegion', 'type': 'str'}, - } - - _subtype_map = { - 'object_type': {'WorkloadCrrAccessToken': 'WorkloadCrrAccessToken'} - } - - def __init__( - self, - **kwargs - ): - super(CrrAccessToken, self).__init__(**kwargs) - self.object_type = None # type: Optional[str] - self.access_token_string = kwargs.get('access_token_string', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group_name = kwargs.get('resource_group_name', None) - self.resource_name = kwargs.get('resource_name', None) - self.resource_id = kwargs.get('resource_id', None) - self.protection_container_id = kwargs.get('protection_container_id', None) - self.recovery_point_id = kwargs.get('recovery_point_id', None) - self.recovery_point_time = kwargs.get('recovery_point_time', None) - self.container_name = kwargs.get('container_name', None) - self.container_type = kwargs.get('container_type', None) - self.backup_management_type = kwargs.get('backup_management_type', None) - self.datasource_type = kwargs.get('datasource_type', None) - self.datasource_name = kwargs.get('datasource_name', None) - self.datasource_id = kwargs.get('datasource_id', None) - self.datasource_container_name = kwargs.get('datasource_container_name', None) - self.coordinator_service_stamp_id = kwargs.get('coordinator_service_stamp_id', None) - self.coordinator_service_stamp_uri = kwargs.get('coordinator_service_stamp_uri', None) - self.protection_service_stamp_id = kwargs.get('protection_service_stamp_id', None) - self.protection_service_stamp_uri = kwargs.get('protection_service_stamp_uri', None) - self.token_extended_information = kwargs.get('token_extended_information', None) - self.rp_tier_information = kwargs.get('rp_tier_information', None) - self.rp_original_sa_option = kwargs.get('rp_original_sa_option', None) - self.rp_is_managed_virtual_machine = kwargs.get('rp_is_managed_virtual_machine', None) - self.rp_vm_size_description = kwargs.get('rp_vm_size_description', None) - self.b_ms_active_region = kwargs.get('b_ms_active_region', None) - - -class CrrAccessTokenResource(Resource): - """CrrAccessTokenResource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id represents the complete path to the resource. - :vartype id: str - :ivar name: Resource name associated with the resource. - :vartype name: str - :ivar type: Resource type represents the complete path of the form - Namespace/ResourceType/ResourceType/... - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param e_tag: Optional ETag. - :type e_tag: str - :param properties: CrrAccessTokenResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.CrrAccessToken - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'CrrAccessToken'}, - } - - def __init__( - self, - **kwargs - ): - super(CrrAccessTokenResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class CrrJobRequest(msrest.serialization.Model): - """Request object for fetching CRR jobs. - - :param resource_id: Entire ARM resource id of the resource. - :type resource_id: str - :param job_name: Job Name of the job to be fetched. - :type job_name: str - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'job_name': {'key': 'jobName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CrrJobRequest, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.job_name = kwargs.get('job_name', None) - - -class CrrJobRequestResource(Resource): - """Request object for fetching CRR jobs. - - Variables are only populated by the server, and will be ignored when sending a request. - - :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] - """ - - _attribute_map = { - 'days_of_the_month': {'key': 'daysOfTheMonth', 'type': '[Day]'}, - } - - def __init__( - self, - **kwargs - ): - super(DailyRetentionFormat, self).__init__(**kwargs) - self.days_of_the_month = kwargs.get('days_of_the_month', None) - - -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 - """ - - _attribute_map = { - 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, - 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, - } - - def __init__( - self, - **kwargs - ): - super(DailyRetentionSchedule, self).__init__(**kwargs) - self.retention_times = kwargs.get('retention_times', None) - self.retention_duration = kwargs.get('retention_duration', None) - - -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 - """ - - _attribute_map = { - 'date': {'key': 'date', 'type': 'int'}, - 'is_last': {'key': 'isLast', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(Day, self).__init__(**kwargs) - self.date = kwargs.get('date', None) - self.is_last = kwargs.get('is_last', None) - - -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 - backup. - :type is_inclusion_list: bool - """ - - _attribute_map = { - 'disk_lun_list': {'key': 'diskLunList', 'type': '[int]'}, - 'is_inclusion_list': {'key': 'isInclusionList', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - 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. - - :param lun: - :type lun: int - :param name: - :type name: str - """ - - _attribute_map = { - 'lun': {'key': 'lun', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DiskInformation, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) - self.name = kwargs.get('name', None) - - -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. - Failed | Succeeded. - :type status: str - :param error_detail: Error Details if the Status is non-success. - :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail - """ - - _attribute_map = { - 'node_name': {'key': 'nodeName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, - } - - def __init__( - self, - **kwargs - ): - super(DistributedNodesInfo, self).__init__(**kwargs) - self.node_name = kwargs.get('node_name', None) - self.status = kwargs.get('status', None) - self.error_detail = kwargs.get('error_detail', None) - - -class DpmBackupEngine(BackupEngineBase): - """Data Protection Manager (DPM) specific backup engine. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. = - {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. - 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 - 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 - """ - - _validation = { - 'backup_engine_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, - 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, - 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, - 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, - 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, - 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, - 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, - } - - def __init__( - self, - **kwargs - ): - super(DpmBackupEngine, self).__init__(**kwargs) - self.backup_engine_type = 'DpmBackupEngine' # type: str - - -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 - """ - - _attribute_map = { - 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(DPMContainerExtendedInfo, self).__init__(**kwargs) - self.last_refreshed_at = kwargs.get('last_refreshed_at', None) - - -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] - """ - - _attribute_map = { - 'error_string': {'key': 'errorString', 'type': 'str'}, - 'recommendations': {'key': 'recommendations', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - 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. - - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.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 - 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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :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 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: - "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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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 OperationResultInfoBase(msrest.serialization.Model): - """Base class for operation result info. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ExportJobsOperationResultInfo, OperationResultInfo. - - 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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - } - - _subtype_map = { - 'object_type': {'ExportJobsOperationResultInfo': 'ExportJobsOperationResultInfo', 'OperationResultInfo': 'OperationResultInfo'} - } - - def __init__( - self, - **kwargs - ): - super(OperationResultInfoBase, self).__init__(**kwargs) - self.object_type = None # type: Optional[str] - - -class ExportJobsOperationResultInfo(OperationResultInfoBase): - """This class is used to send blob details after exporting jobs. - - 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 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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'blob_url': {'key': 'blobUrl', 'type': 'str'}, - 'blob_sas_key': {'key': 'blobSasKey', 'type': 'str'}, - 'excel_file_blob_url': {'key': 'excelFileBlobUrl', 'type': 'str'}, - 'excel_file_blob_sas_key': {'key': 'excelFileBlobSasKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExportJobsOperationResultInfo, self).__init__(**kwargs) - self.object_type = 'ExportJobsOperationResultInfo' # type: str - self.blob_url = kwargs.get('blob_url', None) - self.blob_sas_key = kwargs.get('blob_sas_key', None) - self.excel_file_blob_url = kwargs.get('excel_file_blob_url', None) - self.excel_file_blob_sas_key = kwargs.get('excel_file_blob_sas_key', None) - - -class ExtendedProperties(msrest.serialization.Model): - """Extended Properties for Azure IaasVM Backup. - - :param disk_exclusion_properties: Extended Properties for Disk Exclusion. - :type disk_exclusion_properties: - ~azure.mgmt.recoveryservicesbackup.models.DiskExclusionProperties - """ - - _attribute_map = { - 'disk_exclusion_properties': {'key': 'diskExclusionProperties', 'type': 'DiskExclusionProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(ExtendedProperties, self).__init__(**kwargs) - self.disk_exclusion_properties = kwargs.get('disk_exclusion_properties', None) - - -class GenericContainer(ProtectionContainer): - """Base class for generic container of backup items. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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: - ~azure.mgmt.recoveryservicesbackup.models.GenericContainerExtendedInfo - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'fabric_name': {'key': 'fabricName', 'type': 'str'}, - 'extended_information': {'key': 'extendedInformation', 'type': 'GenericContainerExtendedInfo'}, - } - - def __init__( - self, - **kwargs - ): - super(GenericContainer, self).__init__(**kwargs) - self.container_type = 'GenericContainer' # type: str - self.fabric_name = kwargs.get('fabric_name', None) - self.extended_information = kwargs.get('extended_information', None) - - -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] - """ - - _attribute_map = { - 'raw_cert_data': {'key': 'rawCertData', 'type': 'str'}, - 'container_identity_info': {'key': 'containerIdentityInfo', 'type': 'ContainerIdentityInfo'}, - 'service_endpoints': {'key': 'serviceEndpoints', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - 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) - self.service_endpoints = kwargs.get('service_endpoints', None) - - -class GenericProtectedItem(ProtectedItem): - """Base class for backup items. - - 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 container. - :type friendly_name: str - :param 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", - "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 - protected item). - :type source_associations: dict[str, str] - :param fabric_name: Name of this backup item's fabric. - :type 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 - ): - 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 GenericProtectionPolicy(ProtectionPolicy): - """Azure VM (Mercury) workload-specific backup policy. - - 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 - 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 - retention. - :type sub_protection_policy: - list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] - :param 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 - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'fabric_name': {'key': 'fabricName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(GenericProtectionPolicy, self).__init__(**kwargs) - self.backup_management_type = 'GenericProtectionPolicy' # type: str - self.sub_protection_policy = kwargs.get('sub_protection_policy', None) - self.time_zone = kwargs.get('time_zone', 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. - - :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 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 - """ - - _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 - ): - 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 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 - """ - - _attribute_map = { - 'expand': {'key': 'expand', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(GetProtectedItemQueryObject, self).__init__(**kwargs) - self.expand = kwargs.get('expand', 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 - 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 - (UTC). - :type recovery_point_expiry_time_in_utc: ~datetime.datetime - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - 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) - - -class IaasVMILRRegistrationRequest(ILRRequest): - """Restore files/folders from a backup copy of IaaS VM. - - 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 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 / - 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 - server. - :type renew_existing_registration: bool - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - '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}'}, - } - - def __init__( - self, - **kwargs - ): - super(IaasVMRecoveryPoint, self).__init__(**kwargs) - self.object_type = 'IaasVMRecoveryPoint' # type: str - self.recovery_point_type = kwargs.get('recovery_point_type', None) - self.recovery_point_time = kwargs.get('recovery_point_time', None) - self.recovery_point_additional_info = kwargs.get('recovery_point_additional_info', None) - self.source_vm_storage_type = kwargs.get('source_vm_storage_type', None) - self.is_source_vm_encrypted = kwargs.get('is_source_vm_encrypted', None) - self.key_and_secret = kwargs.get('key_and_secret', None) - self.is_instant_ilr_session_active = kwargs.get('is_instant_ilr_session_active', None) - self.recovery_point_tier_details = kwargs.get('recovery_point_tier_details', None) - self.is_managed_virtual_machine = kwargs.get('is_managed_virtual_machine', None) - self.virtual_machine_size = kwargs.get('virtual_machine_size', None) - self.original_storage_account_option = kwargs.get('original_storage_account_option', None) - self.os_type = kwargs.get('os_type', None) - self.recovery_point_disk_configuration = kwargs.get('recovery_point_disk_configuration', None) - self.zones = kwargs.get('zones', None) - self.recovery_point_move_readiness_info = kwargs.get('recovery_point_move_readiness_info', None) - - -class IaasVMRecoveryPointAutoGenerated(RecoveryPoint): - """IaaS VM workload specific backup copy. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_type: Type of the backup copy. - :vartype recovery_point_type: str - :ivar recovery_point_time: Time at which this backup copy was created. - :vartype recovery_point_time: ~datetime.datetime - :ivar recovery_point_additional_info: Additional information associated with this backup copy. - :vartype recovery_point_additional_info: str - :ivar source_vm_storage_type: Storage type of the VM whose backup copy is created. - :vartype source_vm_storage_type: str - :ivar is_source_vm_encrypted: Identifies whether the VM was encrypted when the backup copy is - created. - :vartype is_source_vm_encrypted: bool - :param key_and_secret: Required details for recovering an encrypted VM. Applicable only when - IsSourceVMEncrypted is true. - :type key_and_secret: ~azure.mgmt.recoveryservicesbackup.models.KeyAndSecretDetails - :param is_instant_ilr_session_active: Is the session to recover items from this backup copy - still active. - :type is_instant_ilr_session_active: bool - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param is_managed_virtual_machine: Whether VM is with Managed Disks. - :type is_managed_virtual_machine: bool - :param virtual_machine_size: Virtual Machine Size. - :type virtual_machine_size: str - :param original_storage_account_option: Original Storage Account Option. - :type original_storage_account_option: bool - :param os_type: OS type. - :type os_type: str - :param recovery_point_disk_configuration: Disk configuration. - :type recovery_point_disk_configuration: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointDiskConfiguration - :param zones: Identifies the zone of the VM at the time of backup. Applicable only for - zone-pinned Vms. - :type zones: list[str] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_type': {'readonly': True}, - 'recovery_point_time': {'readonly': True}, - 'recovery_point_additional_info': {'readonly': True}, - 'source_vm_storage_type': {'readonly': True}, - 'is_source_vm_encrypted': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, - 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, - 'recovery_point_additional_info': {'key': 'recoveryPointAdditionalInfo', 'type': 'str'}, - 'source_vm_storage_type': {'key': 'sourceVMStorageType', 'type': 'str'}, - 'is_source_vm_encrypted': {'key': 'isSourceVMEncrypted', 'type': 'bool'}, - 'key_and_secret': {'key': 'keyAndSecret', 'type': 'KeyAndSecretDetails'}, - 'is_instant_ilr_session_active': {'key': 'isInstantIlrSessionActive', 'type': 'bool'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'is_managed_virtual_machine': {'key': 'isManagedVirtualMachine', 'type': 'bool'}, - 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, - 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'recovery_point_disk_configuration': {'key': 'recoveryPointDiskConfiguration', 'type': 'RecoveryPointDiskConfiguration'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - } - - def __init__( - self, - **kwargs - ): - super(IaasVMRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'IaasVMRecoveryPoint' # type: str - self.recovery_point_type = None - self.recovery_point_time = None - self.recovery_point_additional_info = None - self.source_vm_storage_type = None - self.is_source_vm_encrypted = None - self.key_and_secret = kwargs.get('key_and_secret', None) - self.is_instant_ilr_session_active = kwargs.get('is_instant_ilr_session_active', None) - self.recovery_point_tier_details = kwargs.get('recovery_point_tier_details', None) - self.is_managed_virtual_machine = kwargs.get('is_managed_virtual_machine', None) - self.virtual_machine_size = kwargs.get('virtual_machine_size', None) - self.original_storage_account_option = kwargs.get('original_storage_account_option', None) - self.os_type = kwargs.get('os_type', None) - self.recovery_point_disk_configuration = kwargs.get('recovery_point_disk_configuration', None) - self.zones = kwargs.get('zones', None) - self.recovery_point_move_readiness_info = kwargs.get('recovery_point_move_readiness_info', None) - - -class IaasVMRestoreRequest(RestoreRequest): - """IaaS VM workload-specific restore. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: IaasVMRestoreWithRehydrationRequest. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :param recovery_point_id: ID of the backup copy to be recovered. - :type recovery_point_id: str - :param recovery_type: Type of this recovery. Possible values include: "Invalid", - "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM which is being recovered. - :type source_resource_id: str - :param target_virtual_machine_id: This is the complete ARM Id of the VM that will be created. - For e.g. - /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param target_resource_group_id: This is the ARM Id of the resource group that you want to - create for this Virtual machine and other artifacts. - For e.g. /subscriptions/{subId}/resourcegroups/{rg}. - :type target_resource_group_id: str - :param storage_account_id: Fully qualified ARM ID of the storage account to which the VM has to - be restored. - :type storage_account_id: str - :param virtual_network_id: This is the virtual network Id of the vnet that will be attached to - the virtual machine. - User will be validated for join action permissions in the linked access. - :type virtual_network_id: str - :param subnet_id: Subnet ID, is the subnet ID associated with the to be restored VM. For - Classic VMs it would be - {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource - ID used to represent - the subnet. - :type subnet_id: str - :param target_domain_name_id: Fully qualified ARM ID of the domain name to be associated to the - VM being restored. This applies only to Classic - Virtual Machines. - :type target_domain_name_id: str - :param region: Region in which the virtual machine is restored. - :type region: str - :param affinity_group: Affinity group associated to VM to be restored. Used only for Classic - Compute Virtual Machines. - :type affinity_group: str - :param create_new_cloud_service: Should a new cloud service be created while restoring the VM. - If this is false, VM will be restored to the same - cloud service as it was at the time of backup. - :type create_new_cloud_service: bool - :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'}, - } - - _subtype_map = { - 'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'} - } - - def __init__( - self, - **kwargs - ): - super(IaasVMRestoreRequest, self).__init__(**kwargs) - self.object_type = 'IaasVMRestoreRequest' # type: str - self.recovery_point_id = kwargs.get('recovery_point_id', None) - self.recovery_type = kwargs.get('recovery_type', None) - self.source_resource_id = kwargs.get('source_resource_id', None) - self.target_virtual_machine_id = kwargs.get('target_virtual_machine_id', None) - self.target_resource_group_id = kwargs.get('target_resource_group_id', None) - self.storage_account_id = kwargs.get('storage_account_id', None) - self.virtual_network_id = kwargs.get('virtual_network_id', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.target_domain_name_id = kwargs.get('target_domain_name_id', None) - self.region = kwargs.get('region', None) - self.affinity_group = kwargs.get('affinity_group', None) - self.create_new_cloud_service = kwargs.get('create_new_cloud_service', None) - 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) - - -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) - - -class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest): - """IaaS VM workload-specific restore with integrated rehydration of recovery point. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. 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 recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, - 'region': {'key': 'region', 'type': 'str'}, - 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, - 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, - 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, - 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, - 'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'}, - 'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'}, - 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'}, - 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, - } - - def __init__( - self, - **kwargs - ): - super(IaasVMRestoreWithRehydrationRequest, self).__init__(**kwargs) - self.object_type = 'IaasVMRestoreWithRehydrationRequest' # type: str - self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) - - -class IdentityBasedRestoreDetails(msrest.serialization.Model): - """IaaS VM workload specific restore details for restores using managed identity. - - :param object_type: Gets the class type. - :type object_type: str - :param target_storage_account_id: Fully qualified ARM ID of the target storage account. - :type target_storage_account_id: str - """ - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'target_storage_account_id': {'key': 'targetStorageAccountId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IdentityBasedRestoreDetails, self).__init__(**kwargs) - self.object_type = kwargs.get('object_type', None) - self.target_storage_account_id = kwargs.get('target_storage_account_id', None) - - -class IdentityInfo(msrest.serialization.Model): - """Encapsulates Managed Identity related information. - - :param 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 - Optional: Might not be required in the case of system assigned managed identity. - :type 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 - ): - 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 ILRRequestResource(Resource): - """Parameters to Provision ILR API. - - 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: ILRRequestResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ILRRequest - """ - - _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': 'ILRRequest'}, - } - - def __init__( - self, - **kwargs - ): - super(ILRRequestResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class InquiryInfo(msrest.serialization.Model): - """Details about inquired protectable items under a given container. - - :param 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. - For e.g. - For SQL and oracle this will contain different details. - :type inquiry_details: list[~azure.mgmt.recoveryservicesbackup.models.WorkloadInquiryDetails] - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, - 'inquiry_details': {'key': 'inquiryDetails', 'type': '[WorkloadInquiryDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(InquiryInfo, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.error_detail = kwargs.get('error_detail', None) - self.inquiry_details = kwargs.get('inquiry_details', None) - - -class InquiryValidation(msrest.serialization.Model): - """Validation for inquired protectable items under a given container. - - 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 additional_detail: Error Additional Detail in case the status is non-success. - :vartype additional_detail: str - """ - - _validation = { - 'additional_detail': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, - 'additional_detail': {'key': 'additionalDetail', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(InquiryValidation, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.error_detail = kwargs.get('error_detail', None) - self.additional_detail = None - - -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] - """ - - _attribute_map = { - 'client_scripts': {'key': 'clientScripts', 'type': '[ClientScriptForConnect]'}, - } - - def __init__( - self, - **kwargs - ): - super(InstantItemRecoveryTarget, self).__init__(**kwargs) - self.client_scripts = kwargs.get('client_scripts', None) - - -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 - """ - - _attribute_map = { - 'azure_backup_rg_name_prefix': {'key': 'azureBackupRGNamePrefix', 'type': 'str'}, - 'azure_backup_rg_name_suffix': {'key': 'azureBackupRGNameSuffix', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - 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) - - -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: - "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", - "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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 - """ - - _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 - ): - 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 - :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 - """ - - _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 - ): - super(JobResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[JobResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(JobResourceList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -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 - """ - - _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 - ): - 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. - - :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 - """ - - _attribute_map = { - 'kek_details': {'key': 'kekDetails', 'type': 'KEKDetails'}, - 'bek_details': {'key': 'bekDetails', 'type': 'BEKDetails'}, - 'encryption_mechanism': {'key': 'encryptionMechanism', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - 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. - - :param resource_health_status: Resource Health Status. Possible values include: "Healthy", - "TransientDegraded", "PersistentDegraded", "TransientUnhealthy", "PersistentUnhealthy", - "Invalid". - :type resource_health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.ResourceHealthStatus - :param resource_health_details: Resource Health Status. - :type resource_health_details: - list[~azure.mgmt.recoveryservicesbackup.models.ResourceHealthDetails] - """ - - _attribute_map = { - 'resource_health_status': {'key': 'resourceHealthStatus', 'type': 'str'}, - 'resource_health_details': {'key': 'resourceHealthDetails', 'type': '[ResourceHealthDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(KPIResourceHealthDetails, self).__init__(**kwargs) - self.resource_health_status = kwargs.get('resource_health_status', None) - self.resource_health_details = kwargs.get('resource_health_details', None) - - -class 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] - """ - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'excluded_rp_list': {'key': 'excludedRPList', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(ListRecoveryPointsRecommendedForMoveRequest, self).__init__(**kwargs) - self.object_type = kwargs.get('object_type', None) - self.excluded_rp_list = kwargs.get('excluded_rp_list', None) - - -class SchedulePolicy(msrest.serialization.Model): - """Base class for backup schedule. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LogSchedulePolicy, LongTermSchedulePolicy, SimpleSchedulePolicy. - - 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 - deciding the specific types in the polymorphic chain of types.Constant filled by server. - :type schedule_policy_type: str - """ - - _validation = { - 'schedule_policy_type': {'required': True}, - } - - _attribute_map = { - 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, - } - - _subtype_map = { - 'schedule_policy_type': {'LogSchedulePolicy': 'LogSchedulePolicy', 'LongTermSchedulePolicy': 'LongTermSchedulePolicy', 'SimpleSchedulePolicy': 'SimpleSchedulePolicy'} - } - - def __init__( - self, - **kwargs - ): - super(SchedulePolicy, self).__init__(**kwargs) - self.schedule_policy_type = None # type: Optional[str] - - -class LogSchedulePolicy(SchedulePolicy): - """Log policy schedule. - - 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 - 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 - minutes. - :type schedule_frequency_in_mins: int - """ - - _validation = { - 'schedule_policy_type': {'required': True}, - } - - _attribute_map = { - 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, - 'schedule_frequency_in_mins': {'key': 'scheduleFrequencyInMins', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(LogSchedulePolicy, self).__init__(**kwargs) - self.schedule_policy_type = 'LogSchedulePolicy' # type: str - self.schedule_frequency_in_mins = kwargs.get('schedule_frequency_in_mins', None) - - -class RetentionPolicy(msrest.serialization.Model): - """Base class for retention policy. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LongTermRetentionPolicy, SimpleRetentionPolicy. - - 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 - deciding the specific types in the polymorphic chain of types.Constant filled by server. - :type retention_policy_type: str - """ - - _validation = { - 'retention_policy_type': {'required': True}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, - } - - _subtype_map = { - 'retention_policy_type': {'LongTermRetentionPolicy': 'LongTermRetentionPolicy', 'SimpleRetentionPolicy': 'SimpleRetentionPolicy'} - } - - def __init__( - self, - **kwargs - ): - super(RetentionPolicy, self).__init__(**kwargs) - self.retention_policy_type = None # type: Optional[str] - - -class LongTermRetentionPolicy(RetentionPolicy): - """Long term retention policy. - - 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 - 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 - """ - - _validation = { - 'retention_policy_type': {'required': True}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, - 'daily_schedule': {'key': 'dailySchedule', 'type': 'DailyRetentionSchedule'}, - 'weekly_schedule': {'key': 'weeklySchedule', 'type': 'WeeklyRetentionSchedule'}, - 'monthly_schedule': {'key': 'monthlySchedule', 'type': 'MonthlyRetentionSchedule'}, - 'yearly_schedule': {'key': 'yearlySchedule', 'type': 'YearlyRetentionSchedule'}, - } - - def __init__( - self, - **kwargs - ): - super(LongTermRetentionPolicy, self).__init__(**kwargs) - self.retention_policy_type = 'LongTermRetentionPolicy' # type: str - self.daily_schedule = kwargs.get('daily_schedule', None) - self.weekly_schedule = kwargs.get('weekly_schedule', None) - self.monthly_schedule = kwargs.get('monthly_schedule', None) - self.yearly_schedule = kwargs.get('yearly_schedule', None) - - -class LongTermSchedulePolicy(SchedulePolicy): - """Long term policy schedule. - - 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 - deciding the specific types in the polymorphic chain of types.Constant filled by server. - :type schedule_policy_type: str - """ - - _validation = { - 'schedule_policy_type': {'required': True}, - } - - _attribute_map = { - 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LongTermSchedulePolicy, self).__init__(**kwargs) - self.schedule_policy_type = 'LongTermSchedulePolicy' # type: str - - -class MabContainer(ProtectionContainer): - """Container with items backed up using MAB backup engine. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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: - list[~azure.mgmt.recoveryservicesbackup.models.MABContainerHealthDetails] - :param container_health_state: Health state of mab container. - :type container_health_state: str - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, - 'container_id': {'key': 'containerId', 'type': 'long'}, - 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, - 'agent_version': {'key': 'agentVersion', 'type': 'str'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'MabContainerExtendedInfo'}, - 'mab_container_health_details': {'key': 'mabContainerHealthDetails', 'type': '[MABContainerHealthDetails]'}, - 'container_health_state': {'key': 'containerHealthState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(MabContainer, self).__init__(**kwargs) - self.container_type = 'Windows' # type: str - self.can_re_register = kwargs.get('can_re_register', None) - self.container_id = kwargs.get('container_id', None) - self.protected_item_count = kwargs.get('protected_item_count', None) - self.agent_version = kwargs.get('agent_version', None) - self.extended_info = kwargs.get('extended_info', None) - self.mab_container_health_details = kwargs.get('mab_container_health_details', None) - self.container_health_state = kwargs.get('container_health_state', None) - - -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 - 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 - """ - - _attribute_map = { - 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, - 'backup_item_type': {'key': 'backupItemType', 'type': 'str'}, - 'backup_items': {'key': 'backupItems', 'type': '[str]'}, - 'policy_name': {'key': 'policyName', 'type': 'str'}, - 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - 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) - self.backup_items = kwargs.get('backup_items', None) - self.policy_name = kwargs.get('policy_name', None) - self.last_backup_status = kwargs.get('last_backup_status', None) - - -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] - """ - - _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(MABContainerHealthDetails, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.title = kwargs.get('title', None) - self.message = kwargs.get('message', None) - self.recommendations = kwargs.get('recommendations', 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. - - :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 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: - ~azure.mgmt.recoveryservicesbackup.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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.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 - 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", - "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", - "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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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 MabProtectionPolicy(ProtectionPolicy): - """Mab container-specific backup policy. - - 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 - 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 - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, - 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, - } - - def __init__( - self, - **kwargs - ): - super(MabProtectionPolicy, self).__init__(**kwargs) - self.backup_management_type = 'MAB' # type: str - self.schedule_policy = kwargs.get('schedule_policy', None) - self.retention_policy = kwargs.get('retention_policy', None) - - -class MonthlyRetentionSchedule(msrest.serialization.Model): - """Monthly retention schedule. - - :param 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 - ~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: - ~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 - """ - - _attribute_map = { - 'retention_schedule_format_type': {'key': 'retentionScheduleFormatType', 'type': 'str'}, - 'retention_schedule_daily': {'key': 'retentionScheduleDaily', 'type': 'DailyRetentionFormat'}, - 'retention_schedule_weekly': {'key': 'retentionScheduleWeekly', 'type': 'WeeklyRetentionFormat'}, - 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, - 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, - } - - def __init__( - self, - **kwargs - ): - 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) - self.retention_schedule_weekly = kwargs.get('retention_schedule_weekly', None) - self.retention_times = kwargs.get('retention_times', None) - self.retention_duration = kwargs.get('retention_duration', None) - - -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: - "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". - :type source_tier_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType - :param target_tier_type: Target tier where RP needs to be moved. Possible values include: - "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". - :type target_tier_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType - """ - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'source_tier_type': {'key': 'sourceTierType', 'type': 'str'}, - 'target_tier_type': {'key': 'targetTierType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(MoveRPAcrossTiersRequest, self).__init__(**kwargs) - self.object_type = kwargs.get('object_type', None) - self.source_tier_type = kwargs.get('source_tier_type', None) - self.target_tier_type = kwargs.get('target_tier_type', None) - - -class NameInfo(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 - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - 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. - - :param error: The error object. - :type error: ~azure.mgmt.recoveryservicesbackup.models.NewErrorResponseError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'NewErrorResponseError'}, - } - - def __init__( - self, - **kwargs - ): - super(NewErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class 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. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.recoveryservicesbackup.models.NewErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.recoveryservicesbackup.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[NewErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(NewErrorResponseError, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class 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 - 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] - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'job_list': {'key': 'jobList', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationResultInfo, self).__init__(**kwargs) - self.object_type = 'OperationResultInfo' # type: str - self.job_list = kwargs.get('job_list', None) - - -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", - "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". - :type status_code: str or ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode - :param headers: HTTP headers associated with this operation. - :type headers: dict[str, list[str]] - """ - - _attribute_map = { - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'headers': {'key': 'headers', 'type': '{[str]}'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationWorkerResponse, self).__init__(**kwargs) - self.status_code = kwargs.get('status_code', None) - self.headers = kwargs.get('headers', None) - - -class OperationResultInfoBaseResource(OperationWorkerResponse): - """Base class for operation result info. - - :param 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". - :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 - """ - - _attribute_map = { - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'headers': {'key': 'headers', 'type': '{[str]}'}, - 'operation': {'key': 'operation', 'type': 'OperationResultInfoBase'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationResultInfoBaseResource, self).__init__(**kwargs) - self.operation = kwargs.get('operation', None) - - -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", - "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 - """ - - _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 - ): - 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. - - :param code: Error code of the operation failure. - :type code: str - :param message: Error message displayed if the operation failure. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - 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. - - :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 - """ - - _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. - - :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 job_id: ID of the job created for this protected item. - :type 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 - ): - 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. - - :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 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] - """ - - _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 - ): - 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. - - :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_target: Target details for file / folder restore. - :type recovery_target: ~azure.mgmt.recoveryservicesbackup.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 - ): - 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. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :param updated_recovery_point: Recovery Point info with updated source snapshot URI. - :type updated_recovery_point: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPoint - :param deleted_backup_item_version: In case the share is in soft-deleted state, populate this - field with deleted backup item. - :type deleted_backup_item_version: str - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'updated_recovery_point': {'key': 'updatedRecoveryPoint', 'type': 'RecoveryPoint'}, - 'deleted_backup_item_version': {'key': 'deletedBackupItemVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationStatusRecoveryPointExtendedInfo, self).__init__(**kwargs) - self.object_type = 'OperationStatusRecoveryPointExtendedInfo' # type: str - self.updated_recovery_point = kwargs.get('updated_recovery_point', None) - self.deleted_backup_item_version = kwargs.get('deleted_backup_item_version', None) - - -class PointInTimeRange(msrest.serialization.Model): - """Provides details for log ranges. - - :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 - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(PointInTimeRange, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - - -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 - 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 - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PreBackupValidation, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - - -class PrepareDataMoveRequest(msrest.serialization.Model): - """Prepare DataMove Request. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. ARM Id of target vault. - :type target_resource_id: str - :param target_region: Required. Target Region. - :type target_region: str - :param data_move_level: Required. DataMove Level. Possible values include: "Invalid", "Vault", - "Container". - :type data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel - :param source_container_arm_ids: Source Container ArmIds - This needs to be populated only if DataMoveLevel is set to container. - :type source_container_arm_ids: list[str] - :param ignore_moved: Ignore the artifacts which are already moved. - :type ignore_moved: bool - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'target_region': {'required': True}, - 'data_move_level': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'target_region': {'key': 'targetRegion', 'type': 'str'}, - 'data_move_level': {'key': 'dataMoveLevel', 'type': 'str'}, - 'source_container_arm_ids': {'key': 'sourceContainerArmIds', 'type': '[str]'}, - 'ignore_moved': {'key': 'ignoreMoved', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(PrepareDataMoveRequest, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - self.target_region = kwargs['target_region'] - self.data_move_level = kwargs['data_move_level'] - self.source_container_arm_ids = kwargs.get('source_container_arm_ids', None) - self.ignore_moved = kwargs.get('ignore_moved', None) - - -class VaultStorageConfigOperationResultResponse(msrest.serialization.Model): - """Operation result response for Vault Storage Config. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PrepareDataMoveResponse. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. 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': {'PrepareDataMoveResponse': 'PrepareDataMoveResponse'} - } - - def __init__( - self, - **kwargs - ): - super(VaultStorageConfigOperationResultResponse, self).__init__(**kwargs) - self.object_type = None # type: Optional[str] - - -class PrepareDataMoveResponse(VaultStorageConfigOperationResultResponse): - """Prepare DataMove Response. - - 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 correlation_id: Co-relationId for move operation. - :type correlation_id: str - :param source_vault_properties: Source Vault Properties. - :type source_vault_properties: dict[str, str] - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'source_vault_properties': {'key': 'sourceVaultProperties', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(PrepareDataMoveResponse, self).__init__(**kwargs) - self.object_type = 'PrepareDataMoveResponse' # type: str - self.correlation_id = kwargs.get('correlation_id', None) - self.source_vault_properties = kwargs.get('source_vault_properties', None) - - -class PreValidateEnableBackupRequest(msrest.serialization.Model): - """Contract to validate if backup can be enabled on the given resource in a given vault and given configuration. -It will validate followings - - -#. Vault capacity -#. VM is already protected -#. Any VM related configuration passed in properties. - - :param 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 - """ - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'vault_id': {'key': 'vaultId', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PreValidateEnableBackupRequest, self).__init__(**kwargs) - self.resource_type = kwargs.get('resource_type', None) - self.resource_id = kwargs.get('resource_id', None) - self.vault_id = kwargs.get('vault_id', None) - self.properties = kwargs.get('properties', None) - - -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. - 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. - vm;iaasvmcontainer;rgname;vmname. This is required for portal. - :type protected_item_name: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error_code': {'key': 'errorCode', 'type': 'str'}, - 'error_message': {'key': 'errorMessage', 'type': 'str'}, - 'recommendation': {'key': 'recommendation', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PreValidateEnableBackupResponse, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.error_code = kwargs.get('error_code', None) - self.error_message = kwargs.get('error_message', None) - self.recommendation = kwargs.get('recommendation', None) - self.container_name = kwargs.get('container_name', None) - self.protected_item_name = kwargs.get('protected_item_name', None) - - -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 - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class PrivateEndpointConnection(msrest.serialization.Model): - """Private Endpoint Connection Response Properties. - - :param 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 - connection. - :type private_endpoint: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpoint - :param private_link_service_connection_state: Gets or sets private link service connection - state. - :type private_link_service_connection_state: - ~azure.mgmt.recoveryservicesbackup.models.PrivateLinkServiceConnectionState - """ - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__( - self, - **kwargs - ): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - - -class PrivateEndpointConnectionResource(Resource): - """Private Endpoint Connection Response Properties. - - 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: PrivateEndpointConnectionResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnection - """ - - _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': 'PrivateEndpointConnection'}, - } - - def __init__( - self, - **kwargs - ): - super(PrivateEndpointConnectionResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class PrivateLinkServiceConnectionState(msrest.serialization.Model): - """Private Link Service Connection State. - - :param 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 - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'action_required': {'key': 'actionRequired', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - self.action_required = kwargs.get('action_required', None) - - -class ProtectableContainerResource(Resource): - """Protectable Container 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 - :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 - """ - - _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': 'ProtectableContainer'}, - } - - def __init__( - self, - **kwargs - ): - super(ProtectableContainerResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ProtectableContainerResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProtectableContainerResourceList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class ProtectedItemQueryObject(msrest.serialization.Model): - """Filters to list backup items. - - :param 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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 - """ - - _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 - ): - 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 - :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 - """ - - _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 - ): - super(ProtectedItemResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ProtectedItemResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProtectedItemResourceList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class ProtectionContainerResource(Resource): - """Base class for container with backup items. Containers with specific workloads 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 - :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 - """ - - _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': 'ProtectionContainer'}, - } - - def __init__( - self, - **kwargs - ): - super(ProtectionContainerResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ProtectionContainerResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProtectionContainerResourceList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class ProtectionIntentQueryObject(msrest.serialization.Model): - """Filters to list protection intent. - - :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 - :param 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 - """ - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'item_type': {'key': 'itemType', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'item_name': {'key': 'itemName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ProtectionIntentQueryObject, self).__init__(**kwargs) - self.backup_management_type = kwargs.get('backup_management_type', None) - self.item_type = kwargs.get('item_type', None) - self.parent_name = kwargs.get('parent_name', None) - self.item_name = kwargs.get('item_name', None) - - -class ProtectionIntentResource(Resource): - """Base class for backup ProtectionIntent. - - 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: ProtectionIntentResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntent - """ - - _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': 'ProtectionIntent'}, - } - - def __init__( - self, - **kwargs - ): - super(ProtectionIntentResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ProtectionIntentResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProtectionIntentResourceList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class ProtectionPolicyQueryObject(msrest.serialization.Model): - """Filters the list backup policies API. - - :param 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 - ~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", - "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", - "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", - "SAPAseDatabase". - :type workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType - """ - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'fabric_name': {'key': 'fabricName', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ProtectionPolicyQueryObject, self).__init__(**kwargs) - self.backup_management_type = kwargs.get('backup_management_type', None) - self.fabric_name = kwargs.get('fabric_name', None) - self.workload_type = kwargs.get('workload_type', None) - - -class ProtectionPolicyResource(Resource): - """Base class for backup policy. Workload-specific backup policies 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 - :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 - """ - - _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': 'ProtectionPolicy'}, - } - - def __init__( - self, - **kwargs - ): - super(ProtectionPolicyResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ProtectionPolicyResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProtectionPolicyResourceList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -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] - """ - - _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 - ): - 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. - - :param is_ready_for_move: - :type is_ready_for_move: bool - :param additional_info: - :type additional_info: str - """ - - _attribute_map = { - 'is_ready_for_move': {'key': 'isReadyForMove', 'type': 'bool'}, - 'additional_info': {'key': 'additionalInfo', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RecoveryPointMoveReadinessInfo, self).__init__(**kwargs) - self.is_ready_for_move = kwargs.get('is_ready_for_move', None) - self.additional_info = kwargs.get('additional_info', None) - - -class RecoveryPointRehydrationInfo(msrest.serialization.Model): - """RP Rehydration Info. - - :param rehydration_retention_duration: How long the rehydrated RP should be kept - Should be ISO8601 Duration format e.g. "P7D". - :type rehydration_retention_duration: str - :param rehydration_priority: Rehydration Priority. Possible values include: "Standard", "High". - :type rehydration_priority: str or - ~azure.mgmt.recoveryservicesbackup.models.RehydrationPriority - """ - - _attribute_map = { - 'rehydration_retention_duration': {'key': 'rehydrationRetentionDuration', 'type': 'str'}, - 'rehydration_priority': {'key': 'rehydrationPriority', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RecoveryPointRehydrationInfo, self).__init__(**kwargs) - self.rehydration_retention_duration = kwargs.get('rehydration_retention_duration', None) - self.rehydration_priority = kwargs.get('rehydration_priority', None) - - -class RecoveryPointResource(Resource): - """Base class for backup copies. Workload-specific backup copies are derived from this class. - - 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: RecoveryPointResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.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 - ): - super(RecoveryPointResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[RecoveryPointResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(RecoveryPointResourceList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class RecoveryPointTierInformation(msrest.serialization.Model): - """Recovery point tier information. - - :param 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", - "Disabled", "Deleted", "Rehydrated". - :type status: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus - :param extended_info: Recovery point tier status. - :type extended_info: dict[str, str] - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'extended_info': {'key': 'extendedInfo', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(RecoveryPointTierInformation, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.status = kwargs.get('status', None) - self.extended_info = kwargs.get('extended_info', None) - - -class ResourceGuardOperationDetail(msrest.serialization.Model): - """ResourceGuardOperationDetail. - - :param vault_critical_operation: - :type vault_critical_operation: str - :param default_resource_request: - :type default_resource_request: str - """ - - _attribute_map = { - 'vault_critical_operation': {'key': 'vaultCriticalOperation', 'type': 'str'}, - 'default_resource_request': {'key': 'defaultResourceRequest', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - 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) - - -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: - list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardOperationDetail] - :param last_updated_time: - :type last_updated_time: str - :param description: - :type description: str - """ - - _attribute_map = { - 'resource_guard_resource_id': {'key': 'resourceGuardResourceId', 'type': 'str'}, - 'resource_guard_operation_details': {'key': 'resourceGuardOperationDetails', 'type': '[ResourceGuardOperationDetail]'}, - 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - 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) - self.last_updated_time = kwargs.get('last_updated_time', None) - self.description = kwargs.get('description', None) - - -class ResourceGuardProxyBaseResource(Resource): - """ResourceGuardProxyBaseResource. - - 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: ResourceGuardProxyBaseResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBase - """ - - _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': 'ResourceGuardProxyBase'}, - } - - def __init__( - self, - **kwargs - ): - super(ResourceGuardProxyBaseResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ResourceGuardProxyBaseResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ResourceGuardProxyBaseResourceList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -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 - """ - - _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 - ): - 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 RestoreRequestResource(Resource): - """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. - - :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: RestoreRequestResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest - """ - - _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': 'RestoreRequest'}, - } - - def __init__( - self, - **kwargs - ): - super(RestoreRequestResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class RetentionDuration(msrest.serialization.Model): - """Retention duration. - - :param 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: - "Invalid", "Days", "Weeks", "Months", "Years". - :type duration_type: str or ~azure.mgmt.recoveryservicesbackup.models.RetentionDurationType - """ - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'duration_type': {'key': 'durationType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RetentionDuration, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.duration_type = kwargs.get('duration_type', None) - - -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] - """ - - _attribute_map = { - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityPinBase, self).__init__(**kwargs) - self.resource_guard_operation_requests = kwargs.get('resource_guard_operation_requests', None) - - -class Settings(msrest.serialization.Model): - """Common settings field for backup management. - - :param 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' - will be deprecated once clients upgrade to consider this flag. - :type is_compression: bool - """ - - _attribute_map = { - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'issqlcompression': {'key': 'issqlcompression', 'type': 'bool'}, - 'is_compression': {'key': 'isCompression', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(Settings, self).__init__(**kwargs) - self.time_zone = kwargs.get('time_zone', None) - self.issqlcompression = kwargs.get('issqlcompression', None) - self.is_compression = kwargs.get('is_compression', None) - - -class SimpleRetentionPolicy(RetentionPolicy): - """Simple policy retention. - - 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 - 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 - """ - - _validation = { - 'retention_policy_type': {'required': True}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, - 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, - } - - def __init__( - self, - **kwargs - ): - super(SimpleRetentionPolicy, self).__init__(**kwargs) - self.retention_policy_type = 'SimpleRetentionPolicy' # type: str - self.retention_duration = kwargs.get('retention_duration', None) - - -class SimpleSchedulePolicy(SchedulePolicy): - """Simple policy schedule. - - 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 - 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 - """ - - _validation = { - 'schedule_policy_type': {'required': True}, - } - - _attribute_map = { - 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, - 'schedule_run_frequency': {'key': 'scheduleRunFrequency', 'type': 'str'}, - 'schedule_run_days': {'key': 'scheduleRunDays', 'type': '[str]'}, - 'schedule_run_times': {'key': 'scheduleRunTimes', 'type': '[iso-8601]'}, - 'schedule_weekly_frequency': {'key': 'scheduleWeeklyFrequency', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - 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.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 - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, - 'logical_name': {'key': 'logicalName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - 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. - - :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 - """ - - _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 - ): - 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 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", - "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 - """ - - _attribute_map = { - 'policy_type': {'key': 'policyType', 'type': 'str'}, - 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, - 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, - } - - def __init__( - self, - **kwargs - ): - super(SubProtectionPolicy, self).__init__(**kwargs) - self.policy_type = kwargs.get('policy_type', None) - self.schedule_policy = kwargs.get('schedule_policy', None) - self.retention_policy = kwargs.get('retention_policy', None) - - -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 - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - 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. - - :param 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 - 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 - """ - - _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 - ): - 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 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 - """ - - _attribute_map = { - 'token': {'key': 'token', 'type': 'str'}, - 'expiry_time_in_utc_ticks': {'key': 'expiryTimeInUtcTicks', 'type': 'long'}, - 'security_pin': {'key': 'securityPIN', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - 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) - self.security_pin = kwargs.get('security_pin', None) - - -class TriggerDataMoveRequest(msrest.serialization.Model): - """Trigger DataMove Request. - - All required parameters must be populated in order to send to Azure. - - :param source_resource_id: Required. ARM Id of source vault. - :type source_resource_id: str - :param source_region: Required. Source Region. - :type source_region: str - :param data_move_level: Required. DataMove Level. Possible values include: "Invalid", "Vault", - "Container". - :type data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel - :param correlation_id: Required. Correlation Id. - :type correlation_id: str - :param source_container_arm_ids: Source Container ArmIds. - :type source_container_arm_ids: list[str] - :param pause_gc: Pause GC. - :type pause_gc: bool - """ - - _validation = { - 'source_resource_id': {'required': True}, - 'source_region': {'required': True}, - 'data_move_level': {'required': True}, - 'correlation_id': {'required': True}, - } - - _attribute_map = { - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'source_region': {'key': 'sourceRegion', 'type': 'str'}, - 'data_move_level': {'key': 'dataMoveLevel', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'source_container_arm_ids': {'key': 'sourceContainerArmIds', 'type': '[str]'}, - 'pause_gc': {'key': 'pauseGC', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(TriggerDataMoveRequest, self).__init__(**kwargs) - self.source_resource_id = kwargs['source_resource_id'] - self.source_region = kwargs['source_region'] - self.data_move_level = kwargs['data_move_level'] - self.correlation_id = kwargs['correlation_id'] - self.source_container_arm_ids = kwargs.get('source_container_arm_ids', None) - self.pause_gc = kwargs.get('pause_gc', None) - - -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 - """ - - _attribute_map = { - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'resource_to_be_deleted': {'key': 'resourceToBeDeleted', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - 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) - - -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 - expired. - :type unlock_delete_expiry_time: str - """ - - _attribute_map = { - 'unlock_delete_expiry_time': {'key': 'unlockDeleteExpiryTime', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(UnlockDeleteResponse, self).__init__(**kwargs) - self.unlock_delete_expiry_time = kwargs.get('unlock_delete_expiry_time', None) - - -class ValidateOperationRequest(msrest.serialization.Model): - """Base class for validate operation request. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: 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 - 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': {'ValidateRestoreOperationRequest': 'ValidateRestoreOperationRequest'} - } - - def __init__( - self, - **kwargs - ): - super(ValidateOperationRequest, self).__init__(**kwargs) - self.object_type = None # type: Optional[str] - - -class ValidateRestoreOperationRequest(ValidateOperationRequest): - """AzureRestoreValidation request. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ValidateIaasVMRestoreOperationRequest. - - 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 restore_request: Sets restore request to be validated. - :type restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'restore_request': {'key': 'restoreRequest', 'type': 'RestoreRequest'}, - } - - _subtype_map = { - 'object_type': {'ValidateIaasVMRestoreOperationRequest': 'ValidateIaasVMRestoreOperationRequest'} - } - - def __init__( - self, - **kwargs - ): - super(ValidateRestoreOperationRequest, self).__init__(**kwargs) - self.object_type = 'ValidateRestoreOperationRequest' # type: str - self.restore_request = kwargs.get('restore_request', None) - - -class ValidateIaasVMRestoreOperationRequest(ValidateRestoreOperationRequest): - """AzureRestoreValidation 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 restore_request: Sets restore request to be validated. - :type restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'restore_request': {'key': 'restoreRequest', 'type': 'RestoreRequest'}, - } - - def __init__( - self, - **kwargs - ): - super(ValidateIaasVMRestoreOperationRequest, self).__init__(**kwargs) - self.object_type = 'ValidateIaasVMRestoreOperationRequest' # type: str - - -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] - """ - - _attribute_map = { - 'validation_results': {'key': 'validationResults', 'type': '[ErrorDetail]'}, - } - - def __init__( - self, - **kwargs - ): - super(ValidateOperationResponse, self).__init__(**kwargs) - self.validation_results = kwargs.get('validation_results', None) - - -class ValidateOperationsResponse(msrest.serialization.Model): - """ValidateOperationsResponse. - - :param validate_operation_response: Base class for validate operation response. - :type validate_operation_response: - ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationResponse - """ - - _attribute_map = { - 'validate_operation_response': {'key': 'validateOperationResponse', 'type': 'ValidateOperationResponse'}, - } - - def __init__( - self, - **kwargs - ): - super(ValidateOperationsResponse, self).__init__(**kwargs) - self.validate_operation_response = kwargs.get('validate_operation_response', None) - - -class VaultJob(Job): - """Vault level Job. - - All required parameters must be populated in order to send to Azure. - - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.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 - 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 - """ - - _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': '[VaultJobErrorInfo]'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'VaultJobExtendedInfo'}, - } - - def __init__( - self, - **kwargs - ): - super(VaultJob, self).__init__(**kwargs) - self.job_type = 'VaultJob' # 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.extended_info = kwargs.get('extended_info', None) - - -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] - """ - - _attribute_map = { - 'error_code': {'key': 'errorCode', 'type': 'int'}, - 'error_string': {'key': 'errorString', 'type': 'str'}, - 'recommendations': {'key': 'recommendations', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(VaultJobErrorInfo, self).__init__(**kwargs) - self.error_code = kwargs.get('error_code', None) - self.error_string = kwargs.get('error_string', None) - self.recommendations = kwargs.get('recommendations', None) - - -class VaultJobExtendedInfo(msrest.serialization.Model): - """Vault Job for CMK - has CMK specific info. - - :param property_bag: Job properties. - :type property_bag: dict[str, str] - """ - - _attribute_map = { - 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(VaultJobExtendedInfo, self).__init__(**kwargs) - self.property_bag = kwargs.get('property_bag', None) - - -class WeeklyRetentionFormat(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] - """ - - _attribute_map = { - 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[str]'}, - 'weeks_of_the_month': {'key': 'weeksOfTheMonth', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - 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) - - -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 - """ - - _attribute_map = { - 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[str]'}, - 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, - 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, - } - - def __init__( - self, - **kwargs - ): - 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 - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'item_count': {'key': 'itemCount', 'type': 'long'}, - 'inquiry_validation': {'key': 'inquiryValidation', 'type': 'InquiryValidation'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadInquiryDetails, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.item_count = kwargs.get('item_count', None) - self.inquiry_validation = kwargs.get('inquiry_validation', None) - - -class WorkloadItemResource(Resource): - """Base class for backup item. Workload-specific backup items 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 - :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 - """ - - _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': 'WorkloadItem'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadItemResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[WorkloadItemResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadItemResourceList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class WorkloadProtectableItemResource(Resource): - """Base class for backup item. Workload-specific backup items 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 - :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 - """ - - _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': 'WorkloadProtectableItem'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadProtectableItemResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[WorkloadProtectableItemResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkloadProtectableItemResourceList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class YearlyRetentionSchedule(msrest.serialization.Model): - """Yearly retention schedule. - - :param retention_schedule_format_type: Retention schedule format for yearly retention policy. - Possible values include: "Invalid", "Daily", "Weekly". - :type 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: - ~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 - """ - - _attribute_map = { - 'retention_schedule_format_type': {'key': 'retentionScheduleFormatType', 'type': 'str'}, - 'months_of_year': {'key': 'monthsOfYear', 'type': '[str]'}, - 'retention_schedule_daily': {'key': 'retentionScheduleDaily', 'type': 'DailyRetentionFormat'}, - 'retention_schedule_weekly': {'key': 'retentionScheduleWeekly', 'type': 'WeeklyRetentionFormat'}, - 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, - 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, - } - - def __init__( - self, - **kwargs - ): - 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) - self.retention_schedule_daily = kwargs.get('retention_schedule_daily', None) - self.retention_schedule_weekly = kwargs.get('retention_schedule_weekly', None) - self.retention_times = kwargs.get('retention_times', None) - self.retention_duration = kwargs.get('retention_duration', 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 deleted file mode 100644 index 73c58d14c797..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models_py3.py +++ /dev/null @@ -1,15883 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import datetime -from typing import Dict, List, Optional, Union - -from azure.core.exceptions import HttpResponseError -import msrest.serialization - -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. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureBackupGoalFeatureSupportRequest, AzureVMResourceFeatureSupportRequest. - - 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 - """ - - _validation = { - 'feature_type': {'required': True}, - } - - _attribute_map = { - 'feature_type': {'key': 'featureType', 'type': 'str'}, - } - - _subtype_map = { - 'feature_type': {'AzureBackupGoals': 'AzureBackupGoalFeatureSupportRequest', 'AzureVMResourceBackup': 'AzureVMResourceFeatureSupportRequest'} - } - - def __init__( - self, - **kwargs - ): - super(FeatureSupportRequest, self).__init__(**kwargs) - self.feature_type = None # type: Optional[str] - - -class AzureBackupGoalFeatureSupportRequest(FeatureSupportRequest): - """Azure backup goal feature specific request. - - 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 - """ - - _validation = { - 'feature_type': {'required': True}, - } - - _attribute_map = { - 'feature_type': {'key': 'featureType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureBackupGoalFeatureSupportRequest, self).__init__(**kwargs) - self.feature_type = 'AzureBackupGoals' # type: str - - -class ProtectionContainer(msrest.serialization.Model): - """Base class for container with backup items. Containers with specific workloads are derived from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureSqlContainer, AzureWorkloadContainer, DpmContainer, GenericContainer, IaaSVMContainer, AzureStorageContainer, MabContainer. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", - "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", - "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - } - - _subtype_map = { - 'container_type': {'AzureSqlContainer': 'AzureSqlContainer', 'AzureWorkloadContainer': 'AzureWorkloadContainer', 'DPMContainer': 'DpmContainer', 'GenericContainer': 'GenericContainer', 'IaaSVMContainer': 'IaaSVMContainer', 'StorageContainer': 'AzureStorageContainer', 'Windows': 'MabContainer'} - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - health_status: Optional[str] = None, - **kwargs - ): - 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] - - -class DpmContainer(ProtectionContainer): - """DPM workload-specific protection container. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureBackupServerContainer. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, - 'container_id': {'key': 'containerId', 'type': 'str'}, - 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, - 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, - 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, - 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, - 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, - } - - _subtype_map = { - 'container_type': {'AzureBackupServerContainer': 'AzureBackupServerContainer'} - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - health_status: Optional[str] = None, - can_re_register: Optional[bool] = None, - container_id: Optional[str] = None, - protected_item_count: Optional[int] = None, - dpm_agent_version: Optional[str] = None, - dpm_servers: Optional[List[str]] = None, - upgrade_available: Optional[bool] = None, - protection_status: Optional[str] = None, - 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) - self.container_type = 'DPMContainer' # type: str - self.can_re_register = can_re_register - self.container_id = container_id - self.protected_item_count = protected_item_count - self.dpm_agent_version = dpm_agent_version - self.dpm_servers = dpm_servers - self.upgrade_available = upgrade_available - self.protection_status = protection_status - self.extended_info = extended_info - - -class AzureBackupServerContainer(DpmContainer): - """AzureBackupServer (DPMVenus) workload-specific protection container. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, - 'container_id': {'key': 'containerId', 'type': 'str'}, - 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, - 'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'}, - 'dpm_servers': {'key': 'dpmServers', 'type': '[str]'}, - 'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'}, - 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'}, - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - health_status: Optional[str] = None, - can_re_register: Optional[bool] = None, - container_id: Optional[str] = None, - protected_item_count: Optional[int] = None, - dpm_agent_version: Optional[str] = None, - dpm_servers: Optional[List[str]] = None, - upgrade_available: Optional[bool] = None, - protection_status: Optional[str] = None, - 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) - self.container_type = 'AzureBackupServerContainer' # type: str - - -class BackupEngineBase(msrest.serialization.Model): - """The base backup engine class. All workload specific backup engines derive from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureBackupServerEngine, DpmBackupEngine. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. = - {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. - 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 - 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 - """ - - _validation = { - 'backup_engine_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, - 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, - 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, - 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, - 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, - 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, - 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, - } - - _subtype_map = { - 'backup_engine_type': {'AzureBackupServerEngine': 'AzureBackupServerEngine', 'DpmBackupEngine': 'DpmBackupEngine'} - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - backup_engine_state: Optional[str] = None, - health_status: Optional[str] = None, - can_re_register: Optional[bool] = None, - backup_engine_id: Optional[str] = None, - dpm_version: Optional[str] = None, - azure_backup_agent_version: Optional[str] = None, - is_azure_backup_agent_upgrade_available: Optional[bool] = None, - is_dpm_upgrade_available: Optional[bool] = None, - extended_info: Optional["BackupEngineExtendedInfo"] = None, - **kwargs - ): - super(BackupEngineBase, self).__init__(**kwargs) - self.friendly_name = friendly_name - self.backup_management_type = backup_management_type - self.registration_status = registration_status - self.backup_engine_state = backup_engine_state - self.health_status = health_status - self.backup_engine_type = None # type: Optional[str] - self.can_re_register = can_re_register - self.backup_engine_id = backup_engine_id - self.dpm_version = dpm_version - self.azure_backup_agent_version = azure_backup_agent_version - self.is_azure_backup_agent_upgrade_available = is_azure_backup_agent_upgrade_available - self.is_dpm_upgrade_available = is_dpm_upgrade_available - self.extended_info = extended_info - - -class AzureBackupServerEngine(BackupEngineBase): - """Backup engine type when Azure Backup Server is used to manage the backups. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. = - {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. - 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 - 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 - """ - - _validation = { - 'backup_engine_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, - 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, - 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, - 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, - 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, - 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, - 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - backup_engine_state: Optional[str] = None, - health_status: Optional[str] = None, - can_re_register: Optional[bool] = None, - backup_engine_id: Optional[str] = None, - dpm_version: Optional[str] = None, - azure_backup_agent_version: Optional[str] = None, - is_azure_backup_agent_upgrade_available: Optional[bool] = None, - is_dpm_upgrade_available: Optional[bool] = None, - extended_info: Optional["BackupEngineExtendedInfo"] = None, - **kwargs - ): - 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 - - -class BackupRequest(msrest.serialization.Model): - """Base class for backup request. Workload-specific backup requests are derived from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileShareBackupRequest, AzureWorkloadBackupRequest, IaasVMBackupRequest. - - 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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - } - - _subtype_map = { - 'object_type': {'AzureFileShareBackupRequest': 'AzureFileShareBackupRequest', 'AzureWorkloadBackupRequest': 'AzureWorkloadBackupRequest', 'IaasVMBackupRequest': 'IaasVMBackupRequest'} - } - - def __init__( - self, - **kwargs - ): - super(BackupRequest, self).__init__(**kwargs) - self.object_type = None # type: Optional[str] - - -class AzureFileShareBackupRequest(BackupRequest): - """AzureFileShare 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 - 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 - (UTC). - :type recovery_point_expiry_time_in_utc: ~datetime.datetime - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - recovery_point_expiry_time_in_utc: Optional[datetime.datetime] = None, - **kwargs - ): - super(AzureFileShareBackupRequest, self).__init__(**kwargs) - self.object_type = 'AzureFileShareBackupRequest' # type: str - self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc - - -class WorkloadProtectableItem(msrest.serialization.Model): - """Base class for backup item. Workload-specific backup items are derived from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileShareProtectableItem, AzureVmWorkloadProtectableItem, 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", - "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - } - - _subtype_map = { - 'protectable_item_type': {'AzureFileShare': 'AzureFileShareProtectableItem', 'AzureVmWorkloadProtectableItem': 'AzureVmWorkloadProtectableItem', 'IaaSVMProtectableItem': 'IaaSVMProtectableItem'} - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - **kwargs - ): - super(WorkloadProtectableItem, self).__init__(**kwargs) - self.backup_management_type = backup_management_type - self.workload_type = workload_type - self.protectable_item_type = None # type: Optional[str] - self.friendly_name = friendly_name - self.protection_state = protection_state - - -class AzureFileShareProtectableItem(WorkloadProtectableItem): - """Protectable item for Azure Fileshare workloads. - - 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", - "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 - 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 - ~azure.mgmt.recoveryservicesbackup.models.AzureFileShareType - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_container_fabric_id': {'key': 'parentContainerFabricId', 'type': 'str'}, - 'parent_container_friendly_name': {'key': 'parentContainerFriendlyName', 'type': 'str'}, - 'azure_file_share_type': {'key': 'azureFileShareType', 'type': 'str'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_container_fabric_id: Optional[str] = None, - parent_container_friendly_name: Optional[str] = None, - azure_file_share_type: Optional[Union[str, "AzureFileShareType"]] = None, - **kwargs - ): - 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 - self.parent_container_friendly_name = parent_container_friendly_name - self.azure_file_share_type = azure_file_share_type - - -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. - - 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] - """ - - _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': 'AzureFileshareProtectedItemAutoGenerated', '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 - ): - 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. - - :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", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param workload_type: Type of workload this item represents. Possible values include: - "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", - "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", - "SAPHanaDatabase", "SAPAseDatabase". - :type workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.DataSourceType - :param container_name: Unique name of container. - :type container_name: str - :param source_resource_id: ARM ID of the resource to be backed up. - :type source_resource_id: str - :param policy_id: ID of the backup policy with which this item is backed up. - :type policy_id: str - :param last_recovery_point: Timestamp when the last (latest) backup copy was created for this - backup item. - :type last_recovery_point: ~datetime.datetime - :param backup_set_name: Name of the backup set the backup item belongs to. - :type backup_set_name: str - :param create_mode: Create mode to indicate recovery of existing soft deleted data source or - creation of new data source. Possible values include: "Invalid", "Default", "Recover". - :type create_mode: str or ~azure.mgmt.recoveryservicesbackup.models.CreateMode - :param deferred_delete_time_in_utc: Time for deferred deletion in UTC. - :type deferred_delete_time_in_utc: ~datetime.datetime - :param is_scheduled_for_deferred_delete: Flag to identify whether the DS is scheduled for - deferred delete. - :type is_scheduled_for_deferred_delete: bool - :param deferred_delete_time_remaining: Time remaining before the DS marked for deferred delete - is permanently deleted. - :type deferred_delete_time_remaining: str - :param is_deferred_delete_schedule_upcoming: Flag to identify whether the deferred deleted DS - is to be purged soon. - :type is_deferred_delete_schedule_upcoming: bool - :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. - :type is_rehydrate: bool - :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check - will be performed. - :type resource_guard_operation_requests: list[str] - :param friendly_name: Friendly name of the fileshare represented by this backup item. - :type friendly_name: str - :param protection_status: Backup status of this backup item. - :type protection_status: str - :param protection_state: Backup state of this backup item. Possible values include: "Invalid", - "IRPending", "Protected", "ProtectionError", "ProtectionStopped", "ProtectionPaused". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionState - :param health_status: backups running status for this backup item. Possible values include: - "Passed", "ActionRequired", "ActionSuggested", "Invalid". - :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param last_backup_status: Last backup operation status. Possible values: Healthy, Unhealthy. - :type last_backup_status: str - :param last_backup_time: Timestamp of the last backup operation on this backup item. - :type last_backup_time: ~datetime.datetime - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param extended_info: Additional information with this backup item. - :type extended_info: - ~azure.mgmt.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo - """ - - _validation = { - 'protected_item_type': {'required': True}, - } - - _attribute_map = { - 'protected_item_type': {'key': 'protectedItemType', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'policy_id': {'key': 'policyId', 'type': 'str'}, - 'last_recovery_point': {'key': 'lastRecoveryPoint', 'type': 'iso-8601'}, - 'backup_set_name': {'key': 'backupSetName', 'type': 'str'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'deferred_delete_time_in_utc': {'key': 'deferredDeleteTimeInUTC', 'type': 'iso-8601'}, - 'is_scheduled_for_deferred_delete': {'key': 'isScheduledForDeferredDelete', 'type': 'bool'}, - 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, - 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, - 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, - 'last_backup_time': {'key': 'lastBackupTime', 'type': 'iso-8601'}, - 'kpis_healths': {'key': 'kpisHealths', 'type': '{KPIResourceHealthDetails}'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'AzureFileshareProtectedItemExtendedInfo'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - workload_type: Optional[Union[str, "DataSourceType"]] = None, - container_name: Optional[str] = None, - source_resource_id: Optional[str] = None, - policy_id: Optional[str] = None, - last_recovery_point: Optional[datetime.datetime] = None, - backup_set_name: Optional[str] = None, - create_mode: Optional[Union[str, "CreateMode"]] = None, - deferred_delete_time_in_utc: Optional[datetime.datetime] = None, - is_scheduled_for_deferred_delete: Optional[bool] = None, - deferred_delete_time_remaining: Optional[str] = None, - is_deferred_delete_schedule_upcoming: Optional[bool] = None, - is_rehydrate: Optional[bool] = None, - resource_guard_operation_requests: Optional[List[str]] = None, - friendly_name: Optional[str] = None, - protection_status: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionState"]] = None, - health_status: Optional[Union[str, "HealthStatus"]] = None, - last_backup_status: Optional[str] = None, - last_backup_time: Optional[datetime.datetime] = None, - kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, - extended_info: Optional["AzureFileshareProtectedItemExtendedInfo"] = None, - **kwargs - ): - super(AzureFileshareProtectedItemAutoGenerated, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) - self.protected_item_type = 'AzureFileShareProtectedItem' # type: str - self.friendly_name = friendly_name - self.protection_status = protection_status - self.protection_state = protection_state - self.health_status = health_status - self.last_backup_status = last_backup_status - self.last_backup_time = last_backup_time - self.kpis_healths = kpis_healths - self.extended_info = extended_info - - -class AzureFileshareProtectedItemExtendedInfo(msrest.serialization.Model): - """Additional information about Azure File Share backup item. - - 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 - item. - :type 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 - ): - 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 ProtectionPolicy(msrest.serialization.Model): - """Base class for backup policy. Workload-specific backup policies are derived from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureIaaSVMProtectionPolicy, AzureSqlProtectionPolicy, AzureFileShareProtectionPolicy, AzureVmWorkloadProtectionPolicy, GenericProtectionPolicy, MabProtectionPolicy. - - 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 - 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] - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - } - - _subtype_map = { - 'backup_management_type': {'AzureIaasVM': 'AzureIaaSVMProtectionPolicy', 'AzureSql': 'AzureSqlProtectionPolicy', 'AzureStorage': 'AzureFileShareProtectionPolicy', 'AzureWorkload': 'AzureVmWorkloadProtectionPolicy', 'GenericProtectionPolicy': 'GenericProtectionPolicy', 'MAB': 'MabProtectionPolicy'} - } - - def __init__( - self, - *, - protected_items_count: Optional[int] = None, - resource_guard_operation_requests: Optional[List[str]] = None, - **kwargs - ): - super(ProtectionPolicy, self).__init__(**kwargs) - self.protected_items_count = protected_items_count - self.backup_management_type = None # type: Optional[str] - self.resource_guard_operation_requests = resource_guard_operation_requests - - -class AzureFileShareProtectionPolicy(ProtectionPolicy): - """AzureStorage backup policy. - - 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 - 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: - "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 - Time". - :type time_zone: str - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, - 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, - 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - } - - def __init__( - self, - *, - protected_items_count: Optional[int] = None, - resource_guard_operation_requests: Optional[List[str]] = None, - work_load_type: Optional[Union[str, "WorkloadType"]] = None, - schedule_policy: Optional["SchedulePolicy"] = None, - retention_policy: Optional["RetentionPolicy"] = None, - time_zone: Optional[str] = None, - **kwargs - ): - 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 - self.schedule_policy = schedule_policy - self.retention_policy = retention_policy - self.time_zone = time_zone - - -class ILRRequest(msrest.serialization.Model): - """Parameters to Provision ILR API. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileShareProvisionILRRequest, IaasVMILRRegistrationRequest. - - 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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - } - - _subtype_map = { - 'object_type': {'AzureFileShareProvisionILRRequest': 'AzureFileShareProvisionILRRequest', 'IaasVMILRRegistrationRequest': 'IaasVMILRRegistrationRequest'} - } - - def __init__( - self, - **kwargs - ): - super(ILRRequest, self).__init__(**kwargs) - self.object_type = None # type: Optional[str] - - -class AzureFileShareProvisionILRRequest(ILRRequest): - """Update snapshot Uri with the correct friendly Name of the source Azure file share. - - 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: Recovery point ID. - :type recovery_point_id: str - :param source_resource_id: Source Storage account ARM Id. - :type source_resource_id: str - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - recovery_point_id: Optional[str] = None, - source_resource_id: Optional[str] = None, - **kwargs - ): - super(AzureFileShareProvisionILRRequest, self).__init__(**kwargs) - self.object_type = 'AzureFileShareProvisionILRRequest' # type: str - self.recovery_point_id = recovery_point_id - self.source_resource_id = source_resource_id - - -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. - - 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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - } - - _subtype_map = { - 'object_type': {'AzureFileShareRecoveryPoint': 'AzureFileShareRecoveryPointAutoGenerated', 'AzureWorkloadRecoveryPoint': 'AzureWorkloadRecoveryPointAutoGenerated', 'GenericRecoveryPoint': 'GenericRecoveryPoint', 'IaasVMRecoveryPoint': 'IaasVMRecoveryPointAutoGenerated'} - } - - 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. - - 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, - *, - recovery_point_type: Optional[str] = None, - recovery_point_time: Optional[datetime.datetime] = None, - file_share_snapshot_uri: Optional[str] = None, - recovery_point_size_in_gb: Optional[int] = None, - **kwargs - ): - super(AzureFileShareRecoveryPoint, self).__init__(**kwargs) - self.object_type = 'AzureFileShareRecoveryPoint' # type: str - self.recovery_point_type = recovery_point_type - self.recovery_point_time = recovery_point_time - self.file_share_snapshot_uri = file_share_snapshot_uri - self.recovery_point_size_in_gb = recovery_point_size_in_gb - - -class AzureFileShareRecoveryPointAutoGenerated(RecoveryPoint): - """Azure File Share workload specific backup copy. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_type: Type of the backup copy. Specifies whether it is a crash consistent - backup or app consistent. - :vartype recovery_point_type: str - :ivar recovery_point_time: Time at which this backup copy was created. - :vartype recovery_point_time: ~datetime.datetime - :ivar file_share_snapshot_uri: Contains Url to the snapshot of fileshare, if applicable. - :vartype file_share_snapshot_uri: str - :ivar recovery_point_size_in_gb: Contains recovery point size. - :vartype recovery_point_size_in_gb: int - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_type': {'readonly': True}, - 'recovery_point_time': {'readonly': True}, - 'file_share_snapshot_uri': {'readonly': True}, - 'recovery_point_size_in_gb': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, - 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, - 'file_share_snapshot_uri': {'key': 'fileShareSnapshotUri', 'type': 'str'}, - 'recovery_point_size_in_gb': {'key': 'recoveryPointSizeInGB', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureFileShareRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'AzureFileShareRecoveryPoint' # type: str - self.recovery_point_type = None - self.recovery_point_time = None - self.file_share_snapshot_uri = None - self.recovery_point_size_in_gb = None - - -class RestoreRequest(msrest.serialization.Model): - """Base class for restore request. Workload-specific restore requests are derived from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, IaasVMRestoreRequestAutoGenerated. - - 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 - """ - - _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 - """ - - _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 - ): - 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 IaaSVMContainer(ProtectionContainer): - """IaaS VM workload-specific container. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureIaaSClassicComputeVMContainer, AzureIaaSComputeVMContainer. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - 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 - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, - 'virtual_machine_version': {'key': 'virtualMachineVersion', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - } - - _subtype_map = { - 'container_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMContainer', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMContainer'} - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - health_status: 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) - self.container_type = 'IaaSVMContainer' # type: str - self.virtual_machine_id = virtual_machine_id - self.virtual_machine_version = virtual_machine_version - self.resource_group = resource_group - - -class AzureIaaSClassicComputeVMContainer(IaaSVMContainer): - """IaaS VM workload-specific backup item representing a classic virtual machine. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - 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 - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', '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, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - health_status: 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) - self.container_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str - - -class IaaSVMProtectableItem(WorkloadProtectableItem): - """IaaS VM workload-specific backup item. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureIaaSClassicComputeVMProtectableItem, AzureIaaSComputeVMProtectableItem. - - 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", - "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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, - } - - _subtype_map = { - 'protectable_item_type': {'Microsoft.ClassicCompute/virtualMachines': 'AzureIaaSClassicComputeVMProtectableItem', 'Microsoft.Compute/virtualMachines': 'AzureIaaSComputeVMProtectableItem'} - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - virtual_machine_id: Optional[str] = None, - **kwargs - ): - 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 - - -class AzureIaaSClassicComputeVMProtectableItem(IaaSVMProtectableItem): - """IaaS VM workload-specific backup item representing the Classic Compute VM. - - 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", - "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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - virtual_machine_id: 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) - self.protectable_item_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str - - -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. - - :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 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 - 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", - "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", - "ActionRequired", "ActionSuggested", "Invalid". - :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param last_backup_status: Last backup operation status. - :type last_backup_status: str - :param last_backup_time: Timestamp of the last backup operation on this 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: - ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo - :param extended_properties: Extended Properties for Azure IaasVM Backup. - :type extended_properties: ~azure.mgmt.recoveryservicesbackup.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 - ): - 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. - - :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 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 - 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", - "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", - "ActionRequired", "ActionSuggested", "Invalid". - :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param last_backup_status: Last backup operation status. - :type last_backup_status: str - :param last_backup_time: Timestamp of the last backup operation on this 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: - ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo - :param extended_properties: Extended Properties for Azure IaasVM Backup. - :type extended_properties: ~azure.mgmt.recoveryservicesbackup.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 - ): - 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 AzureIaaSComputeVMContainer(IaaSVMContainer): - """IaaS VM workload-specific backup item representing an Azure Resource Manager virtual machine. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - 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 - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', '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, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - health_status: 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) - self.container_type = 'Microsoft.Compute/virtualMachines' # type: str - - -class AzureIaaSComputeVMProtectableItem(IaaSVMProtectableItem): - """IaaS VM workload-specific backup item representing the Azure Resource Manager VM. - - 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", - "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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - virtual_machine_id: 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) - self.protectable_item_type = 'Microsoft.Compute/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. - - :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 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 - 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", - "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", - "ActionRequired", "ActionSuggested", "Invalid". - :type health_status: str or ~azure.mgmt.recoveryservicesbackup.models.HealthStatus - :param health_details: Health details on this backup item. - :type health_details: list[~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMHealthDetails] - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - :param last_backup_status: Last backup operation status. - :type last_backup_status: str - :param last_backup_time: Timestamp of the last backup operation on this 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: - ~azure.mgmt.recoveryservicesbackup.models.AzureIaaSVMProtectedItemExtendedInfo - :param extended_properties: Extended Properties for Azure IaasVM Backup. - :type extended_properties: ~azure.mgmt.recoveryservicesbackup.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 - ): - 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, 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 - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.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 - specific types in the polymorphic chain of types.Constant filled by server. - :type 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', 'VaultJob': 'VaultJob'} - } - - 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 - ): - 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. - - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.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 - 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 - Resource Manager VM. - :type virtual_machine_version: str - :param extended_info: Additional information for this job. - :type 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'}, - '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 - ): - 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. - - :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 - 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 - """ - - _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 - ): - 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. - - :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. - eg: number of bytes transferred etc. - :type 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 - ): - 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. - - :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 - inconsistent. - :type 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 - ): - 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 AzureIaaSVMProtectionPolicy(ProtectionPolicy): - """IaaS VM workload-specific backup policy. - - 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 - 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 - Time". - :type time_zone: str - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'instant_rp_details': {'key': 'instantRPDetails', 'type': 'InstantRPAdditionalDetails'}, - 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, - 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, - 'instant_rp_retention_range_in_days': {'key': 'instantRpRetentionRangeInDays', 'type': 'int'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - } - - def __init__( - self, - *, - protected_items_count: Optional[int] = None, - resource_guard_operation_requests: Optional[List[str]] = None, - instant_rp_details: Optional["InstantRPAdditionalDetails"] = None, - schedule_policy: Optional["SchedulePolicy"] = None, - retention_policy: Optional["RetentionPolicy"] = None, - instant_rp_retention_range_in_days: Optional[int] = None, - time_zone: Optional[str] = None, - **kwargs - ): - 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 - self.schedule_policy = schedule_policy - self.retention_policy = retention_policy - self.instant_rp_retention_range_in_days = instant_rp_retention_range_in_days - self.time_zone = time_zone - - -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. - - 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", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type 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 - 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", - "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type 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'}, - } - - _subtype_map = { - 'protection_intent_item_type': {'AzureResourceItem': 'AzureResourceProtectionIntent', 'RecoveryServiceVaultItem': 'AzureRecoveryServiceVaultProtectionIntent'} - } - - def __init__( - self, - *, - 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 - ): - super(ProtectionIntent, self).__init__(**kwargs) - self.protection_intent_item_type = None # type: Optional[str] - self.backup_management_type = backup_management_type - self.source_resource_id = source_resource_id - self.item_id = item_id - self.policy_id = policy_id - self.protection_state = protection_state - - -class AzureRecoveryServiceVaultProtectionIntent(ProtectionIntent): - """Azure Recovery Services Vault specific protection intent item. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: 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", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type 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 - 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", - "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type 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'}, - } - - _subtype_map = { - 'protection_intent_item_type': {'AzureWorkloadAutoProtectionIntent': 'AzureWorkloadAutoProtectionIntent'} - } - - def __init__( - self, - *, - 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 - ): - 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 - - -class AzureResourceProtectionIntent(ProtectionIntent): - """IaaS VM specific backup protection intent item. - - 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", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type 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 - 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", - "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 - """ - - _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'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - } - - def __init__( - self, - *, - 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, - friendly_name: Optional[str] = None, - **kwargs - ): - 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 - - -class AzureWorkloadContainer(ProtectionContainer): - """Container for the workloads running inside Azure Compute or Classic Compute. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureSQLAGWorkloadContainerProtectionContainer, AzureVMAppContainerProtectionContainer. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - 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: - ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo - :param 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", - "Reregister". - :type operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - } - - _subtype_map = { - 'container_type': {'SQLAGWorkLoadContainer': 'AzureSQLAGWorkloadContainerProtectionContainer', 'VMAppContainer': 'AzureVMAppContainerProtectionContainer'} - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - health_status: Optional[str] = None, - source_resource_id: Optional[str] = None, - last_updated_time: Optional[datetime.datetime] = None, - extended_info: Optional["AzureWorkloadContainerExtendedInfo"] = None, - workload_type: Optional[Union[str, "WorkloadType"]] = None, - 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) - self.container_type = 'AzureWorkloadContainer' # type: str - self.source_resource_id = source_resource_id - self.last_updated_time = last_updated_time - self.extended_info = extended_info - self.workload_type = workload_type - self.operation_type = operation_type - - -class AzureSQLAGWorkloadContainerProtectionContainer(AzureWorkloadContainer): - """Container for SQL workloads under SQL Availability Group. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - 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: - ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo - :param 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", - "Reregister". - :type operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - health_status: Optional[str] = None, - source_resource_id: Optional[str] = None, - last_updated_time: Optional[datetime.datetime] = None, - extended_info: Optional["AzureWorkloadContainerExtendedInfo"] = None, - workload_type: Optional[Union[str, "WorkloadType"]] = None, - 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) - self.container_type = 'SQLAGWorkLoadContainer' # type: str - - -class AzureSqlContainer(ProtectionContainer): - """Azure Sql workload-specific container. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "Unknown", "IaasVMContainer", "IaasVMServiceContainer", "DPMContainer", - "AzureBackupServerContainer", "MABContainer", "Cluster", "AzureSqlContainer", "Windows", - "VCenter", "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type container_type: str or ~azure.mgmt.recoveryservicesbackup.models.ContainerType - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - 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) - self.container_type = 'AzureSqlContainer' # type: str - - -class AzureSqlProtectedItem(ProtectedItem): - """Azure SQL 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 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: - ~azure.mgmt.recoveryservicesbackup.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 - ): - 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. - - :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 - """ - - _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 - ): - 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 AzureSqlProtectionPolicy(ProtectionPolicy): - """Azure SQL workload-specific backup policy. - - 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 - 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 - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, - } - - def __init__( - self, - *, - protected_items_count: Optional[int] = None, - resource_guard_operation_requests: Optional[List[str]] = None, - retention_policy: Optional["RetentionPolicy"] = None, - **kwargs - ): - 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 - - -class AzureStorageContainer(ProtectionContainer): - """Azure Storage Account workload-specific container. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', '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, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - health_status: 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) - 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 - - -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] - """ - - _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 - ): - 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. - - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.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 - 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 - 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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :param task_id: The task display name. - :type task_id: str - :param status: The status. - :type 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 - ): - super(AzureStorageJobTaskDetails, self).__init__(**kwargs) - self.task_id = task_id - self.status = status - - -class ProtectableContainer(msrest.serialization.Model): - """Protectable Container Class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureStorageProtectableContainer, AzureVMAppContainerProtectableContainer. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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", - "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", - "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", - "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type 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 - """ - - _validation = { - 'protectable_container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_id': {'key': 'containerId', 'type': 'str'}, - } - - _subtype_map = { - 'protectable_container_type': {'StorageContainer': 'AzureStorageProtectableContainer', 'VMAppContainer': 'AzureVMAppContainerProtectableContainer'} - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - health_status: Optional[str] = None, - container_id: Optional[str] = None, - **kwargs - ): - super(ProtectableContainer, self).__init__(**kwargs) - self.friendly_name = friendly_name - self.backup_management_type = backup_management_type - self.protectable_container_type = None # type: Optional[str] - self.health_status = health_status - self.container_id = container_id - - -class AzureStorageProtectableContainer(ProtectableContainer): - """Azure Storage-specific protectable containers. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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", - "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", - "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", - "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type 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 - """ - - _validation = { - 'protectable_container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_id': {'key': 'containerId', 'type': 'str'}, - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - health_status: Optional[str] = None, - container_id: Optional[str] = None, - **kwargs - ): - 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 - - -class AzureVMAppContainerProtectableContainer(ProtectableContainer): - """Azure workload-specific container. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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", - "IaasVMServiceContainer", "DPMContainer", "AzureBackupServerContainer", "MABContainer", - "Cluster", "AzureSqlContainer", "Windows", "VCenter", "VMAppContainer", - "SQLAGWorkLoadContainer", "StorageContainer", "GenericContainer". - :type 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 - """ - - _validation = { - 'protectable_container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'protectable_container_type': {'key': 'protectableContainerType', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_id': {'key': 'containerId', 'type': 'str'}, - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - health_status: Optional[str] = None, - container_id: Optional[str] = None, - **kwargs - ): - 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 - - -class AzureVMAppContainerProtectionContainer(AzureWorkloadContainer): - """Container for SQL workloads under Azure Virtual Machines. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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 - 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: - ~azure.mgmt.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo - :param 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", - "Reregister". - :type operation_type: str or ~azure.mgmt.recoveryservicesbackup.models.OperationType - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'AzureWorkloadContainerExtendedInfo'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - health_status: Optional[str] = None, - source_resource_id: Optional[str] = None, - last_updated_time: Optional[datetime.datetime] = None, - extended_info: Optional["AzureWorkloadContainerExtendedInfo"] = None, - workload_type: Optional[Union[str, "WorkloadType"]] = None, - 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) - self.container_type = 'VMAppContainer' # type: str - - -class AzureVMResourceFeatureSupportRequest(FeatureSupportRequest): - """AzureResource(IaaS VM) Specific feature support request. - - 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 - """ - - _validation = { - 'feature_type': {'required': True}, - } - - _attribute_map = { - 'feature_type': {'key': 'featureType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'vm_sku': {'key': 'vmSku', 'type': 'str'}, - } - - def __init__( - self, - *, - vm_size: Optional[str] = None, - vm_sku: Optional[str] = None, - **kwargs - ): - super(AzureVMResourceFeatureSupportRequest, self).__init__(**kwargs) - self.feature_type = 'AzureVMResourceBackup' # type: str - self.vm_size = vm_size - self.vm_sku = vm_sku - - -class AzureVMResourceFeatureSupportResponse(msrest.serialization.Model): - """Response for feature support requests for Azure IaasVm. - - :param support_status: Support status of feature. Possible values include: "Invalid", - "Supported", "DefaultOFF", "DefaultON", "NotSupported". - :type support_status: str or ~azure.mgmt.recoveryservicesbackup.models.SupportStatus - """ - - _attribute_map = { - 'support_status': {'key': 'supportStatus', 'type': 'str'}, - } - - def __init__( - self, - *, - support_status: Optional[Union[str, "SupportStatus"]] = None, - **kwargs - ): - super(AzureVMResourceFeatureSupportResponse, self).__init__(**kwargs) - self.support_status = support_status - - -class WorkloadItem(msrest.serialization.Model): - """Base class for backup item. Workload-specific backup items are derived from this class. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: 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", - "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_state: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - } - - _subtype_map = { - 'workload_item_type': {'AzureVmWorkloadItem': 'AzureVmWorkloadItem'} - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - **kwargs - ): - super(WorkloadItem, self).__init__(**kwargs) - self.backup_management_type = backup_management_type - self.workload_type = workload_type - self.workload_item_type = None # type: Optional[str] - self.friendly_name = friendly_name - self.protection_state = protection_state - - -class AzureVmWorkloadItem(WorkloadItem): - """Azure VM workload-specific workload item. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureVmWorkloadSAPAseDatabaseWorkloadItem, AzureVmWorkloadSAPAseSystemWorkloadItem, AzureVmWorkloadSAPHanaDatabaseWorkloadItem, AzureVmWorkloadSAPHanaSystemWorkloadItem, AzureVmWorkloadSQLDatabaseWorkloadItem, AzureVmWorkloadSQLInstanceWorkloadItem. - - 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", - "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 - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, - } - - _subtype_map = { - 'workload_item_type': {'SAPAseDatabase': 'AzureVmWorkloadSAPAseDatabaseWorkloadItem', 'SAPAseSystem': 'AzureVmWorkloadSAPAseSystemWorkloadItem', 'SAPHanaDatabase': 'AzureVmWorkloadSAPHanaDatabaseWorkloadItem', 'SAPHanaSystem': 'AzureVmWorkloadSAPHanaSystemWorkloadItem', 'SQLDataBase': 'AzureVmWorkloadSQLDatabaseWorkloadItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceWorkloadItem'} - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_name: Optional[str] = None, - server_name: Optional[str] = None, - is_auto_protectable: Optional[bool] = None, - subinquireditemcount: Optional[int] = None, - sub_workload_item_count: Optional[int] = None, - **kwargs - ): - 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 - self.server_name = server_name - self.is_auto_protectable = is_auto_protectable - self.subinquireditemcount = subinquireditemcount - self.sub_workload_item_count = sub_workload_item_count - - -class AzureVmWorkloadProtectableItem(WorkloadProtectableItem): - """Azure VM workload-specific protectable item. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureVmWorkloadSAPAseSystemProtectableItem, AzureVmWorkloadSAPHanaDatabaseProtectableItem, AzureVmWorkloadSAPHanaSystemProtectableItem, AzureVmWorkloadSQLAvailabilityGroupProtectableItem, AzureVmWorkloadSQLDatabaseProtectableItem, AzureVmWorkloadSQLInstanceProtectableItem. - - 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", - "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 - 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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, - 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, - } - - _subtype_map = { - 'protectable_item_type': {'SAPAseSystem': 'AzureVmWorkloadSAPAseSystemProtectableItem', 'SAPHanaDatabase': 'AzureVmWorkloadSAPHanaDatabaseProtectableItem', 'SAPHanaSystem': 'AzureVmWorkloadSAPHanaSystemProtectableItem', 'SQLAvailabilityGroupContainer': 'AzureVmWorkloadSQLAvailabilityGroupProtectableItem', 'SQLDataBase': 'AzureVmWorkloadSQLDatabaseProtectableItem', 'SQLInstance': 'AzureVmWorkloadSQLInstanceProtectableItem'} - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_name: Optional[str] = None, - parent_unique_name: Optional[str] = None, - server_name: Optional[str] = None, - is_auto_protectable: Optional[bool] = None, - is_auto_protected: Optional[bool] = None, - subinquireditemcount: Optional[int] = None, - subprotectableitemcount: Optional[int] = None, - prebackupvalidation: Optional["PreBackupValidation"] = None, - **kwargs - ): - 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 - self.parent_unique_name = parent_unique_name - self.server_name = server_name - self.is_auto_protectable = is_auto_protectable - self.is_auto_protected = is_auto_protected - self.subinquireditemcount = subinquireditemcount - self.subprotectableitemcount = subprotectableitemcount - self.prebackupvalidation = prebackupvalidation - - -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. - - :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 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 - 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", - "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. - 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 - heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", - "IRPending". - :type protected_item_health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: - ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - """ - - _validation = { - '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 - ): - 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. - - :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 - item. - :type 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 - ): - 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 AzureVmWorkloadProtectionPolicy(ProtectionPolicy): - """Azure VM (Mercury) workload-specific backup policy. - - 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 - 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: - "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 - retention. - :type sub_protection_policy: - list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] - :param make_policy_consistent: Fix the policy inconsistency. - :type make_policy_consistent: bool - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, - 'settings': {'key': 'settings', 'type': 'Settings'}, - 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, - 'make_policy_consistent': {'key': 'makePolicyConsistent', 'type': 'bool'}, - } - - def __init__( - self, - *, - protected_items_count: Optional[int] = None, - resource_guard_operation_requests: Optional[List[str]] = None, - work_load_type: Optional[Union[str, "WorkloadType"]] = None, - settings: Optional["Settings"] = None, - sub_protection_policy: Optional[List["SubProtectionPolicy"]] = None, - make_policy_consistent: Optional[bool] = None, - **kwargs - ): - 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 - self.settings = settings - self.sub_protection_policy = sub_protection_policy - self.make_policy_consistent = make_policy_consistent - - -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. - - :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 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 - 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", - "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. - 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 - heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", - "IRPending". - :type protected_item_health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: - ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - """ - - _validation = { - '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 - ): - 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 AzureVmWorkloadSAPAseDatabaseWorkloadItem(AzureVmWorkloadItem): - """Azure VM workload-specific workload item representing SAP ASE Database. - - 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", - "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 - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_name: Optional[str] = None, - server_name: Optional[str] = None, - is_auto_protectable: Optional[bool] = None, - subinquireditemcount: Optional[int] = None, - sub_workload_item_count: Optional[int] = None, - **kwargs - ): - 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 - - -class AzureVmWorkloadSAPAseSystemProtectableItem(AzureVmWorkloadProtectableItem): - """Azure VM workload-specific protectable item representing SAP ASE System. - - 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", - "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 - 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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, - 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_name: Optional[str] = None, - parent_unique_name: Optional[str] = None, - server_name: Optional[str] = None, - is_auto_protectable: Optional[bool] = None, - is_auto_protected: Optional[bool] = None, - subinquireditemcount: Optional[int] = None, - subprotectableitemcount: Optional[int] = None, - prebackupvalidation: Optional["PreBackupValidation"] = None, - **kwargs - ): - 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 - - -class AzureVmWorkloadSAPAseSystemWorkloadItem(AzureVmWorkloadItem): - """Azure VM workload-specific workload item representing SAP ASE System. - - 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", - "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 - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_name: Optional[str] = None, - server_name: Optional[str] = None, - is_auto_protectable: Optional[bool] = None, - subinquireditemcount: Optional[int] = None, - sub_workload_item_count: Optional[int] = None, - **kwargs - ): - 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 - - -class AzureVmWorkloadSAPHanaDatabaseProtectableItem(AzureVmWorkloadProtectableItem): - """Azure VM workload-specific protectable item representing SAP HANA Database. - - 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", - "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 - 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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, - 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_name: Optional[str] = None, - parent_unique_name: Optional[str] = None, - server_name: Optional[str] = None, - is_auto_protectable: Optional[bool] = None, - is_auto_protected: Optional[bool] = None, - subinquireditemcount: Optional[int] = None, - subprotectableitemcount: Optional[int] = None, - prebackupvalidation: Optional["PreBackupValidation"] = None, - **kwargs - ): - 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 - - -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. - - :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 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 - 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", - "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. - 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 - heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", - "IRPending". - :type protected_item_health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: - ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - """ - - _validation = { - '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 - ): - 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 AzureVmWorkloadSAPHanaDatabaseWorkloadItem(AzureVmWorkloadItem): - """Azure VM workload-specific workload item representing SAP HANA Database. - - 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", - "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 - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_name: Optional[str] = None, - server_name: Optional[str] = None, - is_auto_protectable: Optional[bool] = None, - subinquireditemcount: Optional[int] = None, - sub_workload_item_count: Optional[int] = None, - **kwargs - ): - 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 - - -class AzureVmWorkloadSAPHanaSystemProtectableItem(AzureVmWorkloadProtectableItem): - """Azure VM workload-specific protectable item representing SAP HANA System. - - 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", - "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 - 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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, - 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_name: Optional[str] = None, - parent_unique_name: Optional[str] = None, - server_name: Optional[str] = None, - is_auto_protectable: Optional[bool] = None, - is_auto_protected: Optional[bool] = None, - subinquireditemcount: Optional[int] = None, - subprotectableitemcount: Optional[int] = None, - prebackupvalidation: Optional["PreBackupValidation"] = None, - **kwargs - ): - 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 - - -class AzureVmWorkloadSAPHanaSystemWorkloadItem(AzureVmWorkloadItem): - """Azure VM workload-specific workload item representing SAP HANA System. - - 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", - "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 - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_name: Optional[str] = None, - server_name: Optional[str] = None, - is_auto_protectable: Optional[bool] = None, - subinquireditemcount: Optional[int] = None, - sub_workload_item_count: Optional[int] = None, - **kwargs - ): - 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 - - -class AzureVmWorkloadSQLAvailabilityGroupProtectableItem(AzureVmWorkloadProtectableItem): - """Azure VM workload-specific protectable item representing SQL Availability Group. - - 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", - "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 - 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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, - 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_name: Optional[str] = None, - parent_unique_name: Optional[str] = None, - server_name: Optional[str] = None, - is_auto_protectable: Optional[bool] = None, - is_auto_protected: Optional[bool] = None, - subinquireditemcount: Optional[int] = None, - subprotectableitemcount: Optional[int] = None, - prebackupvalidation: Optional["PreBackupValidation"] = None, - **kwargs - ): - 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 - - -class AzureVmWorkloadSQLDatabaseProtectableItem(AzureVmWorkloadProtectableItem): - """Azure VM workload-specific protectable item representing SQL Database. - - 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", - "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 - 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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, - 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_name: Optional[str] = None, - parent_unique_name: Optional[str] = None, - server_name: Optional[str] = None, - is_auto_protectable: Optional[bool] = None, - is_auto_protected: Optional[bool] = None, - subinquireditemcount: Optional[int] = None, - subprotectableitemcount: Optional[int] = None, - prebackupvalidation: Optional["PreBackupValidation"] = None, - **kwargs - ): - 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 - - -class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): - """Azure VM workload-specific protected item representing SQL Database. - - 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 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 - 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", - "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. - 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 - heartbeat received. Possible values include: "Invalid", "Healthy", "Unhealthy", "NotReachable", - "IRPending". - :type protected_item_health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemHealthStatus - :param extended_info: Additional information for this backup item. - :type extended_info: - ~azure.mgmt.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo - :param kpis_healths: Health details of different KPIs. - :type kpis_healths: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.KPIResourceHealthDetails] - """ - - _validation = { - '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 - ): - 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 AzureVmWorkloadSQLDatabaseWorkloadItem(AzureVmWorkloadItem): - """Azure VM workload-specific workload item representing SQL Database. - - 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", - "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 - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_name: Optional[str] = None, - server_name: Optional[str] = None, - is_auto_protectable: Optional[bool] = None, - subinquireditemcount: Optional[int] = None, - sub_workload_item_count: Optional[int] = None, - **kwargs - ): - 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 - - -class AzureVmWorkloadSQLInstanceProtectableItem(AzureVmWorkloadProtectableItem): - """Azure VM workload-specific protectable item representing SQL Instance. - - 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", - "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 - 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 - """ - - _validation = { - 'protectable_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protectable_item_type': {'key': 'protectableItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'parent_unique_name': {'key': 'parentUniqueName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'is_auto_protected': {'key': 'isAutoProtected', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'subprotectableitemcount': {'key': 'subprotectableitemcount', 'type': 'int'}, - 'prebackupvalidation': {'key': 'prebackupvalidation', 'type': 'PreBackupValidation'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_name: Optional[str] = None, - parent_unique_name: Optional[str] = None, - server_name: Optional[str] = None, - is_auto_protectable: Optional[bool] = None, - is_auto_protected: Optional[bool] = None, - subinquireditemcount: Optional[int] = None, - subprotectableitemcount: Optional[int] = None, - prebackupvalidation: Optional["PreBackupValidation"] = None, - **kwargs - ): - 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 - - -class AzureVmWorkloadSQLInstanceWorkloadItem(AzureVmWorkloadItem): - """Azure VM workload-specific workload item representing SQL Instance. - - 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", - "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] - """ - - _validation = { - 'workload_item_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'protection_state': {'key': 'protectionState', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'server_name': {'key': 'serverName', 'type': 'str'}, - 'is_auto_protectable': {'key': 'isAutoProtectable', 'type': 'bool'}, - 'subinquireditemcount': {'key': 'subinquireditemcount', 'type': 'int'}, - 'sub_workload_item_count': {'key': 'subWorkloadItemCount', 'type': 'int'}, - 'data_directory_paths': {'key': 'dataDirectoryPaths', 'type': '[SQLDataDirectory]'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[str] = None, - workload_type: Optional[str] = None, - friendly_name: Optional[str] = None, - protection_state: Optional[Union[str, "ProtectionStatus"]] = None, - parent_name: Optional[str] = None, - server_name: Optional[str] = None, - is_auto_protectable: Optional[bool] = None, - subinquireditemcount: Optional[int] = None, - sub_workload_item_count: Optional[int] = None, - data_directory_paths: Optional[List["SQLDataDirectory"]] = None, - **kwargs - ): - 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 - - -class AzureWorkloadAutoProtectionIntent(AzureRecoveryServiceVaultProtectionIntent): - """Azure Recovery Services Vault specific protection intent item. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSQLAutoProtectionIntent. - - 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", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type 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 - 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", - "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type 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'}, - } - - _subtype_map = { - 'protection_intent_item_type': {'AzureWorkloadSQLAutoProtectionIntent': 'AzureWorkloadSQLAutoProtectionIntent'} - } - - def __init__( - self, - *, - 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 - ): - 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 - - -class AzureWorkloadBackupRequest(BackupRequest): - """AzureWorkload 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 - 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 - 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 - (UTC). - :type recovery_point_expiry_time_in_utc: ~datetime.datetime - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'backup_type': {'key': 'backupType', 'type': 'str'}, - 'enable_compression': {'key': 'enableCompression', 'type': 'bool'}, - 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - backup_type: Optional[Union[str, "BackupType"]] = None, - enable_compression: Optional[bool] = None, - recovery_point_expiry_time_in_utc: Optional[datetime.datetime] = None, - **kwargs - ): - super(AzureWorkloadBackupRequest, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadBackupRequest' # type: str - self.backup_type = backup_type - self.enable_compression = enable_compression - self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc - - -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 - 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] - """ - - _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 - ): - super(AzureWorkloadContainerExtendedInfo, self).__init__(**kwargs) - self.host_server_name = host_server_name - self.inquiry_info = inquiry_info - self.nodes_list = nodes_list - - -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 - """ - - _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 - ): - 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. - - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.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 - 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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :param task_id: The task display name. - :type task_id: str - :param status: The status. - :type 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 - ): - 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. - - 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}'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadPointInTimeRecoveryPoint': 'AzureWorkloadPointInTimeRecoveryPoint', 'AzureWorkloadSAPHanaRecoveryPoint': 'AzureWorkloadSAPHanaRecoveryPoint', 'AzureWorkloadSQLRecoveryPoint': 'AzureWorkloadSQLRecoveryPoint'} - } - - 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(AzureWorkloadRecoveryPoint, self).__init__(**kwargs) - self.object_type = 'AzureWorkloadRecoveryPoint' # type: str - self.recovery_point_time_in_utc = recovery_point_time_in_utc - self.type = type - 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. - - 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 - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - :param time_ranges: List of log ranges. - :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadSAPHanaPointInTimeRecoveryPoint': 'AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated'} - } - - def __init__( - self, - *, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, - recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, - time_ranges: Optional[List["PointInTimeRange"]] = None, - **kwargs - ): - super(AzureWorkloadPointInTimeRecoveryPointAutoGenerated, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, **kwargs) - self.object_type = 'AzureWorkloadPointInTimeRecoveryPoint' # type: str - self.time_ranges = time_ranges - - -class AzureWorkloadRestoreRequest(RestoreRequest): - """AzureWorkload-specific restore. - - 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, - *, - 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 - ): - 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. - - :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'}, - } - - 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 - ): - 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. - - 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]'}, - } - - 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 - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - :param time_ranges: List of log ranges. - :type time_ranges: list[~azure.mgmt.recoveryservicesbackup.models.PointInTimeRange] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - 'time_ranges': {'key': 'timeRanges', 'type': '[PointInTimeRange]'}, - } - - def __init__( - self, - *, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, - recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, - time_ranges: Optional[List["PointInTimeRange"]] = None, - **kwargs - ): - super(AzureWorkloadSAPHanaPointInTimeRecoveryPointAutoGenerated, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, time_ranges=time_ranges, **kwargs) - self.object_type = 'AzureWorkloadSAPHanaPointInTimeRecoveryPoint' # type: str - - -class AzureWorkloadSAPHanaRestoreRequest(AzureWorkloadRestoreRequest): - """AzureWorkload SAP Hana-specific restore. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSAPHanaPointInTimeRestoreRequest, AzureWorkloadSAPHanaRestoreWithRehydrateRequest. - - 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': {'AzureWorkloadSAPHanaPointInTimeRestoreRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreRequest', 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest': 'AzureWorkloadSAPHanaRestoreWithRehydrateRequest'} - } - - 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 - ): - 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. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. 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'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest': 'AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest'} - } - - 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 - ): - 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 AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSAPHanaPointInTimeRestoreRequest): - """AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. 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 - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, - 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, - 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, - 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, - } - - def __init__( - self, - *, - recovery_type: 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, - recovery_point_rehydration_info: Optional["RecoveryPointRehydrationInfo"] = None, - **kwargs - ): - 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 - - -class AzureWorkloadSAPHanaRecoveryPoint(AzureWorkloadRecoveryPoint): - """SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints. - - 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 - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_time_in_utc: UTC time at which recovery point was created. - :vartype recovery_point_time_in_utc: ~datetime.datetime - :ivar type: Type of restore point. Possible values include: "Invalid", "Full", "Log", - "Differential", "Incremental". - :vartype type: str or ~azure.mgmt.recoveryservicesbackup.models.RestorePointType - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_time_in_utc': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_time_in_utc': {'key': 'recoveryPointTimeInUTC', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - } - - def __init__( - self, - *, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, - recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, - **kwargs - ): - super(AzureWorkloadSAPHanaRecoveryPointAutoGenerated, self).__init__(recovery_point_tier_details=recovery_point_tier_details, recovery_point_move_readiness_info=recovery_point_move_readiness_info, **kwargs) - self.object_type = 'AzureWorkloadSAPHanaRecoveryPoint' # type: str - - -class AzureWorkloadSAPHanaRestoreWithRehydrateRequest(AzureWorkloadSAPHanaRestoreRequest): - """AzureWorkload SAP Hana-specific restore with integrated rehydration of recovery point. - - 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 recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, - 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, - 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, - } - - def __init__( - self, - *, - recovery_type: 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, - recovery_point_rehydration_info: Optional["RecoveryPointRehydrationInfo"] = None, - **kwargs - ): - 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 - - -class AzureWorkloadSQLAutoProtectionIntent(AzureWorkloadAutoProtectionIntent): - """Azure Workload SQL Auto Protection intent item. - - 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", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type 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 - 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", - "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. - Possible values include: "Invalid", "SQLInstance", "SQLDataBase", "SAPHanaSystem", - "SAPHanaDatabase", "SAPAseSystem", "SAPAseDatabase". - :type workload_item_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadItemType - """ - - _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'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - } - - def __init__( - self, - *, - 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, - workload_item_type: Optional[Union[str, "WorkloadItemType"]] = None, - **kwargs - ): - 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 - - -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. - - 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 - """ - - _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'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadSQLPointInTimeRecoveryPoint': 'AzureWorkloadSQLPointInTimeRecoveryPoint'} - } - - 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, - extended_info: Optional["AzureWorkloadSQLRecoveryPointExtendedInfo"] = None, - **kwargs - ): - 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 - - -class AzureWorkloadSQLPointInTimeRecoveryPoint(AzureWorkloadSQLRecoveryPoint): - """Recovery point specific to PointInTime. - - 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, - *, - 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, - extended_info: Optional["AzureWorkloadSQLRecoveryPointExtendedInfo"] = None, - time_ranges: Optional[List["PointInTimeRange"]] = None, - **kwargs - ): - 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. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSQLPointInTimeRestoreRequest, AzureWorkloadSQLRestoreWithRehydrateRequest. - - 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 should_use_alternate_target_location: Default option set to true. If this is set to - false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when - restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: - list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] - """ - - _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', 'AzureWorkloadSQLRestoreWithRehydrateRequest': 'AzureWorkloadSQLRestoreWithRehydrateRequest'} - } - - 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 - ): - 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. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. 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 should_use_alternate_target_location: Default option set to true. If this is set to - false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when - restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: - list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] - :param point_in_time: PointInTime value. - :type point_in_time: ~datetime.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'}, - } - - _subtype_map = { - 'object_type': {'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest': 'AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest'} - } - - 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 - ): - 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 AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest(AzureWorkloadSQLPointInTimeRestoreRequest): - """AzureWorkload SQL-specific restore with integrated rehydration of recovery point. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. 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 should_use_alternate_target_location: Default option set to true. If this is set to - false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when - restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: - list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] - :param point_in_time: PointInTime value. - :type point_in_time: ~datetime.datetime - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, - 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, - 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, - 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, - 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, - 'point_in_time': {'key': 'pointInTime', 'type': 'iso-8601'}, - 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, - } - - def __init__( - self, - *, - recovery_type: 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, - recovery_point_rehydration_info: Optional["RecoveryPointRehydrationInfo"] = None, - **kwargs - ): - 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 - - -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, - *, - data_directory_time_in_utc: Optional[datetime.datetime] = None, - data_directory_paths: Optional[List["SQLDataDirectory"]] = None, - **kwargs - ): - 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 - 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 should_use_alternate_target_location: Default option set to true. If this is set to - false, alternate data directory must be provided. - :type should_use_alternate_target_location: bool - :param is_non_recoverable: SQL specific property where user can chose to set no-recovery when - restore operation is tried. - :type is_non_recoverable: bool - :param alternate_directory_paths: Data directory details. - :type alternate_directory_paths: - list[~azure.mgmt.recoveryservicesbackup.models.SQLDataDirectoryMapping] - :param recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, - 'target_info': {'key': 'targetInfo', 'type': 'TargetRestoreInfo'}, - 'recovery_mode': {'key': 'recoveryMode', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'should_use_alternate_target_location': {'key': 'shouldUseAlternateTargetLocation', 'type': 'bool'}, - 'is_non_recoverable': {'key': 'isNonRecoverable', 'type': 'bool'}, - 'alternate_directory_paths': {'key': 'alternateDirectoryPaths', 'type': '[SQLDataDirectoryMapping]'}, - 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, - } - - def __init__( - self, - *, - recovery_type: 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 - ): - 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 BackupEngineBaseResource(Resource): - """The base backup engine class. All workload specific backup engines derive 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 - :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 - """ - - _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': 'BackupEngineBase'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["BackupEngineBase"] = None, - **kwargs - ): - super(BackupEngineBaseResource, 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. - - :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next - page of resources. - :type next_link: str - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - **kwargs - ): - super(ResourceList, self).__init__(**kwargs) - self.next_link = next_link - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[BackupEngineBaseResource]'}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - value: Optional[List["BackupEngineBaseResource"]] = None, - **kwargs - ): - super(BackupEngineBaseResourceList, self).__init__(next_link=next_link, **kwargs) - self.value = value - - -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 - """ - - _attribute_map = { - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'protected_servers_count': {'key': 'protectedServersCount', 'type': 'int'}, - 'disk_count': {'key': 'diskCount', 'type': 'int'}, - 'used_disk_space': {'key': 'usedDiskSpace', 'type': 'float'}, - 'available_disk_space': {'key': 'availableDiskSpace', 'type': 'float'}, - 'refreshed_at': {'key': 'refreshedAt', 'type': 'iso-8601'}, - 'azure_protected_instances': {'key': 'azureProtectedInstances', 'type': 'int'}, - } - - def __init__( - self, - *, - database_name: Optional[str] = None, - protected_items_count: Optional[int] = None, - protected_servers_count: Optional[int] = None, - disk_count: Optional[int] = None, - used_disk_space: Optional[float] = None, - available_disk_space: Optional[float] = None, - refreshed_at: Optional[datetime.datetime] = None, - azure_protected_instances: Optional[int] = None, - **kwargs - ): - super(BackupEngineExtendedInfo, self).__init__(**kwargs) - self.database_name = database_name - self.protected_items_count = protected_items_count - self.protected_servers_count = protected_servers_count - self.disk_count = disk_count - self.used_disk_space = used_disk_space - self.available_disk_space = available_disk_space - self.refreshed_at = refreshed_at - self.azure_protected_instances = azure_protected_instances - - -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 - """ - - _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 - ): - 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. - - :param value: The list of backup management usages for the given vault. - :type value: list[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsage] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BackupManagementUsage]'}, - } - - def __init__( - self, - *, - value: Optional[List["BackupManagementUsage"]] = None, - **kwargs - ): - super(BackupManagementUsageList, self).__init__(**kwargs) - self.value = value - - -class BackupRequestResource(Resource): - """Base class for backup request. Workload-specific backup requests 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 - :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 - """ - - _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': 'BackupRequest'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["BackupRequest"] = None, - **kwargs - ): - super(BackupRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -class BackupResourceConfig(msrest.serialization.Model): - """The resource storage details. - - :param 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", - "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, - 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 - """ - - _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 - ): - 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 - :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 - """ - - _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 - ): - super(BackupResourceConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -class BackupResourceEncryptionConfig(msrest.serialization.Model): - """BackupResourceEncryptionConfig. - - :param encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", - "MicrosoftManaged", "CustomerManaged". - :type 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", - "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", - "Enabled". - :type infrastructure_encryption_state: str or - ~azure.mgmt.recoveryservicesbackup.models.InfrastructureEncryptionState - """ - - _attribute_map = { - 'encryption_at_rest_type': {'key': 'encryptionAtRestType', 'type': 'str'}, - 'key_uri': {'key': 'keyUri', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'last_update_status': {'key': 'lastUpdateStatus', 'type': 'str'}, - 'infrastructure_encryption_state': {'key': 'infrastructureEncryptionState', 'type': 'str'}, - } - - def __init__( - self, - *, - encryption_at_rest_type: Optional[Union[str, "EncryptionAtRestType"]] = None, - key_uri: Optional[str] = None, - subscription_id: Optional[str] = None, - last_update_status: Optional[Union[str, "LastUpdateStatus"]] = None, - infrastructure_encryption_state: Optional[Union[str, "InfrastructureEncryptionState"]] = None, - **kwargs - ): - super(BackupResourceEncryptionConfig, self).__init__(**kwargs) - self.encryption_at_rest_type = encryption_at_rest_type - self.key_uri = key_uri - self.subscription_id = subscription_id - self.last_update_status = last_update_status - self.infrastructure_encryption_state = infrastructure_encryption_state - - -class BackupResourceEncryptionConfigExtended(BackupResourceEncryptionConfig): - """BackupResourceEncryptionConfigExtended. - - :param encryption_at_rest_type: Encryption At Rest Type. Possible values include: "Invalid", - "MicrosoftManaged", "CustomerManaged". - :type 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", - "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", - "Enabled". - :type 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 - """ - - _attribute_map = { - 'encryption_at_rest_type': {'key': 'encryptionAtRestType', 'type': 'str'}, - 'key_uri': {'key': 'keyUri', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'last_update_status': {'key': 'lastUpdateStatus', 'type': 'str'}, - 'infrastructure_encryption_state': {'key': 'infrastructureEncryptionState', 'type': 'str'}, - 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, - 'use_system_assigned_identity': {'key': 'useSystemAssignedIdentity', 'type': 'bool'}, - } - - def __init__( - self, - *, - encryption_at_rest_type: Optional[Union[str, "EncryptionAtRestType"]] = None, - key_uri: Optional[str] = None, - subscription_id: Optional[str] = None, - last_update_status: Optional[Union[str, "LastUpdateStatus"]] = None, - infrastructure_encryption_state: Optional[Union[str, "InfrastructureEncryptionState"]] = None, - user_assigned_identity: Optional[str] = None, - use_system_assigned_identity: Optional[bool] = None, - **kwargs - ): - 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 - - -class BackupResourceEncryptionConfigExtendedResource(Resource): - """BackupResourceEncryptionConfigExtendedResource. - - 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: BackupResourceEncryptionConfigExtendedResource properties. - :type properties: - ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtended - """ - - _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': 'BackupResourceEncryptionConfigExtended'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["BackupResourceEncryptionConfigExtended"] = None, - **kwargs - ): - super(BackupResourceEncryptionConfigExtendedResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -class BackupResourceEncryptionConfigResource(Resource): - """BackupResourceEncryptionConfigResource. - - 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: BackupResourceEncryptionConfigResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfig - """ - - _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': 'BackupResourceEncryptionConfig'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["BackupResourceEncryptionConfig"] = None, - **kwargs - ): - super(BackupResourceEncryptionConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -class BackupResourceVaultConfig(msrest.serialization.Model): - """Backup resource vault config details. - - :param 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", - "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, - the storageTypeState is always Locked. Possible values include: "Invalid", "Locked", - "Unlocked". - :type storage_type_state: str or ~azure.mgmt.recoveryservicesbackup.models.StorageTypeState - :param enhanced_security_state: Enabled or Disabled. Possible values include: "Invalid", - "Enabled", "Disabled". - :type enhanced_security_state: str or - ~azure.mgmt.recoveryservicesbackup.models.EnhancedSecurityState - :param soft_delete_feature_state: Soft Delete feature state. Possible values include: - "Invalid", "Enabled", "Disabled". - :type soft_delete_feature_state: str or - ~azure.mgmt.recoveryservicesbackup.models.SoftDeleteFeatureState - :param resource_guard_operation_requests: ResourceGuard Operation Requests. - :type resource_guard_operation_requests: list[str] - """ - - _attribute_map = { - 'storage_model_type': {'key': 'storageModelType', 'type': 'str'}, - 'storage_type': {'key': 'storageType', 'type': 'str'}, - 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, - 'enhanced_security_state': {'key': 'enhancedSecurityState', 'type': 'str'}, - 'soft_delete_feature_state': {'key': 'softDeleteFeatureState', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - } - - 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, - 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 - ): - super(BackupResourceVaultConfig, self).__init__(**kwargs) - self.storage_model_type = storage_model_type - self.storage_type = storage_type - self.storage_type_state = storage_type_state - self.enhanced_security_state = enhanced_security_state - self.soft_delete_feature_state = soft_delete_feature_state - self.resource_guard_operation_requests = resource_guard_operation_requests - - -class BackupResourceVaultConfigResource(Resource): - """Backup resource vault config details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource Id represents the complete path to the resource. - :vartype id: str - :ivar name: Resource name associated with the resource. - :vartype name: str - :ivar type: Resource type represents the complete path of the form - Namespace/ResourceType/ResourceType/... - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: 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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BackupResourceVaultConfig'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["BackupResourceVaultConfig"] = None, - **kwargs - ): - super(BackupResourceVaultConfigResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -class BackupStatusRequest(msrest.serialization.Model): - """BackupStatus request. - - :param 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 - """ - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'po_logical_name': {'key': 'poLogicalName', 'type': 'str'}, - } - - def __init__( - self, - *, - resource_type: Optional[Union[str, "DataSourceType"]] = None, - resource_id: Optional[str] = None, - po_logical_name: Optional[str] = None, - **kwargs - ): - super(BackupStatusRequest, self).__init__(**kwargs) - self.resource_type = resource_type - self.resource_id = resource_id - self.po_logical_name = po_logical_name - - -class BackupStatusResponse(msrest.serialization.Model): - """BackupStatus response. - - :param 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. - iaasvmcontainer;iaasvmcontainer;csname;vmname. - :type container_name: str - :param 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 - """ - - _attribute_map = { - 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, - 'vault_id': {'key': 'vaultId', 'type': 'str'}, - 'fabric_name': {'key': 'fabricName', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, - 'error_code': {'key': 'errorCode', 'type': 'str'}, - 'error_message': {'key': 'errorMessage', 'type': 'str'}, - 'policy_name': {'key': 'policyName', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - } - - def __init__( - self, - *, - protection_status: Optional[Union[str, "ProtectionStatus"]] = None, - vault_id: Optional[str] = None, - fabric_name: Optional[Union[str, "FabricName"]] = None, - container_name: Optional[str] = None, - protected_item_name: Optional[str] = None, - error_code: Optional[str] = None, - error_message: Optional[str] = None, - policy_name: Optional[str] = None, - registration_status: Optional[str] = None, - **kwargs - ): - super(BackupStatusResponse, self).__init__(**kwargs) - self.protection_status = protection_status - self.vault_id = vault_id - self.fabric_name = fabric_name - self.container_name = container_name - self.protected_item_name = protected_item_name - self.error_code = error_code - self.error_message = error_message - self.policy_name = policy_name - self.registration_status = registration_status - - -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 - """ - - _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 - ): - 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 - """ - - _attribute_map = { - 'expand': {'key': 'expand', 'type': 'str'}, - } - - def __init__( - self, - *, - expand: Optional[str] = None, - **kwargs - ): - super(BMSBackupEngineQueryObject, self).__init__(**kwargs) - self.expand = expand - - -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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type 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 - """ - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'expand': {'key': 'expand', 'type': 'str'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - friendly_name: Optional[str] = None, - expand: Optional[str] = None, - **kwargs - ): - super(BMSBackupEnginesQueryObject, self).__init__(**kwargs) - self.backup_management_type = backup_management_type - self.friendly_name = friendly_name - self.expand = expand - - -class BMSBackupSummariesQueryObject(msrest.serialization.Model): - """Query parameters to fetch backup summaries. - - :param type: Backup management type for this container. Possible values include: "Invalid", - "BackupProtectedItemCountSummary", "BackupProtectionContainerCountSummary". - :type type: str or ~azure.mgmt.recoveryservicesbackup.models.Type - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "Type"]] = None, - **kwargs - ): - super(BMSBackupSummariesQueryObject, self).__init__(**kwargs) - self.type = type - - -class BMSContainerQueryObject(msrest.serialization.Model): - """The query filters that can be used with the list containers API. - - All required parameters must be populated in order to send to Azure. - - :param 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 - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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 - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, - 'fabric_name': {'key': 'fabricName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - } - - def __init__( - self, - *, - backup_management_type: Union[str, "BackupManagementType"], - container_type: Optional[Union[str, "ContainerType"]] = None, - backup_engine_name: Optional[str] = None, - fabric_name: Optional[str] = None, - status: Optional[str] = None, - friendly_name: Optional[str] = None, - **kwargs - ): - super(BMSContainerQueryObject, self).__init__(**kwargs) - self.backup_management_type = backup_management_type - self.container_type = container_type - self.backup_engine_name = backup_engine_name - self.fabric_name = fabric_name - self.status = status - self.friendly_name = friendly_name - - -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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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 - """ - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - workload_type: Optional[Union[str, "WorkloadType"]] = None, - **kwargs - ): - super(BMSContainersInquiryQueryObject, self).__init__(**kwargs) - self.backup_management_type = backup_management_type - self.workload_type = workload_type - - -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", - "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", - "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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 - """ - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - workload_type: Optional[Union[str, "WorkloadType"]] = None, - container_name: Optional[str] = None, - status: Optional[str] = None, - friendly_name: Optional[str] = None, - **kwargs - ): - super(BMSPOQueryObject, self).__init__(**kwargs) - self.backup_management_type = backup_management_type - self.workload_type = workload_type - self.container_name = container_name - self.status = status - self.friendly_name = friendly_name - - -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 - 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(BMSRefreshContainersQueryObject, self).__init__(**kwargs) - self.backup_management_type = backup_management_type - - -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", - "Log", "Differential", "FullAndDifferential", "All", "Incremental". - :type restore_point_query_type: str or - ~azure.mgmt.recoveryservicesbackup.models.RestorePointQueryType - :param extended_info: In Get Recovery Point, it tells whether extended information about - recovery point is asked. - :type extended_info: bool - :param move_ready_rp_only: Whether the RP can be moved to another tier. - :type move_ready_rp_only: bool - """ - - _attribute_map = { - '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 - ): - super(BMSRPQueryObject, self).__init__(**kwargs) - self.start_date = start_date - self.end_date = end_date - self.restore_point_query_type = restore_point_query_type - self.extended_info = extended_info - self.move_ready_rp_only = move_ready_rp_only - - -class BMSWorkloadItemQueryObject(msrest.serialization.Model): - """Filters to list items that can be backed up. - - :param backup_management_type: Backup management type. 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_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", - "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", - "NotProtected", "Protecting", "Protected", "ProtectionFailed". - :type protection_status: str or ~azure.mgmt.recoveryservicesbackup.models.ProtectionStatus - """ - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'workload_item_type': {'key': 'workloadItemType', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - workload_item_type: Optional[Union[str, "WorkloadItemType"]] = None, - workload_type: Optional[Union[str, "WorkloadType"]] = None, - protection_status: Optional[Union[str, "ProtectionStatus"]] = None, - **kwargs - ): - super(BMSWorkloadItemQueryObject, self).__init__(**kwargs) - self.backup_management_type = backup_management_type - self.workload_item_type = workload_item_type - self.workload_type = workload_type - self.protection_status = protection_status - - -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 - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - *, - provider: Optional[str] = None, - resource: Optional[str] = None, - operation: Optional[str] = None, - description: Optional[str] = None, - **kwargs - ): - super(ClientDiscoveryDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - - -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 - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - blob_duration: Optional[str] = None, - **kwargs - ): - super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration - - -class ClientDiscoveryForProperties(msrest.serialization.Model): - """Class to represent shoebox properties in json client discovery. - - :param service_specification: Operation properties. - :type service_specification: - ~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, - } - - def __init__( - self, - *, - service_specification: Optional["ClientDiscoveryForServiceSpecification"] = None, - **kwargs - ): - super(ClientDiscoveryForProperties, self).__init__(**kwargs) - self.service_specification = service_specification - - -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: - list[~azure.mgmt.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification] - """ - - _attribute_map = { - 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, - } - - def __init__( - self, - *, - log_specifications: Optional[List["ClientDiscoveryForLogSpecification"]] = None, - **kwargs - ): - super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) - self.log_specifications = log_specifications - - -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 - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ClientDiscoveryValueForSingleApi]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ClientDiscoveryValueForSingleApi"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ClientDiscoveryResponse, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -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 - 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 - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display: Optional["ClientDiscoveryDisplay"] = None, - origin: Optional[str] = None, - properties: Optional["ClientDiscoveryForProperties"] = None, - **kwargs - ): - super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties - - -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 , - .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 - 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 - given for download to user. - If its null or empty then , ignore it. - :type 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 - ): - 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 CloudErrorBody(msrest.serialization.Model): - """An error response from the Container Instance service. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed - programmatically. - :vartype code: str - :ivar message: A message describing the error, intended to be suitable for display in a user - interface. - :vartype message: str - :ivar target: The target of the particular error. For example, the name of the property in - error. - :vartype target: str - :ivar details: A list of additional details about the error. - :vartype details: list[~azure.mgmt.recoveryservicesbackup.models.CloudErrorBody] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.recoveryservicesbackup.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(CloudErrorBody, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class ContainerIdentityInfo(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}, - } - - _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 - ): - super(CrrJobRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -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] - """ - - _attribute_map = { - 'days_of_the_month': {'key': 'daysOfTheMonth', 'type': '[Day]'}, - } - - def __init__( - self, - *, - days_of_the_month: Optional[List["Day"]] = None, - **kwargs - ): - super(DailyRetentionFormat, self).__init__(**kwargs) - self.days_of_the_month = days_of_the_month - - -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 - """ - - _attribute_map = { - 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, - 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, - } - - def __init__( - self, - *, - retention_times: Optional[List[datetime.datetime]] = None, - retention_duration: Optional["RetentionDuration"] = None, - **kwargs - ): - super(DailyRetentionSchedule, self).__init__(**kwargs) - self.retention_times = retention_times - self.retention_duration = retention_duration - - -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 - """ - - _attribute_map = { - 'date': {'key': 'date', 'type': 'int'}, - 'is_last': {'key': 'isLast', 'type': 'bool'}, - } - - def __init__( - self, - *, - date: Optional[int] = None, - is_last: Optional[bool] = None, - **kwargs - ): - super(Day, self).__init__(**kwargs) - self.date = date - self.is_last = is_last - - -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 - backup. - :type 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 - ): - 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. - - :param lun: - :type lun: int - :param name: - :type 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 - ): - super(DiskInformation, self).__init__(**kwargs) - self.lun = lun - self.name = name - - -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. - Failed | Succeeded. - :type status: str - :param error_detail: Error Details if the Status is non-success. - :type error_detail: ~azure.mgmt.recoveryservicesbackup.models.ErrorDetail - """ - - _attribute_map = { - 'node_name': {'key': 'nodeName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, - } - - def __init__( - self, - *, - node_name: Optional[str] = None, - status: Optional[str] = None, - error_detail: Optional["ErrorDetail"] = None, - **kwargs - ): - super(DistributedNodesInfo, self).__init__(**kwargs) - self.node_name = node_name - self.status = status - self.error_detail = error_detail - - -class DpmBackupEngine(BackupEngineBase): - """Data Protection Manager (DPM) specific backup engine. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. = - {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. - 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 - 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 - """ - - _validation = { - 'backup_engine_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'}, - 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, - 'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'}, - 'dpm_version': {'key': 'dpmVersion', 'type': 'str'}, - 'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'}, - 'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'}, - 'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'}, - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - backup_engine_state: Optional[str] = None, - health_status: Optional[str] = None, - can_re_register: Optional[bool] = None, - backup_engine_id: Optional[str] = None, - dpm_version: Optional[str] = None, - azure_backup_agent_version: Optional[str] = None, - is_azure_backup_agent_upgrade_available: Optional[bool] = None, - is_dpm_upgrade_available: Optional[bool] = None, - extended_info: Optional["BackupEngineExtendedInfo"] = None, - **kwargs - ): - 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 - - -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 - """ - - _attribute_map = { - 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - last_refreshed_at: Optional[datetime.datetime] = None, - **kwargs - ): - super(DPMContainerExtendedInfo, self).__init__(**kwargs) - self.last_refreshed_at = last_refreshed_at - - -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] - """ - - _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 - ): - 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. - - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.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 - 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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :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 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: - "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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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 OperationResultInfoBase(msrest.serialization.Model): - """Base class for operation result info. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ExportJobsOperationResultInfo, OperationResultInfo. - - 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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - } - - _subtype_map = { - 'object_type': {'ExportJobsOperationResultInfo': 'ExportJobsOperationResultInfo', 'OperationResultInfo': 'OperationResultInfo'} - } - - def __init__( - self, - **kwargs - ): - super(OperationResultInfoBase, self).__init__(**kwargs) - self.object_type = None # type: Optional[str] - - -class ExportJobsOperationResultInfo(OperationResultInfoBase): - """This class is used to send blob details after exporting jobs. - - 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 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 - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'blob_url': {'key': 'blobUrl', 'type': 'str'}, - 'blob_sas_key': {'key': 'blobSasKey', 'type': 'str'}, - 'excel_file_blob_url': {'key': 'excelFileBlobUrl', 'type': 'str'}, - 'excel_file_blob_sas_key': {'key': 'excelFileBlobSasKey', 'type': 'str'}, - } - - def __init__( - self, - *, - blob_url: Optional[str] = None, - blob_sas_key: Optional[str] = None, - excel_file_blob_url: Optional[str] = None, - excel_file_blob_sas_key: Optional[str] = None, - **kwargs - ): - super(ExportJobsOperationResultInfo, self).__init__(**kwargs) - self.object_type = 'ExportJobsOperationResultInfo' # type: str - self.blob_url = blob_url - self.blob_sas_key = blob_sas_key - self.excel_file_blob_url = excel_file_blob_url - self.excel_file_blob_sas_key = excel_file_blob_sas_key - - -class ExtendedProperties(msrest.serialization.Model): - """Extended Properties for Azure IaasVM Backup. - - :param disk_exclusion_properties: Extended Properties for Disk Exclusion. - :type disk_exclusion_properties: - ~azure.mgmt.recoveryservicesbackup.models.DiskExclusionProperties - """ - - _attribute_map = { - 'disk_exclusion_properties': {'key': 'diskExclusionProperties', 'type': 'DiskExclusionProperties'}, - } - - def __init__( - self, - *, - disk_exclusion_properties: Optional["DiskExclusionProperties"] = None, - **kwargs - ): - super(ExtendedProperties, self).__init__(**kwargs) - self.disk_exclusion_properties = disk_exclusion_properties - - -class GenericContainer(ProtectionContainer): - """Base class for generic container of backup items. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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: - ~azure.mgmt.recoveryservicesbackup.models.GenericContainerExtendedInfo - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'fabric_name': {'key': 'fabricName', 'type': 'str'}, - 'extended_information': {'key': 'extendedInformation', 'type': 'GenericContainerExtendedInfo'}, - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - health_status: 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) - self.container_type = 'GenericContainer' # type: str - self.fabric_name = fabric_name - self.extended_information = extended_information - - -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] - """ - - _attribute_map = { - 'raw_cert_data': {'key': 'rawCertData', 'type': 'str'}, - 'container_identity_info': {'key': 'containerIdentityInfo', 'type': 'ContainerIdentityInfo'}, - 'service_endpoints': {'key': 'serviceEndpoints', 'type': '{str}'}, - } - - def __init__( - self, - *, - raw_cert_data: Optional[str] = None, - container_identity_info: Optional["ContainerIdentityInfo"] = None, - service_endpoints: Optional[Dict[str, str]] = None, - **kwargs - ): - super(GenericContainerExtendedInfo, self).__init__(**kwargs) - self.raw_cert_data = raw_cert_data - self.container_identity_info = container_identity_info - self.service_endpoints = service_endpoints - - -class GenericProtectedItem(ProtectedItem): - """Base class for backup items. - - 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 container. - :type friendly_name: str - :param 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", - "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 - protected item). - :type source_associations: dict[str, str] - :param fabric_name: Name of this backup item's fabric. - :type 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 - ): - 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 GenericProtectionPolicy(ProtectionPolicy): - """Azure VM (Mercury) workload-specific backup policy. - - 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 - 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 - retention. - :type sub_protection_policy: - list[~azure.mgmt.recoveryservicesbackup.models.SubProtectionPolicy] - :param 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 - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'fabric_name': {'key': 'fabricName', 'type': 'str'}, - } - - def __init__( - self, - *, - protected_items_count: Optional[int] = None, - resource_guard_operation_requests: Optional[List[str]] = None, - sub_protection_policy: Optional[List["SubProtectionPolicy"]] = None, - time_zone: Optional[str] = None, - fabric_name: Optional[str] = None, - **kwargs - ): - 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 - self.time_zone = time_zone - self.fabric_name = fabric_name - - -class GenericRecoveryPoint(RecoveryPoint): - """Generic 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 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 - """ - - _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 - ): - 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 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 - """ - - _attribute_map = { - 'expand': {'key': 'expand', 'type': 'str'}, - } - - def __init__( - self, - *, - expand: Optional[str] = None, - **kwargs - ): - super(GetProtectedItemQueryObject, self).__init__(**kwargs) - self.expand = expand - - -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 - 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 - (UTC). - :type recovery_point_expiry_time_in_utc: ~datetime.datetime - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_expiry_time_in_utc': {'key': 'recoveryPointExpiryTimeInUTC', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - recovery_point_expiry_time_in_utc: Optional[datetime.datetime] = None, - **kwargs - ): - super(IaasVMBackupRequest, self).__init__(**kwargs) - self.object_type = 'IaasVMBackupRequest' # type: str - self.recovery_point_expiry_time_in_utc = recovery_point_expiry_time_in_utc - - -class IaasVMILRRegistrationRequest(ILRRequest): - """Restore files/folders from a backup copy of IaaS VM. - - 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 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 / - 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 - server. - :type renew_existing_registration: bool - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - '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, - *, - recovery_point_id: Optional[str] = None, - virtual_machine_id: Optional[str] = None, - initiator_name: Optional[str] = None, - renew_existing_registration: Optional[bool] = None, - **kwargs - ): - super(IaasVMILRRegistrationRequest, self).__init__(**kwargs) - self.object_type = 'IaasVMILRRegistrationRequest' # type: str - self.recovery_point_id = recovery_point_id - self.virtual_machine_id = virtual_machine_id - self.initiator_name = initiator_name - self.renew_existing_registration = renew_existing_registration - - -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}'}, - } - - def __init__( - self, - *, - recovery_point_type: Optional[str] = None, - recovery_point_time: Optional[datetime.datetime] = None, - recovery_point_additional_info: Optional[str] = None, - source_vm_storage_type: Optional[str] = None, - is_source_vm_encrypted: Optional[bool] = None, - key_and_secret: Optional["KeyAndSecretDetails"] = None, - is_instant_ilr_session_active: Optional[bool] = None, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, - is_managed_virtual_machine: Optional[bool] = None, - virtual_machine_size: Optional[str] = None, - original_storage_account_option: Optional[bool] = None, - os_type: Optional[str] = None, - recovery_point_disk_configuration: Optional["RecoveryPointDiskConfiguration"] = None, - zones: Optional[List[str]] = None, - recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, - **kwargs - ): - super(IaasVMRecoveryPoint, self).__init__(**kwargs) - self.object_type = 'IaasVMRecoveryPoint' # type: str - self.recovery_point_type = recovery_point_type - self.recovery_point_time = recovery_point_time - self.recovery_point_additional_info = recovery_point_additional_info - self.source_vm_storage_type = source_vm_storage_type - self.is_source_vm_encrypted = is_source_vm_encrypted - self.key_and_secret = key_and_secret - self.is_instant_ilr_session_active = is_instant_ilr_session_active - self.recovery_point_tier_details = recovery_point_tier_details - self.is_managed_virtual_machine = is_managed_virtual_machine - self.virtual_machine_size = virtual_machine_size - self.original_storage_account_option = original_storage_account_option - self.os_type = os_type - self.recovery_point_disk_configuration = recovery_point_disk_configuration - self.zones = zones - self.recovery_point_move_readiness_info = recovery_point_move_readiness_info - - -class IaasVMRecoveryPointAutoGenerated(RecoveryPoint): - """IaaS VM workload specific backup copy. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :ivar recovery_point_type: Type of the backup copy. - :vartype recovery_point_type: str - :ivar recovery_point_time: Time at which this backup copy was created. - :vartype recovery_point_time: ~datetime.datetime - :ivar recovery_point_additional_info: Additional information associated with this backup copy. - :vartype recovery_point_additional_info: str - :ivar source_vm_storage_type: Storage type of the VM whose backup copy is created. - :vartype source_vm_storage_type: str - :ivar is_source_vm_encrypted: Identifies whether the VM was encrypted when the backup copy is - created. - :vartype is_source_vm_encrypted: bool - :param key_and_secret: Required details for recovering an encrypted VM. Applicable only when - IsSourceVMEncrypted is true. - :type key_and_secret: ~azure.mgmt.recoveryservicesbackup.models.KeyAndSecretDetails - :param is_instant_ilr_session_active: Is the session to recover items from this backup copy - still active. - :type is_instant_ilr_session_active: bool - :param recovery_point_tier_details: Recovery point tier information. - :type recovery_point_tier_details: - list[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierInformation] - :param is_managed_virtual_machine: Whether VM is with Managed Disks. - :type is_managed_virtual_machine: bool - :param virtual_machine_size: Virtual Machine Size. - :type virtual_machine_size: str - :param original_storage_account_option: Original Storage Account Option. - :type original_storage_account_option: bool - :param os_type: OS type. - :type os_type: str - :param recovery_point_disk_configuration: Disk configuration. - :type recovery_point_disk_configuration: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointDiskConfiguration - :param zones: Identifies the zone of the VM at the time of backup. Applicable only for - zone-pinned Vms. - :type zones: list[str] - :param recovery_point_move_readiness_info: Eligibility of RP to be moved to another tier. - :type recovery_point_move_readiness_info: dict[str, - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo] - """ - - _validation = { - 'object_type': {'required': True}, - 'recovery_point_type': {'readonly': True}, - 'recovery_point_time': {'readonly': True}, - 'recovery_point_additional_info': {'readonly': True}, - 'source_vm_storage_type': {'readonly': True}, - 'is_source_vm_encrypted': {'readonly': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, - 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, - 'recovery_point_additional_info': {'key': 'recoveryPointAdditionalInfo', 'type': 'str'}, - 'source_vm_storage_type': {'key': 'sourceVMStorageType', 'type': 'str'}, - 'is_source_vm_encrypted': {'key': 'isSourceVMEncrypted', 'type': 'bool'}, - 'key_and_secret': {'key': 'keyAndSecret', 'type': 'KeyAndSecretDetails'}, - 'is_instant_ilr_session_active': {'key': 'isInstantIlrSessionActive', 'type': 'bool'}, - 'recovery_point_tier_details': {'key': 'recoveryPointTierDetails', 'type': '[RecoveryPointTierInformation]'}, - 'is_managed_virtual_machine': {'key': 'isManagedVirtualMachine', 'type': 'bool'}, - 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, - 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'recovery_point_disk_configuration': {'key': 'recoveryPointDiskConfiguration', 'type': 'RecoveryPointDiskConfiguration'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'recovery_point_move_readiness_info': {'key': 'recoveryPointMoveReadinessInfo', 'type': '{RecoveryPointMoveReadinessInfo}'}, - } - - def __init__( - self, - *, - key_and_secret: Optional["KeyAndSecretDetails"] = None, - is_instant_ilr_session_active: Optional[bool] = None, - recovery_point_tier_details: Optional[List["RecoveryPointTierInformation"]] = None, - is_managed_virtual_machine: Optional[bool] = None, - virtual_machine_size: Optional[str] = None, - original_storage_account_option: Optional[bool] = None, - os_type: Optional[str] = None, - recovery_point_disk_configuration: Optional["RecoveryPointDiskConfiguration"] = None, - zones: Optional[List[str]] = None, - recovery_point_move_readiness_info: Optional[Dict[str, "RecoveryPointMoveReadinessInfo"]] = None, - **kwargs - ): - super(IaasVMRecoveryPointAutoGenerated, self).__init__(**kwargs) - self.object_type = 'IaasVMRecoveryPoint' # type: str - self.recovery_point_type = None - self.recovery_point_time = None - self.recovery_point_additional_info = None - self.source_vm_storage_type = None - self.is_source_vm_encrypted = None - self.key_and_secret = key_and_secret - self.is_instant_ilr_session_active = is_instant_ilr_session_active - self.recovery_point_tier_details = recovery_point_tier_details - self.is_managed_virtual_machine = is_managed_virtual_machine - self.virtual_machine_size = virtual_machine_size - self.original_storage_account_option = original_storage_account_option - self.os_type = os_type - self.recovery_point_disk_configuration = recovery_point_disk_configuration - self.zones = zones - self.recovery_point_move_readiness_info = recovery_point_move_readiness_info - - -class IaasVMRestoreRequest(RestoreRequest): - """IaaS VM workload-specific restore. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: IaasVMRestoreWithRehydrationRequest. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :param recovery_point_id: ID of the backup copy to be recovered. - :type recovery_point_id: str - :param recovery_type: Type of this recovery. Possible values include: "Invalid", - "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". - :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType - :param source_resource_id: Fully qualified ARM ID of the VM which is being recovered. - :type source_resource_id: str - :param target_virtual_machine_id: This is the complete ARM Id of the VM that will be created. - For e.g. - /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - :type target_virtual_machine_id: str - :param target_resource_group_id: This is the ARM Id of the resource group that you want to - create for this Virtual machine and other artifacts. - For e.g. /subscriptions/{subId}/resourcegroups/{rg}. - :type target_resource_group_id: str - :param storage_account_id: Fully qualified ARM ID of the storage account to which the VM has to - be restored. - :type storage_account_id: str - :param virtual_network_id: This is the virtual network Id of the vnet that will be attached to - the virtual machine. - User will be validated for join action permissions in the linked access. - :type virtual_network_id: str - :param subnet_id: Subnet ID, is the subnet ID associated with the to be restored VM. For - Classic VMs it would be - {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource - ID used to represent - the subnet. - :type subnet_id: str - :param target_domain_name_id: Fully qualified ARM ID of the domain name to be associated to the - VM being restored. This applies only to Classic - Virtual Machines. - :type target_domain_name_id: str - :param region: Region in which the virtual machine is restored. - :type region: str - :param affinity_group: Affinity group associated to VM to be restored. Used only for Classic - Compute Virtual Machines. - :type affinity_group: str - :param create_new_cloud_service: Should a new cloud service be created while restoring the VM. - If this is false, VM will be restored to the same - cloud service as it was at the time of backup. - :type create_new_cloud_service: bool - :param original_storage_account_option: Original Storage Account Option. - :type original_storage_account_option: bool - :param encryption_details: Details needed if the VM was encrypted at the time of backup. - :type encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails - :param restore_disk_lun_list: List of Disk LUNs for partial restore. - :type restore_disk_lun_list: list[int] - :param restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored - with Managed disks. - :type restore_with_managed_disks: bool - :param disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be encrypted - at rest during restore with customer managed key. - :type disk_encryption_set_id: str - :param zones: Target zone where the VM and its disks should be restored. - :type zones: list[str] - :param identity_info: Managed Identity information required to access customer storage account. - :type identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, - 'region': {'key': 'region', 'type': 'str'}, - 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, - 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, - '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'}, - } - - _subtype_map = { - 'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'} - } - - 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, - **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 - 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 - - -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, - *, - 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 - ): - super(IaasVMRestoreRequestAutoGenerated, 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 IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest): - """IaaS VM workload-specific restore with integrated rehydration of recovery point. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. 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 recovery_point_rehydration_info: RP Rehydration Info. - :type recovery_point_rehydration_info: - ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, - 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, - 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, - 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, - 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, - 'region': {'key': 'region', 'type': 'str'}, - 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, - 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, - 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, - 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, - 'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'}, - 'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'}, - 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'}, - 'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'}, - } - - 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, - 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) - self.object_type = 'IaasVMRestoreWithRehydrationRequest' # type: str - self.recovery_point_rehydration_info = recovery_point_rehydration_info - - -class IdentityBasedRestoreDetails(msrest.serialization.Model): - """IaaS VM workload specific restore details for restores using managed identity. - - :param object_type: Gets the class type. - :type object_type: str - :param target_storage_account_id: Fully qualified ARM ID of the target storage account. - :type target_storage_account_id: str - """ - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'target_storage_account_id': {'key': 'targetStorageAccountId', 'type': 'str'}, - } - - def __init__( - self, - *, - object_type: Optional[str] = None, - target_storage_account_id: Optional[str] = None, - **kwargs - ): - super(IdentityBasedRestoreDetails, self).__init__(**kwargs) - self.object_type = object_type - self.target_storage_account_id = target_storage_account_id - - -class IdentityInfo(msrest.serialization.Model): - """Encapsulates Managed Identity related information. - - :param 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 - Optional: Might not be required in the case of system assigned managed identity. - :type 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 - ): - super(IdentityInfo, self).__init__(**kwargs) - self.is_system_assigned_identity = is_system_assigned_identity - self.managed_identity_resource_id = managed_identity_resource_id - - -class ILRRequestResource(Resource): - """Parameters to Provision ILR API. - - 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: ILRRequestResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ILRRequest - """ - - _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': 'ILRRequest'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["ILRRequest"] = None, - **kwargs - ): - super(ILRRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -class InquiryInfo(msrest.serialization.Model): - """Details about inquired protectable items under a given container. - - :param 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. - For e.g. - For SQL and oracle this will contain different details. - :type inquiry_details: list[~azure.mgmt.recoveryservicesbackup.models.WorkloadInquiryDetails] - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, - 'inquiry_details': {'key': 'inquiryDetails', 'type': '[WorkloadInquiryDetails]'}, - } - - def __init__( - self, - *, - status: Optional[str] = None, - error_detail: Optional["ErrorDetail"] = None, - inquiry_details: Optional[List["WorkloadInquiryDetails"]] = None, - **kwargs - ): - super(InquiryInfo, self).__init__(**kwargs) - self.status = status - self.error_detail = error_detail - self.inquiry_details = inquiry_details - - -class InquiryValidation(msrest.serialization.Model): - """Validation for inquired protectable items under a given container. - - 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 additional_detail: Error Additional Detail in case the status is non-success. - :vartype additional_detail: str - """ - - _validation = { - 'additional_detail': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error_detail': {'key': 'errorDetail', 'type': 'ErrorDetail'}, - 'additional_detail': {'key': 'additionalDetail', 'type': 'str'}, - } - - def __init__( - self, - *, - status: Optional[str] = None, - error_detail: Optional["ErrorDetail"] = None, - **kwargs - ): - super(InquiryValidation, self).__init__(**kwargs) - self.status = status - self.error_detail = error_detail - self.additional_detail = None - - -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] - """ - - _attribute_map = { - 'client_scripts': {'key': 'clientScripts', 'type': '[ClientScriptForConnect]'}, - } - - def __init__( - self, - *, - client_scripts: Optional[List["ClientScriptForConnect"]] = None, - **kwargs - ): - super(InstantItemRecoveryTarget, self).__init__(**kwargs) - self.client_scripts = client_scripts - - -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 - """ - - _attribute_map = { - 'azure_backup_rg_name_prefix': {'key': 'azureBackupRGNamePrefix', 'type': 'str'}, - 'azure_backup_rg_name_suffix': {'key': 'azureBackupRGNameSuffix', 'type': 'str'}, - } - - def __init__( - self, - *, - azure_backup_rg_name_prefix: Optional[str] = None, - azure_backup_rg_name_suffix: Optional[str] = None, - **kwargs - ): - 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 - - -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: - "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", - "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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 - """ - - _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 - ): - 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 - :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 - """ - - _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 - ): - super(JobResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -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] - """ - - _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 - ): - super(JobResourceList, self).__init__(next_link=next_link, **kwargs) - self.value = value - - -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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :param resource_health_status: Resource Health Status. Possible values include: "Healthy", - "TransientDegraded", "PersistentDegraded", "TransientUnhealthy", "PersistentUnhealthy", - "Invalid". - :type resource_health_status: str or - ~azure.mgmt.recoveryservicesbackup.models.ResourceHealthStatus - :param resource_health_details: Resource Health Status. - :type resource_health_details: - list[~azure.mgmt.recoveryservicesbackup.models.ResourceHealthDetails] - """ - - _attribute_map = { - 'resource_health_status': {'key': 'resourceHealthStatus', 'type': 'str'}, - 'resource_health_details': {'key': 'resourceHealthDetails', 'type': '[ResourceHealthDetails]'}, - } - - def __init__( - self, - *, - resource_health_status: Optional[Union[str, "ResourceHealthStatus"]] = None, - resource_health_details: Optional[List["ResourceHealthDetails"]] = None, - **kwargs - ): - super(KPIResourceHealthDetails, self).__init__(**kwargs) - self.resource_health_status = resource_health_status - self.resource_health_details = resource_health_details - - -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] - """ - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'excluded_rp_list': {'key': 'excludedRPList', 'type': '[str]'}, - } - - def __init__( - self, - *, - object_type: Optional[str] = None, - excluded_rp_list: Optional[List[str]] = None, - **kwargs - ): - super(ListRecoveryPointsRecommendedForMoveRequest, self).__init__(**kwargs) - self.object_type = object_type - self.excluded_rp_list = excluded_rp_list - - -class SchedulePolicy(msrest.serialization.Model): - """Base class for backup schedule. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LogSchedulePolicy, LongTermSchedulePolicy, SimpleSchedulePolicy. - - 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 - deciding the specific types in the polymorphic chain of types.Constant filled by server. - :type schedule_policy_type: str - """ - - _validation = { - 'schedule_policy_type': {'required': True}, - } - - _attribute_map = { - 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, - } - - _subtype_map = { - 'schedule_policy_type': {'LogSchedulePolicy': 'LogSchedulePolicy', 'LongTermSchedulePolicy': 'LongTermSchedulePolicy', 'SimpleSchedulePolicy': 'SimpleSchedulePolicy'} - } - - def __init__( - self, - **kwargs - ): - super(SchedulePolicy, self).__init__(**kwargs) - self.schedule_policy_type = None # type: Optional[str] - - -class LogSchedulePolicy(SchedulePolicy): - """Log policy schedule. - - 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 - 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 - minutes. - :type schedule_frequency_in_mins: int - """ - - _validation = { - 'schedule_policy_type': {'required': True}, - } - - _attribute_map = { - 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, - 'schedule_frequency_in_mins': {'key': 'scheduleFrequencyInMins', 'type': 'int'}, - } - - def __init__( - self, - *, - schedule_frequency_in_mins: Optional[int] = None, - **kwargs - ): - super(LogSchedulePolicy, self).__init__(**kwargs) - self.schedule_policy_type = 'LogSchedulePolicy' # type: str - self.schedule_frequency_in_mins = schedule_frequency_in_mins - - -class RetentionPolicy(msrest.serialization.Model): - """Base class for retention policy. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LongTermRetentionPolicy, SimpleRetentionPolicy. - - 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 - deciding the specific types in the polymorphic chain of types.Constant filled by server. - :type retention_policy_type: str - """ - - _validation = { - 'retention_policy_type': {'required': True}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, - } - - _subtype_map = { - 'retention_policy_type': {'LongTermRetentionPolicy': 'LongTermRetentionPolicy', 'SimpleRetentionPolicy': 'SimpleRetentionPolicy'} - } - - def __init__( - self, - **kwargs - ): - super(RetentionPolicy, self).__init__(**kwargs) - self.retention_policy_type = None # type: Optional[str] - - -class LongTermRetentionPolicy(RetentionPolicy): - """Long term retention policy. - - 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 - 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 - """ - - _validation = { - 'retention_policy_type': {'required': True}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, - 'daily_schedule': {'key': 'dailySchedule', 'type': 'DailyRetentionSchedule'}, - 'weekly_schedule': {'key': 'weeklySchedule', 'type': 'WeeklyRetentionSchedule'}, - 'monthly_schedule': {'key': 'monthlySchedule', 'type': 'MonthlyRetentionSchedule'}, - 'yearly_schedule': {'key': 'yearlySchedule', 'type': 'YearlyRetentionSchedule'}, - } - - def __init__( - self, - *, - daily_schedule: Optional["DailyRetentionSchedule"] = None, - weekly_schedule: Optional["WeeklyRetentionSchedule"] = None, - monthly_schedule: Optional["MonthlyRetentionSchedule"] = None, - yearly_schedule: Optional["YearlyRetentionSchedule"] = None, - **kwargs - ): - super(LongTermRetentionPolicy, self).__init__(**kwargs) - self.retention_policy_type = 'LongTermRetentionPolicy' # type: str - self.daily_schedule = daily_schedule - self.weekly_schedule = weekly_schedule - self.monthly_schedule = monthly_schedule - self.yearly_schedule = yearly_schedule - - -class LongTermSchedulePolicy(SchedulePolicy): - """Long term policy schedule. - - 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 - deciding the specific types in the polymorphic chain of types.Constant filled by server. - :type schedule_policy_type: str - """ - - _validation = { - 'schedule_policy_type': {'required': True}, - } - - _attribute_map = { - 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LongTermSchedulePolicy, self).__init__(**kwargs) - self.schedule_policy_type = 'LongTermSchedulePolicy' # type: str - - -class MabContainer(ProtectionContainer): - """Container with items backed up using MAB backup engine. - - 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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. - 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", - "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: - list[~azure.mgmt.recoveryservicesbackup.models.MABContainerHealthDetails] - :param container_health_state: Health state of mab container. - :type container_health_state: str - """ - - _validation = { - 'container_type': {'required': True}, - } - - _attribute_map = { - 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'registration_status': {'key': 'registrationStatus', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'can_re_register': {'key': 'canReRegister', 'type': 'bool'}, - 'container_id': {'key': 'containerId', 'type': 'long'}, - 'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'}, - 'agent_version': {'key': 'agentVersion', 'type': 'str'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'MabContainerExtendedInfo'}, - 'mab_container_health_details': {'key': 'mabContainerHealthDetails', 'type': '[MABContainerHealthDetails]'}, - 'container_health_state': {'key': 'containerHealthState', 'type': 'str'}, - } - - def __init__( - self, - *, - friendly_name: Optional[str] = None, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - registration_status: Optional[str] = None, - health_status: Optional[str] = None, - can_re_register: Optional[bool] = None, - container_id: Optional[int] = None, - protected_item_count: Optional[int] = None, - agent_version: Optional[str] = None, - extended_info: Optional["MabContainerExtendedInfo"] = None, - mab_container_health_details: Optional[List["MABContainerHealthDetails"]] = None, - 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) - self.container_type = 'Windows' # type: str - self.can_re_register = can_re_register - self.container_id = container_id - self.protected_item_count = protected_item_count - self.agent_version = agent_version - self.extended_info = extended_info - self.mab_container_health_details = mab_container_health_details - self.container_health_state = container_health_state - - -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 - 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 - """ - - _attribute_map = { - 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, - 'backup_item_type': {'key': 'backupItemType', 'type': 'str'}, - 'backup_items': {'key': 'backupItems', 'type': '[str]'}, - 'policy_name': {'key': 'policyName', 'type': 'str'}, - 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, - } - - def __init__( - self, - *, - last_refreshed_at: Optional[datetime.datetime] = None, - backup_item_type: Optional[Union[str, "BackupItemType"]] = None, - backup_items: Optional[List[str]] = None, - policy_name: Optional[str] = None, - last_backup_status: Optional[str] = None, - **kwargs - ): - super(MabContainerExtendedInfo, self).__init__(**kwargs) - self.last_refreshed_at = last_refreshed_at - self.backup_item_type = backup_item_type - self.backup_items = backup_items - self.policy_name = policy_name - self.last_backup_status = last_backup_status - - -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] - """ - - _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, - *, - code: Optional[int] = None, - title: Optional[str] = None, - message: Optional[str] = None, - recommendations: Optional[List[str]] = None, - **kwargs - ): - super(MABContainerHealthDetails, self).__init__(**kwargs) - self.code = code - self.title = title - self.message = message - self.recommendations = recommendations - - -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. - - :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 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: - ~azure.mgmt.recoveryservicesbackup.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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.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 - 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", - "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", - "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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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 MabProtectionPolicy(ProtectionPolicy): - """Mab container-specific backup policy. - - 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 - 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 - """ - - _validation = { - 'backup_management_type': {'required': True}, - } - - _attribute_map = { - 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, - 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, - } - - def __init__( - self, - *, - protected_items_count: Optional[int] = None, - resource_guard_operation_requests: Optional[List[str]] = None, - schedule_policy: Optional["SchedulePolicy"] = None, - retention_policy: Optional["RetentionPolicy"] = None, - **kwargs - ): - 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 - self.retention_policy = retention_policy - - -class MonthlyRetentionSchedule(msrest.serialization.Model): - """Monthly retention schedule. - - :param 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 - ~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: - ~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 - """ - - _attribute_map = { - 'retention_schedule_format_type': {'key': 'retentionScheduleFormatType', 'type': 'str'}, - 'retention_schedule_daily': {'key': 'retentionScheduleDaily', 'type': 'DailyRetentionFormat'}, - 'retention_schedule_weekly': {'key': 'retentionScheduleWeekly', 'type': 'WeeklyRetentionFormat'}, - 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, - 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, - } - - def __init__( - self, - *, - retention_schedule_format_type: Optional[Union[str, "RetentionScheduleFormat"]] = None, - retention_schedule_daily: Optional["DailyRetentionFormat"] = None, - retention_schedule_weekly: Optional["WeeklyRetentionFormat"] = None, - retention_times: Optional[List[datetime.datetime]] = None, - retention_duration: Optional["RetentionDuration"] = None, - **kwargs - ): - super(MonthlyRetentionSchedule, self).__init__(**kwargs) - self.retention_schedule_format_type = retention_schedule_format_type - self.retention_schedule_daily = retention_schedule_daily - self.retention_schedule_weekly = retention_schedule_weekly - self.retention_times = retention_times - self.retention_duration = retention_duration - - -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: - "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". - :type source_tier_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType - :param target_tier_type: Target tier where RP needs to be moved. Possible values include: - "Invalid", "InstantRP", "HardenedRP", "ArchivedRP". - :type target_tier_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierType - """ - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'source_tier_type': {'key': 'sourceTierType', 'type': 'str'}, - 'target_tier_type': {'key': 'targetTierType', 'type': 'str'}, - } - - def __init__( - self, - *, - object_type: Optional[str] = None, - source_tier_type: Optional[Union[str, "RecoveryPointTierType"]] = None, - target_tier_type: Optional[Union[str, "RecoveryPointTierType"]] = None, - **kwargs - ): - super(MoveRPAcrossTiersRequest, self).__init__(**kwargs) - self.object_type = object_type - self.source_tier_type = source_tier_type - self.target_tier_type = target_tier_type - - -class NameInfo(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 - """ - - _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 - ): - super(NameInfo, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value - - -class NewErrorResponse(msrest.serialization.Model): - """The resource management error response. - - :param error: The error object. - :type error: ~azure.mgmt.recoveryservicesbackup.models.NewErrorResponseError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'NewErrorResponseError'}, - } - - def __init__( - self, - *, - error: Optional["NewErrorResponseError"] = None, - **kwargs - ): - 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. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.recoveryservicesbackup.models.NewErrorResponse] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.recoveryservicesbackup.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[NewErrorResponse]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(NewErrorResponseError, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class 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 - 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] - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'job_list': {'key': 'jobList', 'type': '[str]'}, - } - - def __init__( - self, - *, - job_list: Optional[List[str]] = None, - **kwargs - ): - super(OperationResultInfo, self).__init__(**kwargs) - self.object_type = 'OperationResultInfo' # type: str - self.job_list = job_list - - -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", - "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". - :type status_code: str or ~azure.mgmt.recoveryservicesbackup.models.HttpStatusCode - :param headers: HTTP headers associated with this operation. - :type headers: dict[str, list[str]] - """ - - _attribute_map = { - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'headers': {'key': 'headers', 'type': '{[str]}'}, - } - - def __init__( - self, - *, - status_code: Optional[Union[str, "HttpStatusCode"]] = None, - headers: Optional[Dict[str, List[str]]] = None, - **kwargs - ): - super(OperationWorkerResponse, self).__init__(**kwargs) - self.status_code = status_code - self.headers = headers - - -class OperationResultInfoBaseResource(OperationWorkerResponse): - """Base class for operation result info. - - :param 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". - :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 - """ - - _attribute_map = { - 'status_code': {'key': 'statusCode', 'type': 'str'}, - 'headers': {'key': 'headers', 'type': '{[str]}'}, - 'operation': {'key': 'operation', 'type': 'OperationResultInfoBase'}, - } - - def __init__( - self, - *, - status_code: Optional[Union[str, "HttpStatusCode"]] = None, - headers: Optional[Dict[str, List[str]]] = None, - operation: Optional["OperationResultInfoBase"] = None, - **kwargs - ): - super(OperationResultInfoBaseResource, self).__init__(status_code=status_code, headers=headers, **kwargs) - self.operation = operation - - -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", - "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 - """ - - _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 - ): - 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. - - :param code: Error code of the operation failure. - :type code: str - :param message: Error message displayed if the operation failure. - :type 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 - ): - 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. - - :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 - """ - - _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. - - :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 job_id: ID of the job created for this protected item. - :type 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 - ): - 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. - - :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 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] - """ - - _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 - ): - 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. - - :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_target: Target details for file / folder restore. - :type recovery_target: ~azure.mgmt.recoveryservicesbackup.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 - ): - 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. - - :param object_type: Required. This property will be used as the discriminator for deciding the - specific types in the polymorphic chain of types.Constant filled by server. - :type object_type: str - :param updated_recovery_point: Recovery Point info with updated source snapshot URI. - :type updated_recovery_point: ~azure.mgmt.recoveryservicesbackup.models.RecoveryPoint - :param deleted_backup_item_version: In case the share is in soft-deleted state, populate this - field with deleted backup item. - :type deleted_backup_item_version: str - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'updated_recovery_point': {'key': 'updatedRecoveryPoint', 'type': 'RecoveryPoint'}, - 'deleted_backup_item_version': {'key': 'deletedBackupItemVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - updated_recovery_point: Optional["RecoveryPoint"] = None, - deleted_backup_item_version: Optional[str] = None, - **kwargs - ): - super(OperationStatusRecoveryPointExtendedInfo, self).__init__(**kwargs) - self.object_type = 'OperationStatusRecoveryPointExtendedInfo' # type: str - self.updated_recovery_point = updated_recovery_point - self.deleted_backup_item_version = deleted_backup_item_version - - -class PointInTimeRange(msrest.serialization.Model): - """Provides details for log ranges. - - :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 - """ - - _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 - ): - super(PointInTimeRange, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - - -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 - 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 - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "InquiryStatus"]] = None, - code: Optional[str] = None, - message: Optional[str] = None, - **kwargs - ): - super(PreBackupValidation, self).__init__(**kwargs) - self.status = status - self.code = code - self.message = message - - -class PrepareDataMoveRequest(msrest.serialization.Model): - """Prepare DataMove Request. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. ARM Id of target vault. - :type target_resource_id: str - :param target_region: Required. Target Region. - :type target_region: str - :param data_move_level: Required. DataMove Level. Possible values include: "Invalid", "Vault", - "Container". - :type data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel - :param source_container_arm_ids: Source Container ArmIds - This needs to be populated only if DataMoveLevel is set to container. - :type source_container_arm_ids: list[str] - :param ignore_moved: Ignore the artifacts which are already moved. - :type ignore_moved: bool - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'target_region': {'required': True}, - 'data_move_level': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'target_region': {'key': 'targetRegion', 'type': 'str'}, - 'data_move_level': {'key': 'dataMoveLevel', 'type': 'str'}, - 'source_container_arm_ids': {'key': 'sourceContainerArmIds', 'type': '[str]'}, - 'ignore_moved': {'key': 'ignoreMoved', 'type': 'bool'}, - } - - def __init__( - self, - *, - target_resource_id: str, - target_region: str, - data_move_level: Union[str, "DataMoveLevel"], - source_container_arm_ids: Optional[List[str]] = None, - ignore_moved: Optional[bool] = None, - **kwargs - ): - super(PrepareDataMoveRequest, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - self.target_region = target_region - self.data_move_level = data_move_level - self.source_container_arm_ids = source_container_arm_ids - self.ignore_moved = ignore_moved - - -class VaultStorageConfigOperationResultResponse(msrest.serialization.Model): - """Operation result response for Vault Storage Config. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: PrepareDataMoveResponse. - - All required parameters must be populated in order to send to Azure. - - :param object_type: Required. 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': {'PrepareDataMoveResponse': 'PrepareDataMoveResponse'} - } - - def __init__( - self, - **kwargs - ): - super(VaultStorageConfigOperationResultResponse, self).__init__(**kwargs) - self.object_type = None # type: Optional[str] - - -class PrepareDataMoveResponse(VaultStorageConfigOperationResultResponse): - """Prepare DataMove Response. - - 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 correlation_id: Co-relationId for move operation. - :type correlation_id: str - :param source_vault_properties: Source Vault Properties. - :type source_vault_properties: dict[str, str] - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'source_vault_properties': {'key': 'sourceVaultProperties', 'type': '{str}'}, - } - - def __init__( - self, - *, - correlation_id: Optional[str] = None, - source_vault_properties: Optional[Dict[str, str]] = None, - **kwargs - ): - super(PrepareDataMoveResponse, self).__init__(**kwargs) - self.object_type = 'PrepareDataMoveResponse' # type: str - self.correlation_id = correlation_id - self.source_vault_properties = source_vault_properties - - -class PreValidateEnableBackupRequest(msrest.serialization.Model): - """Contract to validate if backup can be enabled on the given resource in a given vault and given configuration. -It will validate followings - - -#. Vault capacity -#. VM is already protected -#. Any VM related configuration passed in properties. - - :param 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 - """ - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'vault_id': {'key': 'vaultId', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'str'}, - } - - def __init__( - self, - *, - resource_type: Optional[Union[str, "DataSourceType"]] = None, - resource_id: Optional[str] = None, - vault_id: Optional[str] = None, - properties: Optional[str] = None, - **kwargs - ): - super(PreValidateEnableBackupRequest, self).__init__(**kwargs) - self.resource_type = resource_type - self.resource_id = resource_id - self.vault_id = vault_id - self.properties = properties - - -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. - 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. - vm;iaasvmcontainer;rgname;vmname. This is required for portal. - :type protected_item_name: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error_code': {'key': 'errorCode', 'type': 'str'}, - 'error_message': {'key': 'errorMessage', 'type': 'str'}, - 'recommendation': {'key': 'recommendation', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'protected_item_name': {'key': 'protectedItemName', 'type': 'str'}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "ValidationStatus"]] = None, - error_code: Optional[str] = None, - error_message: Optional[str] = None, - recommendation: Optional[str] = None, - container_name: Optional[str] = None, - protected_item_name: Optional[str] = None, - **kwargs - ): - super(PreValidateEnableBackupResponse, self).__init__(**kwargs) - self.status = status - self.error_code = error_code - self.error_message = error_message - self.recommendation = recommendation - self.container_name = container_name - self.protected_item_name = protected_item_name - - -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 - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = id - - -class PrivateEndpointConnection(msrest.serialization.Model): - """Private Endpoint Connection Response Properties. - - :param 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 - connection. - :type private_endpoint: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpoint - :param private_link_service_connection_state: Gets or sets private link service connection - state. - :type private_link_service_connection_state: - ~azure.mgmt.recoveryservicesbackup.models.PrivateLinkServiceConnectionState - """ - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - } - - def __init__( - self, - *, - provisioning_state: Optional[Union[str, "ProvisioningState"]] = None, - private_endpoint: Optional["PrivateEndpoint"] = None, - private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, - **kwargs - ): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.provisioning_state = provisioning_state - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - - -class PrivateEndpointConnectionResource(Resource): - """Private Endpoint Connection Response Properties. - - 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: PrivateEndpointConnectionResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnection - """ - - _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': 'PrivateEndpointConnection'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["PrivateEndpointConnection"] = None, - **kwargs - ): - super(PrivateEndpointConnectionResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -class PrivateLinkServiceConnectionState(msrest.serialization.Model): - """Private Link Service Connection State. - - :param 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 - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'action_required': {'key': 'actionRequired', 'type': 'str'}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "PrivateEndpointConnectionStatus"]] = None, - description: Optional[str] = None, - action_required: Optional[str] = None, - **kwargs - ): - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - self.action_required = action_required - - -class ProtectableContainerResource(Resource): - """Protectable Container 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 - :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 - """ - - _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': 'ProtectableContainer'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["ProtectableContainer"] = None, - **kwargs - ): - super(ProtectableContainerResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ProtectableContainerResource]'}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - value: Optional[List["ProtectableContainerResource"]] = None, - **kwargs - ): - super(ProtectableContainerResourceList, self).__init__(next_link=next_link, **kwargs) - self.value = value - - -class ProtectedItemQueryObject(msrest.serialization.Model): - """Filters to list backup items. - - :param 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 - include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param 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 - """ - - _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 - ): - 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 - :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 - """ - - _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 - ): - super(ProtectedItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -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] - """ - - _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 - ): - super(ProtectedItemResourceList, self).__init__(next_link=next_link, **kwargs) - self.value = value - - -class ProtectionContainerResource(Resource): - """Base class for container with backup items. Containers with specific workloads 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 - :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 - """ - - _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': 'ProtectionContainer'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["ProtectionContainer"] = None, - **kwargs - ): - super(ProtectionContainerResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ProtectionContainerResource]'}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - value: Optional[List["ProtectionContainerResource"]] = None, - **kwargs - ): - super(ProtectionContainerResourceList, self).__init__(next_link=next_link, **kwargs) - self.value = value - - -class ProtectionIntentQueryObject(msrest.serialization.Model): - """Filters to list protection intent. - - :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 - :param 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 - """ - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'item_type': {'key': 'itemType', 'type': 'str'}, - 'parent_name': {'key': 'parentName', 'type': 'str'}, - 'item_name': {'key': 'itemName', 'type': 'str'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - item_type: Optional[Union[str, "IntentItemType"]] = None, - parent_name: Optional[str] = None, - item_name: Optional[str] = None, - **kwargs - ): - super(ProtectionIntentQueryObject, self).__init__(**kwargs) - self.backup_management_type = backup_management_type - self.item_type = item_type - self.parent_name = parent_name - self.item_name = item_name - - -class ProtectionIntentResource(Resource): - """Base class for backup ProtectionIntent. - - 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: ProtectionIntentResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntent - """ - - _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': 'ProtectionIntent'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["ProtectionIntent"] = None, - **kwargs - ): - super(ProtectionIntentResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ProtectionIntentResource]'}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - value: Optional[List["ProtectionIntentResource"]] = None, - **kwargs - ): - super(ProtectionIntentResourceList, self).__init__(next_link=next_link, **kwargs) - self.value = value - - -class ProtectionPolicyQueryObject(msrest.serialization.Model): - """Filters the list backup policies API. - - :param 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 - ~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", - "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", - "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", - "SAPAseDatabase". - :type workload_type: str or ~azure.mgmt.recoveryservicesbackup.models.WorkloadType - """ - - _attribute_map = { - 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, - 'fabric_name': {'key': 'fabricName', 'type': 'str'}, - 'workload_type': {'key': 'workloadType', 'type': 'str'}, - } - - def __init__( - self, - *, - backup_management_type: Optional[Union[str, "BackupManagementType"]] = None, - fabric_name: Optional[str] = None, - workload_type: Optional[Union[str, "WorkloadType"]] = None, - **kwargs - ): - super(ProtectionPolicyQueryObject, self).__init__(**kwargs) - self.backup_management_type = backup_management_type - self.fabric_name = fabric_name - self.workload_type = workload_type - - -class ProtectionPolicyResource(Resource): - """Base class for backup policy. Workload-specific backup policies 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 - :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 - """ - - _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': 'ProtectionPolicy'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["ProtectionPolicy"] = None, - **kwargs - ): - super(ProtectionPolicyResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ProtectionPolicyResource]'}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - value: Optional[List["ProtectionPolicyResource"]] = None, - **kwargs - ): - super(ProtectionPolicyResourceList, self).__init__(next_link=next_link, **kwargs) - self.value = value - - -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] - """ - - _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 - ): - 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. - - :param is_ready_for_move: - :type is_ready_for_move: bool - :param additional_info: - :type additional_info: str - """ - - _attribute_map = { - 'is_ready_for_move': {'key': 'isReadyForMove', 'type': 'bool'}, - 'additional_info': {'key': 'additionalInfo', 'type': 'str'}, - } - - def __init__( - self, - *, - is_ready_for_move: Optional[bool] = None, - additional_info: Optional[str] = None, - **kwargs - ): - super(RecoveryPointMoveReadinessInfo, self).__init__(**kwargs) - self.is_ready_for_move = is_ready_for_move - self.additional_info = additional_info - - -class RecoveryPointRehydrationInfo(msrest.serialization.Model): - """RP Rehydration Info. - - :param rehydration_retention_duration: How long the rehydrated RP should be kept - Should be ISO8601 Duration format e.g. "P7D". - :type rehydration_retention_duration: str - :param rehydration_priority: Rehydration Priority. Possible values include: "Standard", "High". - :type rehydration_priority: str or - ~azure.mgmt.recoveryservicesbackup.models.RehydrationPriority - """ - - _attribute_map = { - 'rehydration_retention_duration': {'key': 'rehydrationRetentionDuration', 'type': 'str'}, - 'rehydration_priority': {'key': 'rehydrationPriority', 'type': 'str'}, - } - - def __init__( - self, - *, - rehydration_retention_duration: Optional[str] = None, - rehydration_priority: Optional[Union[str, "RehydrationPriority"]] = None, - **kwargs - ): - super(RecoveryPointRehydrationInfo, self).__init__(**kwargs) - self.rehydration_retention_duration = rehydration_retention_duration - self.rehydration_priority = rehydration_priority - - -class RecoveryPointResource(Resource): - """Base class for backup copies. Workload-specific backup copies are derived from this class. - - 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: RecoveryPointResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.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 - ): - super(RecoveryPointResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -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] - """ - - _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 - ): - super(RecoveryPointResourceList, self).__init__(next_link=next_link, **kwargs) - self.value = value - - -class RecoveryPointTierInformation(msrest.serialization.Model): - """Recovery point tier information. - - :param 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", - "Disabled", "Deleted", "Rehydrated". - :type status: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryPointTierStatus - :param extended_info: Recovery point tier status. - :type extended_info: dict[str, str] - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': '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 - ): - super(RecoveryPointTierInformation, self).__init__(**kwargs) - self.type = type - self.status = status - self.extended_info = extended_info - - -class ResourceGuardOperationDetail(msrest.serialization.Model): - """ResourceGuardOperationDetail. - - :param vault_critical_operation: - :type vault_critical_operation: str - :param default_resource_request: - :type default_resource_request: str - """ - - _attribute_map = { - 'vault_critical_operation': {'key': 'vaultCriticalOperation', 'type': 'str'}, - 'default_resource_request': {'key': 'defaultResourceRequest', 'type': 'str'}, - } - - def __init__( - self, - *, - vault_critical_operation: Optional[str] = None, - default_resource_request: Optional[str] = None, - **kwargs - ): - super(ResourceGuardOperationDetail, self).__init__(**kwargs) - self.vault_critical_operation = vault_critical_operation - self.default_resource_request = default_resource_request - - -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: - list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardOperationDetail] - :param last_updated_time: - :type last_updated_time: str - :param description: - :type description: str - """ - - _attribute_map = { - 'resource_guard_resource_id': {'key': 'resourceGuardResourceId', 'type': 'str'}, - 'resource_guard_operation_details': {'key': 'resourceGuardOperationDetails', 'type': '[ResourceGuardOperationDetail]'}, - 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - *, - resource_guard_resource_id: Optional[str] = None, - resource_guard_operation_details: Optional[List["ResourceGuardOperationDetail"]] = None, - last_updated_time: Optional[str] = None, - description: Optional[str] = None, - **kwargs - ): - super(ResourceGuardProxyBase, self).__init__(**kwargs) - self.resource_guard_resource_id = resource_guard_resource_id - self.resource_guard_operation_details = resource_guard_operation_details - self.last_updated_time = last_updated_time - self.description = description - - -class ResourceGuardProxyBaseResource(Resource): - """ResourceGuardProxyBaseResource. - - 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: ResourceGuardProxyBaseResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBase - """ - - _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': 'ResourceGuardProxyBase'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["ResourceGuardProxyBase"] = None, - **kwargs - ): - super(ResourceGuardProxyBaseResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ResourceGuardProxyBaseResource]'}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - value: Optional[List["ResourceGuardProxyBaseResource"]] = None, - **kwargs - ): - super(ResourceGuardProxyBaseResourceList, self).__init__(next_link=next_link, **kwargs) - self.value = value - - -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 - """ - - _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 - ): - super(RestoreFileSpecs, self).__init__(**kwargs) - self.path = path - self.file_spec_type = file_spec_type - self.target_folder_path = target_folder_path - - -class RestoreRequestResource(Resource): - """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. - - :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: RestoreRequestResource properties. - :type properties: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest - """ - - _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': 'RestoreRequest'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["RestoreRequest"] = None, - **kwargs - ): - super(RestoreRequestResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -class RetentionDuration(msrest.serialization.Model): - """Retention duration. - - :param 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: - "Invalid", "Days", "Weeks", "Months", "Years". - :type duration_type: str or ~azure.mgmt.recoveryservicesbackup.models.RetentionDurationType - """ - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'duration_type': {'key': 'durationType', 'type': 'str'}, - } - - def __init__( - self, - *, - count: Optional[int] = None, - duration_type: Optional[Union[str, "RetentionDurationType"]] = None, - **kwargs - ): - super(RetentionDuration, self).__init__(**kwargs) - self.count = count - self.duration_type = duration_type - - -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] - """ - - _attribute_map = { - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - } - - def __init__( - self, - *, - resource_guard_operation_requests: Optional[List[str]] = None, - **kwargs - ): - super(SecurityPinBase, self).__init__(**kwargs) - self.resource_guard_operation_requests = resource_guard_operation_requests - - -class Settings(msrest.serialization.Model): - """Common settings field for backup management. - - :param 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' - will be deprecated once clients upgrade to consider this flag. - :type is_compression: bool - """ - - _attribute_map = { - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'issqlcompression': {'key': 'issqlcompression', 'type': 'bool'}, - 'is_compression': {'key': 'isCompression', 'type': 'bool'}, - } - - def __init__( - self, - *, - time_zone: Optional[str] = None, - issqlcompression: Optional[bool] = None, - is_compression: Optional[bool] = None, - **kwargs - ): - super(Settings, self).__init__(**kwargs) - self.time_zone = time_zone - self.issqlcompression = issqlcompression - self.is_compression = is_compression - - -class SimpleRetentionPolicy(RetentionPolicy): - """Simple policy retention. - - 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 - 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 - """ - - _validation = { - 'retention_policy_type': {'required': True}, - } - - _attribute_map = { - 'retention_policy_type': {'key': 'retentionPolicyType', 'type': 'str'}, - 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, - } - - def __init__( - self, - *, - retention_duration: Optional["RetentionDuration"] = None, - **kwargs - ): - super(SimpleRetentionPolicy, self).__init__(**kwargs) - self.retention_policy_type = 'SimpleRetentionPolicy' # type: str - self.retention_duration = retention_duration - - -class SimpleSchedulePolicy(SchedulePolicy): - """Simple policy schedule. - - 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 - 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 - """ - - _validation = { - 'schedule_policy_type': {'required': True}, - } - - _attribute_map = { - 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, - 'schedule_run_frequency': {'key': 'scheduleRunFrequency', 'type': 'str'}, - 'schedule_run_days': {'key': 'scheduleRunDays', 'type': '[str]'}, - 'schedule_run_times': {'key': 'scheduleRunTimes', 'type': '[iso-8601]'}, - 'schedule_weekly_frequency': {'key': 'scheduleWeeklyFrequency', 'type': 'int'}, - } - - def __init__( - self, - *, - 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, - schedule_weekly_frequency: Optional[int] = None, - **kwargs - ): - 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.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 - """ - - _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 - ): - 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. - - :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 - """ - - _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 - ): - 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 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", - "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 - """ - - _attribute_map = { - 'policy_type': {'key': 'policyType', 'type': 'str'}, - 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, - 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, - } - - def __init__( - self, - *, - policy_type: Optional[Union[str, "PolicyType"]] = None, - schedule_policy: Optional["SchedulePolicy"] = None, - retention_policy: Optional["RetentionPolicy"] = None, - **kwargs - ): - super(SubProtectionPolicy, self).__init__(**kwargs) - self.policy_type = policy_type - self.schedule_policy = schedule_policy - self.retention_policy = retention_policy - - -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 - """ - - _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 - ): - 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. - - :param 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 - 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 - """ - - _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 - ): - 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 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 - """ - - _attribute_map = { - 'token': {'key': 'token', 'type': 'str'}, - 'expiry_time_in_utc_ticks': {'key': 'expiryTimeInUtcTicks', 'type': 'long'}, - 'security_pin': {'key': 'securityPIN', 'type': 'str'}, - } - - def __init__( - self, - *, - token: Optional[str] = None, - expiry_time_in_utc_ticks: Optional[int] = None, - security_pin: Optional[str] = None, - **kwargs - ): - super(TokenInformation, self).__init__(**kwargs) - self.token = token - self.expiry_time_in_utc_ticks = expiry_time_in_utc_ticks - self.security_pin = security_pin - - -class TriggerDataMoveRequest(msrest.serialization.Model): - """Trigger DataMove Request. - - All required parameters must be populated in order to send to Azure. - - :param source_resource_id: Required. ARM Id of source vault. - :type source_resource_id: str - :param source_region: Required. Source Region. - :type source_region: str - :param data_move_level: Required. DataMove Level. Possible values include: "Invalid", "Vault", - "Container". - :type data_move_level: str or ~azure.mgmt.recoveryservicesbackup.models.DataMoveLevel - :param correlation_id: Required. Correlation Id. - :type correlation_id: str - :param source_container_arm_ids: Source Container ArmIds. - :type source_container_arm_ids: list[str] - :param pause_gc: Pause GC. - :type pause_gc: bool - """ - - _validation = { - 'source_resource_id': {'required': True}, - 'source_region': {'required': True}, - 'data_move_level': {'required': True}, - 'correlation_id': {'required': True}, - } - - _attribute_map = { - 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, - 'source_region': {'key': 'sourceRegion', 'type': 'str'}, - 'data_move_level': {'key': 'dataMoveLevel', 'type': 'str'}, - 'correlation_id': {'key': 'correlationId', 'type': 'str'}, - 'source_container_arm_ids': {'key': 'sourceContainerArmIds', 'type': '[str]'}, - 'pause_gc': {'key': 'pauseGC', 'type': 'bool'}, - } - - def __init__( - self, - *, - source_resource_id: str, - source_region: str, - data_move_level: Union[str, "DataMoveLevel"], - correlation_id: str, - source_container_arm_ids: Optional[List[str]] = None, - pause_gc: Optional[bool] = None, - **kwargs - ): - super(TriggerDataMoveRequest, self).__init__(**kwargs) - self.source_resource_id = source_resource_id - self.source_region = source_region - self.data_move_level = data_move_level - self.correlation_id = correlation_id - self.source_container_arm_ids = source_container_arm_ids - self.pause_gc = pause_gc - - -class 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 - """ - - _attribute_map = { - 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, - 'resource_to_be_deleted': {'key': 'resourceToBeDeleted', 'type': 'str'}, - } - - def __init__( - self, - *, - resource_guard_operation_requests: Optional[List[str]] = None, - resource_to_be_deleted: Optional[str] = None, - **kwargs - ): - super(UnlockDeleteRequest, self).__init__(**kwargs) - self.resource_guard_operation_requests = resource_guard_operation_requests - self.resource_to_be_deleted = resource_to_be_deleted - - -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 - expired. - :type unlock_delete_expiry_time: str - """ - - _attribute_map = { - 'unlock_delete_expiry_time': {'key': 'unlockDeleteExpiryTime', 'type': 'str'}, - } - - def __init__( - self, - *, - unlock_delete_expiry_time: Optional[str] = None, - **kwargs - ): - super(UnlockDeleteResponse, self).__init__(**kwargs) - self.unlock_delete_expiry_time = unlock_delete_expiry_time - - -class ValidateOperationRequest(msrest.serialization.Model): - """Base class for validate operation request. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: 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 - 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': {'ValidateRestoreOperationRequest': 'ValidateRestoreOperationRequest'} - } - - def __init__( - self, - **kwargs - ): - super(ValidateOperationRequest, self).__init__(**kwargs) - self.object_type = None # type: Optional[str] - - -class ValidateRestoreOperationRequest(ValidateOperationRequest): - """AzureRestoreValidation request. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ValidateIaasVMRestoreOperationRequest. - - 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 restore_request: Sets restore request to be validated. - :type restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'restore_request': {'key': 'restoreRequest', 'type': 'RestoreRequest'}, - } - - _subtype_map = { - 'object_type': {'ValidateIaasVMRestoreOperationRequest': 'ValidateIaasVMRestoreOperationRequest'} - } - - def __init__( - self, - *, - restore_request: Optional["RestoreRequest"] = None, - **kwargs - ): - super(ValidateRestoreOperationRequest, self).__init__(**kwargs) - self.object_type = 'ValidateRestoreOperationRequest' # type: str - self.restore_request = restore_request - - -class ValidateIaasVMRestoreOperationRequest(ValidateRestoreOperationRequest): - """AzureRestoreValidation 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 restore_request: Sets restore request to be validated. - :type restore_request: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequest - """ - - _validation = { - 'object_type': {'required': True}, - } - - _attribute_map = { - 'object_type': {'key': 'objectType', 'type': 'str'}, - 'restore_request': {'key': 'restoreRequest', 'type': 'RestoreRequest'}, - } - - def __init__( - self, - *, - restore_request: Optional["RestoreRequest"] = None, - **kwargs - ): - super(ValidateIaasVMRestoreOperationRequest, self).__init__(restore_request=restore_request, **kwargs) - self.object_type = 'ValidateIaasVMRestoreOperationRequest' # type: str - - -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] - """ - - _attribute_map = { - 'validation_results': {'key': 'validationResults', 'type': '[ErrorDetail]'}, - } - - def __init__( - self, - *, - validation_results: Optional[List["ErrorDetail"]] = None, - **kwargs - ): - super(ValidateOperationResponse, self).__init__(**kwargs) - self.validation_results = validation_results - - -class ValidateOperationsResponse(msrest.serialization.Model): - """ValidateOperationsResponse. - - :param validate_operation_response: Base class for validate operation response. - :type validate_operation_response: - ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationResponse - """ - - _attribute_map = { - 'validate_operation_response': {'key': 'validateOperationResponse', 'type': 'ValidateOperationResponse'}, - } - - def __init__( - self, - *, - validate_operation_response: Optional["ValidateOperationResponse"] = None, - **kwargs - ): - super(ValidateOperationsResponse, self).__init__(**kwargs) - self.validate_operation_response = validate_operation_response - - -class VaultJob(Job): - """Vault level Job. - - All required parameters must be populated in order to send to Azure. - - :param entity_friendly_name: Friendly name of the entity on which the current job is executing. - :type entity_friendly_name: str - :param backup_management_type: Backup management type to execute the current job. Possible - values include: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", - "AzureStorage", "AzureWorkload", "DefaultBackup". - :type backup_management_type: str or - ~azure.mgmt.recoveryservicesbackup.models.BackupManagementType - :param operation: The operation name. - :type operation: str - :param status: Job status. - :type status: str - :param start_time: The start time. - :type start_time: ~datetime.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 - 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 - """ - - _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': '[VaultJobErrorInfo]'}, - 'extended_info': {'key': 'extendedInfo', 'type': 'VaultJobExtendedInfo'}, - } - - 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["VaultJobErrorInfo"]] = None, - extended_info: Optional["VaultJobExtendedInfo"] = None, - **kwargs - ): - 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 - self.actions_info = actions_info - self.error_details = error_details - self.extended_info = extended_info - - -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] - """ - - _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 - ): - super(VaultJobErrorInfo, self).__init__(**kwargs) - self.error_code = error_code - self.error_string = error_string - self.recommendations = recommendations - - -class VaultJobExtendedInfo(msrest.serialization.Model): - """Vault Job for CMK - has CMK specific info. - - :param property_bag: Job properties. - :type property_bag: dict[str, str] - """ - - _attribute_map = { - 'property_bag': {'key': 'propertyBag', 'type': '{str}'}, - } - - def __init__( - self, - *, - property_bag: Optional[Dict[str, str]] = None, - **kwargs - ): - super(VaultJobExtendedInfo, self).__init__(**kwargs) - self.property_bag = property_bag - - -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] - """ - - _attribute_map = { - 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[str]'}, - 'weeks_of_the_month': {'key': 'weeksOfTheMonth', 'type': '[str]'}, - } - - def __init__( - self, - *, - days_of_the_week: Optional[List[Union[str, "DayOfWeek"]]] = None, - weeks_of_the_month: Optional[List[Union[str, "WeekOfMonth"]]] = None, - **kwargs - ): - super(WeeklyRetentionFormat, self).__init__(**kwargs) - self.days_of_the_week = days_of_the_week - self.weeks_of_the_month = weeks_of_the_month - - -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 - """ - - _attribute_map = { - 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[str]'}, - 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, - 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, - } - - def __init__( - self, - *, - days_of_the_week: Optional[List[Union[str, "DayOfWeek"]]] = None, - retention_times: Optional[List[datetime.datetime]] = None, - retention_duration: Optional["RetentionDuration"] = None, - **kwargs - ): - 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 - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'item_count': {'key': 'itemCount', 'type': 'long'}, - 'inquiry_validation': {'key': 'inquiryValidation', 'type': 'InquiryValidation'}, - } - - def __init__( - self, - *, - type: Optional[str] = None, - item_count: Optional[int] = None, - inquiry_validation: Optional["InquiryValidation"] = None, - **kwargs - ): - super(WorkloadInquiryDetails, self).__init__(**kwargs) - self.type = type - self.item_count = item_count - self.inquiry_validation = inquiry_validation - - -class WorkloadItemResource(Resource): - """Base class for backup item. Workload-specific backup items 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 - :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 - """ - - _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': 'WorkloadItem'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["WorkloadItem"] = None, - **kwargs - ): - super(WorkloadItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[WorkloadItemResource]'}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - value: Optional[List["WorkloadItemResource"]] = None, - **kwargs - ): - super(WorkloadItemResourceList, self).__init__(next_link=next_link, **kwargs) - self.value = value - - -class WorkloadProtectableItemResource(Resource): - """Base class for backup item. Workload-specific backup items 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 - :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 - """ - - _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': 'WorkloadProtectableItem'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - e_tag: Optional[str] = None, - properties: Optional["WorkloadProtectableItem"] = None, - **kwargs - ): - super(WorkloadProtectableItemResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) - self.properties = properties - - -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] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[WorkloadProtectableItemResource]'}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - value: Optional[List["WorkloadProtectableItemResource"]] = None, - **kwargs - ): - super(WorkloadProtectableItemResourceList, self).__init__(next_link=next_link, **kwargs) - self.value = value - - -class YearlyRetentionSchedule(msrest.serialization.Model): - """Yearly retention schedule. - - :param retention_schedule_format_type: Retention schedule format for yearly retention policy. - Possible values include: "Invalid", "Daily", "Weekly". - :type 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: - ~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 - """ - - _attribute_map = { - 'retention_schedule_format_type': {'key': 'retentionScheduleFormatType', 'type': 'str'}, - 'months_of_year': {'key': 'monthsOfYear', 'type': '[str]'}, - 'retention_schedule_daily': {'key': 'retentionScheduleDaily', 'type': 'DailyRetentionFormat'}, - 'retention_schedule_weekly': {'key': 'retentionScheduleWeekly', 'type': 'WeeklyRetentionFormat'}, - 'retention_times': {'key': 'retentionTimes', 'type': '[iso-8601]'}, - 'retention_duration': {'key': 'retentionDuration', 'type': 'RetentionDuration'}, - } - - def __init__( - self, - *, - retention_schedule_format_type: Optional[Union[str, "RetentionScheduleFormat"]] = None, - months_of_year: Optional[List[Union[str, "MonthOfYear"]]] = None, - retention_schedule_daily: Optional["DailyRetentionFormat"] = None, - retention_schedule_weekly: Optional["WeeklyRetentionFormat"] = None, - retention_times: Optional[List[datetime.datetime]] = None, - retention_duration: Optional["RetentionDuration"] = None, - **kwargs - ): - super(YearlyRetentionSchedule, self).__init__(**kwargs) - self.retention_schedule_format_type = retention_schedule_format_type - self.months_of_year = months_of_year - self.retention_schedule_daily = retention_schedule_daily - self.retention_schedule_weekly = retention_schedule_weekly - self.retention_times = retention_times - self.retention_duration = retention_duration 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 deleted file mode 100644 index 4cf20850f0a4..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_recovery_services_backup_client_enums.py +++ /dev/null @@ -1,691 +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 enum import Enum, EnumMeta -from six import with_metaclass - -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 AzureFileShareType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """File Share type XSync or XSMB. - """ - - INVALID = "Invalid" - XSMB = "XSMB" - X_SYNC = "XSync" - -class BackupEngineType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Type of the backup engine. - """ - - INVALID = "Invalid" - DPM_BACKUP_ENGINE = "DpmBackupEngine" - AZURE_BACKUP_SERVER_ENGINE = "AzureBackupServerEngine" - -class BackupItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Type of backup items associated with this container. - """ - - 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 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 BackupType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Type of backup, viz. Full, Differential, Log or CopyOnlyFull - """ - - INVALID = "Invalid" - FULL = "Full" - DIFFERENTIAL = "Differential" - LOG = "Log" - COPY_ONLY_FULL = "CopyOnlyFull" - INCREMENTAL = "Incremental" - -class ContainerType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Type of container for filter - """ - - 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 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 DataMoveLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """DataMove Level - """ - - INVALID = "Invalid" - VAULT = "Vault" - CONTAINER = "Container" - -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 DayOfWeek(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - - SUNDAY = "Sunday" - MONDAY = "Monday" - TUESDAY = "Tuesday" - WEDNESDAY = "Wednesday" - THURSDAY = "Thursday" - FRIDAY = "Friday" - SATURDAY = "Saturday" - -class EncryptionAtRestType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Encryption At Rest Type - """ - - INVALID = "Invalid" - MICROSOFT_MANAGED = "MicrosoftManaged" - CUSTOMER_MANAGED = "CustomerManaged" - -class EnhancedSecurityState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Enabled or Disabled. - """ - - INVALID = "Invalid" - ENABLED = "Enabled" - DISABLED = "Disabled" - -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)): - """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 HttpStatusCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """HTTP Status Code of the operation. - """ - - CONTINUE_ENUM = "Continue" - SWITCHING_PROTOCOLS = "SwitchingProtocols" - OK = "OK" - CREATED = "Created" - ACCEPTED = "Accepted" - NON_AUTHORITATIVE_INFORMATION = "NonAuthoritativeInformation" - NO_CONTENT = "NoContent" - RESET_CONTENT = "ResetContent" - PARTIAL_CONTENT = "PartialContent" - MULTIPLE_CHOICES = "MultipleChoices" - AMBIGUOUS = "Ambiguous" - MOVED_PERMANENTLY = "MovedPermanently" - MOVED = "Moved" - FOUND = "Found" - REDIRECT = "Redirect" - SEE_OTHER = "SeeOther" - REDIRECT_METHOD = "RedirectMethod" - NOT_MODIFIED = "NotModified" - USE_PROXY = "UseProxy" - UNUSED = "Unused" - TEMPORARY_REDIRECT = "TemporaryRedirect" - REDIRECT_KEEP_VERB = "RedirectKeepVerb" - BAD_REQUEST = "BadRequest" - UNAUTHORIZED = "Unauthorized" - PAYMENT_REQUIRED = "PaymentRequired" - FORBIDDEN = "Forbidden" - NOT_FOUND = "NotFound" - METHOD_NOT_ALLOWED = "MethodNotAllowed" - NOT_ACCEPTABLE = "NotAcceptable" - PROXY_AUTHENTICATION_REQUIRED = "ProxyAuthenticationRequired" - REQUEST_TIMEOUT = "RequestTimeout" - CONFLICT = "Conflict" - GONE = "Gone" - LENGTH_REQUIRED = "LengthRequired" - PRECONDITION_FAILED = "PreconditionFailed" - REQUEST_ENTITY_TOO_LARGE = "RequestEntityTooLarge" - REQUEST_URI_TOO_LONG = "RequestUriTooLong" - UNSUPPORTED_MEDIA_TYPE = "UnsupportedMediaType" - REQUESTED_RANGE_NOT_SATISFIABLE = "RequestedRangeNotSatisfiable" - EXPECTATION_FAILED = "ExpectationFailed" - UPGRADE_REQUIRED = "UpgradeRequired" - INTERNAL_SERVER_ERROR = "InternalServerError" - NOT_IMPLEMENTED = "NotImplemented" - BAD_GATEWAY = "BadGateway" - SERVICE_UNAVAILABLE = "ServiceUnavailable" - GATEWAY_TIMEOUT = "GatewayTimeout" - HTTP_VERSION_NOT_SUPPORTED = "HttpVersionNotSupported" - -class InfrastructureEncryptionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - - INVALID = "Invalid" - DISABLED = "Disabled" - ENABLED = "Enabled" - -class InquiryStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Status of protectable item, i.e. InProgress,Succeeded,Failed - """ - - INVALID = "Invalid" - SUCCESS = "Success" - FAILED = "Failed" - -class IntentItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Type of workload this item represents - """ - - INVALID = "Invalid" - SQL_INSTANCE = "SQLInstance" - SQL_AVAILABILITY_GROUP_CONTAINER = "SQLAvailabilityGroupContainer" - -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 LastUpdateStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - - INVALID = "Invalid" - NOT_ENABLED = "NotEnabled" - PARTIALLY_SUCCEEDED = "PartiallySucceeded" - PARTIALLY_FAILED = "PartiallyFailed" - FAILED = "Failed" - SUCCEEDED = "Succeeded" - INITIALIZED = "Initialized" - FIRST_INITIALIZATION = "FirstInitialization" - -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 MonthOfYear(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - - INVALID = "Invalid" - JANUARY = "January" - FEBRUARY = "February" - MARCH = "March" - APRIL = "April" - MAY = "May" - JUNE = "June" - JULY = "July" - AUGUST = "August" - SEPTEMBER = "September" - OCTOBER = "October" - NOVEMBER = "November" - DECEMBER = "December" - -class OperationStatusValues(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Operation status. - """ - - INVALID = "Invalid" - IN_PROGRESS = "InProgress" - SUCCEEDED = "Succeeded" - FAILED = "Failed" - CANCELED = "Canceled" - -class OperationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Re-Do Operation - """ - - INVALID = "Invalid" - REGISTER = "Register" - REREGISTER = "Reregister" - -class OverwriteOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Can Overwrite if Target DataBase already exists - """ - - INVALID = "Invalid" - FAIL_ON_CONFLICT = "FailOnConflict" - OVERWRITE = "Overwrite" - -class PolicyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Type of backup policy type - """ - - INVALID = "Invalid" - FULL = "Full" - DIFFERENTIAL = "Differential" - LOG = "Log" - COPY_ONLY_FULL = "CopyOnlyFull" - INCREMENTAL = "Incremental" - -class PrivateEndpointConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Gets or sets the status - """ - - PENDING = "Pending" - APPROVED = "Approved" - REJECTED = "Rejected" - DISCONNECTED = "Disconnected" - -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 ProtectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Specifies whether the container is registered or not - """ - - INVALID = "Invalid" - NOT_PROTECTED = "NotProtected" - PROTECTING = "Protecting" - PROTECTED = "Protected" - PROTECTION_FAILED = "ProtectionFailed" - -class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Gets or sets provisioning state of the private endpoint connection - """ - - SUCCEEDED = "Succeeded" - DELETING = "Deleting" - FAILED = "Failed" - PENDING = "Pending" - -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 RehydrationPriority(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Rehydration Priority - """ - - STANDARD = "Standard" - HIGH = "High" - -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 RetentionDurationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Retention duration type of retention policy. - """ - - INVALID = "Invalid" - DAYS = "Days" - WEEKS = "Weeks" - MONTHS = "Months" - YEARS = "Years" - -class RetentionScheduleFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Retention schedule format type for monthly retention policy. - """ - - INVALID = "Invalid" - DAILY = "Daily" - WEEKLY = "Weekly" - -class ScheduleRunType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Frequency of the schedule operation of this policy. - """ - - INVALID = "Invalid" - DAILY = "Daily" - WEEKLY = "Weekly" - -class SoftDeleteFeatureState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Soft Delete feature state - """ - - INVALID = "Invalid" - ENABLED = "Enabled" - DISABLED = "Disabled" - -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 SupportStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Support status of feature - """ - - INVALID = "Invalid" - SUPPORTED = "Supported" - DEFAULT_OFF = "DefaultOFF" - DEFAULT_ON = "DefaultON" - NOT_SUPPORTED = "NotSupported" - -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 ValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Validation Status - """ - - INVALID = "Invalid" - SUCCEEDED = "Succeeded" - FAILED = "Failed" - -class WeekOfMonth(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - - FIRST = "First" - SECOND = "Second" - THIRD = "Third" - FOURTH = "Fourth" - LAST = "Last" - INVALID = "Invalid" - -class WorkloadItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Workload item type of the item for which intent is to be set - """ - - INVALID = "Invalid" - SQL_INSTANCE = "SQLInstance" - SQL_DATA_BASE = "SQLDataBase" - SAP_HANA_SYSTEM = "SAPHanaSystem" - SAP_HANA_DATABASE = "SAPHanaDatabase" - SAP_ASE_SYSTEM = "SAPAseSystem" - SAP_ASE_DATABASE = "SAPAseDatabase" - -class 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/operations/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py deleted file mode 100644 index 18922f7c05ca..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py +++ /dev/null @@ -1,123 +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 ._backup_resource_storage_configs_non_crr_operations import BackupResourceStorageConfigsNonCRROperations -from ._protection_intent_operations import ProtectionIntentOperations -from ._backup_status_operations import BackupStatusOperations -from ._feature_support_operations import FeatureSupportOperations -from ._backup_protection_intent_operations import BackupProtectionIntentOperations -from ._backup_usage_summaries_operations import BackupUsageSummariesOperations -from ._operations import Operations -from ._backup_resource_vault_configs_operations import BackupResourceVaultConfigsOperations -from ._backup_resource_encryption_configs_operations import BackupResourceEncryptionConfigsOperations -from ._private_endpoint_connection_operations import PrivateEndpointConnectionOperations -from ._private_endpoint_operations import PrivateEndpointOperations -from ._recovery_services_backup_client_operations import RecoveryServicesBackupClientOperationsMixin -from ._bms_prepare_data_move_operation_result_operations import BMSPrepareDataMoveOperationResultOperations -from ._protected_items_operations import ProtectedItemsOperations -from ._protected_item_operation_results_operations import ProtectedItemOperationResultsOperations -from ._recovery_points_operations import RecoveryPointsOperations -from ._restores_operations import RestoresOperations -from ._backup_policies_operations import BackupPoliciesOperations -from ._protection_policies_operations import ProtectionPoliciesOperations -from ._protection_policy_operation_results_operations import ProtectionPolicyOperationResultsOperations -from ._backup_jobs_operations import BackupJobsOperations -from ._job_details_operations import JobDetailsOperations -from ._job_cancellations_operations import JobCancellationsOperations -from ._job_operation_results_operations import JobOperationResultsOperations -from ._export_jobs_operation_results_operations import ExportJobsOperationResultsOperations -from ._jobs_operations import JobsOperations -from ._backup_protected_items_operations import BackupProtectedItemsOperations -from ._operation_operations import OperationOperations -from ._backup_engines_operations import BackupEnginesOperations -from ._protection_container_refresh_operation_results_operations import ProtectionContainerRefreshOperationResultsOperations -from ._protectable_containers_operations import ProtectableContainersOperations -from ._protection_containers_operations import ProtectionContainersOperations -from ._backup_workload_items_operations import BackupWorkloadItemsOperations -from ._protection_container_operation_results_operations import ProtectionContainerOperationResultsOperations -from ._backups_operations import BackupsOperations -from ._protected_item_operation_statuses_operations import ProtectedItemOperationStatusesOperations -from ._item_level_recovery_connections_operations import ItemLevelRecoveryConnectionsOperations -from ._backup_operation_results_operations import BackupOperationResultsOperations -from ._backup_operation_statuses_operations import BackupOperationStatusesOperations -from ._protection_policy_operation_statuses_operations import ProtectionPolicyOperationStatusesOperations -from ._backup_protectable_items_operations import BackupProtectableItemsOperations -from ._backup_protection_containers_operations import BackupProtectionContainersOperations -from ._security_pins_operations import SecurityPINsOperations -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', - 'ProtectionIntentOperations', - 'BackupStatusOperations', - 'FeatureSupportOperations', - 'BackupProtectionIntentOperations', - 'BackupUsageSummariesOperations', - 'Operations', - 'BackupResourceVaultConfigsOperations', - 'BackupResourceEncryptionConfigsOperations', - 'PrivateEndpointConnectionOperations', - 'PrivateEndpointOperations', - 'RecoveryServicesBackupClientOperationsMixin', - 'BMSPrepareDataMoveOperationResultOperations', - 'ProtectedItemsOperations', - 'ProtectedItemOperationResultsOperations', - 'RecoveryPointsOperations', - 'RestoresOperations', - 'BackupPoliciesOperations', - 'ProtectionPoliciesOperations', - 'ProtectionPolicyOperationResultsOperations', - 'BackupJobsOperations', - 'JobDetailsOperations', - 'JobCancellationsOperations', - 'JobOperationResultsOperations', - 'ExportJobsOperationResultsOperations', - 'JobsOperations', - 'BackupProtectedItemsOperations', - 'OperationOperations', - 'BackupEnginesOperations', - 'ProtectionContainerRefreshOperationResultsOperations', - 'ProtectableContainersOperations', - 'ProtectionContainersOperations', - 'BackupWorkloadItemsOperations', - 'ProtectionContainerOperationResultsOperations', - 'BackupsOperations', - 'ProtectedItemOperationStatusesOperations', - 'ItemLevelRecoveryConnectionsOperations', - 'BackupOperationResultsOperations', - 'BackupOperationStatusesOperations', - 'ProtectionPolicyOperationStatusesOperations', - 'BackupProtectableItemsOperations', - 'BackupProtectionContainersOperations', - 'SecurityPINsOperations', - 'RecoveryPointsRecommendedForMoveOperations', - 'ResourceGuardProxiesOperations', - 'ResourceGuardProxyOperations', - 'BackupUsageSummariesCRROperations', - 'AadPropertiesOperations', - 'CrossRegionRestoreOperations', - 'BackupCrrJobDetailsOperations', - 'BackupCrrJobsOperations', - 'CrrOperationResultsOperations', - 'CrrOperationStatusOperations', - 'BackupResourceStorageConfigsOperations', - 'RecoveryPointsCrrOperations', - 'BackupProtectedItemsCrrOperations', -] diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_aad_properties_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_aad_properties_operations.py deleted file mode 100644 index e99a8c16e9c0..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_aad_properties_operations.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class AadPropertiesOperations(object): - """AadPropertiesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - azure_region, # type: str - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.AADPropertiesResource" - """Fetches the AAD properties from target region BCM stamp. - - Fetches the AAD properties from target region BCM stamp. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AADPropertiesResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.AADPropertiesResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AADPropertiesResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('AADPropertiesResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_job_details_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_job_details_operations.py deleted file mode 100644 index 8716bcc1cad1..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_job_details_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupCrrJobDetailsOperations(object): - """BackupCrrJobDetailsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - azure_region, # type: str - parameters, # type: "_models.CrrJobRequest" - **kwargs # type: Any - ): - # type: (...) -> "_models.JobResource" - """Get CRR job details from target region. - - Get CRR job details from target region. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: CRR Job request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.CrrJobRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :return: JobResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.JobResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrrJobRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('JobResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_jobs_operations.py deleted file mode 100644 index dd79a28a027c..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_crr_jobs_operations.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupCrrJobsOperations(object): - """BackupCrrJobsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - azure_region, # type: str - parameters, # type: "_models.CrrJobRequest" - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.JobResourceList"] - """Gets the list of CRR jobs from the target region. - - Gets the list of CRR jobs from the target region. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: Backup CRR Job request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.CrrJobRequest - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.JobResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = "application/json" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrrJobRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrrJobRequest') - body_content_kwargs['content'] = body_content - request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('JobResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py deleted file mode 100644 index 18b91322a7f2..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupEnginesOperations(object): - """BackupEnginesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.BackupEngineBaseResourceList"] - """Backup management servers registered to Recovery Services Vault. Returns a pageable list of - servers. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either BackupEngineBaseResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('BackupEngineBaseResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines'} # type: ignore - - def get( - self, - vault_name, # type: str - resource_group_name, # type: str - backup_engine_name, # type: str - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.BackupEngineBaseResource" - """Returns backup management server registered to Recovery Services Vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param backup_engine_name: Name of the backup management server. - :type backup_engine_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupEngineBaseResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupEngineBaseResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupEngineBaseResource"] - error_map = { - 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') - - 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupEngineBaseResource', pipeline_response) - - if cls: - 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 deleted file mode 100644 index d4c27b63eb60..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_jobs_operations.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupJobsOperations(object): - """BackupJobsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.JobResourceList"] - """Provides a pageable list of jobs. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either JobResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.JobResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('JobResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs'} # type: ignore 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 deleted file mode 100644 index da93e057c37a..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_results_operations.py +++ /dev/null @@ -1,112 +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 BackupOperationResultsOperations(object): - """BackupOperationResultsOperations 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 - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Provides the status of the delete operations such as deleting backed up item. Once the - operation has started, the - status code in the response would be Accepted. It will continue to be in this state till it - reaches completion. On - successful completion, the status code will be OK. This method expects OperationID as an - argument. OperationID is - part of the Location header of the operation response. - - :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. - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - 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, {}) - - 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 deleted file mode 100644 index b2fc5c5eaef4..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_statuses_operations.py +++ /dev/null @@ -1,113 +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 BackupOperationStatusesOperations(object): - """BackupOperationStatusesOperations 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 - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.OperationStatus" - """Fetches the status of an operation such as triggering a backup, restore. The status can be in - progress, completed - or failed. You can refer to the OperationStatus enum for all the possible states of an - operation. Some operations - create jobs. This method returns the list of jobs when the operation is complete. - - :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. - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationStatus, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # 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) - 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}/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 deleted file mode 100644 index 96e3059e557c..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_policies_operations.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupPoliciesOperations(object): - """BackupPoliciesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ProtectionPolicyResourceList"] - """Lists of backup policies associated with Recovery Services Vault. API provides pagination - parameters to fetch - scoped results. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :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] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectionPolicyResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies'} # type: ignore 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 deleted file mode 100644 index fb64b6e5649a..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protectable_items_operations.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupProtectableItemsOperations(object): - """BackupProtectableItemsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkloadProtectableItemResourceList"] - """Provides a pageable list of protectable objects within your subscription according to the query - filter and the - pagination parameters. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadProtectableItemResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadProtectableItemResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadProtectableItemResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_crr_operations.py deleted file mode 100644 index 1fdbb0bfbffb..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_crr_operations.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupProtectedItemsCrrOperations(object): - """BackupProtectedItemsCrrOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ProtectedItemResourceList"] - """Provides a pageable list of all items that are backed up within a vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectedItemResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectedItemResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectedItemResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py deleted file mode 100644 index dfd4b29c25e4..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupProtectedItemsOperations(object): - """BackupProtectedItemsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ProtectedItemResourceList"] - """Provides a pageable list of all items that are backed up within a vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectedItemResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectedItemResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectedItemResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py deleted file mode 100644 index 29e77faa867c..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupProtectionContainersOperations(object): - """BackupProtectionContainersOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ProtectionContainerResourceList"] - """Lists the containers registered to Recovery Services Vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :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] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectionContainerResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers'} # type: ignore 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 deleted file mode 100644 index 89f4f6241b10..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_intent_operations.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupProtectionIntentOperations(object): - """BackupProtectionIntentOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ProtectionIntentResourceList"] - """Provides a pageable list of all intents that are present within a vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectionIntentResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectionIntentResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents'} # type: ignore 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 deleted file mode 100644 index c2318886521d..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_encryption_configs_operations.py +++ /dev/null @@ -1,172 +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 BackupResourceEncryptionConfigsOperations(object): - """BackupResourceEncryptionConfigsOperations 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.BackupResourceEncryptionConfigExtendedResource" - """Fetches Vault Encryption 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: BackupResourceEncryptionConfigExtendedResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtendedResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceEncryptionConfigExtendedResource"] - error_map = { - 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') - - # 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.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceEncryptionConfigExtendedResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig'} # type: ignore - - def update( - self, - vault_name, # type: str - resource_group_name, # type: str - parameters, # type: "_models.BackupResourceEncryptionConfigResource" - **kwargs # type: Any - ): - # type: (...) -> None - """Updates Vault encryption config. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: Vault encryption input config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource - :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 = "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') - - # 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, '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) - 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 deleted file mode 100644 index db0a78c1b91d..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_non_crr_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 BackupResourceStorageConfigsNonCRROperations(object): - """BackupResourceStorageConfigsNonCRROperations 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 = "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') - - # 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.NewErrorResponse, 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 = "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') - - # 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.NewErrorResponse, 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 = "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') - - # 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.NewErrorResponse, 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 deleted file mode 100644 index 0e194112cafe..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_vault_configs_operations.py +++ /dev/null @@ -1,244 +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 BackupResourceVaultConfigsOperations(object): - """BackupResourceVaultConfigsOperations 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.BackupResourceVaultConfigResource" - """Fetches resource vault config. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceVaultConfigResource"] - error_map = { - 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') - - # 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.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} # type: ignore - - def update( - self, - vault_name, # type: str - resource_group_name, # type: str - parameters, # type: "_models.BackupResourceVaultConfigResource" - **kwargs # type: Any - ): - # type: (...) -> "_models.BackupResourceVaultConfigResource" - """Updates vault security config. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: resource config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceVaultConfigResource"] - error_map = { - 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') - - # 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, '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) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig'} # type: ignore - - def put( - self, - vault_name, # type: str - resource_group_name, # type: str - parameters, # type: "_models.BackupResourceVaultConfigResource" - **kwargs # type: Any - ): - # type: (...) -> "_models.BackupResourceVaultConfigResource" - """Updates vault security config. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: resource config request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceVaultConfigResource - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceVaultConfigResource"] - error_map = { - 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') - - # 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, '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) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackupResourceVaultConfigResource', pipeline_response) - - if cls: - 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 deleted file mode 100644 index b42bedf4d2d1..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_status_operations.py +++ /dev/null @@ -1,110 +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 BackupStatusOperations(object): - """BackupStatusOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - azure_region, # type: str - parameters, # type: "_models.BackupStatusRequest" - **kwargs # type: Any - ): - # type: (...) -> "_models.BackupStatusResponse" - """Get the container backup status. - - Get the container backup status. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: Container Backup Status Request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupStatusRequest - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupStatusResponse"] - error_map = { - 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') - - # 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, '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 - - 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('BackupStatusResponse', pipeline_response) - - if cls: - 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_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_crr_operations.py deleted file mode 100644 index 4a3a68574fd2..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_crr_operations.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupUsageSummariesCRROperations(object): - """BackupUsageSummariesCRROperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.BackupManagementUsageList"] - """Fetches the backup management usage summaries of the vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either BackupManagementUsageList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsageList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupManagementUsageList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('BackupManagementUsageList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py deleted file mode 100644 index c484700883cd..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupUsageSummariesOperations(object): - """BackupUsageSummariesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.BackupManagementUsageList"] - """Fetches the backup management usage summaries of the vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either BackupManagementUsageList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.BackupManagementUsageList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupManagementUsageList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('BackupManagementUsageList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py deleted file mode 100644 index ba086d19548e..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py +++ /dev/null @@ -1,142 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class BackupWorkloadItemsOperations(object): - """BackupWorkloadItemsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - container_name, # type: str - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkloadItemResourceList"] - """Provides a pageable list of workload item of a specific container according to the query filter - and the pagination - parameters. - - :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 filter: OData filter options. - :type filter: str - :param skip_token: skipToken Filter. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either WorkloadItemResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.WorkloadItemResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkloadItemResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items'} # type: ignore 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 deleted file mode 100644 index 29c41688404b..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backups_operations.py +++ /dev/null @@ -1,124 +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 BackupsOperations(object): - """BackupsOperations 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( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - container_name, # type: str - protected_item_name, # type: str - parameters, # type: "_models.BackupRequestResource" - **kwargs # type: Any - ): - # type: (...) -> None - """Triggers backup for specified backed up item. This is an asynchronous operation. To know the - status of the - operation, call GetProtectedItemOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backup item. - :type fabric_name: str - :param container_name: Container name associated with the backup item. - :type container_name: str - :param protected_item_name: Backup item for which backup needs to be triggered. - :type protected_item_name: str - :param parameters: resource backup request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupRequestResource - :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 = "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') - - # 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 - - 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.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 deleted file mode 100644 index f860d252bca6..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py +++ /dev/null @@ -1,112 +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 BMSPrepareDataMoveOperationResultOperations(object): - """BMSPrepareDataMoveOperationResultOperations 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 - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.VaultStorageConfigOperationResultResponse"] - """Fetches Operation Result for Prepare Data Move. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param operation_id: - :type operation_id: str - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VaultStorageConfigOperationResultResponse"]] - error_map = { - 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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VaultStorageConfigOperationResultResponse', 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/operationResults/{operationId}'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_cross_region_restore_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_cross_region_restore_operations.py deleted file mode 100644 index 3a32161293a5..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_cross_region_restore_operations.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class CrossRegionRestoreOperations(object): - """CrossRegionRestoreOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def _trigger_initial( - self, - azure_region, # type: str - parameters, # type: "_models.CrossRegionRestoreRequest" - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._trigger_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'CrossRegionRestoreRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _trigger_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore'} # type: ignore - - def begin_trigger( - self, - azure_region, # type: str - parameters, # type: "_models.CrossRegionRestoreRequest" - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Restores the specified backed up data in a different region as compared to where the data is backed up. - - Restores the specified backed up data in a different region as compared to where the data is - backed up. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: resource cross region restore request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.CrossRegionRestoreRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._trigger_initial( - azure_region=azure_region, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_results_operations.py deleted file mode 100644 index b65e4435fb91..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_results_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class CrrOperationResultsOperations(object): - """CrrOperationResultsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - azure_region, # type: str - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """get. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param operation_id: - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_status_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_status_operations.py deleted file mode 100644 index 7307c4bc17a6..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_crr_operation_status_operations.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class CrrOperationStatusOperations(object): - """CrrOperationStatusOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - azure_region, # type: str - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.OperationStatus" - """get. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param operation_id: - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationStatus, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'azureRegion': self._serialize.url("azure_region", azure_region, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('OperationStatus', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py deleted file mode 100644 index 875e6b29abcf..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py +++ /dev/null @@ -1,116 +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, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class ExportJobsOperationResultsOperations(object): - """ExportJobsOperationResultsOperations 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 - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.OperationResultInfoBaseResource" - """Gets the operation result of operation triggered by Export Jobs API. If the operation is - successful, then it also - contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in - JSON serialized format. - - :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 export job. - :type operation_id: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationResultInfoBaseResource"] - error_map = { - 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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('OperationResultInfoBaseResource', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('OperationResultInfoBaseResource', pipeline_response) - - if cls: - 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 deleted file mode 100644 index 073ade8447fe..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_feature_support_operations.py +++ /dev/null @@ -1,110 +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 FeatureSupportOperations(object): - """FeatureSupportOperations 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 validate( - self, - azure_region, # type: str - parameters, # type: "_models.FeatureSupportRequest" - **kwargs # type: Any - ): - # type: (...) -> "_models.AzureVMResourceFeatureSupportResponse" - """It will validate if given feature with resource properties is supported in service. - - It will validate if given feature with resource properties is supported in service. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: Feature support request object. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.FeatureSupportRequest - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureVMResourceFeatureSupportResponse"] - error_map = { - 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') - - # 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, '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 - - 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('AzureVMResourceFeatureSupportResponse', pipeline_response) - - if cls: - 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 deleted file mode 100644 index a30950df6363..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_item_level_recovery_connections_operations.py +++ /dev/null @@ -1,209 +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 ItemLevelRecoveryConnectionsOperations(object): - """ItemLevelRecoveryConnectionsOperations 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 provision( - 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.ILRRequestResource" - **kwargs # type: Any - ): - # type: (...) -> None - """Provisions a script which invokes an iSCSI connection to the backup data. Executing this script - opens a file - explorer displaying all the recoverable files and folders. This is an asynchronous operation. - To know the status of - provisioning, call GetProtectedItemOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up items. - :type fabric_name: str - :param container_name: Container name associated with the backed up items. - :type container_name: str - :param protected_item_name: Backed up item name whose files/folders are to be restored. - :type protected_item_name: str - :param recovery_point_id: Recovery point ID which represents backed up data. iSCSI connection - will be provisioned - for this backed up data. - :type recovery_point_id: str - :param parameters: resource ILR request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ILRRequestResource - :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 = "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') - - # 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 = 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, {}) - - provision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery'} # type: ignore - - def revoke( - 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 - **kwargs # type: Any - ): - # type: (...) -> None - """Revokes an iSCSI connection which can be used to download a script. Executing this script opens - a file explorer - displaying all recoverable files and folders. This is an asynchronous 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 fabric_name: Fabric name associated with the backed up items. - :type fabric_name: str - :param container_name: Container name associated with the backed up items. - :type container_name: str - :param protected_item_name: Backed up item name whose files/folders are to be restored. - :type protected_item_name: str - :param recovery_point_id: Recovery point ID which represents backed up data. iSCSI connection - will be revoked for - this backed up data. - :type recovery_point_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - request = self._client.post(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 [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, {}) - - 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 deleted file mode 100644 index 2713c58df457..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_cancellations_operations.py +++ /dev/null @@ -1,107 +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 JobCancellationsOperations(object): - """JobCancellationsOperations 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( - self, - vault_name, # type: str - resource_group_name, # type: str - job_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call - GetCancelOperationResult 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 job_name: Name of the job to cancel. - :type job_name: 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 = "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') - - # 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 - - 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.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 deleted file mode 100644 index b92495c6777f..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_details_operations.py +++ /dev/null @@ -1,109 +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 JobDetailsOperations(object): - """JobDetailsOperations 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 - job_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.JobResource" - """Gets extended information associated with the job. - - :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 job_name: Name of the job whose details are to be fetched. - :type job_name: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.JobResource"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('JobResource', pipeline_response) - - if cls: - 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 deleted file mode 100644 index e9aef23b51d4..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_operation_results_operations.py +++ /dev/null @@ -1,110 +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 JobOperationResultsOperations(object): - """JobOperationResultsOperations 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 - job_name, # type: str - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Fetches the result of any 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 job_name: Job name whose operation result has to be fetched. - :type job_name: str - :param operation_id: OperationID which represents the operation whose result has to be fetched. - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - 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, {}) - - 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 deleted file mode 100644 index 25692cfce608..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_jobs_operations.py +++ /dev/null @@ -1,107 +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 JobsOperations(object): - """JobsOperations 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 export( - self, - vault_name, # type: str - resource_group_name, # type: str - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - """Triggers export of jobs specified by filters and returns an OperationID to track. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param filter: OData filter options. - :type filter: str - :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 = "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') - - # 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 - - 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, {}) - - 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 deleted file mode 100644 index e9ba5a00de5b..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operation_operations.py +++ /dev/null @@ -1,113 +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 OperationOperations(object): - """OperationOperations 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 validate( - self, - vault_name, # type: str - resource_group_name, # type: str - parameters, # type: "_models.ValidateOperationRequest" - **kwargs # type: Any - ): - # type: (...) -> "_models.ValidateOperationsResponse" - """Validate operation for specified backed up item. This is a synchronous operation. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: resource validate operation request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ValidateOperationRequest - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidateOperationsResponse"] - error_map = { - 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') - - # 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, '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 - - 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('ValidateOperationsResponse', pipeline_response) - - if cls: - 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 deleted file mode 100644 index cec78994caad..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operations.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class Operations(object): - """Operations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ClientDiscoveryResponse"] - """Returns the list of available operations. - - :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] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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 = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ClientDiscoveryResponse', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/providers/Microsoft.RecoveryServices/operations'} # type: ignore 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 deleted file mode 100644 index 1b40295b6cc6..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_connection_operations.py +++ /dev/null @@ -1,368 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class PrivateEndpointConnectionOperations(object): - """PrivateEndpointConnectionOperations 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 - private_endpoint_connection_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.PrivateEndpointConnectionResource" - """Get Private Endpoint Connection. This call is made by Backup Admin. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. - :type private_endpoint_connection_name: str - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] - error_map = { - 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') - - # 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.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) - - if cls: - 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 - resource_group_name, # type: str - private_endpoint_connection_name, # type: str - parameters, # type: "_models.PrivateEndpointConnectionResource" - **kwargs # type: Any - ): - # type: (...) -> "_models.PrivateEndpointConnectionResource" - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] - error_map = { - 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') - - # 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, '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 - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('PrivateEndpointConnectionResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - - def begin_put( - self, - vault_name, # type: str - resource_group_name, # type: str - private_endpoint_connection_name, # type: str - parameters, # type: "_models.PrivateEndpointConnectionResource" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.PrivateEndpointConnectionResource"] - """Approve or Reject Private Endpoint requests. This call is made by Backup Admin. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. - :type private_endpoint_connection_name: str - :param parameters: Request body for operation. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionResource - :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 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] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] - 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._put_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - private_endpoint_connection_name=private_endpoint_connection_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - 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) - 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_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - - def _delete_initial( - self, - vault_name, # type: str - resource_group_name, # type: str - private_endpoint_connection_name, # type: str - **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 = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(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, 204]: - 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, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - - def begin_delete( - self, - vault_name, # type: str - resource_group_name, # type: str - private_endpoint_connection_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Delete Private Endpoint requests. This call is made by Backup Admin. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. - :type private_endpoint_connection_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - private_endpoint_connection_name=private_endpoint_connection_name, - 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) - 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_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 deleted file mode 100644 index 540984fde373..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py +++ /dev/null @@ -1,116 +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 PrivateEndpointOperations(object): - """PrivateEndpointOperations 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_operation_status( - self, - vault_name, # type: str - resource_group_name, # type: str - private_endpoint_connection_name, # type: str - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.OperationStatus" - """Gets the operation status for a private endpoint connection. - - Gets the operation status for a private endpoint connection. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. - :type private_endpoint_connection_name: str - :param operation_id: Operation id. - :type operation_id: str - :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 = "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') - - 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) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('OperationStatus', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_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 deleted file mode 100644 index 0ca0df5b9c3a..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protectable_containers_operations.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class ProtectableContainersOperations(object): - """ProtectableContainersOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ProtectableContainerResourceList"] - """Lists the containers that can be registered to Recovery Services Vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: - :type fabric_name: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProtectableContainerResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ProtectableContainerResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ProtectableContainerResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers'} # type: ignore 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 deleted file mode 100644 index 686c9dc62299..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_results_operations.py +++ /dev/null @@ -1,124 +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 ProtectedItemOperationResultsOperations(object): - """ProtectedItemOperationResultsOperations 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 - fabric_name, # type: str - container_name, # type: str - protected_item_name, # type: str - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ProtectedItemResource"] - """Fetches the result of any operation on the backup item. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backup item. - :type fabric_name: str - :param container_name: Container name associated with the backup item. - :type container_name: str - :param protected_item_name: Backup item name whose details are to be fetched. - :type protected_item_name: str - :param operation_id: OperationID which represents the operation whose result needs to be - fetched. - :type operation_id: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectedItemResource"]] - error_map = { - 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') - - 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, 204]: - 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('ProtectedItemResource', pipeline_response) - - if cls: - 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 deleted file mode 100644 index 494d84541d12..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_statuses_operations.py +++ /dev/null @@ -1,125 +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 ProtectedItemOperationStatusesOperations(object): - """ProtectedItemOperationStatusesOperations 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 - fabric_name, # type: str - container_name, # type: str - protected_item_name, # type: str - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.OperationStatus" - """Fetches the status of an operation such as triggering a backup, restore. The status can be in - progress, completed - or failed. You can refer to the OperationStatus enum for all the possible states of the - operation. Some operations - create jobs. This method returns the list of jobs associated with 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 fabric_name: Fabric name associated with the backup item. - :type fabric_name: str - :param container_name: Container name associated with the backup item. - :type container_name: str - :param protected_item_name: Backup item name whose details are to be fetched. - :type protected_item_name: str - :param operation_id: OperationID represents the operation whose status needs to be fetched. - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationStatus, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - 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) - 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}/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 deleted file mode 100644 index 97efdc1f6d6f..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_items_operations.py +++ /dev/null @@ -1,280 +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 ProtectedItemsOperations(object): - """ProtectedItemsOperations 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 - fabric_name, # type: str - container_name, # type: str - protected_item_name, # type: str - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.ProtectedItemResource" - """Provides the details of the backed up item. This is an asynchronous operation. To know the - status of the operation, - call the GetItemOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up item. - :type fabric_name: str - :param container_name: Container name associated with the backed up item. - :type container_name: str - :param protected_item_name: Backed up item name whose details are to be fetched. - :type protected_item_name: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ProtectedItemResource, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectedItemResource"] - error_map = { - 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') - - 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ProtectedItemResource', pipeline_response) - - if cls: - 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 - - def create_or_update( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - container_name, # type: str - protected_item_name, # type: str - parameters, # type: "_models.ProtectedItemResource" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ProtectedItemResource"] - """Enables backup of an item or to modifies the backup policy information of an already backed up - item. This is an - asynchronous operation. To know the status of the operation, call the GetItemOperationResult - API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backup item. - :type fabric_name: str - :param container_name: Container name associated with the backup item. - :type container_name: str - :param protected_item_name: Item name to be backed up. - :type protected_item_name: str - :param parameters: resource backed up item. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectedItemResource - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectedItemResource"]] - error_map = { - 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') - - # 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 - - 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('ProtectedItemResource', pipeline_response) - - if cls: - 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 - - def delete( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - container_name, # type: str - protected_item_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Used to disable backup of an item within a container. This is an asynchronous operation. To - know the status of the - request, call the GetItemOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up item. - :type fabric_name: str - :param container_name: Container name associated with the backed up item. - :type container_name: str - :param protected_item_name: Backed up item to be deleted. - :type protected_item_name: 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 = "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') - - request = self._client.delete(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, 204]: - 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, {}) - - 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 deleted file mode 100644 index 300a25276d95..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_operation_results_operations.py +++ /dev/null @@ -1,120 +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 ProtectionContainerOperationResultsOperations(object): - """ProtectionContainerOperationResultsOperations 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 - fabric_name, # type: str - container_name, # type: str - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ProtectionContainerResource"] - """Fetches the result of any operation on the container. - - :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: Container name whose information should be fetched. - :type container_name: str - :param operation_id: Operation ID which represents the operation whose result needs to be - fetched. - :type operation_id: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectionContainerResource"]] - error_map = { - 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') - - 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, 204]: - 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('ProtectionContainerResource', pipeline_response) - - if cls: - 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 deleted file mode 100644 index 2b720baee343..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_refresh_operation_results_operations.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class ProtectionContainerRefreshOperationResultsOperations(object): - """ProtectionContainerRefreshOperationResultsOperations 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 - fabric_name, # type: str - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Provides the result of the refresh operation triggered by the BeginRefresh 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 fabric_name: Fabric name associated with the container. - :type fabric_name: str - :param operation_id: Operation ID associated with the operation whose result needs to be - fetched. - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # 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 [202, 204]: - 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, {}) - - 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 deleted file mode 100644 index f39c58d3806b..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_containers_operations.py +++ /dev/null @@ -1,405 +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 ProtectionContainersOperations(object): - """ProtectionContainersOperations 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 - fabric_name, # type: str - container_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ProtectionContainerResource" - """Gets details of the specific container registered to your Recovery Services Vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Name of the fabric where the container belongs. - :type fabric_name: str - :param container_name: Name of the container whose details need to be fetched. - :type container_name: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionContainerResource"] - error_map = { - 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') - - 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ProtectionContainerResource', pipeline_response) - - if cls: - 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 - - def register( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - container_name, # type: str - parameters, # type: "_models.ProtectionContainerResource" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ProtectionContainerResource"] - """Registers the container with Recovery Services vault. - This is an asynchronous operation. To track the operation status, use location header to call - get latest status of - 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 fabric_name: Fabric name associated with the container. - :type fabric_name: str - :param container_name: Name of the container to be registered. - :type container_name: str - :param parameters: Request body for operation. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectionContainerResource - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectionContainerResource"]] - error_map = { - 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') - - 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 - - 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('ProtectionContainerResource', pipeline_response) - - if cls: - 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 - - def unregister( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - container_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Unregisters the given container from your Recovery Services Vault. This is an asynchronous - operation. To determine - whether the backend service has finished processing the request, call Get Container Operation - Result API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Name of the fabric where the container belongs. - :type fabric_name: str - :param container_name: Name of the container which needs to be unregistered from the Recovery - Services Vault. - :type container_name: 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 = "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') - - request = self._client.delete(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, 204]: - 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, {}) - - unregister.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}'} # type: ignore - - def inquire( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - container_name, # type: str - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - """Inquires all the protectable items under the given container. - - This is an async operation and the results should be tracked using location header or - Azure-async-url. - - :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 in which inquiry needs to be triggered. - :type container_name: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: 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 = "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') - - request = self._client.post(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 [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, {}) - - inquire.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire'} # type: ignore - - def refresh( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - """Discovers all the containers in the subscription that can be backed up to Recovery Services - Vault. This is an - asynchronous operation. To know the status of the operation, call GetRefreshOperationResult - API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated the container. - :type fabric_name: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: 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 = "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') - - # 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 - - 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, {}) - - 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 deleted file mode 100644 index 68c9cb1a77b2..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_intent_operations.py +++ /dev/null @@ -1,329 +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 ProtectionIntentOperations(object): - """ProtectionIntentOperations 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 validate( - self, - azure_region, # type: str - parameters, # type: "_models.PreValidateEnableBackupRequest" - **kwargs # type: Any - ): - # type: (...) -> "_models.PreValidateEnableBackupResponse" - """It will validate followings - - - #. Vault capacity - #. VM is already protected - #. Any VM related configuration passed in properties. - - It will validate followings - - - #. Vault capacity - #. VM is already protected - #. Any VM related configuration passed in properties. - - :param azure_region: Azure region to hit Api. - :type azure_region: str - :param parameters: Enable backup validation request on Virtual Machine. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.PreValidateEnableBackupRequest - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PreValidateEnableBackupResponse"] - error_map = { - 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') - - # 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, '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 - - 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('PreValidateEnableBackupResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - validate.metadata = {'url': '/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection'} # type: ignore - - def get( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - intent_object_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ProtectionIntentResource" - """Provides the details of the protection intent up item. This is an asynchronous operation. To - know the status of the operation, - call the GetItemOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up item. - :type fabric_name: str - :param intent_object_name: Backed up item name whose details are to be fetched. - :type intent_object_name: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionIntentResource"] - error_map = { - 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') - - # 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ProtectionIntentResource', pipeline_response) - - if cls: - 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 - - def create_or_update( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - intent_object_name, # type: str - parameters, # type: "_models.ProtectionIntentResource" - **kwargs # type: Any - ): - # type: (...) -> "_models.ProtectionIntentResource" - """Create Intent for Enabling backup of an item. This is a synchronous 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 fabric_name: Fabric name associated with the backup item. - :type fabric_name: str - :param intent_object_name: Intent object name. - :type intent_object_name: str - :param parameters: resource backed up item. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectionIntentResource - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionIntentResource"] - error_map = { - 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') - - # 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 - - 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('ProtectionIntentResource', pipeline_response) - - if cls: - 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 - - def delete( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - intent_object_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Used to remove intent from an item. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the intent. - :type fabric_name: str - :param intent_object_name: Intent to be deleted. - :type intent_object_name: 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 = "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') - - # 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 - - if response.status_code not in [204]: - 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, {}) - - 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 deleted file mode 100644 index 2b48ce38183c..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policies_operations.py +++ /dev/null @@ -1,309 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class ProtectionPoliciesOperations(object): - """ProtectionPoliciesOperations 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 - policy_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ProtectionPolicyResource" - """Provides the details of the backup policies associated to Recovery Services Vault. This is an - asynchronous - operation. Status of the operation can be fetched using GetPolicyOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param policy_name: Backup policy information to be fetched. - :type policy_name: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionPolicyResource"] - error_map = { - 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') - - # 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ProtectionPolicyResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} # type: ignore - - def create_or_update( - self, - vault_name, # type: str - resource_group_name, # type: str - policy_name, # type: str - parameters, # type: "_models.ProtectionPolicyResource" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ProtectionPolicyResource"] - """Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation - can be fetched - using GetPolicyOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param policy_name: Backup policy to be created. - :type policy_name: str - :param parameters: resource backup policy. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ProtectionPolicyResource - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ProtectionPolicyResource"]] - error_map = { - 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') - - # 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, '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 - - 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('ProtectionPolicyResource', pipeline_response) - - if cls: - 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 - resource_group_name, # type: str - policy_name, # type: str - **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 = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(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, 204]: - 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, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}'} # type: ignore - - def begin_delete( - self, - vault_name, # type: str - resource_group_name, # type: str - policy_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous - operation. Status of the - operation can be fetched using GetProtectionPolicyOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param policy_name: Backup policy to be deleted. - :type policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - policy_name=policy_name, - 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) - 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_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 deleted file mode 100644 index d219d859a1a9..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_results_operations.py +++ /dev/null @@ -1,114 +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 ProtectionPolicyOperationResultsOperations(object): - """ProtectionPolicyOperationResultsOperations 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 - policy_name, # type: str - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ProtectionPolicyResource" - """Provides the result of an 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 policy_name: Backup policy name whose operation's result needs to be fetched. - :type policy_name: str - :param operation_id: Operation ID which represents the operation whose result needs to be - fetched. - :type operation_id: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ProtectionPolicyResource"] - error_map = { - 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') - - 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ProtectionPolicyResource', pipeline_response) - - if cls: - 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 deleted file mode 100644 index 7569d503d056..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_statuses_operations.py +++ /dev/null @@ -1,118 +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 ProtectionPolicyOperationStatusesOperations(object): - """ProtectionPolicyOperationStatusesOperations 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 - policy_name, # type: str - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.OperationStatus" - """Provides the status of the asynchronous operations like backup, restore. The status can be in - progress, completed - or failed. You can refer to the Operation Status enum for all the possible states of an - operation. Some operations - create jobs. This method returns the list of jobs associated with 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 policy_name: Backup policy name whose operation's status needs to be fetched. - :type policy_name: str - :param operation_id: Operation ID which represents an operation whose status needs to be - fetched. - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationStatus, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - 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) - 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}/backupPolicies/{policyName}/operations/{operationId}'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_crr_operations.py deleted file mode 100644 index f4100034a834..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_crr_operations.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class RecoveryPointsCrrOperations(object): - """RecoveryPointsCrrOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - container_name, # type: str - protected_item_name, # type: str - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.RecoveryPointResourceList"] - """Lists the backup copies for the backed up item. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up item. - :type fabric_name: str - :param container_name: Container name associated with the backed up item. - :type container_name: str - :param protected_item_name: Backed up item whose backup copies are to be fetched. - :type protected_item_name: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RecoveryPointResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-12-20" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'fabricName': self._serialize.url("fabric_name", fabric_name, 'str'), - 'containerName': self._serialize.url("container_name", container_name, 'str'), - 'protectedItemName': self._serialize.url("protected_item_name", protected_item_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('RecoveryPointResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.NewErrorResponseAutoGenerated, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_operations.py deleted file mode 100644 index cd3d10fc73a1..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_operations.py +++ /dev/null @@ -1,306 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class 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.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - container_name, # type: str - protected_item_name, # type: str - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.RecoveryPointResourceList"] - """Lists the backup copies for the backed up item. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up item. - :type fabric_name: str - :param container_name: Container name associated with the backed up item. - :type container_name: str - :param protected_item_name: Backed up item whose backup copies are to be fetched. - :type protected_item_name: str - :param filter: OData filter options. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RecoveryPointResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('RecoveryPointResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints'} # type: ignore - - def get( - 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 - **kwargs # type: Any - ): - # type: (...) -> "_models.RecoveryPointResource" - """Provides the information of the backed up data identified using RecoveryPointID. This is an - asynchronous operation. - To know the status of the operation, call the GetProtectedItemOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with backed up item. - :type fabric_name: str - :param container_name: Container name associated with backed up item. - :type container_name: str - :param protected_item_name: Backed up item name whose backup data needs to be fetched. - :type protected_item_name: str - :param recovery_point_id: RecoveryPointID represents the backed up data to be fetched. - :type recovery_point_id: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResource"] - error_map = { - 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') - - 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RecoveryPointResource', pipeline_response) - - if cls: - 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, {}) - - 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 deleted file mode 100644 index 893f3cb6071d..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_recommended_for_move_operations.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class RecoveryPointsRecommendedForMoveOperations(object): - """RecoveryPointsRecommendedForMoveOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.recoveryservicesbackup.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - vault_name, # type: str - resource_group_name, # type: str - fabric_name, # type: str - container_name, # type: str - protected_item_name, # type: str - parameters, # type: "_models.ListRecoveryPointsRecommendedForMoveRequest" - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.RecoveryPointResourceList"] - """Lists the recovery points recommended for move to another tier. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: - :type fabric_name: str - :param container_name: - :type container_name: str - :param protected_item_name: - :type protected_item_name: str - :param parameters: List Recovery points Recommended for Move Request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RecoveryPointResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.RecoveryPointResourceList] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoveryPointResourceList"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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) - 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) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('RecoveryPointResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPointsRecommendedForMove'} # type: ignore 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 deleted file mode 100644 index 48810877fd87..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_services_backup_client_operations.py +++ /dev/null @@ -1,487 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class RecoveryServicesBackupClientOperationsMixin(object): - - def get_operation_status( - self, - vault_name, # type: str - resource_group_name, # type: str - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.OperationStatus" - """Fetches operation status for data move operation on vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param operation_id: - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationStatus, or the result of cls(response) - :rtype: ~azure.mgmt.recoveryservicesbackup.models.OperationStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "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') - - # 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.NewErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('OperationStatus', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_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 - resource_group_name, # type: str - parameters, # type: "_models.PrepareDataMoveRequest" - **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 = "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') - - # 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, '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) - - 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 - - def begin_bms_prepare_data_move( - self, - vault_name, # type: str - resource_group_name, # type: str - parameters, # type: "_models.PrepareDataMoveRequest" - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Prepares source vault for Data Move operation. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: Prepare data move request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.PrepareDataMoveRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._bms_prepare_data_move_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - '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) - 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_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( - self, - vault_name, # type: str - resource_group_name, # type: str - parameters, # type: "_models.TriggerDataMoveRequest" - **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 = "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') - - # 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, '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) - - 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 - - def begin_bms_trigger_data_move( - self, - vault_name, # type: str - resource_group_name, # type: str - parameters, # type: "_models.TriggerDataMoveRequest" - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Triggers Data Move Operation on target vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param parameters: Trigger data move request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.TriggerDataMoveRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._bms_trigger_data_move_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - '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) - 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_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( - 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.MoveRPAcrossTiersRequest" - **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 = "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') - - 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 - - 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, {}) - - _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 - - def begin_move_recovery_point( - 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.MoveRPAcrossTiersRequest" - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Move recovery point from one datastore to another store. - - Move recovery point from one datastore to another store. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: - :type fabric_name: str - :param container_name: - :type container_name: str - :param protected_item_name: - :type protected_item_name: str - :param recovery_point_id: - :type recovery_point_id: str - :param parameters: Move Resource Across Tiers Request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.MoveRPAcrossTiersRequest - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._move_recovery_point_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - fabric_name=fabric_name, - container_name=container_name, - protected_item_name=protected_item_name, - recovery_point_id=recovery_point_id, - parameters=parameters, - 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) - 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_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 deleted file mode 100644 index b18a52a35e25..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxies_operations.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class ResourceGuardProxiesOperations(object): - """ResourceGuardProxiesOperations 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: (...) -> Iterable["_models.ResourceGuardProxyBaseResourceList"] - """List the ResourceGuardProxies under vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :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] - :raises: ~azure.core.exceptions.HttpResponseError - """ - 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) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ResourceGuardProxyBaseResourceList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies'} # type: ignore 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 deleted file mode 100644 index de4740f8635c..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxy_operations.py +++ /dev/null @@ -1,307 +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 ResourceGuardProxyOperations(object): - """ResourceGuardProxyOperations 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 - resource_guard_proxy_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ResourceGuardProxyBaseResource" - """Returns ResourceGuardProxy under vault and with the name referenced in request. - - :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 resource_guard_proxy_name: - :type resource_guard_proxy_name: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResource"] - error_map = { - 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') - - # 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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ResourceGuardProxyBaseResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore - - def put( - self, - vault_name, # type: str - resource_group_name, # type: str - resource_guard_proxy_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ResourceGuardProxyBaseResource" - """Add or Update ResourceGuardProxy under vault - Secures vault critical operations. - - :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 resource_guard_proxy_name: - :type resource_guard_proxy_name: 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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResource"] - error_map = { - 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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.put(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) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ResourceGuardProxyBaseResource', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore - - def delete( - self, - vault_name, # type: str - resource_group_name, # type: str - resource_guard_proxy_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Delete ResourceGuardProxy under vault. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param resource_guard_proxy_name: - :type resource_guard_proxy_name: 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 = "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') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(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, 204]: - 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, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore - - def unlock_delete( - self, - vault_name, # type: str - resource_group_name, # type: str - resource_guard_proxy_name, # type: str - parameters, # type: "_models.UnlockDeleteRequest" - **kwargs # type: Any - ): - # type: (...) -> "_models.UnlockDeleteResponse" - """Secures delete ResourceGuardProxy operations. - - :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 resource_guard_proxy_name: - :type resource_guard_proxy_name: str - :param parameters: Request body for operation. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.UnlockDeleteRequest - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UnlockDeleteResponse"] - error_map = { - 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') - - # 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, '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 - - 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('UnlockDeleteResponse', pipeline_response) - - if cls: - 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 deleted file mode 100644 index 7ebb62e219cb..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_restores_operations.py +++ /dev/null @@ -1,198 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class RestoresOperations(object): - """RestoresOperations 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 - fabric_name, # type: str - container_name, # type: str - protected_item_name, # type: str - recovery_point_id, # type: str - parameters, # type: "_models.RestoreRequestResource" - **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 = "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') - - 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 - - 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}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore'} # type: ignore - - def begin_trigger( - 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.RestoreRequestResource" - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Restores the specified backed up data. This is an asynchronous operation. To know the status of - this API call, use - GetProtectedItemOperationResult API. - - :param vault_name: The name of the recovery services vault. - :type vault_name: str - :param resource_group_name: The name of the resource group where the recovery services vault is - present. - :type resource_group_name: str - :param fabric_name: Fabric name associated with the backed up items. - :type fabric_name: str - :param container_name: Container name associated with the backed up items. - :type container_name: str - :param protected_item_name: Backed up item to be restored. - :type protected_item_name: str - :param recovery_point_id: Recovery point ID which represents the backed up data to be restored. - :type recovery_point_id: str - :param parameters: resource restore request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.RestoreRequestResource - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._trigger_initial( - vault_name=vault_name, - resource_group_name=resource_group_name, - fabric_name=fabric_name, - container_name=container_name, - protected_item_name=protected_item_name, - recovery_point_id=recovery_point_id, - parameters=parameters, - 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) - 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}/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 deleted file mode 100644 index 06c421b4db77..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_security_pins_operations.py +++ /dev/null @@ -1,116 +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 SecurityPINsOperations(object): - """SecurityPINsOperations 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 - parameters=None, # type: Optional["_models.SecurityPinBase"] - **kwargs # type: Any - ): - # type: (...) -> "_models.TokenInformation" - """Get the security PIN. - - :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: security pin request. - :type parameters: ~azure.mgmt.recoveryservicesbackup.models.SecurityPinBase - :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 - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.TokenInformation"] - error_map = { - 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') - - body_content_kwargs = {} # type: Dict[str, Any] - if parameters is not None: - body_content = 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) - 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('TokenInformation', pipeline_response) - - if cls: - 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/passivestamp/_version.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_version.py index 9bd4c9b55137..77f53a3589c6 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_version.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "0.0.0" +VERSION = "4.0.0" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/py.typed b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/py.typed deleted file mode 100644 index e5aff4f83af8..000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file