azure_mgmt_recovery_services_site_recovery 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (353) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/azure_mgmt_recovery_services_site_recovery.rb +7 -0
  4. data/lib/generated/azure_mgmt_recovery_services_site_recovery.rb +372 -0
  5. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aapply_recovery_point_input.rb +48 -0
  6. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2acontainer_creation_input.rb +48 -0
  7. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aenable_protection_input.rb +136 -0
  8. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aevent_details.rb +108 -0
  9. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2afailover_provider_input.rb +71 -0
  10. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2apolicy_creation_input.rb +92 -0
  11. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2apolicy_details.rb +100 -0
  12. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotected_disk_details.rb +168 -0
  13. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aprotected_managed_disk_details.rb +158 -0
  14. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2areplication_details.rb +373 -0
  15. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2areprotect_input.rb +117 -0
  16. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2arp_recovery_point_type.rb +18 -0
  17. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aswitch_protection_input.rb +136 -0
  18. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2aupdate_replication_protected_item_input.rb +68 -0
  19. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_disk_input_details.rb +64 -0
  20. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/a2avm_managed_disk_input_details.rb +64 -0
  21. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/add_vcenter_request.rb +46 -0
  22. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/add_vcenter_request_properties.rb +86 -0
  23. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert.rb +76 -0
  24. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert_collection.rb +94 -0
  25. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alert_properties.rb +72 -0
  26. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/alternate_location_recovery_option.rb +16 -0
  27. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_input.rb +46 -0
  28. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_input_properties.rb +58 -0
  29. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/apply_recovery_point_provider_specific_input.rb +47 -0
  30. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/armexception.rb +93 -0
  31. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/armexception_details.rb +104 -0
  32. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/arminner_error.rb +186 -0
  33. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/asr_job_details.rb +62 -0
  34. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/asrtask.rb +182 -0
  35. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/automation_runbook_task_details.rb +139 -0
  36. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_fabric_creation_input.rb +58 -0
  37. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_fabric_specific_details.rb +75 -0
  38. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_create_network_mapping_input.rb +59 -0
  39. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_network_mapping_settings.rb +68 -0
  40. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_update_network_mapping_input.rb +58 -0
  41. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_to_azure_vm_synced_config_details.rb +87 -0
  42. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/azure_vm_disk_details.rb +104 -0
  43. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configuration_settings.rb +47 -0
  44. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configure_alert_request.rb +46 -0
  45. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/configure_alert_request_properties.rb +72 -0
  46. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/consistency_check_task_details.rb +68 -0
  47. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_network_mapping_input.rb +46 -0
  48. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_network_mapping_input_properties.rb +68 -0
  49. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_policy_input.rb +45 -0
  50. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_policy_input_properties.rb +47 -0
  51. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_input.rb +46 -0
  52. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_input_properties.rb +55 -0
  53. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_mapping_input.rb +46 -0
  54. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_protection_container_mapping_input_properties.rb +67 -0
  55. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_recovery_plan_input.rb +46 -0
  56. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/create_recovery_plan_input_properties.rb +84 -0
  57. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/current_scenario_details.rb +64 -0
  58. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/data_store.rb +84 -0
  59. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/data_sync_status.rb +16 -0
  60. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_input.rb +46 -0
  61. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_input_properties.rb +61 -0
  62. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_provider_specific_input.rb +45 -0
  63. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disable_protection_reason.rb +16 -0
  64. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/discover_protectable_item_request.rb +46 -0
  65. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/discover_protectable_item_request_properties.rb +65 -0
  66. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disk_details.rb +74 -0
  67. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/disk_volume_details.rb +54 -0
  68. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/display.rb +100 -0
  69. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_input.rb +46 -0
  70. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_input_properties.rb +71 -0
  71. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/enable_protection_provider_specific_input.rb +49 -0
  72. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/encryption_details.rb +64 -0
  73. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event.rb +76 -0
  74. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_collection.rb +94 -0
  75. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_properties.rb +151 -0
  76. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_provider_specific_details.rb +50 -0
  77. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_query_parameter.rb +107 -0
  78. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/event_specific_details.rb +45 -0
  79. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/export_job_details.rb +82 -0
  80. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric.rb +76 -0
  81. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_collection.rb +94 -0
  82. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_creation_input.rb +45 -0
  83. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_creation_input_properties.rb +48 -0
  84. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_properties.rb +127 -0
  85. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_replication_group_task_details.rb +79 -0
  86. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_create_network_mapping_input.rb +47 -0
  87. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_creation_input.rb +46 -0
  88. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_details.rb +49 -0
  89. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/fabric_specific_update_network_mapping_input.rb +47 -0
  90. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_deployment_model.rb +17 -0
  91. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_job_details.rb +81 -0
  92. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_process_server_request.rb +46 -0
  93. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_process_server_request_properties.rb +92 -0
  94. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/failover_replication_protected_item_details.rb +124 -0
  95. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/group_task_details.rb +66 -0
  96. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error.rb +152 -0
  97. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error_category.rb +17 -0
  98. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/health_error_summary.rb +120 -0
  99. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica2012event_details.rb +88 -0
  100. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica2012r2event_details.rb +88 -0
  101. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_apply_recovery_point_input.rb +79 -0
  102. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_enable_protection_input.rb +201 -0
  103. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_event_details.rb +78 -0
  104. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_failback_provider_input.rb +78 -0
  105. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_failover_provider_input.rb +90 -0
  106. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_policy_details.rb +112 -0
  107. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_policy_input.rb +120 -0
  108. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_replication_details.rb +281 -0
  109. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_reprotect_input.rb +109 -0
  110. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_rp_recovery_point_type.rb +17 -0
  111. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_azure_update_replication_protected_item_input.rb +82 -0
  112. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_event_details.rb +88 -0
  113. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_policy_details.rb +151 -0
  114. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_base_replication_details.rb +135 -0
  115. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_policy_details.rb +161 -0
  116. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_policy_input.rb +161 -0
  117. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_blue_replication_details.rb +135 -0
  118. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_policy_details.rb +151 -0
  119. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_policy_input.rb +151 -0
  120. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vreplica_replication_details.rb +135 -0
  121. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vsite_details.rb +48 -0
  122. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/hyper_vvirtual_machine_details.rb +97 -0
  123. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/identity_information.rb +117 -0
  124. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/identity_provider_type.rb +16 -0
  125. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_agent_details.rb +66 -0
  126. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2apply_recovery_point_input.rb +58 -0
  127. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2enable_protection_input.rb +211 -0
  128. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2event_details.rb +119 -0
  129. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2failover_provider_input.rb +70 -0
  130. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2policy_details.rb +100 -0
  131. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2policy_input.rb +102 -0
  132. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2protected_disk_details.rb +185 -0
  133. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2recovery_point_details.rb +64 -0
  134. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2replication_details.rb +573 -0
  135. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2reprotect_input.rb +126 -0
  136. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_azure_v2update_replication_protected_item_input.rb +82 -0
  137. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_base_policy_details.rb +90 -0
  138. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disable_protection_provider_specific_input.rb +60 -0
  139. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_details.rb +102 -0
  140. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_exclusion_input.rb +73 -0
  141. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_disk_signature_exclusion_options.rb +46 -0
  142. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_enable_protection_input.rb +156 -0
  143. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_failover_provider_input.rb +75 -0
  144. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_policy_details.rb +90 -0
  145. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_policy_input.rb +92 -0
  146. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_protected_disk_details.rb +185 -0
  147. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_replication_details.rb +472 -0
  148. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_reprotect_input.rb +136 -0
  149. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_v2rp_recovery_point_type.rb +18 -0
  150. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/in_mage_volume_exclusion_options.rb +59 -0
  151. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/inconsistent_vm_details.rb +90 -0
  152. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/initial_replication_details.rb +54 -0
  153. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/inline_workflow_task_details.rb +80 -0
  154. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/input_endpoint.rb +74 -0
  155. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job.rb +119 -0
  156. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_collection.rb +94 -0
  157. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_details.rb +68 -0
  158. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_entity.rb +95 -0
  159. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_error_details.rb +86 -0
  160. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_properties.rb +206 -0
  161. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_query_parameter.rb +98 -0
  162. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_status_event_details.rb +88 -0
  163. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/job_task_details.rb +60 -0
  164. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/license_type.rb +17 -0
  165. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network.rb +76 -0
  166. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network_collection.rb +94 -0
  167. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/logical_network_properties.rb +77 -0
  168. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/manual_action_task_details.rb +78 -0
  169. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/master_target_server.rb +179 -0
  170. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/method_call_status.rb +73 -0
  171. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/mobility_service_update.rb +65 -0
  172. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/multi_vm_sync_status.rb +16 -0
  173. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network.rb +76 -0
  174. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_collection.rb +94 -0
  175. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping.rb +82 -0
  176. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_collection.rb +98 -0
  177. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_fabric_specific_settings.rb +47 -0
  178. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_mapping_properties.rb +128 -0
  179. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/network_properties.rb +82 -0
  180. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/operations_discovery.rb +95 -0
  181. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/operations_discovery_collection.rb +94 -0
  182. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/osdetails.rb +94 -0
  183. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/osdisk_details.rb +64 -0
  184. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/planned_failover_input.rb +46 -0
  185. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/planned_failover_input_properties.rb +57 -0
  186. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy.rb +76 -0
  187. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_collection.rb +94 -0
  188. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_properties.rb +57 -0
  189. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_provider_specific_details.rb +54 -0
  190. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/policy_provider_specific_input.rb +51 -0
  191. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/possible_operations_directions.rb +16 -0
  192. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/process_server.rb +294 -0
  193. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item.rb +76 -0
  194. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_collection.rb +94 -0
  195. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protectable_item_properties.rb +123 -0
  196. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protected_items_query_parameter.rb +64 -0
  197. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container.rb +76 -0
  198. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_collection.rb +94 -0
  199. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_fabric_specific_details.rb +45 -0
  200. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping.rb +76 -0
  201. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_collection.rb +94 -0
  202. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_properties.rb +154 -0
  203. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_mapping_provider_specific_details.rb +46 -0
  204. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/protection_container_properties.rb +106 -0
  205. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_error.rb +84 -0
  206. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_specific_failover_input.rb +49 -0
  207. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/provider_specific_recovery_point_details.rb +45 -0
  208. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/rcm_azure_migration_policy_details.rb +101 -0
  209. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan.rb +76 -0
  210. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_a2afailover_input.rb +72 -0
  211. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action.rb +95 -0
  212. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action_details.rb +47 -0
  213. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_action_location.rb +16 -0
  214. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_automation_runbook_action_details.rb +81 -0
  215. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_collection.rb +94 -0
  216. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group.rb +100 -0
  217. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group_task_details.rb +93 -0
  218. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_group_type.rb +17 -0
  219. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_hyper_vreplica_azure_failback_input.rb +73 -0
  220. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_hyper_vreplica_azure_failover_input.rb +92 -0
  221. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_in_mage_azure_v2failover_input.rb +82 -0
  222. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_in_mage_failover_input.rb +60 -0
  223. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_manual_action_details.rb +58 -0
  224. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_planned_failover_input.rb +46 -0
  225. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_planned_failover_input_properties.rb +68 -0
  226. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_properties.rb +207 -0
  227. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_protected_item.rb +54 -0
  228. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_provider_specific_failover_input.rb +50 -0
  229. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_script_action_details.rb +80 -0
  230. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_shutdown_group_task_details.rb +93 -0
  231. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_cleanup_input.rb +46 -0
  232. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_cleanup_input_properties.rb +45 -0
  233. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_input.rb +46 -0
  234. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_test_failover_input_properties.rb +98 -0
  235. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_unplanned_failover_input.rb +46 -0
  236. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_plan_unplanned_failover_input_properties.rb +81 -0
  237. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point.rb +76 -0
  238. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_collection.rb +94 -0
  239. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_properties.rb +67 -0
  240. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_point_type.rb +17 -0
  241. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider.rb +76 -0
  242. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider_collection.rb +94 -0
  243. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/recovery_services_provider_properties.rb +191 -0
  244. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/remove_protection_container_mapping_input.rb +46 -0
  245. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/remove_protection_container_mapping_input_properties.rb +47 -0
  246. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/renew_certificate_input.rb +46 -0
  247. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/renew_certificate_input_properties.rb +44 -0
  248. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_group_details.rb +48 -0
  249. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item.rb +76 -0
  250. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_collection.rb +95 -0
  251. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_operation.rb +27 -0
  252. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_protected_item_properties.rb +338 -0
  253. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_container_unmapping_input.rb +45 -0
  254. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_container_creation_input.rb +46 -0
  255. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_container_mapping_input.rb +45 -0
  256. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/replication_provider_specific_settings.rb +51 -0
  257. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resource.rb +77 -0
  258. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resource_health_summary.rb +64 -0
  259. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resume_job_params.rb +45 -0
  260. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/resume_job_params_properties.rb +44 -0
  261. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/retention_volume.rb +74 -0
  262. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_input.rb +46 -0
  263. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_input_properties.rb +58 -0
  264. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/reverse_replication_provider_specific_input.rb +48 -0
  265. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/role_assignment.rb +84 -0
  266. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/rp_in_mage_recovery_point_type.rb +17 -0
  267. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/run_as_account.rb +54 -0
  268. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/san_enable_protection_input.rb +48 -0
  269. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/script_action_task_details.rb +89 -0
  270. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/service_error.rb +84 -0
  271. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/set_multi_vm_sync_status.rb +16 -0
  272. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/severity.rb +18 -0
  273. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/source_site_operations.rb +16 -0
  274. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification.rb +77 -0
  275. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_collection.rb +94 -0
  276. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping.rb +77 -0
  277. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_collection.rb +95 -0
  278. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_input.rb +46 -0
  279. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_mapping_properties.rb +44 -0
  280. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_classification_properties.rb +44 -0
  281. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/storage_mapping_input_properties.rb +44 -0
  282. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/subnet.rb +71 -0
  283. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_input.rb +45 -0
  284. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_input_properties.rb +58 -0
  285. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_job_details.rb +72 -0
  286. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/switch_protection_provider_specific_input.rb +45 -0
  287. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/task_type_details.rb +52 -0
  288. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_cleanup_input.rb +46 -0
  289. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_cleanup_input_properties.rb +44 -0
  290. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_input.rb +45 -0
  291. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_input_properties.rb +88 -0
  292. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/test_failover_job_details.rb +132 -0
  293. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/unplanned_failover_input.rb +46 -0
  294. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/unplanned_failover_input_properties.rb +67 -0
  295. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_mobility_service_request.rb +46 -0
  296. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_mobility_service_request_properties.rb +44 -0
  297. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_network_mapping_input.rb +46 -0
  298. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_network_mapping_input_properties.rb +68 -0
  299. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_policy_input.rb +45 -0
  300. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_policy_input_properties.rb +47 -0
  301. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_recovery_plan_input.rb +46 -0
  302. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_recovery_plan_input_properties.rb +52 -0
  303. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_input.rb +46 -0
  304. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_input_properties.rb +131 -0
  305. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_replication_protected_item_provider_input.rb +48 -0
  306. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_vcenter_request.rb +46 -0
  307. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/update_vcenter_request_properties.rb +86 -0
  308. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vault_health_details.rb +76 -0
  309. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vault_health_properties.rb +76 -0
  310. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter.rb +76 -0
  311. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter_collection.rb +94 -0
  312. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vcenter_properties.rb +137 -0
  313. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/virtual_machine_task_details.rb +79 -0
  314. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vm_nic_updates_task_details.rb +78 -0
  315. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_details.rb +48 -0
  316. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_create_network_mapping_input.rb +49 -0
  317. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_network_mapping_settings.rb +48 -0
  318. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_azure_update_network_mapping_input.rb +49 -0
  319. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_create_network_mapping_input.rb +49 -0
  320. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_network_mapping_settings.rb +48 -0
  321. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmm_to_vmm_update_network_mapping_input.rb +49 -0
  322. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmnic_details.rb +154 -0
  323. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmnic_input_details.rb +74 -0
  324. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_cbt_policy_creation_input.rb +79 -0
  325. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_cbt_policy_details.rb +89 -0
  326. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_details.rb +376 -0
  327. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_v2fabric_creation_input.rb +48 -0
  328. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_v2fabric_specific_details.rb +68 -0
  329. data/lib/generated/azure_mgmt_recovery_services_site_recovery/models/vmware_virtual_machine_details.rb +168 -0
  330. data/lib/generated/azure_mgmt_recovery_services_site_recovery/module_definition.rb +8 -0
  331. data/lib/generated/azure_mgmt_recovery_services_site_recovery/operations.rb +230 -0
  332. data/lib/generated/azure_mgmt_recovery_services_site_recovery/recovery_points.rb +360 -0
  333. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_alert_settings.rb +442 -0
  334. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_events.rb +329 -0
  335. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_fabrics.rb +1299 -0
  336. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_jobs.rb +905 -0
  337. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_logical_networks.rb +335 -0
  338. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_network_mappings.rb +1012 -0
  339. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_networks.rb +541 -0
  340. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_policies.rb +752 -0
  341. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protectable_items.rb +344 -0
  342. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protected_items.rb +2757 -0
  343. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_container_mappings.rb +1002 -0
  344. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_protection_containers.rb +1175 -0
  345. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_plans.rb +1639 -0
  346. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_recovery_services_providers.rb +967 -0
  347. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classification_mappings.rb +861 -0
  348. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_storage_classifications.rb +541 -0
  349. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replication_vault_health.rb +116 -0
  350. data/lib/generated/azure_mgmt_recovery_services_site_recovery/replicationv_centers.rb +999 -0
  351. data/lib/generated/azure_mgmt_recovery_services_site_recovery/site_recovery_management_client.rb +217 -0
  352. data/lib/generated/azure_mgmt_recovery_services_site_recovery/version.rb +8 -0
  353. metadata +466 -0
