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,329 @@
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
+ # ReplicationEvents
9
+ #
10
+ class ReplicationEvents
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ReplicationEvents 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
+ # Get the details of an Azure Site recovery event.
26
+ #
27
+ # The operation to get the details of an Azure Site recovery event.
28
+ #
29
+ # @param event_name [String] The name of the Azure Site Recovery event.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [Event] operation results.
34
+ #
35
+ def get(event_name, custom_headers = nil)
36
+ response = get_async(event_name, custom_headers).value!
37
+ response.body unless response.nil?
38
+ end
39
+
40
+ #
41
+ # Get the details of an Azure Site recovery event.
42
+ #
43
+ # The operation to get the details of an Azure Site recovery event.
44
+ #
45
+ # @param event_name [String] The name of the Azure Site Recovery event.
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def get_with_http_info(event_name, custom_headers = nil)
52
+ get_async(event_name, custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # Get the details of an Azure Site recovery event.
57
+ #
58
+ # The operation to get the details of an Azure Site recovery event.
59
+ #
60
+ # @param event_name [String] The name of the Azure Site Recovery event.
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def get_async(event_name, custom_headers = nil)
67
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
68
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
69
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
70
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
71
+ fail ArgumentError, 'event_name is nil' if event_name.nil?
72
+
73
+
74
+ request_headers = {}
75
+
76
+ # Set Headers
77
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
78
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
79
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents/{eventName}'
80
+
81
+ request_url = @base_url || @client.base_url
82
+
83
+ options = {
84
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
85
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'eventName' => event_name},
86
+ query_params: {'api-version' => @client.api_version},
87
+ headers: request_headers.merge(custom_headers || {}),
88
+ base_url: request_url
89
+ }
90
+ promise = @client.make_request_async(:get, path_template, options)
91
+
92
+ promise = promise.then do |result|
93
+ http_response = result.response
94
+ status_code = http_response.status
95
+ response_content = http_response.body
96
+ unless status_code == 200
97
+ error_model = JSON.load(response_content)
98
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
99
+ end
100
+
101
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
102
+ # Deserialize Response
103
+ if status_code == 200
104
+ begin
105
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
106
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Event.mapper()
107
+ result.body = @client.deserialize(result_mapper, parsed_response)
108
+ rescue Exception => e
109
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
110
+ end
111
+ end
112
+
113
+ result
114
+ end
115
+
116
+ promise.execute
117
+ end
118
+
119
+ #
120
+ # Gets the list of Azure Site Recovery events.
121
+ #
122
+ # Gets the list of Azure Site Recovery events for the vault.
123
+ #
124
+ # @param filter [String] OData filter options.
125
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
126
+ # will be added to the HTTP request.
127
+ #
128
+ # @return [Array<Event>] operation results.
129
+ #
130
+ def list(filter = nil, custom_headers = nil)
131
+ first_page = list_as_lazy(filter, custom_headers)
132
+ first_page.get_all_items
133
+ end
134
+
135
+ #
136
+ # Gets the list of Azure Site Recovery events.
137
+ #
138
+ # Gets the list of Azure Site Recovery events for the vault.
139
+ #
140
+ # @param filter [String] OData filter options.
141
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
142
+ # will be added to the HTTP request.
143
+ #
144
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
145
+ #
146
+ def list_with_http_info(filter = nil, custom_headers = nil)
147
+ list_async(filter, custom_headers).value!
148
+ end
149
+
150
+ #
151
+ # Gets the list of Azure Site Recovery events.
152
+ #
153
+ # Gets the list of Azure Site Recovery events for the vault.
154
+ #
155
+ # @param filter [String] OData filter options.
156
+ # @param [Hash{String => String}] A hash of custom headers that will be added
157
+ # to the HTTP request.
158
+ #
159
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
160
+ #
161
+ def list_async(filter = nil, custom_headers = nil)
162
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
163
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
164
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
165
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
166
+
167
+
168
+ request_headers = {}
169
+
170
+ # Set Headers
171
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
172
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
173
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents'
174
+
175
+ request_url = @base_url || @client.base_url
176
+
177
+ options = {
178
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
179
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id},
180
+ query_params: {'api-version' => @client.api_version,'$filter' => filter},
181
+ headers: request_headers.merge(custom_headers || {}),
182
+ base_url: request_url
183
+ }
184
+ promise = @client.make_request_async(:get, path_template, options)
185
+
186
+ promise = promise.then do |result|
187
+ http_response = result.response
188
+ status_code = http_response.status
189
+ response_content = http_response.body
190
+ unless status_code == 200
191
+ error_model = JSON.load(response_content)
192
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
193
+ end
194
+
195
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
196
+ # Deserialize Response
197
+ if status_code == 200
198
+ begin
199
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
200
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::EventCollection.mapper()
201
+ result.body = @client.deserialize(result_mapper, parsed_response)
202
+ rescue Exception => e
203
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
204
+ end
205
+ end
206
+
207
+ result
208
+ end
209
+
210
+ promise.execute
211
+ end
212
+
213
+ #
214
+ # Gets the list of Azure Site Recovery events.
215
+ #
216
+ # Gets the list of Azure Site Recovery events for the vault.
217
+ #
218
+ # @param next_page_link [String] The NextLink from the previous successful call
219
+ # to List operation.
220
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
221
+ # will be added to the HTTP request.
222
+ #
223
+ # @return [EventCollection] operation results.
224
+ #
225
+ def list_next(next_page_link, custom_headers = nil)
226
+ response = list_next_async(next_page_link, custom_headers).value!
227
+ response.body unless response.nil?
228
+ end
229
+
230
+ #
231
+ # Gets the list of Azure Site Recovery events.
232
+ #
233
+ # Gets the list of Azure Site Recovery events for the vault.
234
+ #
235
+ # @param next_page_link [String] The NextLink from the previous successful call
236
+ # to List operation.
237
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
238
+ # will be added to the HTTP request.
239
+ #
240
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
241
+ #
242
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
243
+ list_next_async(next_page_link, custom_headers).value!
244
+ end
245
+
246
+ #
247
+ # Gets the list of Azure Site Recovery events.
248
+ #
249
+ # Gets the list of Azure Site Recovery events for the vault.
250
+ #
251
+ # @param next_page_link [String] The NextLink from the previous successful call
252
+ # to List operation.
253
+ # @param [Hash{String => String}] A hash of custom headers that will be added
254
+ # to the HTTP request.
255
+ #
256
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
257
+ #
258
+ def list_next_async(next_page_link, custom_headers = nil)
259
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
260
+
261
+
262
+ request_headers = {}
263
+
264
+ # Set Headers
265
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
266
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
267
+ path_template = '{nextLink}'
268
+
269
+ request_url = @base_url || @client.base_url
270
+
271
+ options = {
272
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
273
+ skip_encoding_path_params: {'nextLink' => next_page_link},
274
+ headers: request_headers.merge(custom_headers || {}),
275
+ base_url: request_url
276
+ }
277
+ promise = @client.make_request_async(:get, path_template, options)
278
+
279
+ promise = promise.then do |result|
280
+ http_response = result.response
281
+ status_code = http_response.status
282
+ response_content = http_response.body
283
+ unless status_code == 200
284
+ error_model = JSON.load(response_content)
285
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
286
+ end
287
+
288
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
289
+ # Deserialize Response
290
+ if status_code == 200
291
+ begin
292
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
293
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::EventCollection.mapper()
294
+ result.body = @client.deserialize(result_mapper, parsed_response)
295
+ rescue Exception => e
296
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
297
+ end
298
+ end
299
+
300
+ result
301
+ end
302
+
303
+ promise.execute
304
+ end
305
+
306
+ #
307
+ # Gets the list of Azure Site Recovery events.
308
+ #
309
+ # Gets the list of Azure Site Recovery events for the vault.
310
+ #
311
+ # @param filter [String] OData filter options.
312
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
313
+ # will be added to the HTTP request.
314
+ #
315
+ # @return [EventCollection] which provide lazy access to pages of the response.
316
+ #
317
+ def list_as_lazy(filter = nil, custom_headers = nil)
318
+ response = list_async(filter, custom_headers).value!
319
+ unless response.nil?
320
+ page = response.body
321
+ page.next_method = Proc.new do |next_page_link|
322
+ list_next_async(next_page_link, custom_headers)
323
+ end
324
+ page
325
+ end
326
+ end
327
+
328
+ end
329
+ end
@@ -0,0 +1,1299 @@
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
+ # ReplicationFabrics
9
+ #
10
+ class ReplicationFabrics
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ReplicationFabrics 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
+ # Migrates the site to AAD.
26
+ #
27
+ # The operation to migrate an Azure Site Recovery fabric to AAD.
28
+ #
29
+ # @param fabric_name [String] ASR fabric to migrate.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ def migrate_to_aad(fabric_name, custom_headers = nil)
34
+ response = migrate_to_aad_async(fabric_name, custom_headers).value!
35
+ nil
36
+ end
37
+
38
+ #
39
+ # @param fabric_name [String] ASR fabric to migrate.
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [Concurrent::Promise] promise which provides async access to http
44
+ # response.
45
+ #
46
+ def migrate_to_aad_async(fabric_name, custom_headers = nil)
47
+ # Send request
48
+ promise = begin_migrate_to_aad_async(fabric_name, custom_headers)
49
+
50
+ promise = promise.then do |response|
51
+ # Defining deserialization method.
52
+ deserialize_method = lambda do |parsed_response|
53
+ end
54
+
55
+ # Waiting for response.
56
+ @client.get_long_running_operation_result(response, deserialize_method)
57
+ end
58
+
59
+ promise
60
+ end
61
+
62
+ #
63
+ # Renews certificate for the fabric.
64
+ #
65
+ # Renews the connection certificate for the ASR replication fabric.
66
+ #
67
+ # @param fabric_name [String] fabric name to renew certs for.
68
+ # @param renew_certificate [RenewCertificateInput] Renew certificate input.
69
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
70
+ # will be added to the HTTP request.
71
+ #
72
+ # @return [Fabric] operation results.
73
+ #
74
+ def renew_certificate(fabric_name, renew_certificate, custom_headers = nil)
75
+ response = renew_certificate_async(fabric_name, renew_certificate, custom_headers).value!
76
+ response.body unless response.nil?
77
+ end
78
+
79
+ #
80
+ # @param fabric_name [String] fabric name to renew certs for.
81
+ # @param renew_certificate [RenewCertificateInput] Renew certificate input.
82
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
83
+ # will be added to the HTTP request.
84
+ #
85
+ # @return [Concurrent::Promise] promise which provides async access to http
86
+ # response.
87
+ #
88
+ def renew_certificate_async(fabric_name, renew_certificate, custom_headers = nil)
89
+ # Send request
90
+ promise = begin_renew_certificate_async(fabric_name, renew_certificate, custom_headers)
91
+
92
+ promise = promise.then do |response|
93
+ # Defining deserialization method.
94
+ deserialize_method = lambda do |parsed_response|
95
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper()
96
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
97
+ end
98
+
99
+ # Waiting for response.
100
+ @client.get_long_running_operation_result(response, deserialize_method)
101
+ end
102
+
103
+ promise
104
+ end
105
+
106
+ #
107
+ # Perform failover of the process server.
108
+ #
109
+ # The operation to move replications from a process server to another process
110
+ # server.
111
+ #
112
+ # @param fabric_name [String] The name of the fabric containing the process
113
+ # server.
114
+ # @param failover_process_server_request [FailoverProcessServerRequest] The
115
+ # input to the failover process server operation.
116
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
117
+ # will be added to the HTTP request.
118
+ #
119
+ # @return [Fabric] operation results.
120
+ #
121
+ def reassociate_gateway(fabric_name, failover_process_server_request, custom_headers = nil)
122
+ response = reassociate_gateway_async(fabric_name, failover_process_server_request, custom_headers).value!
123
+ response.body unless response.nil?
124
+ end
125
+
126
+ #
127
+ # @param fabric_name [String] The name of the fabric containing the process
128
+ # server.
129
+ # @param failover_process_server_request [FailoverProcessServerRequest] The
130
+ # input to the failover process server operation.
131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
132
+ # will be added to the HTTP request.
133
+ #
134
+ # @return [Concurrent::Promise] promise which provides async access to http
135
+ # response.
136
+ #
137
+ def reassociate_gateway_async(fabric_name, failover_process_server_request, custom_headers = nil)
138
+ # Send request
139
+ promise = begin_reassociate_gateway_async(fabric_name, failover_process_server_request, custom_headers)
140
+
141
+ promise = promise.then do |response|
142
+ # Defining deserialization method.
143
+ deserialize_method = lambda do |parsed_response|
144
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper()
145
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
146
+ end
147
+
148
+ # Waiting for response.
149
+ @client.get_long_running_operation_result(response, deserialize_method)
150
+ end
151
+
152
+ promise
153
+ end
154
+
155
+ #
156
+ # Checks the consistency of the ASR fabric.
157
+ #
158
+ # The operation to perform a consistency check on the fabric.
159
+ #
160
+ # @param fabric_name [String] Fabric name.
161
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
162
+ # will be added to the HTTP request.
163
+ #
164
+ # @return [Fabric] operation results.
165
+ #
166
+ def check_consistency(fabric_name, custom_headers = nil)
167
+ response = check_consistency_async(fabric_name, custom_headers).value!
168
+ response.body unless response.nil?
169
+ end
170
+
171
+ #
172
+ # @param fabric_name [String] Fabric name.
173
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
174
+ # will be added to the HTTP request.
175
+ #
176
+ # @return [Concurrent::Promise] promise which provides async access to http
177
+ # response.
178
+ #
179
+ def check_consistency_async(fabric_name, custom_headers = nil)
180
+ # Send request
181
+ promise = begin_check_consistency_async(fabric_name, custom_headers)
182
+
183
+ promise = promise.then do |response|
184
+ # Defining deserialization method.
185
+ deserialize_method = lambda do |parsed_response|
186
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper()
187
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
188
+ end
189
+
190
+ # Waiting for response.
191
+ @client.get_long_running_operation_result(response, deserialize_method)
192
+ end
193
+
194
+ promise
195
+ end
196
+
197
+ #
198
+ # Deletes the site.
199
+ #
200
+ # The operation to delete or remove an Azure Site Recovery fabric.
201
+ #
202
+ # @param fabric_name [String] ASR fabric to delete
203
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
204
+ # will be added to the HTTP request.
205
+ #
206
+ def delete(fabric_name, custom_headers = nil)
207
+ response = delete_async(fabric_name, custom_headers).value!
208
+ nil
209
+ end
210
+
211
+ #
212
+ # @param fabric_name [String] ASR fabric to delete
213
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
214
+ # will be added to the HTTP request.
215
+ #
216
+ # @return [Concurrent::Promise] promise which provides async access to http
217
+ # response.
218
+ #
219
+ def delete_async(fabric_name, custom_headers = nil)
220
+ # Send request
221
+ promise = begin_delete_async(fabric_name, custom_headers)
222
+
223
+ promise = promise.then do |response|
224
+ # Defining deserialization method.
225
+ deserialize_method = lambda do |parsed_response|
226
+ end
227
+
228
+ # Waiting for response.
229
+ @client.get_long_running_operation_result(response, deserialize_method)
230
+ end
231
+
232
+ promise
233
+ end
234
+
235
+ #
236
+ # Gets the details of an ASR fabric.
237
+ #
238
+ # Gets the details of an Azure Site Recovery fabric.
239
+ #
240
+ # @param fabric_name [String] Fabric name.
241
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
242
+ # will be added to the HTTP request.
243
+ #
244
+ # @return [Fabric] operation results.
245
+ #
246
+ def get(fabric_name, custom_headers = nil)
247
+ response = get_async(fabric_name, custom_headers).value!
248
+ response.body unless response.nil?
249
+ end
250
+
251
+ #
252
+ # Gets the details of an ASR fabric.
253
+ #
254
+ # Gets the details of an Azure Site Recovery fabric.
255
+ #
256
+ # @param fabric_name [String] Fabric name.
257
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
258
+ # will be added to the HTTP request.
259
+ #
260
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
261
+ #
262
+ def get_with_http_info(fabric_name, custom_headers = nil)
263
+ get_async(fabric_name, custom_headers).value!
264
+ end
265
+
266
+ #
267
+ # Gets the details of an ASR fabric.
268
+ #
269
+ # Gets the details of an Azure Site Recovery fabric.
270
+ #
271
+ # @param fabric_name [String] Fabric name.
272
+ # @param [Hash{String => String}] A hash of custom headers that will be added
273
+ # to the HTTP request.
274
+ #
275
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
276
+ #
277
+ def get_async(fabric_name, custom_headers = nil)
278
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
279
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
280
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
281
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
282
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
283
+
284
+
285
+ request_headers = {}
286
+
287
+ # Set Headers
288
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
289
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
290
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}'
291
+
292
+ request_url = @base_url || @client.base_url
293
+
294
+ options = {
295
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
296
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name},
297
+ query_params: {'api-version' => @client.api_version},
298
+ headers: request_headers.merge(custom_headers || {}),
299
+ base_url: request_url
300
+ }
301
+ promise = @client.make_request_async(:get, path_template, options)
302
+
303
+ promise = promise.then do |result|
304
+ http_response = result.response
305
+ status_code = http_response.status
306
+ response_content = http_response.body
307
+ unless status_code == 200
308
+ error_model = JSON.load(response_content)
309
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
310
+ end
311
+
312
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
313
+ # Deserialize Response
314
+ if status_code == 200
315
+ begin
316
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
317
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper()
318
+ result.body = @client.deserialize(result_mapper, parsed_response)
319
+ rescue Exception => e
320
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
321
+ end
322
+ end
323
+
324
+ result
325
+ end
326
+
327
+ promise.execute
328
+ end
329
+
330
+ #
331
+ # Creates an Azure Site Recoery fabric.
332
+ #
333
+ # The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site)
334
+ #
335
+ # @param fabric_name [String] Name of the ASR fabric.
336
+ # @param input [FabricCreationInput] Fabric creation input.
337
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
338
+ # will be added to the HTTP request.
339
+ #
340
+ # @return [Fabric] operation results.
341
+ #
342
+ def create(fabric_name, input, custom_headers = nil)
343
+ response = create_async(fabric_name, input, custom_headers).value!
344
+ response.body unless response.nil?
345
+ end
346
+
347
+ #
348
+ # @param fabric_name [String] Name of the ASR fabric.
349
+ # @param input [FabricCreationInput] Fabric creation input.
350
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
351
+ # will be added to the HTTP request.
352
+ #
353
+ # @return [Concurrent::Promise] promise which provides async access to http
354
+ # response.
355
+ #
356
+ def create_async(fabric_name, input, custom_headers = nil)
357
+ # Send request
358
+ promise = begin_create_async(fabric_name, input, custom_headers)
359
+
360
+ promise = promise.then do |response|
361
+ # Defining deserialization method.
362
+ deserialize_method = lambda do |parsed_response|
363
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper()
364
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
365
+ end
366
+
367
+ # Waiting for response.
368
+ @client.get_long_running_operation_result(response, deserialize_method)
369
+ end
370
+
371
+ promise
372
+ end
373
+
374
+ #
375
+ # Purges the site.
376
+ #
377
+ # The operation to purge(force delete) an Azure Site Recovery fabric.
378
+ #
379
+ # @param fabric_name [String] ASR fabric to purge.
380
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
381
+ # will be added to the HTTP request.
382
+ #
383
+ def purge(fabric_name, custom_headers = nil)
384
+ response = purge_async(fabric_name, custom_headers).value!
385
+ nil
386
+ end
387
+
388
+ #
389
+ # @param fabric_name [String] ASR fabric to purge.
390
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
391
+ # will be added to the HTTP request.
392
+ #
393
+ # @return [Concurrent::Promise] promise which provides async access to http
394
+ # response.
395
+ #
396
+ def purge_async(fabric_name, custom_headers = nil)
397
+ # Send request
398
+ promise = begin_purge_async(fabric_name, custom_headers)
399
+
400
+ promise = promise.then do |response|
401
+ # Defining deserialization method.
402
+ deserialize_method = lambda do |parsed_response|
403
+ end
404
+
405
+ # Waiting for response.
406
+ @client.get_long_running_operation_result(response, deserialize_method)
407
+ end
408
+
409
+ promise
410
+ end
411
+
412
+ #
413
+ # Gets the list of ASR fabrics
414
+ #
415
+ # Gets a list of the Azure Site Recovery fabrics in the vault.
416
+ #
417
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
418
+ # will be added to the HTTP request.
419
+ #
420
+ # @return [Array<Fabric>] operation results.
421
+ #
422
+ def list(custom_headers = nil)
423
+ first_page = list_as_lazy(custom_headers)
424
+ first_page.get_all_items
425
+ end
426
+
427
+ #
428
+ # Gets the list of ASR fabrics
429
+ #
430
+ # Gets a list of the Azure Site Recovery fabrics in the vault.
431
+ #
432
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
433
+ # will be added to the HTTP request.
434
+ #
435
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
436
+ #
437
+ def list_with_http_info(custom_headers = nil)
438
+ list_async(custom_headers).value!
439
+ end
440
+
441
+ #
442
+ # Gets the list of ASR fabrics
443
+ #
444
+ # Gets a list of the Azure Site Recovery fabrics in the vault.
445
+ #
446
+ # @param [Hash{String => String}] A hash of custom headers that will be added
447
+ # to the HTTP request.
448
+ #
449
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
450
+ #
451
+ def list_async(custom_headers = nil)
452
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
453
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
454
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
455
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
456
+
457
+
458
+ request_headers = {}
459
+
460
+ # Set Headers
461
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
462
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
463
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics'
464
+
465
+ request_url = @base_url || @client.base_url
466
+
467
+ options = {
468
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
469
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id},
470
+ query_params: {'api-version' => @client.api_version},
471
+ headers: request_headers.merge(custom_headers || {}),
472
+ base_url: request_url
473
+ }
474
+ promise = @client.make_request_async(:get, path_template, options)
475
+
476
+ promise = promise.then do |result|
477
+ http_response = result.response
478
+ status_code = http_response.status
479
+ response_content = http_response.body
480
+ unless status_code == 200
481
+ error_model = JSON.load(response_content)
482
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
483
+ end
484
+
485
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
486
+ # Deserialize Response
487
+ if status_code == 200
488
+ begin
489
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
490
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::FabricCollection.mapper()
491
+ result.body = @client.deserialize(result_mapper, parsed_response)
492
+ rescue Exception => e
493
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
494
+ end
495
+ end
496
+
497
+ result
498
+ end
499
+
500
+ promise.execute
501
+ end
502
+
503
+ #
504
+ # Migrates the site to AAD.
505
+ #
506
+ # The operation to migrate an Azure Site Recovery fabric to AAD.
507
+ #
508
+ # @param fabric_name [String] ASR fabric to migrate.
509
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
510
+ # will be added to the HTTP request.
511
+ #
512
+ #
513
+ def begin_migrate_to_aad(fabric_name, custom_headers = nil)
514
+ response = begin_migrate_to_aad_async(fabric_name, custom_headers).value!
515
+ nil
516
+ end
517
+
518
+ #
519
+ # Migrates the site to AAD.
520
+ #
521
+ # The operation to migrate an Azure Site Recovery fabric to AAD.
522
+ #
523
+ # @param fabric_name [String] ASR fabric to migrate.
524
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
525
+ # will be added to the HTTP request.
526
+ #
527
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
528
+ #
529
+ def begin_migrate_to_aad_with_http_info(fabric_name, custom_headers = nil)
530
+ begin_migrate_to_aad_async(fabric_name, custom_headers).value!
531
+ end
532
+
533
+ #
534
+ # Migrates the site to AAD.
535
+ #
536
+ # The operation to migrate an Azure Site Recovery fabric to AAD.
537
+ #
538
+ # @param fabric_name [String] ASR fabric to migrate.
539
+ # @param [Hash{String => String}] A hash of custom headers that will be added
540
+ # to the HTTP request.
541
+ #
542
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
543
+ #
544
+ def begin_migrate_to_aad_async(fabric_name, custom_headers = nil)
545
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
546
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
547
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
548
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
549
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
550
+
551
+
552
+ request_headers = {}
553
+
554
+ # Set Headers
555
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
556
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
557
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/migratetoaad'
558
+
559
+ request_url = @base_url || @client.base_url
560
+
561
+ options = {
562
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
563
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name},
564
+ query_params: {'api-version' => @client.api_version},
565
+ headers: request_headers.merge(custom_headers || {}),
566
+ base_url: request_url
567
+ }
568
+ promise = @client.make_request_async(:post, path_template, options)
569
+
570
+ promise = promise.then do |result|
571
+ http_response = result.response
572
+ status_code = http_response.status
573
+ response_content = http_response.body
574
+ unless status_code == 202 || status_code == 204
575
+ error_model = JSON.load(response_content)
576
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
577
+ end
578
+
579
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
580
+
581
+ result
582
+ end
583
+
584
+ promise.execute
585
+ end
586
+
587
+ #
588
+ # Renews certificate for the fabric.
589
+ #
590
+ # Renews the connection certificate for the ASR replication fabric.
591
+ #
592
+ # @param fabric_name [String] fabric name to renew certs for.
593
+ # @param renew_certificate [RenewCertificateInput] Renew certificate input.
594
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
595
+ # will be added to the HTTP request.
596
+ #
597
+ # @return [Fabric] operation results.
598
+ #
599
+ def begin_renew_certificate(fabric_name, renew_certificate, custom_headers = nil)
600
+ response = begin_renew_certificate_async(fabric_name, renew_certificate, custom_headers).value!
601
+ response.body unless response.nil?
602
+ end
603
+
604
+ #
605
+ # Renews certificate for the fabric.
606
+ #
607
+ # Renews the connection certificate for the ASR replication fabric.
608
+ #
609
+ # @param fabric_name [String] fabric name to renew certs for.
610
+ # @param renew_certificate [RenewCertificateInput] Renew certificate input.
611
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
612
+ # will be added to the HTTP request.
613
+ #
614
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
615
+ #
616
+ def begin_renew_certificate_with_http_info(fabric_name, renew_certificate, custom_headers = nil)
617
+ begin_renew_certificate_async(fabric_name, renew_certificate, custom_headers).value!
618
+ end
619
+
620
+ #
621
+ # Renews certificate for the fabric.
622
+ #
623
+ # Renews the connection certificate for the ASR replication fabric.
624
+ #
625
+ # @param fabric_name [String] fabric name to renew certs for.
626
+ # @param renew_certificate [RenewCertificateInput] Renew certificate input.
627
+ # @param [Hash{String => String}] A hash of custom headers that will be added
628
+ # to the HTTP request.
629
+ #
630
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
631
+ #
632
+ def begin_renew_certificate_async(fabric_name, renew_certificate, custom_headers = nil)
633
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
634
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
635
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
636
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
637
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
638
+ fail ArgumentError, 'renew_certificate is nil' if renew_certificate.nil?
639
+
640
+
641
+ request_headers = {}
642
+
643
+ # Set Headers
644
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
645
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
646
+
647
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
648
+
649
+ # Serialize Request
650
+ request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::RenewCertificateInput.mapper()
651
+ request_content = @client.serialize(request_mapper, renew_certificate)
652
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
653
+
654
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/renewCertificate'
655
+
656
+ request_url = @base_url || @client.base_url
657
+
658
+ options = {
659
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
660
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name},
661
+ query_params: {'api-version' => @client.api_version},
662
+ body: request_content,
663
+ headers: request_headers.merge(custom_headers || {}),
664
+ base_url: request_url
665
+ }
666
+ promise = @client.make_request_async(:post, path_template, options)
667
+
668
+ promise = promise.then do |result|
669
+ http_response = result.response
670
+ status_code = http_response.status
671
+ response_content = http_response.body
672
+ unless status_code == 200 || status_code == 202
673
+ error_model = JSON.load(response_content)
674
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
675
+ end
676
+
677
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
678
+ # Deserialize Response
679
+ if status_code == 200
680
+ begin
681
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
682
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper()
683
+ result.body = @client.deserialize(result_mapper, parsed_response)
684
+ rescue Exception => e
685
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
686
+ end
687
+ end
688
+
689
+ result
690
+ end
691
+
692
+ promise.execute
693
+ end
694
+
695
+ #
696
+ # Perform failover of the process server.
697
+ #
698
+ # The operation to move replications from a process server to another process
699
+ # server.
700
+ #
701
+ # @param fabric_name [String] The name of the fabric containing the process
702
+ # server.
703
+ # @param failover_process_server_request [FailoverProcessServerRequest] The
704
+ # input to the failover process server operation.
705
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
706
+ # will be added to the HTTP request.
707
+ #
708
+ # @return [Fabric] operation results.
709
+ #
710
+ def begin_reassociate_gateway(fabric_name, failover_process_server_request, custom_headers = nil)
711
+ response = begin_reassociate_gateway_async(fabric_name, failover_process_server_request, custom_headers).value!
712
+ response.body unless response.nil?
713
+ end
714
+
715
+ #
716
+ # Perform failover of the process server.
717
+ #
718
+ # The operation to move replications from a process server to another process
719
+ # server.
720
+ #
721
+ # @param fabric_name [String] The name of the fabric containing the process
722
+ # server.
723
+ # @param failover_process_server_request [FailoverProcessServerRequest] The
724
+ # input to the failover process server operation.
725
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
726
+ # will be added to the HTTP request.
727
+ #
728
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
729
+ #
730
+ def begin_reassociate_gateway_with_http_info(fabric_name, failover_process_server_request, custom_headers = nil)
731
+ begin_reassociate_gateway_async(fabric_name, failover_process_server_request, custom_headers).value!
732
+ end
733
+
734
+ #
735
+ # Perform failover of the process server.
736
+ #
737
+ # The operation to move replications from a process server to another process
738
+ # server.
739
+ #
740
+ # @param fabric_name [String] The name of the fabric containing the process
741
+ # server.
742
+ # @param failover_process_server_request [FailoverProcessServerRequest] The
743
+ # input to the failover process server operation.
744
+ # @param [Hash{String => String}] A hash of custom headers that will be added
745
+ # to the HTTP request.
746
+ #
747
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
748
+ #
749
+ def begin_reassociate_gateway_async(fabric_name, failover_process_server_request, custom_headers = nil)
750
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
751
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
752
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
753
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
754
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
755
+ fail ArgumentError, 'failover_process_server_request is nil' if failover_process_server_request.nil?
756
+
757
+
758
+ request_headers = {}
759
+
760
+ # Set Headers
761
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
762
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
763
+
764
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
765
+
766
+ # Serialize Request
767
+ request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::FailoverProcessServerRequest.mapper()
768
+ request_content = @client.serialize(request_mapper, failover_process_server_request)
769
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
770
+
771
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/reassociateGateway'
772
+
773
+ request_url = @base_url || @client.base_url
774
+
775
+ options = {
776
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
777
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name},
778
+ query_params: {'api-version' => @client.api_version},
779
+ body: request_content,
780
+ headers: request_headers.merge(custom_headers || {}),
781
+ base_url: request_url
782
+ }
783
+ promise = @client.make_request_async(:post, path_template, options)
784
+
785
+ promise = promise.then do |result|
786
+ http_response = result.response
787
+ status_code = http_response.status
788
+ response_content = http_response.body
789
+ unless status_code == 200 || status_code == 202
790
+ error_model = JSON.load(response_content)
791
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
792
+ end
793
+
794
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
795
+ # Deserialize Response
796
+ if status_code == 200
797
+ begin
798
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
799
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper()
800
+ result.body = @client.deserialize(result_mapper, parsed_response)
801
+ rescue Exception => e
802
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
803
+ end
804
+ end
805
+
806
+ result
807
+ end
808
+
809
+ promise.execute
810
+ end
811
+
812
+ #
813
+ # Checks the consistency of the ASR fabric.
814
+ #
815
+ # The operation to perform a consistency check on the fabric.
816
+ #
817
+ # @param fabric_name [String] Fabric name.
818
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
819
+ # will be added to the HTTP request.
820
+ #
821
+ # @return [Fabric] operation results.
822
+ #
823
+ def begin_check_consistency(fabric_name, custom_headers = nil)
824
+ response = begin_check_consistency_async(fabric_name, custom_headers).value!
825
+ response.body unless response.nil?
826
+ end
827
+
828
+ #
829
+ # Checks the consistency of the ASR fabric.
830
+ #
831
+ # The operation to perform a consistency check on the fabric.
832
+ #
833
+ # @param fabric_name [String] Fabric name.
834
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
835
+ # will be added to the HTTP request.
836
+ #
837
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
838
+ #
839
+ def begin_check_consistency_with_http_info(fabric_name, custom_headers = nil)
840
+ begin_check_consistency_async(fabric_name, custom_headers).value!
841
+ end
842
+
843
+ #
844
+ # Checks the consistency of the ASR fabric.
845
+ #
846
+ # The operation to perform a consistency check on the fabric.
847
+ #
848
+ # @param fabric_name [String] Fabric name.
849
+ # @param [Hash{String => String}] A hash of custom headers that will be added
850
+ # to the HTTP request.
851
+ #
852
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
853
+ #
854
+ def begin_check_consistency_async(fabric_name, custom_headers = nil)
855
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
856
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
857
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
858
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
859
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
860
+
861
+
862
+ request_headers = {}
863
+
864
+ # Set Headers
865
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
866
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
867
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/checkConsistency'
868
+
869
+ request_url = @base_url || @client.base_url
870
+
871
+ options = {
872
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
873
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name},
874
+ query_params: {'api-version' => @client.api_version},
875
+ headers: request_headers.merge(custom_headers || {}),
876
+ base_url: request_url
877
+ }
878
+ promise = @client.make_request_async(:post, path_template, options)
879
+
880
+ promise = promise.then do |result|
881
+ http_response = result.response
882
+ status_code = http_response.status
883
+ response_content = http_response.body
884
+ unless status_code == 200 || status_code == 202
885
+ error_model = JSON.load(response_content)
886
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
887
+ end
888
+
889
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
890
+ # Deserialize Response
891
+ if status_code == 200
892
+ begin
893
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
894
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper()
895
+ result.body = @client.deserialize(result_mapper, parsed_response)
896
+ rescue Exception => e
897
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
898
+ end
899
+ end
900
+
901
+ result
902
+ end
903
+
904
+ promise.execute
905
+ end
906
+
907
+ #
908
+ # Deletes the site.
909
+ #
910
+ # The operation to delete or remove an Azure Site Recovery fabric.
911
+ #
912
+ # @param fabric_name [String] ASR fabric to delete
913
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
914
+ # will be added to the HTTP request.
915
+ #
916
+ #
917
+ def begin_delete(fabric_name, custom_headers = nil)
918
+ response = begin_delete_async(fabric_name, custom_headers).value!
919
+ nil
920
+ end
921
+
922
+ #
923
+ # Deletes the site.
924
+ #
925
+ # The operation to delete or remove an Azure Site Recovery fabric.
926
+ #
927
+ # @param fabric_name [String] ASR fabric to delete
928
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
929
+ # will be added to the HTTP request.
930
+ #
931
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
932
+ #
933
+ def begin_delete_with_http_info(fabric_name, custom_headers = nil)
934
+ begin_delete_async(fabric_name, custom_headers).value!
935
+ end
936
+
937
+ #
938
+ # Deletes the site.
939
+ #
940
+ # The operation to delete or remove an Azure Site Recovery fabric.
941
+ #
942
+ # @param fabric_name [String] ASR fabric to delete
943
+ # @param [Hash{String => String}] A hash of custom headers that will be added
944
+ # to the HTTP request.
945
+ #
946
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
947
+ #
948
+ def begin_delete_async(fabric_name, custom_headers = nil)
949
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
950
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
951
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
952
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
953
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
954
+
955
+
956
+ request_headers = {}
957
+
958
+ # Set Headers
959
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
960
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
961
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/remove'
962
+
963
+ request_url = @base_url || @client.base_url
964
+
965
+ options = {
966
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
967
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name},
968
+ query_params: {'api-version' => @client.api_version},
969
+ headers: request_headers.merge(custom_headers || {}),
970
+ base_url: request_url
971
+ }
972
+ promise = @client.make_request_async(:post, path_template, options)
973
+
974
+ promise = promise.then do |result|
975
+ http_response = result.response
976
+ status_code = http_response.status
977
+ response_content = http_response.body
978
+ unless status_code == 202 || status_code == 204
979
+ error_model = JSON.load(response_content)
980
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
981
+ end
982
+
983
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
984
+
985
+ result
986
+ end
987
+
988
+ promise.execute
989
+ end
990
+
991
+ #
992
+ # Creates an Azure Site Recoery fabric.
993
+ #
994
+ # The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site)
995
+ #
996
+ # @param fabric_name [String] Name of the ASR fabric.
997
+ # @param input [FabricCreationInput] Fabric creation input.
998
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
999
+ # will be added to the HTTP request.
1000
+ #
1001
+ # @return [Fabric] operation results.
1002
+ #
1003
+ def begin_create(fabric_name, input, custom_headers = nil)
1004
+ response = begin_create_async(fabric_name, input, custom_headers).value!
1005
+ response.body unless response.nil?
1006
+ end
1007
+
1008
+ #
1009
+ # Creates an Azure Site Recoery fabric.
1010
+ #
1011
+ # The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site)
1012
+ #
1013
+ # @param fabric_name [String] Name of the ASR fabric.
1014
+ # @param input [FabricCreationInput] Fabric creation input.
1015
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1016
+ # will be added to the HTTP request.
1017
+ #
1018
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1019
+ #
1020
+ def begin_create_with_http_info(fabric_name, input, custom_headers = nil)
1021
+ begin_create_async(fabric_name, input, custom_headers).value!
1022
+ end
1023
+
1024
+ #
1025
+ # Creates an Azure Site Recoery fabric.
1026
+ #
1027
+ # The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site)
1028
+ #
1029
+ # @param fabric_name [String] Name of the ASR fabric.
1030
+ # @param input [FabricCreationInput] Fabric creation input.
1031
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1032
+ # to the HTTP request.
1033
+ #
1034
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1035
+ #
1036
+ def begin_create_async(fabric_name, input, custom_headers = nil)
1037
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1038
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1039
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1040
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1041
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
1042
+ fail ArgumentError, 'input is nil' if input.nil?
1043
+
1044
+
1045
+ request_headers = {}
1046
+
1047
+ # Set Headers
1048
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1049
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1050
+
1051
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1052
+
1053
+ # Serialize Request
1054
+ request_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::FabricCreationInput.mapper()
1055
+ request_content = @client.serialize(request_mapper, input)
1056
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1057
+
1058
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}'
1059
+
1060
+ request_url = @base_url || @client.base_url
1061
+
1062
+ options = {
1063
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1064
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name},
1065
+ query_params: {'api-version' => @client.api_version},
1066
+ body: request_content,
1067
+ headers: request_headers.merge(custom_headers || {}),
1068
+ base_url: request_url
1069
+ }
1070
+ promise = @client.make_request_async(:put, path_template, options)
1071
+
1072
+ promise = promise.then do |result|
1073
+ http_response = result.response
1074
+ status_code = http_response.status
1075
+ response_content = http_response.body
1076
+ unless status_code == 200 || status_code == 202
1077
+ error_model = JSON.load(response_content)
1078
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1079
+ end
1080
+
1081
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1082
+ # Deserialize Response
1083
+ if status_code == 200
1084
+ begin
1085
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1086
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::Fabric.mapper()
1087
+ result.body = @client.deserialize(result_mapper, parsed_response)
1088
+ rescue Exception => e
1089
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1090
+ end
1091
+ end
1092
+
1093
+ result
1094
+ end
1095
+
1096
+ promise.execute
1097
+ end
1098
+
1099
+ #
1100
+ # Purges the site.
1101
+ #
1102
+ # The operation to purge(force delete) an Azure Site Recovery fabric.
1103
+ #
1104
+ # @param fabric_name [String] ASR fabric to purge.
1105
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1106
+ # will be added to the HTTP request.
1107
+ #
1108
+ #
1109
+ def begin_purge(fabric_name, custom_headers = nil)
1110
+ response = begin_purge_async(fabric_name, custom_headers).value!
1111
+ nil
1112
+ end
1113
+
1114
+ #
1115
+ # Purges the site.
1116
+ #
1117
+ # The operation to purge(force delete) an Azure Site Recovery fabric.
1118
+ #
1119
+ # @param fabric_name [String] ASR fabric to purge.
1120
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1121
+ # will be added to the HTTP request.
1122
+ #
1123
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1124
+ #
1125
+ def begin_purge_with_http_info(fabric_name, custom_headers = nil)
1126
+ begin_purge_async(fabric_name, custom_headers).value!
1127
+ end
1128
+
1129
+ #
1130
+ # Purges the site.
1131
+ #
1132
+ # The operation to purge(force delete) an Azure Site Recovery fabric.
1133
+ #
1134
+ # @param fabric_name [String] ASR fabric to purge.
1135
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1136
+ # to the HTTP request.
1137
+ #
1138
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1139
+ #
1140
+ def begin_purge_async(fabric_name, custom_headers = nil)
1141
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1142
+ fail ArgumentError, '@client.resource_name is nil' if @client.resource_name.nil?
1143
+ fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
1144
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1145
+ fail ArgumentError, 'fabric_name is nil' if fabric_name.nil?
1146
+
1147
+
1148
+ request_headers = {}
1149
+
1150
+ # Set Headers
1151
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1152
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1153
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}'
1154
+
1155
+ request_url = @base_url || @client.base_url
1156
+
1157
+ options = {
1158
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1159
+ path_params: {'resourceName' => @client.resource_name,'resourceGroupName' => @client.resource_group_name,'subscriptionId' => @client.subscription_id,'fabricName' => fabric_name},
1160
+ query_params: {'api-version' => @client.api_version},
1161
+ headers: request_headers.merge(custom_headers || {}),
1162
+ base_url: request_url
1163
+ }
1164
+ promise = @client.make_request_async(:delete, path_template, options)
1165
+
1166
+ promise = promise.then do |result|
1167
+ http_response = result.response
1168
+ status_code = http_response.status
1169
+ response_content = http_response.body
1170
+ unless status_code == 202 || status_code == 204
1171
+ error_model = JSON.load(response_content)
1172
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1173
+ end
1174
+
1175
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1176
+
1177
+ result
1178
+ end
1179
+
1180
+ promise.execute
1181
+ end
1182
+
1183
+ #
1184
+ # Gets the list of ASR fabrics
1185
+ #
1186
+ # Gets a list of the Azure Site Recovery fabrics in the vault.
1187
+ #
1188
+ # @param next_page_link [String] The NextLink from the previous successful call
1189
+ # to List operation.
1190
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1191
+ # will be added to the HTTP request.
1192
+ #
1193
+ # @return [FabricCollection] operation results.
1194
+ #
1195
+ def list_next(next_page_link, custom_headers = nil)
1196
+ response = list_next_async(next_page_link, custom_headers).value!
1197
+ response.body unless response.nil?
1198
+ end
1199
+
1200
+ #
1201
+ # Gets the list of ASR fabrics
1202
+ #
1203
+ # Gets a list of the Azure Site Recovery fabrics in the vault.
1204
+ #
1205
+ # @param next_page_link [String] The NextLink from the previous successful call
1206
+ # to List operation.
1207
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1208
+ # will be added to the HTTP request.
1209
+ #
1210
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1211
+ #
1212
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
1213
+ list_next_async(next_page_link, custom_headers).value!
1214
+ end
1215
+
1216
+ #
1217
+ # Gets the list of ASR fabrics
1218
+ #
1219
+ # Gets a list of the Azure Site Recovery fabrics in the vault.
1220
+ #
1221
+ # @param next_page_link [String] The NextLink from the previous successful call
1222
+ # to List operation.
1223
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1224
+ # to the HTTP request.
1225
+ #
1226
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1227
+ #
1228
+ def list_next_async(next_page_link, custom_headers = nil)
1229
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1230
+
1231
+
1232
+ request_headers = {}
1233
+
1234
+ # Set Headers
1235
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1236
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1237
+ path_template = '{nextLink}'
1238
+
1239
+ request_url = @base_url || @client.base_url
1240
+
1241
+ options = {
1242
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1243
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1244
+ headers: request_headers.merge(custom_headers || {}),
1245
+ base_url: request_url
1246
+ }
1247
+ promise = @client.make_request_async(:get, path_template, options)
1248
+
1249
+ promise = promise.then do |result|
1250
+ http_response = result.response
1251
+ status_code = http_response.status
1252
+ response_content = http_response.body
1253
+ unless status_code == 200
1254
+ error_model = JSON.load(response_content)
1255
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1256
+ end
1257
+
1258
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1259
+ # Deserialize Response
1260
+ if status_code == 200
1261
+ begin
1262
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1263
+ result_mapper = Azure::ARM::RecoveryServicesSiteRecovery::Models::FabricCollection.mapper()
1264
+ result.body = @client.deserialize(result_mapper, parsed_response)
1265
+ rescue Exception => e
1266
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1267
+ end
1268
+ end
1269
+
1270
+ result
1271
+ end
1272
+
1273
+ promise.execute
1274
+ end
1275
+
1276
+ #
1277
+ # Gets the list of ASR fabrics
1278
+ #
1279
+ # Gets a list of the Azure Site Recovery fabrics in the vault.
1280
+ #
1281
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1282
+ # will be added to the HTTP request.
1283
+ #
1284
+ # @return [FabricCollection] which provide lazy access to pages of the
1285
+ # response.
1286
+ #
1287
+ def list_as_lazy(custom_headers = nil)
1288
+ response = list_async(custom_headers).value!
1289
+ unless response.nil?
1290
+ page = response.body
1291
+ page.next_method = Proc.new do |next_page_link|
1292
+ list_next_async(next_page_link, custom_headers)
1293
+ end
1294
+ page
1295
+ end
1296
+ end
1297
+
1298
+ end
1299
+ end