@@ -0,0 +1,1175 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::RecoveryServicesSiteRecovery
7
+ #
8
+ # ReplicationProtectionContainers
9
+ #
10
+ class ReplicationProtectionContainers
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ReplicationProtectionContainers class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [SiteRecoveryManagementClient] reference to the SiteRecoveryManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Switches protection from one container to another or one replication provider
26
+ # to another.
27
+ #
28
+ # Operation to switch protection from one container to another or one
29
+ # replication provider to another.
30
+ #
31
+ # @param fabric_name [String] Unique fabric name.
32
+ # @param protection_container_name [String] Protection container name.
33
+ # @param switch_input [SwitchProtectionInput] Switch protection input.
34
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
+ # will be added to the HTTP request.
36
+ #
37
+ # @return [ProtectionContainer] operation results.
38
+ #
39
+ def switch_protection(fabric_name, protection_container_name, switch_input, custom_headers = nil)
40
+ response = switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers).value!
41
+ response.body unless response.nil?
42
+ end
43
+
44
+ #
45
+ # @param fabric_name [String] Unique fabric name.
46
+ # @param protection_container_name [String] Protection container name.
47
+ # @param switch_input [SwitchProtectionInput] Switch protection input.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [Concurrent::Promise] promise which provides async access to http
52
+ # response.
53
+ #
54
+ def switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers = nil)
55
+ # Send request
56
+ promise = begin_switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers)
57
+
58
+ promise = promise.then do |response|
59
+ # Defining deserialization method.
60
+ deserialize_method = lambda do |parsed_response|
61
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainer.mapper()
62
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
63
+ end
64
+
65
+ # Waiting for response.
66
+ @client.get_long_running_operation_result(response, deserialize_method)
67
+ end
68
+
69
+ promise
70
+ end
71
+
72
+ #
73
+ # Removes a protection container.
74
+ #
75
+ # Operation to remove a protection container.
76
+ #
77
+ # @param fabric_name [String] Unique fabric ARM name.
78
+ # @param protection_container_name [String] Unique protection container ARM
79
+ # name.
80
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
81
+ # will be added to the HTTP request.
82
+ #
83
+ def delete(fabric_name, protection_container_name, custom_headers = nil)
84
+ response = delete_async(fabric_name, protection_container_name, custom_headers).value!
85
+ nil
86
+ end
87
+
88
+ #
89
+ # @param fabric_name [String] Unique fabric ARM name.
90
+ # @param protection_container_name [String] Unique protection container ARM
91
+ # name.
92
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
93
+ # will be added to the HTTP request.
94
+ #
95
+ # @return [Concurrent::Promise] promise which provides async access to http
96
+ # response.
97
+ #
98
+ def delete_async(fabric_name, protection_container_name, custom_headers = nil)
99
+ # Send request
100
+ promise = begin_delete_async(fabric_name, protection_container_name, custom_headers)
101
+
102
+ promise = promise.then do |response|
103
+ # Defining deserialization method.
104
+ deserialize_method = lambda do |parsed_response|
105
+ end
106
+
107
+ # Waiting for response.
108
+ @client.get_long_running_operation_result(response, deserialize_method)
109
+ end
110
+
111
+ promise
112
+ end
113
+
114
+ #
115
+ # Adds a protectable item to the replication protection container.
116
+ #
117
+ # The operation to a add a protectable item to a protection container(Add
118
+ # physical server.)
119
+ #
120
+ # @param fabric_name [String] The name of the fabric.
121
+ # @param protection_container_name [String] The name of the protection
122
+ # container.
123
+ # @param discover_protectable_item_request [DiscoverProtectableItemRequest] The
124
+ # request object to add a protectable item.
125
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
126
+ # will be added to the HTTP request.
127
+ #
128
+ # @return [ProtectionContainer] operation results.
129
+ #
130
+ def discover_protectable_item(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers = nil)
131
+ response = discover_protectable_item_async(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers).value!
132
+ response.body unless response.nil?
133
+ end
134
+
135
+ #
136
+ # @param fabric_name [String] The name of the fabric.
137
+ # @param protection_container_name [String] The name of the protection
138
+ # container.
139
+ # @param discover_protectable_item_request [DiscoverProtectableItemRequest] The
140
+ # request object to add a protectable item.
141
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
142
+ # will be added to the HTTP request.
143
+ #
144
+ # @return [Concurrent::Promise] promise which provides async access to http
145
+ # response.
146
+ #
147
+ def discover_protectable_item_async(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers = nil)
148
+ # Send request
149
+ promise = begin_discover_protectable_item_async(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers)
150
+
151
+ promise = promise.then do |response|
152
+ # Defining deserialization method.
153
+ deserialize_method = lambda do |parsed_response|
154
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainer.mapper()
155
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
156
+ end
157
+
158
+ # Waiting for response.
159
+ @client.get_long_running_operation_result(response, deserialize_method)
160
+ end
161
+
162
+ promise
163
+ end
164
+
165
+ #
166
+ # Gets the protection container details.
167
+ #
168
+ # Gets the details of a protection container.
169
+ #
170
+ # @param fabric_name [String] Fabric name.
171
+ # @param protection_container_name [String] Protection container name.
172
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
173
+ # will be added to the HTTP request.
174
+ #
175
+ # @return [ProtectionContainer] operation results.
176
+ #
177
+ def get(fabric_name, protection_container_name, custom_headers = nil)
178
+ response = get_async(fabric_name, protection_container_name, custom_headers).value!
179
+ response.body unless response.nil?
180
+ end
181
+
182
+ #
183
+ # Gets the protection container details.
184
+ #
185
+ # Gets the details of a protection container.
186
+ #
187
+ # @param fabric_name [String] Fabric name.
188
+ # @param protection_container_name [String] Protection container name.
189
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
190
+ # will be added to the HTTP request.
191
+ #
192
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
193
+ #
194
+ def get_with_http_info(fabric_name, protection_container_name, custom_headers = nil)
195
+ get_async(fabric_name, protection_container_name, custom_headers).value!
196
+ end
197
+
198
+ #
199
+ # Gets the protection container details.
200
+ #
201
+ # Gets the details of a protection container.
202
+ #
203
+ # @param fabric_name [String] Fabric name.
204
+ # @param protection_container_name [String] Protection container name.
205
+ # @param [Hash{String => String}] A hash of custom headers that will be added
206
+ # to the HTTP request.
207
+ #
208
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
209
+ #
210
+ def get_async(fabric_name, protection_container_name, custom_headers = nil)
211
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
212
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
213
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
214
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
215
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
216
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
217
+
218
+
219
+ request_headers = {}
220
+
221
+ # Set Headers
222
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
223
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
224
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}'
225
+
226
+ request_url = @base_url || @client.base_url
227
+
228
+ options = {
229
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
230
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name},
231
+ query_params: {'api-version' => @client.api_version},
232
+ headers: request_headers.merge(custom_headers || {}),
233
+ base_url: request_url
234
+ }
235
+ promise = @client.make_request_async(:get, path_template, options)
236
+
237
+ promise = promise.then do |result|
238
+ http_response = result.response
239
+ status_code = http_response.status
240
+ response_content = http_response.body
241
+ unless status_code == 200
242
+ error_model = JSON.load(response_content)
243
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
244
+ end
245
+
246
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
247
+ # Deserialize Response
248
+ if status_code == 200
249
+ begin
250
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
251
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainer.mapper()
252
+ result.body = @client.deserialize(result_mapper, parsed_response)
253
+ rescue Exception => e
254
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
255
+ end
256
+ end
257
+
258
+ result
259
+ end
260
+
261
+ promise.execute
262
+ end
263
+
264
+ #
265
+ # Create a protection container.
266
+ #
267
+ # Operation to create a protection container.
268
+ #
269
+ # @param fabric_name [String] Unique fabric ARM name.
270
+ # @param protection_container_name [String] Unique protection container ARM
271
+ # name.
272
+ # @param creation_input [CreateProtectionContainerInput] Creation input.
273
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
274
+ # will be added to the HTTP request.
275
+ #
276
+ # @return [ProtectionContainer] operation results.
277
+ #
278
+ def create(fabric_name, protection_container_name, creation_input, custom_headers = nil)
279
+ response = create_async(fabric_name, protection_container_name, creation_input, custom_headers).value!
280
+ response.body unless response.nil?
281
+ end
282
+
283
+ #
284
+ # @param fabric_name [String] Unique fabric ARM name.
285
+ # @param protection_container_name [String] Unique protection container ARM
286
+ # name.
287
+ # @param creation_input [CreateProtectionContainerInput] Creation input.
288
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
289
+ # will be added to the HTTP request.
290
+ #
291
+ # @return [Concurrent::Promise] promise which provides async access to http
292
+ # response.
293
+ #
294
+ def create_async(fabric_name, protection_container_name, creation_input, custom_headers = nil)
295
+ # Send request
296
+ promise = begin_create_async(fabric_name, protection_container_name, creation_input, custom_headers)
297
+
298
+ promise = promise.then do |response|
299
+ # Defining deserialization method.
300
+ deserialize_method = lambda do |parsed_response|
301
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainer.mapper()
302
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
303
+ end
304
+
305
+ # Waiting for response.
306
+ @client.get_long_running_operation_result(response, deserialize_method)
307
+ end
308
+
309
+ promise
310
+ end
311
+
312
+ #
313
+ # Gets the list of protection container for a fabric.
314
+ #
315
+ # Lists the protection containers in the specified fabric.
316
+ #
317
+ # @param fabric_name [String] Fabric name.
318
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
319
+ # will be added to the HTTP request.
320
+ #
321
+ # @return [Array<ProtectionContainer>] operation results.
322
+ #
323
+ def list_by_replication_fabrics(fabric_name, custom_headers = nil)
324
+ first_page = list_by_replication_fabrics_as_lazy(fabric_name, custom_headers)
325
+ first_page.get_all_items
326
+ end
327
+
328
+ #
329
+ # Gets the list of protection container for a fabric.
330
+ #
331
+ # Lists the protection containers in the specified fabric.
332
+ #
333
+ # @param fabric_name [String] Fabric name.
334
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
335
+ # will be added to the HTTP request.
336
+ #
337
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
338
+ #
339
+ def list_by_replication_fabrics_with_http_info(fabric_name, custom_headers = nil)
340
+ list_by_replication_fabrics_async(fabric_name, custom_headers).value!
341
+ end
342
+
343
+ #
344
+ # Gets the list of protection container for a fabric.
345
+ #
346
+ # Lists the protection containers in the specified fabric.
347
+ #
348
+ # @param fabric_name [String] Fabric name.
349
+ # @param [Hash{String => String}] A hash of custom headers that will be added
350
+ # to the HTTP request.
351
+ #
352
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
353
+ #
354
+ def list_by_replication_fabrics_async(fabric_name, custom_headers = nil)
355
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
356
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
357
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
358
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
359
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
360
+
361
+
362
+ request_headers = {}
363
+
364
+ # Set Headers
365
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
366
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
367
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers'
368
+
369
+ request_url = @base_url || @client.base_url
370
+
371
+ options = {
372
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
373
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name},
374
+ query_params: {'api-version' => @client.api_version},
375
+ headers: request_headers.merge(custom_headers || {}),
376
+ base_url: request_url
377
+ }
378
+ promise = @client.make_request_async(:get, path_template, options)
379
+
380
+ promise = promise.then do |result|
381
+ http_response = result.response
382
+ status_code = http_response.status
383
+ response_content = http_response.body
384
+ unless status_code == 200
385
+ error_model = JSON.load(response_content)
386
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
387
+ end
388
+
389
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
390
+ # Deserialize Response
391
+ if status_code == 200
392
+ begin
393
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
394
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerCollection.mapper()
395
+ result.body = @client.deserialize(result_mapper, parsed_response)
396
+ rescue Exception => e
397
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
398
+ end
399
+ end
400
+
401
+ result
402
+ end
403
+
404
+ promise.execute
405
+ end
406
+
407
+ #
408
+ # Gets the list of all protection containers in a vault.
409
+ #
410
+ # Lists the protection containers in a vault.
411
+ #
412
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
413
+ # will be added to the HTTP request.
414
+ #
415
+ # @return [Array<ProtectionContainer>] operation results.
416
+ #
417
+ def list(custom_headers = nil)
418
+ first_page = list_as_lazy(custom_headers)
419
+ first_page.get_all_items
420
+ end
421
+
422
+ #
423
+ # Gets the list of all protection containers in a vault.
424
+ #
425
+ # Lists the protection containers in a vault.
426
+ #
427
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
428
+ # will be added to the HTTP request.
429
+ #
430
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
431
+ #
432
+ def list_with_http_info(custom_headers = nil)
433
+ list_async(custom_headers).value!
434
+ end
435
+
436
+ #
437
+ # Gets the list of all protection containers in a vault.
438
+ #
439
+ # Lists the protection containers in a vault.
440
+ #
441
+ # @param [Hash{String => String}] A hash of custom headers that will be added
442
+ # to the HTTP request.
443
+ #
444
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
445
+ #
446
+ def list_async(custom_headers = nil)
447
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
448
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
449
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
450
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
451
+
452
+
453
+ request_headers = {}
454
+
455
+ # Set Headers
456
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
457
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
458
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainers'
459
+
460
+ request_url = @base_url || @client.base_url
461
+
462
+ options = {
463
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
464
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id},
465
+ query_params: {'api-version' => @client.api_version},
466
+ headers: request_headers.merge(custom_headers || {}),
467
+ base_url: request_url
468
+ }
469
+ promise = @client.make_request_async(:get, path_template, options)
470
+
471
+ promise = promise.then do |result|
472
+ http_response = result.response
473
+ status_code = http_response.status
474
+ response_content = http_response.body
475
+ unless status_code == 200
476
+ error_model = JSON.load(response_content)
477
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
478
+ end
479
+
480
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
481
+ # Deserialize Response
482
+ if status_code == 200
483
+ begin
484
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
485
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerCollection.mapper()
486
+ result.body = @client.deserialize(result_mapper, parsed_response)
487
+ rescue Exception => e
488
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
489
+ end
490
+ end
491
+
492
+ result
493
+ end
494
+
495
+ promise.execute
496
+ end
497
+
498
+ #
499
+ # Switches protection from one container to another or one replication provider
500
+ # to another.
501
+ #
502
+ # Operation to switch protection from one container to another or one
503
+ # replication provider to another.
504
+ #
505
+ # @param fabric_name [String] Unique fabric name.
506
+ # @param protection_container_name [String] Protection container name.
507
+ # @param switch_input [SwitchProtectionInput] Switch protection input.
508
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
509
+ # will be added to the HTTP request.
510
+ #
511
+ # @return [ProtectionContainer] operation results.
512
+ #
513
+ def begin_switch_protection(fabric_name, protection_container_name, switch_input, custom_headers = nil)
514
+ response = begin_switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers).value!
515
+ response.body unless response.nil?
516
+ end
517
+
518
+ #
519
+ # Switches protection from one container to another or one replication provider
520
+ # to another.
521
+ #
522
+ # Operation to switch protection from one container to another or one
523
+ # replication provider to another.
524
+ #
525
+ # @param fabric_name [String] Unique fabric name.
526
+ # @param protection_container_name [String] Protection container name.
527
+ # @param switch_input [SwitchProtectionInput] Switch protection input.
528
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
529
+ # will be added to the HTTP request.
530
+ #
531
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
532
+ #
533
+ def begin_switch_protection_with_http_info(fabric_name, protection_container_name, switch_input, custom_headers = nil)
534
+ begin_switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers).value!
535
+ end
536
+
537
+ #
538
+ # Switches protection from one container to another or one replication provider
539
+ # to another.
540
+ #
541
+ # Operation to switch protection from one container to another or one
542
+ # replication provider to another.
543
+ #
544
+ # @param fabric_name [String] Unique fabric name.
545
+ # @param protection_container_name [String] Protection container name.
546
+ # @param switch_input [SwitchProtectionInput] Switch protection input.
547
+ # @param [Hash{String => String}] A hash of custom headers that will be added
548
+ # to the HTTP request.
549
+ #
550
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
551
+ #
552
+ def begin_switch_protection_async(fabric_name, protection_container_name, switch_input, custom_headers = nil)
553
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
554
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
555
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
556
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
557
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
558
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
559
+ fail ArgumentError, 'switch_input is nil' if switch_input.nil?
560
+
561
+
562
+ request_headers = {}
563
+
564
+ # Set Headers
565
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
566
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
567
+
568
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
569
+
570
+ # Serialize Request
571
+ request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::SwitchProtectionInput.mapper()
572
+ request_content = @client.serialize(request_mapper, switch_input)
573
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
574
+
575
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/switchprotection'
576
+
577
+ request_url = @base_url || @client.base_url
578
+
579
+ options = {
580
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
581
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name},
582
+ query_params: {'api-version' => @client.api_version},
583
+ body: request_content,
584
+ headers: request_headers.merge(custom_headers || {}),
585
+ base_url: request_url
586
+ }
587
+ promise = @client.make_request_async(:post, path_template, options)
588
+
589
+ promise = promise.then do |result|
590
+ http_response = result.response
591
+ status_code = http_response.status
592
+ response_content = http_response.body
593
+ unless status_code == 200 || status_code == 202
594
+ error_model = JSON.load(response_content)
595
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
596
+ end
597
+
598
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
599
+ # Deserialize Response
600
+ if status_code == 200
601
+ begin
602
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
603
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainer.mapper()
604
+ result.body = @client.deserialize(result_mapper, parsed_response)
605
+ rescue Exception => e
606
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
607
+ end
608
+ end
609
+
610
+ result
611
+ end
612
+
613
+ promise.execute
614
+ end
615
+
616
+ #
617
+ # Removes a protection container.
618
+ #
619
+ # Operation to remove a protection container.
620
+ #
621
+ # @param fabric_name [String] Unique fabric ARM name.
622
+ # @param protection_container_name [String] Unique protection container ARM
623
+ # name.
624
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
625
+ # will be added to the HTTP request.
626
+ #
627
+ #
628
+ def begin_delete(fabric_name, protection_container_name, custom_headers = nil)
629
+ response = begin_delete_async(fabric_name, protection_container_name, custom_headers).value!
630
+ nil
631
+ end
632
+
633
+ #
634
+ # Removes a protection container.
635
+ #
636
+ # Operation to remove a protection container.
637
+ #
638
+ # @param fabric_name [String] Unique fabric ARM name.
639
+ # @param protection_container_name [String] Unique protection container ARM
640
+ # name.
641
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
642
+ # will be added to the HTTP request.
643
+ #
644
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
645
+ #
646
+ def begin_delete_with_http_info(fabric_name, protection_container_name, custom_headers = nil)
647
+ begin_delete_async(fabric_name, protection_container_name, custom_headers).value!
648
+ end
649
+
650
+ #
651
+ # Removes a protection container.
652
+ #
653
+ # Operation to remove a protection container.
654
+ #
655
+ # @param fabric_name [String] Unique fabric ARM name.
656
+ # @param protection_container_name [String] Unique protection container ARM
657
+ # name.
658
+ # @param [Hash{String => String}] A hash of custom headers that will be added
659
+ # to the HTTP request.
660
+ #
661
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
662
+ #
663
+ def begin_delete_async(fabric_name, protection_container_name, custom_headers = nil)
664
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
665
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
666
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
667
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
668
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
669
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
670
+
671
+
672
+ request_headers = {}
673
+
674
+ # Set Headers
675
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
676
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
677
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/remove'
678
+
679
+ request_url = @base_url || @client.base_url
680
+
681
+ options = {
682
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
683
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name},
684
+ query_params: {'api-version' => @client.api_version},
685
+ headers: request_headers.merge(custom_headers || {}),
686
+ base_url: request_url
687
+ }
688
+ promise = @client.make_request_async(:post, path_template, options)
689
+
690
+ promise = promise.then do |result|
691
+ http_response = result.response
692
+ status_code = http_response.status
693
+ response_content = http_response.body
694
+ unless status_code == 202 || status_code == 204
695
+ error_model = JSON.load(response_content)
696
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
697
+ end
698
+
699
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
700
+
701
+ result
702
+ end
703
+
704
+ promise.execute
705
+ end
706
+
707
+ #
708
+ # Adds a protectable item to the replication protection container.
709
+ #
710
+ # The operation to a add a protectable item to a protection container(Add
711
+ # physical server.)
712
+ #
713
+ # @param fabric_name [String] The name of the fabric.
714
+ # @param protection_container_name [String] The name of the protection
715
+ # container.
716
+ # @param discover_protectable_item_request [DiscoverProtectableItemRequest] The
717
+ # request object to add a protectable item.
718
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
719
+ # will be added to the HTTP request.
720
+ #
721
+ # @return [ProtectionContainer] operation results.
722
+ #
723
+ def begin_discover_protectable_item(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers = nil)
724
+ response = begin_discover_protectable_item_async(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers).value!
725
+ response.body unless response.nil?
726
+ end
727
+
728
+ #
729
+ # Adds a protectable item to the replication protection container.
730
+ #
731
+ # The operation to a add a protectable item to a protection container(Add
732
+ # physical server.)
733
+ #
734
+ # @param fabric_name [String] The name of the fabric.
735
+ # @param protection_container_name [String] The name of the protection
736
+ # container.
737
+ # @param discover_protectable_item_request [DiscoverProtectableItemRequest] The
738
+ # request object to add a protectable item.
739
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
740
+ # will be added to the HTTP request.
741
+ #
742
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
743
+ #
744
+ def begin_discover_protectable_item_with_http_info(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers = nil)
745
+ begin_discover_protectable_item_async(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers).value!
746
+ end
747
+
748
+ #
749
+ # Adds a protectable item to the replication protection container.
750
+ #
751
+ # The operation to a add a protectable item to a protection container(Add
752
+ # physical server.)
753
+ #
754
+ # @param fabric_name [String] The name of the fabric.
755
+ # @param protection_container_name [String] The name of the protection
756
+ # container.
757
+ # @param discover_protectable_item_request [DiscoverProtectableItemRequest] The
758
+ # request object to add a protectable item.
759
+ # @param [Hash{String => String}] A hash of custom headers that will be added
760
+ # to the HTTP request.
761
+ #
762
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
763
+ #
764
+ def begin_discover_protectable_item_async(fabric_name, protection_container_name, discover_protectable_item_request, custom_headers = nil)
765
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
766
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
767
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
768
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
769
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
770
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
771
+ fail ArgumentError, 'discover_protectable_item_request is nil' if discover_protectable_item_request.nil?
772
+
773
+
774
+ request_headers = {}
775
+
776
+ # Set Headers
777
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
778
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
779
+
780
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
781
+
782
+ # Serialize Request
783
+ request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::DiscoverProtectableItemRequest.mapper()
784
+ request_content = @client.serialize(request_mapper, discover_protectable_item_request)
785
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
786
+
787
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/discoverProtectableItem'
788
+
789
+ request_url = @base_url || @client.base_url
790
+
791
+ options = {
792
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
793
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name},
794
+ query_params: {'api-version' => @client.api_version},
795
+ body: request_content,
796
+ headers: request_headers.merge(custom_headers || {}),
797
+ base_url: request_url
798
+ }
799
+ promise = @client.make_request_async(:post, path_template, options)
800
+
801
+ promise = promise.then do |result|
802
+ http_response = result.response
803
+ status_code = http_response.status
804
+ response_content = http_response.body
805
+ unless status_code == 200 || status_code == 202
806
+ error_model = JSON.load(response_content)
807
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
808
+ end
809
+
810
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
811
+ # Deserialize Response
812
+ if status_code == 200
813
+ begin
814
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
815
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainer.mapper()
816
+ result.body = @client.deserialize(result_mapper, parsed_response)
817
+ rescue Exception => e
818
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
819
+ end
820
+ end
821
+
822
+ result
823
+ end
824
+
825
+ promise.execute
826
+ end
827
+
828
+ #
829
+ # Create a protection container.
830
+ #
831
+ # Operation to create a protection container.
832
+ #
833
+ # @param fabric_name [String] Unique fabric ARM name.
834
+ # @param protection_container_name [String] Unique protection container ARM
835
+ # name.
836
+ # @param creation_input [CreateProtectionContainerInput] Creation input.
837
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
838
+ # will be added to the HTTP request.
839
+ #
840
+ # @return [ProtectionContainer] operation results.
841
+ #
842
+ def begin_create(fabric_name, protection_container_name, creation_input, custom_headers = nil)
843
+ response = begin_create_async(fabric_name, protection_container_name, creation_input, custom_headers).value!
844
+ response.body unless response.nil?
845
+ end
846
+
847
+ #
848
+ # Create a protection container.
849
+ #
850
+ # Operation to create a protection container.
851
+ #
852
+ # @param fabric_name [String] Unique fabric ARM name.
853
+ # @param protection_container_name [String] Unique protection container ARM
854
+ # name.
855
+ # @param creation_input [CreateProtectionContainerInput] Creation input.
856
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
857
+ # will be added to the HTTP request.
858
+ #
859
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
860
+ #
861
+ def begin_create_with_http_info(fabric_name, protection_container_name, creation_input, custom_headers = nil)
862
+ begin_create_async(fabric_name, protection_container_name, creation_input, custom_headers).value!
863
+ end
864
+
865
+ #
866
+ # Create a protection container.
867
+ #
868
+ # Operation to create a protection container.
869
+ #
870
+ # @param fabric_name [String] Unique fabric ARM name.
871
+ # @param protection_container_name [String] Unique protection container ARM
872
+ # name.
873
+ # @param creation_input [CreateProtectionContainerInput] Creation input.
874
+ # @param [Hash{String => String}] A hash of custom headers that will be added
875
+ # to the HTTP request.
876
+ #
877
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
878
+ #
879
+ def begin_create_async(fabric_name, protection_container_name, creation_input, custom_headers = nil)
880
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
881
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
882
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
883
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
884
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
885
+ fail ArgumentError, 'protection_container_name is nil' if protection_container_name.nil?
886
+ fail ArgumentError, 'creation_input is nil' if creation_input.nil?
887
+
888
+
889
+ request_headers = {}
890
+
891
+ # Set Headers
892
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
893
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
894
+
895
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
896
+
897
+ # Serialize Request
898
+ request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::CreateProtectionContainerInput.mapper()
899
+ request_content = @client.serialize(request_mapper, creation_input)
900
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
901
+
902
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}'
903
+
904
+ request_url = @base_url || @client.base_url
905
+
906
+ options = {
907
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
908
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name,'protectionContainerName' => protection_container_name},
909
+ query_params: {'api-version' => @client.api_version},
910
+ body: request_content,
911
+ headers: request_headers.merge(custom_headers || {}),
912
+ base_url: request_url
913
+ }
914
+ promise = @client.make_request_async(:put, path_template, options)
915
+
916
+ promise = promise.then do |result|
917
+ http_response = result.response
918
+ status_code = http_response.status
919
+ response_content = http_response.body
920
+ unless status_code == 200 || status_code == 202
921
+ error_model = JSON.load(response_content)
922
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
923
+ end
924
+
925
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
926
+ # Deserialize Response
927
+ if status_code == 200
928
+ begin
929
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
930
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainer.mapper()
931
+ result.body = @client.deserialize(result_mapper, parsed_response)
932
+ rescue Exception => e
933
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
934
+ end
935
+ end
936
+
937
+ result
938
+ end
939
+
940
+ promise.execute
941
+ end
942
+
943
+ #
944
+ # Gets the list of protection container for a fabric.
945
+ #
946
+ # Lists the protection containers in the specified fabric.
947
+ #
948
+ # @param next_page_link [String] The NextLink from the previous successful call
949
+ # to List operation.
950
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
951
+ # will be added to the HTTP request.
952
+ #
953
+ # @return [ProtectionContainerCollection] operation results.
954
+ #
955
+ def list_by_replication_fabrics_next(next_page_link, custom_headers = nil)
956
+ response = list_by_replication_fabrics_next_async(next_page_link, custom_headers).value!
957
+ response.body unless response.nil?
958
+ end
959
+
960
+ #
961
+ # Gets the list of protection container for a fabric.
962
+ #
963
+ # Lists the protection containers in the specified fabric.
964
+ #
965
+ # @param next_page_link [String] The NextLink from the previous successful call
966
+ # to List operation.
967
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
968
+ # will be added to the HTTP request.
969
+ #
970
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
971
+ #
972
+ def list_by_replication_fabrics_next_with_http_info(next_page_link, custom_headers = nil)
973
+ list_by_replication_fabrics_next_async(next_page_link, custom_headers).value!
974
+ end
975
+
976
+ #
977
+ # Gets the list of protection container for a fabric.
978
+ #
979
+ # Lists the protection containers in the specified fabric.
980
+ #
981
+ # @param next_page_link [String] The NextLink from the previous successful call
982
+ # to List operation.
983
+ # @param [Hash{String => String}] A hash of custom headers that will be added
984
+ # to the HTTP request.
985
+ #
986
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
987
+ #
988
+ def list_by_replication_fabrics_next_async(next_page_link, custom_headers = nil)
989
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
990
+
991
+
992
+ request_headers = {}
993
+
994
+ # Set Headers
995
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
996
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
997
+ path_template = '{nextLink}'
998
+
999
+ request_url = @base_url || @client.base_url
1000
+
1001
+ options = {
1002
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1003
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1004
+ headers: request_headers.merge(custom_headers || {}),
1005
+ base_url: request_url
1006
+ }
1007
+ promise = @client.make_request_async(:get, path_template, options)
1008
+
1009
+ promise = promise.then do |result|
1010
+ http_response = result.response
1011
+ status_code = http_response.status
1012
+ response_content = http_response.body
1013
+ unless status_code == 200
1014
+ error_model = JSON.load(response_content)
1015
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1016
+ end
1017
+
1018
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1019
+ # Deserialize Response
1020
+ if status_code == 200
1021
+ begin
1022
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1023
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerCollection.mapper()
1024
+ result.body = @client.deserialize(result_mapper, parsed_response)
1025
+ rescue Exception => e
1026
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1027
+ end
1028
+ end
1029
+
1030
+ result
1031
+ end
1032
+
1033
+ promise.execute
1034
+ end
1035
+
1036
+ #
1037
+ # Gets the list of all protection containers in a vault.
1038
+ #
1039
+ # Lists the protection containers in a vault.
1040
+ #
1041
+ # @param next_page_link [String] The NextLink from the previous successful call
1042
+ # to List operation.
1043
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1044
+ # will be added to the HTTP request.
1045
+ #
1046
+ # @return [ProtectionContainerCollection] operation results.
1047
+ #
1048
+ def list_next(next_page_link, custom_headers = nil)
1049
+ response = list_next_async(next_page_link, custom_headers).value!
1050
+ response.body unless response.nil?
1051
+ end
1052
+
1053
+ #
1054
+ # Gets the list of all protection containers in a vault.
1055
+ #
1056
+ # Lists the protection containers in a vault.
1057
+ #
1058
+ # @param next_page_link [String] The NextLink from the previous successful call
1059
+ # to List operation.
1060
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1061
+ # will be added to the HTTP request.
1062
+ #
1063
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1064
+ #
1065
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
1066
+ list_next_async(next_page_link, custom_headers).value!
1067
+ end
1068
+
1069
+ #
1070
+ # Gets the list of all protection containers in a vault.
1071
+ #
1072
+ # Lists the protection containers in a vault.
1073
+ #
1074
+ # @param next_page_link [String] The NextLink from the previous successful call
1075
+ # to List operation.
1076
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1077
+ # to the HTTP request.
1078
+ #
1079
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1080
+ #
1081
+ def list_next_async(next_page_link, custom_headers = nil)
1082
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1083
+
1084
+
1085
+ request_headers = {}
1086
+
1087
+ # Set Headers
1088
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1089
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1090
+ path_template = '{nextLink}'
1091
+
1092
+ request_url = @base_url || @client.base_url
1093
+
1094
+ options = {
1095
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1096
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1097
+ headers: request_headers.merge(custom_headers || {}),
1098
+ base_url: request_url
1099
+ }
1100
+ promise = @client.make_request_async(:get, path_template, options)
1101
+
1102
+ promise = promise.then do |result|
1103
+ http_response = result.response
1104
+ status_code = http_response.status
1105
+ response_content = http_response.body
1106
+ unless status_code == 200
1107
+ error_model = JSON.load(response_content)
1108
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1109
+ end
1110
+
1111
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1112
+ # Deserialize Response
1113
+ if status_code == 200
1114
+ begin
1115
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1116
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::ProtectionContainerCollection.mapper()
1117
+ result.body = @client.deserialize(result_mapper, parsed_response)
1118
+ rescue Exception => e
1119
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1120
+ end
1121
+ end
1122
+
1123
+ result
1124
+ end
1125
+
1126
+ promise.execute
1127
+ end
1128
+
1129
+ #
1130
+ # Gets the list of protection container for a fabric.
1131
+ #
1132
+ # Lists the protection containers in the specified fabric.
1133
+ #
1134
+ # @param fabric_name [String] Fabric name.
1135
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1136
+ # will be added to the HTTP request.
1137
+ #
1138
+ # @return [ProtectionContainerCollection] which provide lazy access to pages of
1139
+ # the response.
1140
+ #
1141
+ def list_by_replication_fabrics_as_lazy(fabric_name, custom_headers = nil)
1142
+ response = list_by_replication_fabrics_async(fabric_name, custom_headers).value!
1143
+ unless response.nil?
1144
+ page = response.body
1145
+ page.next_method = Proc.new do |next_page_link|
1146
+ list_by_replication_fabrics_next_async(next_page_link, custom_headers)
1147
+ end
1148
+ page
1149
+ end
1150
+ end
1151
+
1152
+ #
1153
+ # Gets the list of all protection containers in a vault.
1154
+ #
1155
+ # Lists the protection containers in a vault.
1156
+ #
1157
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1158
+ # will be added to the HTTP request.
1159
+ #
1160
+ # @return [ProtectionContainerCollection] which provide lazy access to pages of
1161
+ # the response.
1162
+ #
1163
+ def list_as_lazy(custom_headers = nil)
1164
+ response = list_async(custom_headers).value!
1165
+ unless response.nil?
1166
+ page = response.body
1167
+ page.next_method = Proc.new do |next_page_link|
1168
+ list_next_async(next_page_link, custom_headers)
1169
+ end
1170
+ page
1171
+ end
1172
+ end
1173
+
1174
+ end
1175
+ end