azure_mgmt_compute 0.18.5 → 0.18.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (585) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2015-06-15/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  3. data/lib/2015-06-15/generated/azure_mgmt_compute/models/api_entity_reference.rb +1 -1
  4. data/lib/2015-06-15/generated/azure_mgmt_compute/models/availability_set.rb +1 -1
  5. data/lib/2015-06-15/generated/azure_mgmt_compute/models/hardware_profile.rb +19 -18
  6. data/lib/2015-06-15/generated/azure_mgmt_compute/models/osprofile.rb +2 -1
  7. data/lib/2015-06-15/generated/azure_mgmt_compute/models/vault_certificate.rb +3 -3
  8. data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine.rb +1 -1
  9. data/lib/2015-06-15/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +1 -1
  10. data/lib/2016-03-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  11. data/lib/2016-03-30/generated/azure_mgmt_compute/models/api_entity_reference.rb +1 -1
  12. data/lib/2016-03-30/generated/azure_mgmt_compute/models/availability_set.rb +1 -1
  13. data/lib/2016-03-30/generated/azure_mgmt_compute/models/hardware_profile.rb +22 -22
  14. data/lib/2016-03-30/generated/azure_mgmt_compute/models/osprofile.rb +2 -1
  15. data/lib/2016-03-30/generated/azure_mgmt_compute/models/vault_certificate.rb +3 -3
  16. data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine.rb +1 -1
  17. data/lib/2016-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +1 -1
  18. data/lib/2016-04-30-preview/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  19. data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/api_entity_reference.rb +1 -1
  20. data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/availability_set.rb +1 -1
  21. data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/osprofile.rb +2 -1
  22. data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/source_vault.rb +1 -1
  23. data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/vault_certificate.rb +1 -1
  24. data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine.rb +1 -1
  25. data/lib/2016-04-30-preview/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +1 -1
  26. data/lib/2017-03-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  27. data/lib/2017-03-30/generated/azure_mgmt_compute/models/api_entity_reference.rb +1 -1
  28. data/lib/2017-03-30/generated/azure_mgmt_compute/models/availability_set.rb +1 -1
  29. data/lib/2017-03-30/generated/azure_mgmt_compute/models/disk_sku.rb +1 -2
  30. data/lib/2017-03-30/generated/azure_mgmt_compute/models/hardware_profile.rb +19 -18
  31. data/lib/2017-03-30/generated/azure_mgmt_compute/models/image_data_disk.rb +1 -2
  32. data/lib/2017-03-30/generated/azure_mgmt_compute/models/image_osdisk.rb +1 -2
  33. data/lib/2017-03-30/generated/azure_mgmt_compute/models/managed_disk_parameters.rb +1 -2
  34. data/lib/2017-03-30/generated/azure_mgmt_compute/models/osprofile.rb +2 -1
  35. data/lib/2017-03-30/generated/azure_mgmt_compute/models/resource_sku_capabilities.rb +1 -1
  36. data/lib/2017-03-30/generated/azure_mgmt_compute/models/source_vault.rb +1 -1
  37. data/lib/2017-03-30/generated/azure_mgmt_compute/models/vault_certificate.rb +3 -3
  38. data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine.rb +1 -1
  39. data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +1 -2
  40. data/lib/2017-03-30/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +1 -1
  41. data/lib/2017-09-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  42. data/lib/2017-09-01/generated/azure_mgmt_compute/models/resource_sku_capabilities.rb +1 -1
  43. data/lib/2017-12-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  44. data/lib/2017-12-01/generated/azure_mgmt_compute/models/api_entity_reference.rb +1 -1
  45. data/lib/2017-12-01/generated/azure_mgmt_compute/models/availability_set.rb +1 -1
  46. data/lib/2017-12-01/generated/azure_mgmt_compute/models/log_analytics_input_base.rb +1 -1
  47. data/lib/2017-12-01/generated/azure_mgmt_compute/models/osprofile.rb +2 -1
  48. data/lib/2017-12-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info_properties.rb +1 -1
  49. data/lib/2017-12-01/generated/azure_mgmt_compute/models/vault_certificate.rb +3 -3
  50. data/lib/2017-12-01/generated/azure_mgmt_compute/models/virtual_machine.rb +1 -1
  51. data/lib/2017-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +1 -1
  52. data/lib/2017-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +1 -1
  53. data/lib/2017-12-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +1 -1
  54. data/lib/2018-04-01/generated/azure_mgmt_compute.rb +75 -70
  55. data/lib/2018-04-01/generated/azure_mgmt_compute/compute_management_client.rb +5 -1
  56. data/lib/2018-04-01/generated/azure_mgmt_compute/models/api_entity_reference.rb +1 -1
  57. data/lib/2018-04-01/generated/azure_mgmt_compute/models/availability_set.rb +15 -1
  58. data/lib/2018-04-01/generated/azure_mgmt_compute/models/availability_set_update.rb +14 -0
  59. data/lib/2018-04-01/generated/azure_mgmt_compute/models/log_analytics_input_base.rb +1 -1
  60. data/lib/2018-04-01/generated/azure_mgmt_compute/models/osprofile.rb +2 -1
  61. data/lib/2018-04-01/generated/azure_mgmt_compute/models/proximity_placement_group.rb +166 -0
  62. data/lib/2018-04-01/generated/azure_mgmt_compute/models/proximity_placement_group_list_result.rb +100 -0
  63. data/lib/2018-04-01/generated/azure_mgmt_compute/models/proximity_placement_group_type.rb +16 -0
  64. data/lib/2018-04-01/generated/azure_mgmt_compute/models/proximity_placement_group_update.rb +51 -0
  65. data/lib/2018-04-01/generated/azure_mgmt_compute/models/source_vault.rb +1 -1
  66. data/lib/2018-04-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info_properties.rb +1 -1
  67. data/lib/2018-04-01/generated/azure_mgmt_compute/models/vault_certificate.rb +3 -3
  68. data/lib/2018-04-01/generated/azure_mgmt_compute/models/virtual_machine.rb +15 -1
  69. data/lib/2018-04-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +15 -1
  70. data/lib/2018-04-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +1 -1
  71. data/lib/2018-04-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +15 -1
  72. data/lib/2018-04-01/generated/azure_mgmt_compute/proximity_placement_groups.rb +821 -0
  73. data/lib/2018-06-01/generated/azure_mgmt_compute.rb +93 -85
  74. data/lib/2018-06-01/generated/azure_mgmt_compute/compute_management_client.rb +5 -1
  75. data/lib/2018-06-01/generated/azure_mgmt_compute/models/api_entity_reference.rb +1 -1
  76. data/lib/2018-06-01/generated/azure_mgmt_compute/models/availability_set.rb +15 -1
  77. data/lib/2018-06-01/generated/azure_mgmt_compute/models/availability_set_update.rb +14 -0
  78. data/lib/2018-06-01/generated/azure_mgmt_compute/models/diff_disk_settings.rb +4 -4
  79. data/lib/2018-06-01/generated/azure_mgmt_compute/models/disk.rb +6 -2
  80. data/lib/2018-06-01/generated/azure_mgmt_compute/models/gallery.rb +1 -1
  81. data/lib/2018-06-01/generated/azure_mgmt_compute/models/gallery_artifact_publishing_profile_base.rb +1 -1
  82. data/lib/2018-06-01/generated/azure_mgmt_compute/models/gallery_image.rb +2 -2
  83. data/lib/2018-06-01/generated/azure_mgmt_compute/models/gallery_image_version_publishing_profile.rb +2 -2
  84. data/lib/2018-06-01/generated/azure_mgmt_compute/models/log_analytics_input_base.rb +1 -1
  85. data/lib/2018-06-01/generated/azure_mgmt_compute/models/osdisk.rb +1 -1
  86. data/lib/2018-06-01/generated/azure_mgmt_compute/models/osprofile.rb +2 -1
  87. data/lib/2018-06-01/generated/azure_mgmt_compute/models/proximity_placement_group.rb +166 -0
  88. data/lib/2018-06-01/generated/azure_mgmt_compute/models/proximity_placement_group_list_result.rb +100 -0
  89. data/lib/2018-06-01/generated/azure_mgmt_compute/models/proximity_placement_group_type.rb +16 -0
  90. data/lib/2018-06-01/generated/azure_mgmt_compute/models/proximity_placement_group_update.rb +51 -0
  91. data/lib/2018-06-01/generated/azure_mgmt_compute/models/recommended_machine_configuration.rb +1 -1
  92. data/lib/2018-06-01/generated/azure_mgmt_compute/models/source_vault.rb +1 -1
  93. data/lib/2018-06-01/generated/azure_mgmt_compute/models/target_region.rb +1 -1
  94. data/lib/2018-06-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info_properties.rb +1 -1
  95. data/lib/2018-06-01/generated/azure_mgmt_compute/models/vault_certificate.rb +3 -3
  96. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine.rb +15 -1
  97. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_reimage_parameters.rb +48 -0
  98. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +15 -1
  99. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +20 -0
  100. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +1 -1
  101. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_reimage_parameters.rb +65 -0
  102. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +1 -1
  103. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmreimage_parameters.rb +44 -0
  104. data/lib/2018-06-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +15 -1
  105. data/lib/2018-06-01/generated/azure_mgmt_compute/proximity_placement_groups.rb +821 -0
  106. data/lib/2018-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +31 -9
  107. data/lib/2018-06-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +29 -25
  108. data/lib/2018-06-01/generated/azure_mgmt_compute/virtual_machines.rb +140 -0
  109. data/lib/2018-09-30/generated/azure_mgmt_compute.rb +54 -0
  110. data/lib/2018-09-30/generated/azure_mgmt_compute/compute_management_client.rb +137 -0
  111. data/lib/2018-09-30/generated/azure_mgmt_compute/disks.rb +1274 -0
  112. data/lib/2018-09-30/generated/azure_mgmt_compute/models/access_level.rb +17 -0
  113. data/lib/2018-09-30/generated/azure_mgmt_compute/models/access_uri.rb +47 -0
  114. data/lib/2018-09-30/generated/azure_mgmt_compute/models/creation_data.rb +97 -0
  115. data/lib/2018-09-30/generated/azure_mgmt_compute/models/disk.rb +262 -0
  116. data/lib/2018-09-30/generated/azure_mgmt_compute/models/disk_create_option.rb +21 -0
  117. data/lib/2018-09-30/generated/azure_mgmt_compute/models/disk_list.rb +99 -0
  118. data/lib/2018-09-30/generated/azure_mgmt_compute/models/disk_sku.rb +62 -0
  119. data/lib/2018-09-30/generated/azure_mgmt_compute/models/disk_state.rb +20 -0
  120. data/lib/2018-09-30/generated/azure_mgmt_compute/models/disk_storage_account_types.rb +18 -0
  121. data/lib/2018-09-30/generated/azure_mgmt_compute/models/disk_update.rb +134 -0
  122. data/lib/2018-09-30/generated/azure_mgmt_compute/models/encryption_settings_collection.rb +71 -0
  123. data/lib/2018-09-30/generated/azure_mgmt_compute/models/encryption_settings_element.rb +62 -0
  124. data/lib/2018-09-30/generated/azure_mgmt_compute/models/grant_access_data.rb +58 -0
  125. data/lib/2018-09-30/generated/azure_mgmt_compute/models/hyper_vgeneration.rb +16 -0
  126. data/lib/2018-09-30/generated/azure_mgmt_compute/models/image_disk_reference.rb +60 -0
  127. data/lib/2018-09-30/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb +60 -0
  128. data/lib/2018-09-30/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb +59 -0
  129. data/lib/2018-09-30/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
  130. data/lib/2018-09-30/generated/azure_mgmt_compute/models/resource.rb +110 -0
  131. data/lib/2018-09-30/generated/azure_mgmt_compute/models/snapshot.rb +202 -0
  132. data/lib/2018-09-30/generated/azure_mgmt_compute/models/snapshot_list.rb +99 -0
  133. data/lib/2018-09-30/generated/azure_mgmt_compute/models/snapshot_sku.rb +61 -0
  134. data/lib/2018-09-30/generated/azure_mgmt_compute/models/snapshot_storage_account_types.rb +17 -0
  135. data/lib/2018-09-30/generated/azure_mgmt_compute/models/snapshot_update.rb +108 -0
  136. data/lib/2018-09-30/generated/azure_mgmt_compute/models/source_vault.rb +47 -0
  137. data/lib/2018-09-30/generated/azure_mgmt_compute/module_definition.rb +9 -0
  138. data/lib/2018-09-30/generated/azure_mgmt_compute/snapshots.rb +1274 -0
  139. data/lib/2018-10-01/generated/azure_mgmt_compute.rb +220 -0
  140. data/lib/2018-10-01/generated/azure_mgmt_compute/availability_sets.rb +894 -0
  141. data/lib/2018-10-01/generated/azure_mgmt_compute/compute_management_client.rb +195 -0
  142. data/lib/2018-10-01/generated/azure_mgmt_compute/images.rb +959 -0
  143. data/lib/2018-10-01/generated/azure_mgmt_compute/log_analytics.rb +337 -0
  144. data/lib/2018-10-01/generated/azure_mgmt_compute/models/additional_capabilities.rb +51 -0
  145. data/lib/2018-10-01/generated/azure_mgmt_compute/models/additional_unattend_content.rb +93 -0
  146. data/lib/2018-10-01/generated/azure_mgmt_compute/models/api_entity_reference.rb +47 -0
  147. data/lib/2018-10-01/generated/azure_mgmt_compute/models/api_error.rb +100 -0
  148. data/lib/2018-10-01/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
  149. data/lib/2018-10-01/generated/azure_mgmt_compute/models/automatic_osupgrade_policy.rb +64 -0
  150. data/lib/2018-10-01/generated/azure_mgmt_compute/models/automatic_osupgrade_properties.rb +47 -0
  151. data/lib/2018-10-01/generated/azure_mgmt_compute/models/availability_set.rb +189 -0
  152. data/lib/2018-10-01/generated/azure_mgmt_compute/models/availability_set_list_result.rb +100 -0
  153. data/lib/2018-10-01/generated/azure_mgmt_compute/models/availability_set_sku_types.rb +16 -0
  154. data/lib/2018-10-01/generated/azure_mgmt_compute/models/availability_set_update.rb +142 -0
  155. data/lib/2018-10-01/generated/azure_mgmt_compute/models/boot_diagnostics.rb +62 -0
  156. data/lib/2018-10-01/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +74 -0
  157. data/lib/2018-10-01/generated/azure_mgmt_compute/models/caching_types.rb +17 -0
  158. data/lib/2018-10-01/generated/azure_mgmt_compute/models/component_names.rb +15 -0
  159. data/lib/2018-10-01/generated/azure_mgmt_compute/models/compute_operation_list_result.rb +56 -0
  160. data/lib/2018-10-01/generated/azure_mgmt_compute/models/compute_operation_value.rb +108 -0
  161. data/lib/2018-10-01/generated/azure_mgmt_compute/models/data_disk.rb +159 -0
  162. data/lib/2018-10-01/generated/azure_mgmt_compute/models/data_disk_image.rb +49 -0
  163. data/lib/2018-10-01/generated/azure_mgmt_compute/models/diagnostics_profile.rb +52 -0
  164. data/lib/2018-10-01/generated/azure_mgmt_compute/models/diff_disk_options.rb +15 -0
  165. data/lib/2018-10-01/generated/azure_mgmt_compute/models/diff_disk_settings.rb +49 -0
  166. data/lib/2018-10-01/generated/azure_mgmt_compute/models/disk_create_option_types.rb +17 -0
  167. data/lib/2018-10-01/generated/azure_mgmt_compute/models/disk_encryption_settings.rb +73 -0
  168. data/lib/2018-10-01/generated/azure_mgmt_compute/models/disk_instance_view.rb +87 -0
  169. data/lib/2018-10-01/generated/azure_mgmt_compute/models/hardware_profile.rb +104 -0
  170. data/lib/2018-10-01/generated/azure_mgmt_compute/models/image.rb +126 -0
  171. data/lib/2018-10-01/generated/azure_mgmt_compute/models/image_data_disk.rb +126 -0
  172. data/lib/2018-10-01/generated/azure_mgmt_compute/models/image_list_result.rb +99 -0
  173. data/lib/2018-10-01/generated/azure_mgmt_compute/models/image_osdisk.rb +141 -0
  174. data/lib/2018-10-01/generated/azure_mgmt_compute/models/image_reference.rb +98 -0
  175. data/lib/2018-10-01/generated/azure_mgmt_compute/models/image_storage_profile.rb +86 -0
  176. data/lib/2018-10-01/generated/azure_mgmt_compute/models/image_update.rb +89 -0
  177. data/lib/2018-10-01/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
  178. data/lib/2018-10-01/generated/azure_mgmt_compute/models/instance_view_status.rb +93 -0
  179. data/lib/2018-10-01/generated/azure_mgmt_compute/models/instance_view_types.rb +15 -0
  180. data/lib/2018-10-01/generated/azure_mgmt_compute/models/interval_in_mins.rb +18 -0
  181. data/lib/2018-10-01/generated/azure_mgmt_compute/models/ipversion.rb +16 -0
  182. data/lib/2018-10-01/generated/azure_mgmt_compute/models/key_vault_key_reference.rb +59 -0
  183. data/lib/2018-10-01/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb +59 -0
  184. data/lib/2018-10-01/generated/azure_mgmt_compute/models/linux_configuration.rb +81 -0
  185. data/lib/2018-10-01/generated/azure_mgmt_compute/models/list_usages_result.rb +100 -0
  186. data/lib/2018-10-01/generated/azure_mgmt_compute/models/log_analytics_input_base.rb +102 -0
  187. data/lib/2018-10-01/generated/azure_mgmt_compute/models/log_analytics_operation_result.rb +48 -0
  188. data/lib/2018-10-01/generated/azure_mgmt_compute/models/log_analytics_output.rb +47 -0
  189. data/lib/2018-10-01/generated/azure_mgmt_compute/models/maintenance_operation_result_code_types.rb +18 -0
  190. data/lib/2018-10-01/generated/azure_mgmt_compute/models/maintenance_redeploy_status.rb +115 -0
  191. data/lib/2018-10-01/generated/azure_mgmt_compute/models/managed_disk_parameters.rb +57 -0
  192. data/lib/2018-10-01/generated/azure_mgmt_compute/models/network_interface_reference.rb +55 -0
  193. data/lib/2018-10-01/generated/azure_mgmt_compute/models/network_profile.rb +57 -0
  194. data/lib/2018-10-01/generated/azure_mgmt_compute/models/operating_system_state_types.rb +16 -0
  195. data/lib/2018-10-01/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
  196. data/lib/2018-10-01/generated/azure_mgmt_compute/models/osdisk.rb +191 -0
  197. data/lib/2018-10-01/generated/azure_mgmt_compute/models/osdisk_image.rb +48 -0
  198. data/lib/2018-10-01/generated/azure_mgmt_compute/models/osprofile.rb +183 -0
  199. data/lib/2018-10-01/generated/azure_mgmt_compute/models/pass_names.rb +15 -0
  200. data/lib/2018-10-01/generated/azure_mgmt_compute/models/plan.rb +86 -0
  201. data/lib/2018-10-01/generated/azure_mgmt_compute/models/protocol_types.rb +16 -0
  202. data/lib/2018-10-01/generated/azure_mgmt_compute/models/proximity_placement_group.rb +166 -0
  203. data/lib/2018-10-01/generated/azure_mgmt_compute/models/proximity_placement_group_list_result.rb +100 -0
  204. data/lib/2018-10-01/generated/azure_mgmt_compute/models/proximity_placement_group_type.rb +16 -0
  205. data/lib/2018-10-01/generated/azure_mgmt_compute/models/proximity_placement_group_update.rb +51 -0
  206. data/lib/2018-10-01/generated/azure_mgmt_compute/models/purchase_plan.rb +71 -0
  207. data/lib/2018-10-01/generated/azure_mgmt_compute/models/recovery_walk_response.rb +60 -0
  208. data/lib/2018-10-01/generated/azure_mgmt_compute/models/request_rate_by_interval_input.rb +97 -0
  209. data/lib/2018-10-01/generated/azure_mgmt_compute/models/resource.rb +110 -0
  210. data/lib/2018-10-01/generated/azure_mgmt_compute/models/resource_identity_type.rb +18 -0
  211. data/lib/2018-10-01/generated/azure_mgmt_compute/models/rollback_status_info.rb +74 -0
  212. data/lib/2018-10-01/generated/azure_mgmt_compute/models/rolling_upgrade_action_type.rb +16 -0
  213. data/lib/2018-10-01/generated/azure_mgmt_compute/models/rolling_upgrade_policy.rb +108 -0
  214. data/lib/2018-10-01/generated/azure_mgmt_compute/models/rolling_upgrade_progress_info.rb +88 -0
  215. data/lib/2018-10-01/generated/azure_mgmt_compute/models/rolling_upgrade_running_status.rb +88 -0
  216. data/lib/2018-10-01/generated/azure_mgmt_compute/models/rolling_upgrade_status_code.rb +18 -0
  217. data/lib/2018-10-01/generated/azure_mgmt_compute/models/rolling_upgrade_status_info.rb +141 -0
  218. data/lib/2018-10-01/generated/azure_mgmt_compute/models/run_command_document.rb +116 -0
  219. data/lib/2018-10-01/generated/azure_mgmt_compute/models/run_command_document_base.rb +92 -0
  220. data/lib/2018-10-01/generated/azure_mgmt_compute/models/run_command_input.rb +87 -0
  221. data/lib/2018-10-01/generated/azure_mgmt_compute/models/run_command_input_parameter.rb +57 -0
  222. data/lib/2018-10-01/generated/azure_mgmt_compute/models/run_command_list_result.rb +100 -0
  223. data/lib/2018-10-01/generated/azure_mgmt_compute/models/run_command_parameter_definition.rb +81 -0
  224. data/lib/2018-10-01/generated/azure_mgmt_compute/models/run_command_result.rb +56 -0
  225. data/lib/2018-10-01/generated/azure_mgmt_compute/models/setting_names.rb +16 -0
  226. data/lib/2018-10-01/generated/azure_mgmt_compute/models/sku.rb +71 -0
  227. data/lib/2018-10-01/generated/azure_mgmt_compute/models/ssh_configuration.rb +56 -0
  228. data/lib/2018-10-01/generated/azure_mgmt_compute/models/ssh_public_key.rb +64 -0
  229. data/lib/2018-10-01/generated/azure_mgmt_compute/models/status_level_types.rb +17 -0
  230. data/lib/2018-10-01/generated/azure_mgmt_compute/models/storage_account_types.rb +18 -0
  231. data/lib/2018-10-01/generated/azure_mgmt_compute/models/storage_profile.rb +89 -0
  232. data/lib/2018-10-01/generated/azure_mgmt_compute/models/sub_resource.rb +47 -0
  233. data/lib/2018-10-01/generated/azure_mgmt_compute/models/sub_resource_read_only.rb +48 -0
  234. data/lib/2018-10-01/generated/azure_mgmt_compute/models/throttled_requests_input.rb +83 -0
  235. data/lib/2018-10-01/generated/azure_mgmt_compute/models/update_resource.rb +54 -0
  236. data/lib/2018-10-01/generated/azure_mgmt_compute/models/upgrade_mode.rb +17 -0
  237. data/lib/2018-10-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info.rb +73 -0
  238. data/lib/2018-10-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info_properties.rb +116 -0
  239. data/lib/2018-10-01/generated/azure_mgmt_compute/models/upgrade_operation_history_status.rb +74 -0
  240. data/lib/2018-10-01/generated/azure_mgmt_compute/models/upgrade_operation_invoker.rb +17 -0
  241. data/lib/2018-10-01/generated/azure_mgmt_compute/models/upgrade_policy.rb +79 -0
  242. data/lib/2018-10-01/generated/azure_mgmt_compute/models/upgrade_state.rb +18 -0
  243. data/lib/2018-10-01/generated/azure_mgmt_compute/models/usage.rb +83 -0
  244. data/lib/2018-10-01/generated/azure_mgmt_compute/models/usage_name.rb +57 -0
  245. data/lib/2018-10-01/generated/azure_mgmt_compute/models/vault_certificate.rb +72 -0
  246. data/lib/2018-10-01/generated/azure_mgmt_compute/models/vault_secret_group.rb +69 -0
  247. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_hard_disk.rb +46 -0
  248. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine.rb +331 -0
  249. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +87 -0
  250. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +69 -0
  251. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb +99 -0
  252. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_eviction_policy_types.rb +16 -0
  253. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +195 -0
  254. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +71 -0
  255. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +146 -0
  256. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +109 -0
  257. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_extension_update.rb +134 -0
  258. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_extensions_list_result.rb +55 -0
  259. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_health_status.rb +48 -0
  260. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_identity.rb +102 -0
  261. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_identity_user_assigned_identities_value.rb +61 -0
  262. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_image.rb +131 -0
  263. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb +87 -0
  264. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +205 -0
  265. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb +99 -0
  266. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_priority_types.rb +16 -0
  267. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_reimage_parameters.rb +48 -0
  268. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +273 -0
  269. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +126 -0
  270. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +172 -0
  271. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_list_result.rb +103 -0
  272. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +56 -0
  273. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb +105 -0
  274. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity_user_assigned_identities_value.rb +61 -0
  275. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +91 -0
  276. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +59 -0
  277. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ip_tag.rb +58 -0
  278. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +195 -0
  279. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_osupgrade_history.rb +104 -0
  280. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +100 -0
  281. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +101 -0
  282. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +102 -0
  283. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +50 -0
  284. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +137 -0
  285. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_dns_settings.rb +56 -0
  286. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +71 -0
  287. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +180 -0
  288. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +167 -0
  289. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb +106 -0
  290. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration_dns_settings.rb +51 -0
  291. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_reimage_parameters.rb +65 -0
  292. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +74 -0
  293. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +85 -0
  294. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +16 -0
  295. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +91 -0
  296. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update.rb +138 -0
  297. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_ipconfiguration.rb +188 -0
  298. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_configuration.rb +136 -0
  299. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_profile.rb +57 -0
  300. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osdisk.rb +122 -0
  301. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osprofile.rb +92 -0
  302. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_public_ipaddress_configuration.rb +72 -0
  303. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_storage_profile.rb +80 -0
  304. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_vmprofile.rb +112 -0
  305. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +344 -0
  306. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +70 -0
  307. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +57 -0
  308. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +55 -0
  309. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +196 -0
  310. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +101 -0
  311. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +162 -0
  312. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmreimage_parameters.rb +44 -0
  313. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_size.rb +106 -0
  314. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +55 -0
  315. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb +180 -0
  316. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +61 -0
  317. data/lib/2018-10-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +274 -0
  318. data/lib/2018-10-01/generated/azure_mgmt_compute/models/win_rmconfiguration.rb +56 -0
  319. data/lib/2018-10-01/generated/azure_mgmt_compute/models/win_rmlistener.rb +67 -0
  320. data/lib/2018-10-01/generated/azure_mgmt_compute/models/windows_configuration.rb +111 -0
  321. data/lib/2018-10-01/generated/azure_mgmt_compute/module_definition.rb +9 -0
  322. data/lib/2018-10-01/generated/azure_mgmt_compute/operations.rb +107 -0
  323. data/lib/2018-10-01/generated/azure_mgmt_compute/proximity_placement_groups.rb +821 -0
  324. data/lib/2018-10-01/generated/azure_mgmt_compute/usage_operations.rb +237 -0
  325. data/lib/2018-10-01/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +354 -0
  326. data/lib/2018-10-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb +691 -0
  327. data/lib/2018-10-01/generated/azure_mgmt_compute/virtual_machine_images.rb +590 -0
  328. data/lib/2018-10-01/generated/azure_mgmt_compute/virtual_machine_run_commands.rb +316 -0
  329. data/lib/2018-10-01/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb +636 -0
  330. data/lib/2018-10-01/generated/azure_mgmt_compute/virtual_machine_scale_set_rolling_upgrades.rb +490 -0
  331. data/lib/2018-10-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +1937 -0
  332. data/lib/2018-10-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +2971 -0
  333. data/lib/2018-10-01/generated/azure_mgmt_compute/virtual_machine_sizes.rb +120 -0
  334. data/lib/2018-10-01/generated/azure_mgmt_compute/virtual_machines.rb +2746 -0
  335. data/lib/2019-03-01/generated/azure_mgmt_compute.rb +255 -0
  336. data/lib/2019-03-01/generated/azure_mgmt_compute/availability_sets.rb +894 -0
  337. data/lib/2019-03-01/generated/azure_mgmt_compute/compute_management_client.rb +207 -0
  338. data/lib/2019-03-01/generated/azure_mgmt_compute/galleries.rb +810 -0
  339. data/lib/2019-03-01/generated/azure_mgmt_compute/gallery_image_versions.rb +710 -0
  340. data/lib/2019-03-01/generated/azure_mgmt_compute/gallery_images.rb +666 -0
  341. data/lib/2019-03-01/generated/azure_mgmt_compute/images.rb +959 -0
  342. data/lib/2019-03-01/generated/azure_mgmt_compute/log_analytics.rb +337 -0
  343. data/lib/2019-03-01/generated/azure_mgmt_compute/models/additional_capabilities.rb +51 -0
  344. data/lib/2019-03-01/generated/azure_mgmt_compute/models/additional_unattend_content.rb +93 -0
  345. data/lib/2019-03-01/generated/azure_mgmt_compute/models/aggregated_replication_state.rb +18 -0
  346. data/lib/2019-03-01/generated/azure_mgmt_compute/models/api_entity_reference.rb +47 -0
  347. data/lib/2019-03-01/generated/azure_mgmt_compute/models/api_error.rb +100 -0
  348. data/lib/2019-03-01/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
  349. data/lib/2019-03-01/generated/azure_mgmt_compute/models/automatic_osupgrade_policy.rb +64 -0
  350. data/lib/2019-03-01/generated/azure_mgmt_compute/models/automatic_osupgrade_properties.rb +47 -0
  351. data/lib/2019-03-01/generated/azure_mgmt_compute/models/availability_set.rb +189 -0
  352. data/lib/2019-03-01/generated/azure_mgmt_compute/models/availability_set_list_result.rb +100 -0
  353. data/lib/2019-03-01/generated/azure_mgmt_compute/models/availability_set_sku_types.rb +16 -0
  354. data/lib/2019-03-01/generated/azure_mgmt_compute/models/availability_set_update.rb +142 -0
  355. data/lib/2019-03-01/generated/azure_mgmt_compute/models/boot_diagnostics.rb +62 -0
  356. data/lib/2019-03-01/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +74 -0
  357. data/lib/2019-03-01/generated/azure_mgmt_compute/models/caching_types.rb +17 -0
  358. data/lib/2019-03-01/generated/azure_mgmt_compute/models/component_names.rb +15 -0
  359. data/lib/2019-03-01/generated/azure_mgmt_compute/models/compute_operation_list_result.rb +56 -0
  360. data/lib/2019-03-01/generated/azure_mgmt_compute/models/compute_operation_value.rb +108 -0
  361. data/lib/2019-03-01/generated/azure_mgmt_compute/models/data_disk.rb +171 -0
  362. data/lib/2019-03-01/generated/azure_mgmt_compute/models/data_disk_image.rb +49 -0
  363. data/lib/2019-03-01/generated/azure_mgmt_compute/models/diagnostics_profile.rb +52 -0
  364. data/lib/2019-03-01/generated/azure_mgmt_compute/models/diff_disk_options.rb +15 -0
  365. data/lib/2019-03-01/generated/azure_mgmt_compute/models/diff_disk_settings.rb +49 -0
  366. data/lib/2019-03-01/generated/azure_mgmt_compute/models/disallowed.rb +54 -0
  367. data/lib/2019-03-01/generated/azure_mgmt_compute/models/disk_create_option_types.rb +17 -0
  368. data/lib/2019-03-01/generated/azure_mgmt_compute/models/disk_encryption_settings.rb +73 -0
  369. data/lib/2019-03-01/generated/azure_mgmt_compute/models/disk_instance_view.rb +87 -0
  370. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery.rb +125 -0
  371. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery_artifact_publishing_profile_base.rb +68 -0
  372. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery_artifact_source.rb +47 -0
  373. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery_data_disk_image.rb +69 -0
  374. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery_disk_image.rb +63 -0
  375. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery_identifier.rb +48 -0
  376. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery_image.rb +236 -0
  377. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery_image_identifier.rb +68 -0
  378. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery_image_list.rb +100 -0
  379. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery_image_version.rb +140 -0
  380. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery_image_version_list.rb +100 -0
  381. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery_image_version_publishing_profile.rb +125 -0
  382. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery_image_version_storage_profile.rb +69 -0
  383. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery_list.rb +99 -0
  384. data/lib/2019-03-01/generated/azure_mgmt_compute/models/gallery_osdisk_image.rb +54 -0
  385. data/lib/2019-03-01/generated/azure_mgmt_compute/models/hardware_profile.rb +104 -0
  386. data/lib/2019-03-01/generated/azure_mgmt_compute/models/host_caching.rb +17 -0
  387. data/lib/2019-03-01/generated/azure_mgmt_compute/models/hyper_vgeneration_types.rb +16 -0
  388. data/lib/2019-03-01/generated/azure_mgmt_compute/models/image.rb +139 -0
  389. data/lib/2019-03-01/generated/azure_mgmt_compute/models/image_data_disk.rb +126 -0
  390. data/lib/2019-03-01/generated/azure_mgmt_compute/models/image_list_result.rb +99 -0
  391. data/lib/2019-03-01/generated/azure_mgmt_compute/models/image_osdisk.rb +141 -0
  392. data/lib/2019-03-01/generated/azure_mgmt_compute/models/image_purchase_plan.rb +69 -0
  393. data/lib/2019-03-01/generated/azure_mgmt_compute/models/image_reference.rb +98 -0
  394. data/lib/2019-03-01/generated/azure_mgmt_compute/models/image_storage_profile.rb +86 -0
  395. data/lib/2019-03-01/generated/azure_mgmt_compute/models/image_update.rb +102 -0
  396. data/lib/2019-03-01/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
  397. data/lib/2019-03-01/generated/azure_mgmt_compute/models/instance_view_status.rb +93 -0
  398. data/lib/2019-03-01/generated/azure_mgmt_compute/models/instance_view_types.rb +15 -0
  399. data/lib/2019-03-01/generated/azure_mgmt_compute/models/interval_in_mins.rb +18 -0
  400. data/lib/2019-03-01/generated/azure_mgmt_compute/models/ipversion.rb +16 -0
  401. data/lib/2019-03-01/generated/azure_mgmt_compute/models/key_vault_key_reference.rb +59 -0
  402. data/lib/2019-03-01/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb +59 -0
  403. data/lib/2019-03-01/generated/azure_mgmt_compute/models/linux_configuration.rb +81 -0
  404. data/lib/2019-03-01/generated/azure_mgmt_compute/models/list_usages_result.rb +100 -0
  405. data/lib/2019-03-01/generated/azure_mgmt_compute/models/log_analytics_input_base.rb +102 -0
  406. data/lib/2019-03-01/generated/azure_mgmt_compute/models/log_analytics_operation_result.rb +48 -0
  407. data/lib/2019-03-01/generated/azure_mgmt_compute/models/log_analytics_output.rb +47 -0
  408. data/lib/2019-03-01/generated/azure_mgmt_compute/models/maintenance_operation_result_code_types.rb +18 -0
  409. data/lib/2019-03-01/generated/azure_mgmt_compute/models/maintenance_redeploy_status.rb +115 -0
  410. data/lib/2019-03-01/generated/azure_mgmt_compute/models/managed_artifact.rb +46 -0
  411. data/lib/2019-03-01/generated/azure_mgmt_compute/models/managed_disk_parameters.rb +57 -0
  412. data/lib/2019-03-01/generated/azure_mgmt_compute/models/network_interface_reference.rb +55 -0
  413. data/lib/2019-03-01/generated/azure_mgmt_compute/models/network_profile.rb +57 -0
  414. data/lib/2019-03-01/generated/azure_mgmt_compute/models/operating_system_state_types.rb +16 -0
  415. data/lib/2019-03-01/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
  416. data/lib/2019-03-01/generated/azure_mgmt_compute/models/osdisk.rb +191 -0
  417. data/lib/2019-03-01/generated/azure_mgmt_compute/models/osdisk_image.rb +48 -0
  418. data/lib/2019-03-01/generated/azure_mgmt_compute/models/osprofile.rb +183 -0
  419. data/lib/2019-03-01/generated/azure_mgmt_compute/models/pass_names.rb +15 -0
  420. data/lib/2019-03-01/generated/azure_mgmt_compute/models/plan.rb +86 -0
  421. data/lib/2019-03-01/generated/azure_mgmt_compute/models/protocol_types.rb +16 -0
  422. data/lib/2019-03-01/generated/azure_mgmt_compute/models/proximity_placement_group.rb +166 -0
  423. data/lib/2019-03-01/generated/azure_mgmt_compute/models/proximity_placement_group_list_result.rb +100 -0
  424. data/lib/2019-03-01/generated/azure_mgmt_compute/models/proximity_placement_group_type.rb +16 -0
  425. data/lib/2019-03-01/generated/azure_mgmt_compute/models/proximity_placement_group_update.rb +51 -0
  426. data/lib/2019-03-01/generated/azure_mgmt_compute/models/purchase_plan.rb +71 -0
  427. data/lib/2019-03-01/generated/azure_mgmt_compute/models/recommended_machine_configuration.rb +60 -0
  428. data/lib/2019-03-01/generated/azure_mgmt_compute/models/recovery_walk_response.rb +60 -0
  429. data/lib/2019-03-01/generated/azure_mgmt_compute/models/regional_replication_status.rb +86 -0
  430. data/lib/2019-03-01/generated/azure_mgmt_compute/models/replication_state.rb +18 -0
  431. data/lib/2019-03-01/generated/azure_mgmt_compute/models/replication_status.rb +71 -0
  432. data/lib/2019-03-01/generated/azure_mgmt_compute/models/replication_status_types.rb +15 -0
  433. data/lib/2019-03-01/generated/azure_mgmt_compute/models/request_rate_by_interval_input.rb +97 -0
  434. data/lib/2019-03-01/generated/azure_mgmt_compute/models/resource.rb +110 -0
  435. data/lib/2019-03-01/generated/azure_mgmt_compute/models/resource_identity_type.rb +18 -0
  436. data/lib/2019-03-01/generated/azure_mgmt_compute/models/resource_range.rb +57 -0
  437. data/lib/2019-03-01/generated/azure_mgmt_compute/models/rollback_status_info.rb +74 -0
  438. data/lib/2019-03-01/generated/azure_mgmt_compute/models/rolling_upgrade_action_type.rb +16 -0
  439. data/lib/2019-03-01/generated/azure_mgmt_compute/models/rolling_upgrade_policy.rb +108 -0
  440. data/lib/2019-03-01/generated/azure_mgmt_compute/models/rolling_upgrade_progress_info.rb +88 -0
  441. data/lib/2019-03-01/generated/azure_mgmt_compute/models/rolling_upgrade_running_status.rb +88 -0
  442. data/lib/2019-03-01/generated/azure_mgmt_compute/models/rolling_upgrade_status_code.rb +18 -0
  443. data/lib/2019-03-01/generated/azure_mgmt_compute/models/rolling_upgrade_status_info.rb +141 -0
  444. data/lib/2019-03-01/generated/azure_mgmt_compute/models/run_command_document.rb +116 -0
  445. data/lib/2019-03-01/generated/azure_mgmt_compute/models/run_command_document_base.rb +92 -0
  446. data/lib/2019-03-01/generated/azure_mgmt_compute/models/run_command_input.rb +87 -0
  447. data/lib/2019-03-01/generated/azure_mgmt_compute/models/run_command_input_parameter.rb +57 -0
  448. data/lib/2019-03-01/generated/azure_mgmt_compute/models/run_command_list_result.rb +100 -0
  449. data/lib/2019-03-01/generated/azure_mgmt_compute/models/run_command_parameter_definition.rb +81 -0
  450. data/lib/2019-03-01/generated/azure_mgmt_compute/models/run_command_result.rb +56 -0
  451. data/lib/2019-03-01/generated/azure_mgmt_compute/models/setting_names.rb +16 -0
  452. data/lib/2019-03-01/generated/azure_mgmt_compute/models/sku.rb +71 -0
  453. data/lib/2019-03-01/generated/azure_mgmt_compute/models/ssh_configuration.rb +56 -0
  454. data/lib/2019-03-01/generated/azure_mgmt_compute/models/ssh_public_key.rb +64 -0
  455. data/lib/2019-03-01/generated/azure_mgmt_compute/models/status_level_types.rb +17 -0
  456. data/lib/2019-03-01/generated/azure_mgmt_compute/models/storage_account_type.rb +16 -0
  457. data/lib/2019-03-01/generated/azure_mgmt_compute/models/storage_account_types.rb +18 -0
  458. data/lib/2019-03-01/generated/azure_mgmt_compute/models/storage_profile.rb +89 -0
  459. data/lib/2019-03-01/generated/azure_mgmt_compute/models/sub_resource.rb +47 -0
  460. data/lib/2019-03-01/generated/azure_mgmt_compute/models/sub_resource_read_only.rb +48 -0
  461. data/lib/2019-03-01/generated/azure_mgmt_compute/models/target_region.rb +71 -0
  462. data/lib/2019-03-01/generated/azure_mgmt_compute/models/throttled_requests_input.rb +83 -0
  463. data/lib/2019-03-01/generated/azure_mgmt_compute/models/update_resource.rb +54 -0
  464. data/lib/2019-03-01/generated/azure_mgmt_compute/models/upgrade_mode.rb +17 -0
  465. data/lib/2019-03-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info.rb +73 -0
  466. data/lib/2019-03-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info_properties.rb +116 -0
  467. data/lib/2019-03-01/generated/azure_mgmt_compute/models/upgrade_operation_history_status.rb +74 -0
  468. data/lib/2019-03-01/generated/azure_mgmt_compute/models/upgrade_operation_invoker.rb +17 -0
  469. data/lib/2019-03-01/generated/azure_mgmt_compute/models/upgrade_policy.rb +79 -0
  470. data/lib/2019-03-01/generated/azure_mgmt_compute/models/upgrade_state.rb +18 -0
  471. data/lib/2019-03-01/generated/azure_mgmt_compute/models/usage.rb +83 -0
  472. data/lib/2019-03-01/generated/azure_mgmt_compute/models/usage_name.rb +57 -0
  473. data/lib/2019-03-01/generated/azure_mgmt_compute/models/vault_certificate.rb +72 -0
  474. data/lib/2019-03-01/generated/azure_mgmt_compute/models/vault_secret_group.rb +69 -0
  475. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_hard_disk.rb +46 -0
  476. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine.rb +331 -0
  477. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +87 -0
  478. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +69 -0
  479. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb +99 -0
  480. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_eviction_policy_types.rb +16 -0
  481. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +195 -0
  482. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +71 -0
  483. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +146 -0
  484. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +109 -0
  485. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_extension_update.rb +134 -0
  486. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_extensions_list_result.rb +55 -0
  487. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_health_status.rb +48 -0
  488. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_identity.rb +102 -0
  489. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_identity_user_assigned_identities_value.rb +61 -0
  490. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_image.rb +131 -0
  491. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb +87 -0
  492. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +205 -0
  493. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb +99 -0
  494. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_priority_types.rb +16 -0
  495. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_reimage_parameters.rb +48 -0
  496. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +289 -0
  497. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +126 -0
  498. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +172 -0
  499. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_list_result.rb +103 -0
  500. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +56 -0
  501. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb +105 -0
  502. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity_user_assigned_identities_value.rb +61 -0
  503. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +91 -0
  504. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +59 -0
  505. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ip_tag.rb +58 -0
  506. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +195 -0
  507. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_osupgrade_history.rb +104 -0
  508. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +100 -0
  509. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +101 -0
  510. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +102 -0
  511. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +50 -0
  512. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +137 -0
  513. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_dns_settings.rb +56 -0
  514. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +71 -0
  515. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +180 -0
  516. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +167 -0
  517. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb +106 -0
  518. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration_dns_settings.rb +51 -0
  519. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_reimage_parameters.rb +65 -0
  520. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +74 -0
  521. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +85 -0
  522. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +16 -0
  523. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +91 -0
  524. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update.rb +154 -0
  525. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_ipconfiguration.rb +188 -0
  526. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_configuration.rb +136 -0
  527. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_profile.rb +57 -0
  528. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osdisk.rb +122 -0
  529. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osprofile.rb +92 -0
  530. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_public_ipaddress_configuration.rb +72 -0
  531. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_storage_profile.rb +80 -0
  532. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_vmprofile.rb +112 -0
  533. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +384 -0
  534. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +70 -0
  535. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +57 -0
  536. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +55 -0
  537. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +196 -0
  538. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +101 -0
  539. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmnetwork_profile_configuration.rb +57 -0
  540. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +147 -0
  541. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprotection_policy.rb +60 -0
  542. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmreimage_parameters.rb +44 -0
  543. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_size.rb +106 -0
  544. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +55 -0
  545. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb +180 -0
  546. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +61 -0
  547. data/lib/2019-03-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +274 -0
  548. data/lib/2019-03-01/generated/azure_mgmt_compute/models/vmscale_set_convert_to_single_placement_group_input.rb +52 -0
  549. data/lib/2019-03-01/generated/azure_mgmt_compute/models/win_rmconfiguration.rb +56 -0
  550. data/lib/2019-03-01/generated/azure_mgmt_compute/models/win_rmlistener.rb +67 -0
  551. data/lib/2019-03-01/generated/azure_mgmt_compute/models/windows_configuration.rb +111 -0
  552. data/lib/2019-03-01/generated/azure_mgmt_compute/module_definition.rb +9 -0
  553. data/lib/2019-03-01/generated/azure_mgmt_compute/operations.rb +107 -0
  554. data/lib/2019-03-01/generated/azure_mgmt_compute/proximity_placement_groups.rb +821 -0
  555. data/lib/2019-03-01/generated/azure_mgmt_compute/usage_operations.rb +237 -0
  556. data/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +354 -0
  557. data/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb +691 -0
  558. data/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_images.rb +590 -0
  559. data/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_run_commands.rb +316 -0
  560. data/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb +636 -0
  561. data/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_set_rolling_upgrades.rb +490 -0
  562. data/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +1957 -0
  563. data/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +3090 -0
  564. data/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_sizes.rb +120 -0
  565. data/lib/2019-03-01/generated/azure_mgmt_compute/virtual_machines.rb +2766 -0
  566. data/lib/2019-04-01/generated/azure_mgmt_compute.rb +40 -0
  567. data/lib/2019-04-01/generated/azure_mgmt_compute/compute_management_client.rb +133 -0
  568. data/lib/2019-04-01/generated/azure_mgmt_compute/models/resource_sku.rb +250 -0
  569. data/lib/2019-04-01/generated/azure_mgmt_compute/models/resource_sku_capabilities.rb +59 -0
  570. data/lib/2019-04-01/generated/azure_mgmt_compute/models/resource_sku_capacity.rb +85 -0
  571. data/lib/2019-04-01/generated/azure_mgmt_compute/models/resource_sku_capacity_scale_type.rb +17 -0
  572. data/lib/2019-04-01/generated/azure_mgmt_compute/models/resource_sku_costs.rb +72 -0
  573. data/lib/2019-04-01/generated/azure_mgmt_compute/models/resource_sku_location_info.rb +91 -0
  574. data/lib/2019-04-01/generated/azure_mgmt_compute/models/resource_sku_restriction_info.rb +77 -0
  575. data/lib/2019-04-01/generated/azure_mgmt_compute/models/resource_sku_restrictions.rb +99 -0
  576. data/lib/2019-04-01/generated/azure_mgmt_compute/models/resource_sku_restrictions_reason_code.rb +16 -0
  577. data/lib/2019-04-01/generated/azure_mgmt_compute/models/resource_sku_restrictions_type.rb +16 -0
  578. data/lib/2019-04-01/generated/azure_mgmt_compute/models/resource_sku_zone_details.rb +78 -0
  579. data/lib/2019-04-01/generated/azure_mgmt_compute/models/resource_skus_result.rb +100 -0
  580. data/lib/2019-04-01/generated/azure_mgmt_compute/module_definition.rb +9 -0
  581. data/lib/2019-04-01/generated/azure_mgmt_compute/resource_skus.rb +217 -0
  582. data/lib/azure_mgmt_compute.rb +4 -0
  583. data/lib/profiles/latest/modules/compute_profile_module.rb +722 -668
  584. data/lib/version.rb +1 -1
  585. metadata +489 -3
@@ -0,0 +1,120 @@
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::Compute::Mgmt::V2018_10_01
7
+ #
8
+ # Compute Client
9
+ #
10
+ class VirtualMachineSizes
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the VirtualMachineSizes class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ComputeManagementClient] reference to the ComputeManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # This API is deprecated. Use [Resources
26
+ # Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list)
27
+ #
28
+ # @param location [String] The location upon which virtual-machine-sizes is
29
+ # queried.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [VirtualMachineSizeListResult] operation results.
34
+ #
35
+ def list(location, custom_headers:nil)
36
+ response = list_async(location, custom_headers:custom_headers).value!
37
+ response.body unless response.nil?
38
+ end
39
+
40
+ #
41
+ # This API is deprecated. Use [Resources
42
+ # Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list)
43
+ #
44
+ # @param location [String] The location upon which virtual-machine-sizes is
45
+ # queried.
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 list_with_http_info(location, custom_headers:nil)
52
+ list_async(location, custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # This API is deprecated. Use [Resources
57
+ # Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list)
58
+ #
59
+ # @param location [String] The location upon which virtual-machine-sizes is
60
+ # queried.
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 list_async(location, custom_headers:nil)
67
+ fail ArgumentError, 'location is nil' if location.nil?
68
+ fail ArgumentError, "'location' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !location.nil? && location.match(Regexp.new('^^[-\w\._]+$$')).nil?
69
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
70
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
71
+
72
+
73
+ request_headers = {}
74
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
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}/providers/Microsoft.Compute/locations/{location}/vmSizes'
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: {'location' => location,'subscriptionId' => @client.subscription_id},
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::Compute::Mgmt::V2018_10_01::Models::VirtualMachineSizeListResult.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
+ end
120
+ end
@@ -0,0 +1,2746 @@
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::Compute::Mgmt::V2018_10_01
7
+ #
8
+ # Compute Client
9
+ #
10
+ class VirtualMachines
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the VirtualMachines class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ComputeManagementClient] reference to the ComputeManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets all the virtual machines under the specified subscription for the
26
+ # specified location.
27
+ #
28
+ # @param location [String] The location for which virtual machines under the
29
+ # subscription are queried.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [Array<VirtualMachine>] operation results.
34
+ #
35
+ def list_by_location(location, custom_headers:nil)
36
+ first_page = list_by_location_as_lazy(location, custom_headers:custom_headers)
37
+ first_page.get_all_items
38
+ end
39
+
40
+ #
41
+ # Gets all the virtual machines under the specified subscription for the
42
+ # specified location.
43
+ #
44
+ # @param location [String] The location for which virtual machines under the
45
+ # subscription are queried.
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 list_by_location_with_http_info(location, custom_headers:nil)
52
+ list_by_location_async(location, custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # Gets all the virtual machines under the specified subscription for the
57
+ # specified location.
58
+ #
59
+ # @param location [String] The location for which virtual machines under the
60
+ # subscription are queried.
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 list_by_location_async(location, custom_headers:nil)
67
+ fail ArgumentError, 'location is nil' if location.nil?
68
+ fail ArgumentError, "'location' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !location.nil? && location.match(Regexp.new('^^[-\w\._]+$$')).nil?
69
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
70
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
71
+
72
+
73
+ request_headers = {}
74
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
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}/providers/Microsoft.Compute/locations/{location}/virtualMachines'
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: {'location' => location,'subscriptionId' => @client.subscription_id},
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::Compute::Mgmt::V2018_10_01::Models::VirtualMachineListResult.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
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
121
+ # template that can be used to create similar VMs.
122
+ #
123
+ # @param resource_group_name [String] The name of the resource group.
124
+ # @param vm_name [String] The name of the virtual machine.
125
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
126
+ # the Capture Virtual Machine operation.
127
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
128
+ # will be added to the HTTP request.
129
+ #
130
+ # @return [VirtualMachineCaptureResult] operation results.
131
+ #
132
+ def capture(resource_group_name, vm_name, parameters, custom_headers:nil)
133
+ response = capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
134
+ response.body unless response.nil?
135
+ end
136
+
137
+ #
138
+ # @param resource_group_name [String] The name of the resource group.
139
+ # @param vm_name [String] The name of the virtual machine.
140
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
141
+ # the Capture Virtual Machine operation.
142
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
143
+ # will be added to the HTTP request.
144
+ #
145
+ # @return [Concurrent::Promise] promise which provides async access to http
146
+ # response.
147
+ #
148
+ def capture_async(resource_group_name, vm_name, parameters, custom_headers:nil)
149
+ # Send request
150
+ promise = begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers)
151
+
152
+ promise = promise.then do |response|
153
+ # Defining deserialization method.
154
+ deserialize_method = lambda do |parsed_response|
155
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineCaptureResult.mapper()
156
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
157
+ end
158
+
159
+ # Waiting for response.
160
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
161
+ end
162
+
163
+ promise
164
+ end
165
+
166
+ #
167
+ # The operation to create or update a virtual machine.
168
+ #
169
+ # @param resource_group_name [String] The name of the resource group.
170
+ # @param vm_name [String] The name of the virtual machine.
171
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
172
+ # Machine operation.
173
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
174
+ # will be added to the HTTP request.
175
+ #
176
+ # @return [VirtualMachine] operation results.
177
+ #
178
+ def create_or_update(resource_group_name, vm_name, parameters, custom_headers:nil)
179
+ response = create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
180
+ response.body unless response.nil?
181
+ end
182
+
183
+ #
184
+ # @param resource_group_name [String] The name of the resource group.
185
+ # @param vm_name [String] The name of the virtual machine.
186
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
187
+ # Machine operation.
188
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
189
+ # will be added to the HTTP request.
190
+ #
191
+ # @return [Concurrent::Promise] promise which provides async access to http
192
+ # response.
193
+ #
194
+ def create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
195
+ # Send request
196
+ promise = begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers)
197
+
198
+ promise = promise.then do |response|
199
+ # Defining deserialization method.
200
+ deserialize_method = lambda do |parsed_response|
201
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachine.mapper()
202
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
203
+ end
204
+
205
+ # Waiting for response.
206
+ @client.get_long_running_operation_result(response, deserialize_method)
207
+ end
208
+
209
+ promise
210
+ end
211
+
212
+ #
213
+ # The operation to update a virtual machine.
214
+ #
215
+ # @param resource_group_name [String] The name of the resource group.
216
+ # @param vm_name [String] The name of the virtual machine.
217
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
218
+ # Virtual Machine operation.
219
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
220
+ # will be added to the HTTP request.
221
+ #
222
+ # @return [VirtualMachine] operation results.
223
+ #
224
+ def update(resource_group_name, vm_name, parameters, custom_headers:nil)
225
+ response = update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
226
+ response.body unless response.nil?
227
+ end
228
+
229
+ #
230
+ # @param resource_group_name [String] The name of the resource group.
231
+ # @param vm_name [String] The name of the virtual machine.
232
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
233
+ # Virtual Machine operation.
234
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
235
+ # will be added to the HTTP request.
236
+ #
237
+ # @return [Concurrent::Promise] promise which provides async access to http
238
+ # response.
239
+ #
240
+ def update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
241
+ # Send request
242
+ promise = begin_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers)
243
+
244
+ promise = promise.then do |response|
245
+ # Defining deserialization method.
246
+ deserialize_method = lambda do |parsed_response|
247
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachine.mapper()
248
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
249
+ end
250
+
251
+ # Waiting for response.
252
+ @client.get_long_running_operation_result(response, deserialize_method)
253
+ end
254
+
255
+ promise
256
+ end
257
+
258
+ #
259
+ # The operation to delete a virtual machine.
260
+ #
261
+ # @param resource_group_name [String] The name of the resource group.
262
+ # @param vm_name [String] The name of the virtual machine.
263
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
264
+ # will be added to the HTTP request.
265
+ #
266
+ def delete(resource_group_name, vm_name, custom_headers:nil)
267
+ response = delete_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
268
+ nil
269
+ end
270
+
271
+ #
272
+ # @param resource_group_name [String] The name of the resource group.
273
+ # @param vm_name [String] The name of the virtual machine.
274
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
275
+ # will be added to the HTTP request.
276
+ #
277
+ # @return [Concurrent::Promise] promise which provides async access to http
278
+ # response.
279
+ #
280
+ def delete_async(resource_group_name, vm_name, custom_headers:nil)
281
+ # Send request
282
+ promise = begin_delete_async(resource_group_name, vm_name, custom_headers:custom_headers)
283
+
284
+ promise = promise.then do |response|
285
+ # Defining deserialization method.
286
+ deserialize_method = lambda do |parsed_response|
287
+ end
288
+
289
+ # Waiting for response.
290
+ @client.get_long_running_operation_result(response, deserialize_method)
291
+ end
292
+
293
+ promise
294
+ end
295
+
296
+ #
297
+ # Retrieves information about the model view or the instance view of a virtual
298
+ # machine.
299
+ #
300
+ # @param resource_group_name [String] The name of the resource group.
301
+ # @param vm_name [String] The name of the virtual machine.
302
+ # @param expand [InstanceViewTypes] The expand expression to apply on the
303
+ # operation. Possible values include: 'instanceView'
304
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
305
+ # will be added to the HTTP request.
306
+ #
307
+ # @return [VirtualMachine] operation results.
308
+ #
309
+ def get(resource_group_name, vm_name, expand:nil, custom_headers:nil)
310
+ response = get_async(resource_group_name, vm_name, expand:expand, custom_headers:custom_headers).value!
311
+ response.body unless response.nil?
312
+ end
313
+
314
+ #
315
+ # Retrieves information about the model view or the instance view of a virtual
316
+ # machine.
317
+ #
318
+ # @param resource_group_name [String] The name of the resource group.
319
+ # @param vm_name [String] The name of the virtual machine.
320
+ # @param expand [InstanceViewTypes] The expand expression to apply on the
321
+ # operation. Possible values include: 'instanceView'
322
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
323
+ # will be added to the HTTP request.
324
+ #
325
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
326
+ #
327
+ def get_with_http_info(resource_group_name, vm_name, expand:nil, custom_headers:nil)
328
+ get_async(resource_group_name, vm_name, expand:expand, custom_headers:custom_headers).value!
329
+ end
330
+
331
+ #
332
+ # Retrieves information about the model view or the instance view of a virtual
333
+ # machine.
334
+ #
335
+ # @param resource_group_name [String] The name of the resource group.
336
+ # @param vm_name [String] The name of the virtual machine.
337
+ # @param expand [InstanceViewTypes] The expand expression to apply on the
338
+ # operation. Possible values include: 'instanceView'
339
+ # @param [Hash{String => String}] A hash of custom headers that will be added
340
+ # to the HTTP request.
341
+ #
342
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
343
+ #
344
+ def get_async(resource_group_name, vm_name, expand:nil, custom_headers:nil)
345
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
346
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
347
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
348
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
349
+
350
+
351
+ request_headers = {}
352
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
353
+
354
+ # Set Headers
355
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
356
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
357
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
358
+
359
+ request_url = @base_url || @client.base_url
360
+
361
+ options = {
362
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
363
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
364
+ query_params: {'$expand' => expand,'api-version' => @client.api_version},
365
+ headers: request_headers.merge(custom_headers || {}),
366
+ base_url: request_url
367
+ }
368
+ promise = @client.make_request_async(:get, path_template, options)
369
+
370
+ promise = promise.then do |result|
371
+ http_response = result.response
372
+ status_code = http_response.status
373
+ response_content = http_response.body
374
+ unless status_code == 200
375
+ error_model = JSON.load(response_content)
376
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
377
+ end
378
+
379
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
380
+ # Deserialize Response
381
+ if status_code == 200
382
+ begin
383
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
384
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachine.mapper()
385
+ result.body = @client.deserialize(result_mapper, parsed_response)
386
+ rescue Exception => e
387
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
388
+ end
389
+ end
390
+
391
+ result
392
+ end
393
+
394
+ promise.execute
395
+ end
396
+
397
+ #
398
+ # Retrieves information about the run-time state of a virtual machine.
399
+ #
400
+ # @param resource_group_name [String] The name of the resource group.
401
+ # @param vm_name [String] The name of the virtual machine.
402
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
403
+ # will be added to the HTTP request.
404
+ #
405
+ # @return [VirtualMachineInstanceView] operation results.
406
+ #
407
+ def instance_view(resource_group_name, vm_name, custom_headers:nil)
408
+ response = instance_view_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
409
+ response.body unless response.nil?
410
+ end
411
+
412
+ #
413
+ # Retrieves information about the run-time state of a virtual machine.
414
+ #
415
+ # @param resource_group_name [String] The name of the resource group.
416
+ # @param vm_name [String] The name of the virtual machine.
417
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
418
+ # will be added to the HTTP request.
419
+ #
420
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
421
+ #
422
+ def instance_view_with_http_info(resource_group_name, vm_name, custom_headers:nil)
423
+ instance_view_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
424
+ end
425
+
426
+ #
427
+ # Retrieves information about the run-time state of a virtual machine.
428
+ #
429
+ # @param resource_group_name [String] The name of the resource group.
430
+ # @param vm_name [String] The name of the virtual machine.
431
+ # @param [Hash{String => String}] A hash of custom headers that will be added
432
+ # to the HTTP request.
433
+ #
434
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
435
+ #
436
+ def instance_view_async(resource_group_name, vm_name, custom_headers:nil)
437
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
438
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
439
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
440
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
441
+
442
+
443
+ request_headers = {}
444
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
445
+
446
+ # Set Headers
447
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
448
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
449
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'
450
+
451
+ request_url = @base_url || @client.base_url
452
+
453
+ options = {
454
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
455
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
456
+ query_params: {'api-version' => @client.api_version},
457
+ headers: request_headers.merge(custom_headers || {}),
458
+ base_url: request_url
459
+ }
460
+ promise = @client.make_request_async(:get, path_template, options)
461
+
462
+ promise = promise.then do |result|
463
+ http_response = result.response
464
+ status_code = http_response.status
465
+ response_content = http_response.body
466
+ unless status_code == 200
467
+ error_model = JSON.load(response_content)
468
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
469
+ end
470
+
471
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
472
+ # Deserialize Response
473
+ if status_code == 200
474
+ begin
475
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
476
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineInstanceView.mapper()
477
+ result.body = @client.deserialize(result_mapper, parsed_response)
478
+ rescue Exception => e
479
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
480
+ end
481
+ end
482
+
483
+ result
484
+ end
485
+
486
+ promise.execute
487
+ end
488
+
489
+ #
490
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
491
+ # machine must be stop-deallocated before invoking this operation.
492
+ #
493
+ # @param resource_group_name [String] The name of the resource group.
494
+ # @param vm_name [String] The name of the virtual machine.
495
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
496
+ # will be added to the HTTP request.
497
+ #
498
+ def convert_to_managed_disks(resource_group_name, vm_name, custom_headers:nil)
499
+ response = convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
500
+ nil
501
+ end
502
+
503
+ #
504
+ # @param resource_group_name [String] The name of the resource group.
505
+ # @param vm_name [String] The name of the virtual machine.
506
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
507
+ # will be added to the HTTP request.
508
+ #
509
+ # @return [Concurrent::Promise] promise which provides async access to http
510
+ # response.
511
+ #
512
+ def convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:nil)
513
+ # Send request
514
+ promise = begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers)
515
+
516
+ promise = promise.then do |response|
517
+ # Defining deserialization method.
518
+ deserialize_method = lambda do |parsed_response|
519
+ end
520
+
521
+ # Waiting for response.
522
+ @client.get_long_running_operation_result(response, deserialize_method)
523
+ end
524
+
525
+ promise
526
+ end
527
+
528
+ #
529
+ # Shuts down the virtual machine and releases the compute resources. You are
530
+ # not billed for the compute resources that this virtual machine uses.
531
+ #
532
+ # @param resource_group_name [String] The name of the resource group.
533
+ # @param vm_name [String] The name of the virtual machine.
534
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
535
+ # will be added to the HTTP request.
536
+ #
537
+ def deallocate(resource_group_name, vm_name, custom_headers:nil)
538
+ response = deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
539
+ nil
540
+ end
541
+
542
+ #
543
+ # @param resource_group_name [String] The name of the resource group.
544
+ # @param vm_name [String] The name of the virtual machine.
545
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
546
+ # will be added to the HTTP request.
547
+ #
548
+ # @return [Concurrent::Promise] promise which provides async access to http
549
+ # response.
550
+ #
551
+ def deallocate_async(resource_group_name, vm_name, custom_headers:nil)
552
+ # Send request
553
+ promise = begin_deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers)
554
+
555
+ promise = promise.then do |response|
556
+ # Defining deserialization method.
557
+ deserialize_method = lambda do |parsed_response|
558
+ end
559
+
560
+ # Waiting for response.
561
+ @client.get_long_running_operation_result(response, deserialize_method)
562
+ end
563
+
564
+ promise
565
+ end
566
+
567
+ #
568
+ # Sets the state of the virtual machine to generalized.
569
+ #
570
+ # @param resource_group_name [String] The name of the resource group.
571
+ # @param vm_name [String] The name of the virtual machine.
572
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
573
+ # will be added to the HTTP request.
574
+ #
575
+ #
576
+ def generalize(resource_group_name, vm_name, custom_headers:nil)
577
+ response = generalize_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
578
+ nil
579
+ end
580
+
581
+ #
582
+ # Sets the state of the virtual machine to generalized.
583
+ #
584
+ # @param resource_group_name [String] The name of the resource group.
585
+ # @param vm_name [String] The name of the virtual machine.
586
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
587
+ # will be added to the HTTP request.
588
+ #
589
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
590
+ #
591
+ def generalize_with_http_info(resource_group_name, vm_name, custom_headers:nil)
592
+ generalize_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
593
+ end
594
+
595
+ #
596
+ # Sets the state of the virtual machine to generalized.
597
+ #
598
+ # @param resource_group_name [String] The name of the resource group.
599
+ # @param vm_name [String] The name of the virtual machine.
600
+ # @param [Hash{String => String}] A hash of custom headers that will be added
601
+ # to the HTTP request.
602
+ #
603
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
604
+ #
605
+ def generalize_async(resource_group_name, vm_name, custom_headers:nil)
606
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
607
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
608
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
609
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
610
+
611
+
612
+ request_headers = {}
613
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
614
+
615
+ # Set Headers
616
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
617
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
618
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'
619
+
620
+ request_url = @base_url || @client.base_url
621
+
622
+ options = {
623
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
624
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
625
+ query_params: {'api-version' => @client.api_version},
626
+ headers: request_headers.merge(custom_headers || {}),
627
+ base_url: request_url
628
+ }
629
+ promise = @client.make_request_async(:post, path_template, options)
630
+
631
+ promise = promise.then do |result|
632
+ http_response = result.response
633
+ status_code = http_response.status
634
+ response_content = http_response.body
635
+ unless status_code == 200
636
+ error_model = JSON.load(response_content)
637
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
638
+ end
639
+
640
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
641
+
642
+ result
643
+ end
644
+
645
+ promise.execute
646
+ end
647
+
648
+ #
649
+ # Lists all of the virtual machines in the specified resource group. Use the
650
+ # nextLink property in the response to get the next page of virtual machines.
651
+ #
652
+ # @param resource_group_name [String] The name of the resource group.
653
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
654
+ # will be added to the HTTP request.
655
+ #
656
+ # @return [Array<VirtualMachine>] operation results.
657
+ #
658
+ def list(resource_group_name, custom_headers:nil)
659
+ first_page = list_as_lazy(resource_group_name, custom_headers:custom_headers)
660
+ first_page.get_all_items
661
+ end
662
+
663
+ #
664
+ # Lists all of the virtual machines in the specified resource group. Use the
665
+ # nextLink property in the response to get the next page of virtual machines.
666
+ #
667
+ # @param resource_group_name [String] The name of the resource group.
668
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
669
+ # will be added to the HTTP request.
670
+ #
671
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
672
+ #
673
+ def list_with_http_info(resource_group_name, custom_headers:nil)
674
+ list_async(resource_group_name, custom_headers:custom_headers).value!
675
+ end
676
+
677
+ #
678
+ # Lists all of the virtual machines in the specified resource group. Use the
679
+ # nextLink property in the response to get the next page of virtual machines.
680
+ #
681
+ # @param resource_group_name [String] The name of the resource group.
682
+ # @param [Hash{String => String}] A hash of custom headers that will be added
683
+ # to the HTTP request.
684
+ #
685
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
686
+ #
687
+ def list_async(resource_group_name, custom_headers:nil)
688
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
689
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
690
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
691
+
692
+
693
+ request_headers = {}
694
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
695
+
696
+ # Set Headers
697
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
698
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
699
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'
700
+
701
+ request_url = @base_url || @client.base_url
702
+
703
+ options = {
704
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
705
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
706
+ query_params: {'api-version' => @client.api_version},
707
+ headers: request_headers.merge(custom_headers || {}),
708
+ base_url: request_url
709
+ }
710
+ promise = @client.make_request_async(:get, path_template, options)
711
+
712
+ promise = promise.then do |result|
713
+ http_response = result.response
714
+ status_code = http_response.status
715
+ response_content = http_response.body
716
+ unless status_code == 200
717
+ error_model = JSON.load(response_content)
718
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
719
+ end
720
+
721
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
722
+ # Deserialize Response
723
+ if status_code == 200
724
+ begin
725
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
726
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineListResult.mapper()
727
+ result.body = @client.deserialize(result_mapper, parsed_response)
728
+ rescue Exception => e
729
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
730
+ end
731
+ end
732
+
733
+ result
734
+ end
735
+
736
+ promise.execute
737
+ end
738
+
739
+ #
740
+ # Lists all of the virtual machines in the specified subscription. Use the
741
+ # nextLink property in the response to get the next page of virtual machines.
742
+ #
743
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
744
+ # will be added to the HTTP request.
745
+ #
746
+ # @return [Array<VirtualMachine>] operation results.
747
+ #
748
+ def list_all(custom_headers:nil)
749
+ first_page = list_all_as_lazy(custom_headers:custom_headers)
750
+ first_page.get_all_items
751
+ end
752
+
753
+ #
754
+ # Lists all of the virtual machines in the specified subscription. Use the
755
+ # nextLink property in the response to get the next page of virtual machines.
756
+ #
757
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
758
+ # will be added to the HTTP request.
759
+ #
760
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
761
+ #
762
+ def list_all_with_http_info(custom_headers:nil)
763
+ list_all_async(custom_headers:custom_headers).value!
764
+ end
765
+
766
+ #
767
+ # Lists all of the virtual machines in the specified subscription. Use the
768
+ # nextLink property in the response to get the next page of virtual machines.
769
+ #
770
+ # @param [Hash{String => String}] A hash of custom headers that will be added
771
+ # to the HTTP request.
772
+ #
773
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
774
+ #
775
+ def list_all_async(custom_headers:nil)
776
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
777
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
778
+
779
+
780
+ request_headers = {}
781
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
782
+
783
+ # Set Headers
784
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
785
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
786
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'
787
+
788
+ request_url = @base_url || @client.base_url
789
+
790
+ options = {
791
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
792
+ path_params: {'subscriptionId' => @client.subscription_id},
793
+ query_params: {'api-version' => @client.api_version},
794
+ headers: request_headers.merge(custom_headers || {}),
795
+ base_url: request_url
796
+ }
797
+ promise = @client.make_request_async(:get, path_template, options)
798
+
799
+ promise = promise.then do |result|
800
+ http_response = result.response
801
+ status_code = http_response.status
802
+ response_content = http_response.body
803
+ unless status_code == 200
804
+ error_model = JSON.load(response_content)
805
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
806
+ end
807
+
808
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
809
+ # Deserialize Response
810
+ if status_code == 200
811
+ begin
812
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
813
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineListResult.mapper()
814
+ result.body = @client.deserialize(result_mapper, parsed_response)
815
+ rescue Exception => e
816
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
817
+ end
818
+ end
819
+
820
+ result
821
+ end
822
+
823
+ promise.execute
824
+ end
825
+
826
+ #
827
+ # Lists all available virtual machine sizes to which the specified virtual
828
+ # machine can be resized.
829
+ #
830
+ # @param resource_group_name [String] The name of the resource group.
831
+ # @param vm_name [String] The name of the virtual machine.
832
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
833
+ # will be added to the HTTP request.
834
+ #
835
+ # @return [VirtualMachineSizeListResult] operation results.
836
+ #
837
+ def list_available_sizes(resource_group_name, vm_name, custom_headers:nil)
838
+ response = list_available_sizes_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
839
+ response.body unless response.nil?
840
+ end
841
+
842
+ #
843
+ # Lists all available virtual machine sizes to which the specified virtual
844
+ # machine can be resized.
845
+ #
846
+ # @param resource_group_name [String] The name of the resource group.
847
+ # @param vm_name [String] The name of the virtual machine.
848
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
849
+ # will be added to the HTTP request.
850
+ #
851
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
852
+ #
853
+ def list_available_sizes_with_http_info(resource_group_name, vm_name, custom_headers:nil)
854
+ list_available_sizes_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
855
+ end
856
+
857
+ #
858
+ # Lists all available virtual machine sizes to which the specified virtual
859
+ # machine can be resized.
860
+ #
861
+ # @param resource_group_name [String] The name of the resource group.
862
+ # @param vm_name [String] The name of the virtual machine.
863
+ # @param [Hash{String => String}] A hash of custom headers that will be added
864
+ # to the HTTP request.
865
+ #
866
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
867
+ #
868
+ def list_available_sizes_async(resource_group_name, vm_name, custom_headers:nil)
869
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
870
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
871
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
872
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
873
+
874
+
875
+ request_headers = {}
876
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
877
+
878
+ # Set Headers
879
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
880
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
881
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'
882
+
883
+ request_url = @base_url || @client.base_url
884
+
885
+ options = {
886
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
887
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
888
+ query_params: {'api-version' => @client.api_version},
889
+ headers: request_headers.merge(custom_headers || {}),
890
+ base_url: request_url
891
+ }
892
+ promise = @client.make_request_async(:get, path_template, options)
893
+
894
+ promise = promise.then do |result|
895
+ http_response = result.response
896
+ status_code = http_response.status
897
+ response_content = http_response.body
898
+ unless status_code == 200
899
+ error_model = JSON.load(response_content)
900
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
901
+ end
902
+
903
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
904
+ # Deserialize Response
905
+ if status_code == 200
906
+ begin
907
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
908
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineSizeListResult.mapper()
909
+ result.body = @client.deserialize(result_mapper, parsed_response)
910
+ rescue Exception => e
911
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
912
+ end
913
+ end
914
+
915
+ result
916
+ end
917
+
918
+ promise.execute
919
+ end
920
+
921
+ #
922
+ # The operation to power off (stop) a virtual machine. The virtual machine can
923
+ # be restarted with the same provisioned resources. You are still charged for
924
+ # this virtual machine.
925
+ #
926
+ # @param resource_group_name [String] The name of the resource group.
927
+ # @param vm_name [String] The name of the virtual machine.
928
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
929
+ # will be added to the HTTP request.
930
+ #
931
+ def power_off(resource_group_name, vm_name, custom_headers:nil)
932
+ response = power_off_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
933
+ nil
934
+ end
935
+
936
+ #
937
+ # @param resource_group_name [String] The name of the resource group.
938
+ # @param vm_name [String] The name of the virtual machine.
939
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
940
+ # will be added to the HTTP request.
941
+ #
942
+ # @return [Concurrent::Promise] promise which provides async access to http
943
+ # response.
944
+ #
945
+ def power_off_async(resource_group_name, vm_name, custom_headers:nil)
946
+ # Send request
947
+ promise = begin_power_off_async(resource_group_name, vm_name, custom_headers:custom_headers)
948
+
949
+ promise = promise.then do |response|
950
+ # Defining deserialization method.
951
+ deserialize_method = lambda do |parsed_response|
952
+ end
953
+
954
+ # Waiting for response.
955
+ @client.get_long_running_operation_result(response, deserialize_method)
956
+ end
957
+
958
+ promise
959
+ end
960
+
961
+ #
962
+ # The operation to restart a virtual machine.
963
+ #
964
+ # @param resource_group_name [String] The name of the resource group.
965
+ # @param vm_name [String] The name of the virtual machine.
966
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
967
+ # will be added to the HTTP request.
968
+ #
969
+ def restart(resource_group_name, vm_name, custom_headers:nil)
970
+ response = restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
971
+ nil
972
+ end
973
+
974
+ #
975
+ # @param resource_group_name [String] The name of the resource group.
976
+ # @param vm_name [String] The name of the virtual machine.
977
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
978
+ # will be added to the HTTP request.
979
+ #
980
+ # @return [Concurrent::Promise] promise which provides async access to http
981
+ # response.
982
+ #
983
+ def restart_async(resource_group_name, vm_name, custom_headers:nil)
984
+ # Send request
985
+ promise = begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers)
986
+
987
+ promise = promise.then do |response|
988
+ # Defining deserialization method.
989
+ deserialize_method = lambda do |parsed_response|
990
+ end
991
+
992
+ # Waiting for response.
993
+ @client.get_long_running_operation_result(response, deserialize_method)
994
+ end
995
+
996
+ promise
997
+ end
998
+
999
+ #
1000
+ # The operation to start a virtual machine.
1001
+ #
1002
+ # @param resource_group_name [String] The name of the resource group.
1003
+ # @param vm_name [String] The name of the virtual machine.
1004
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1005
+ # will be added to the HTTP request.
1006
+ #
1007
+ def start(resource_group_name, vm_name, custom_headers:nil)
1008
+ response = start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1009
+ nil
1010
+ end
1011
+
1012
+ #
1013
+ # @param resource_group_name [String] The name of the resource group.
1014
+ # @param vm_name [String] The name of the virtual machine.
1015
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1016
+ # will be added to the HTTP request.
1017
+ #
1018
+ # @return [Concurrent::Promise] promise which provides async access to http
1019
+ # response.
1020
+ #
1021
+ def start_async(resource_group_name, vm_name, custom_headers:nil)
1022
+ # Send request
1023
+ promise = begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers)
1024
+
1025
+ promise = promise.then do |response|
1026
+ # Defining deserialization method.
1027
+ deserialize_method = lambda do |parsed_response|
1028
+ end
1029
+
1030
+ # Waiting for response.
1031
+ @client.get_long_running_operation_result(response, deserialize_method)
1032
+ end
1033
+
1034
+ promise
1035
+ end
1036
+
1037
+ #
1038
+ # The operation to redeploy a virtual machine.
1039
+ #
1040
+ # @param resource_group_name [String] The name of the resource group.
1041
+ # @param vm_name [String] The name of the virtual machine.
1042
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1043
+ # will be added to the HTTP request.
1044
+ #
1045
+ def redeploy(resource_group_name, vm_name, custom_headers:nil)
1046
+ response = redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1047
+ nil
1048
+ end
1049
+
1050
+ #
1051
+ # @param resource_group_name [String] The name of the resource group.
1052
+ # @param vm_name [String] The name of the virtual machine.
1053
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1054
+ # will be added to the HTTP request.
1055
+ #
1056
+ # @return [Concurrent::Promise] promise which provides async access to http
1057
+ # response.
1058
+ #
1059
+ def redeploy_async(resource_group_name, vm_name, custom_headers:nil)
1060
+ # Send request
1061
+ promise = begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers)
1062
+
1063
+ promise = promise.then do |response|
1064
+ # Defining deserialization method.
1065
+ deserialize_method = lambda do |parsed_response|
1066
+ end
1067
+
1068
+ # Waiting for response.
1069
+ @client.get_long_running_operation_result(response, deserialize_method)
1070
+ end
1071
+
1072
+ promise
1073
+ end
1074
+
1075
+ #
1076
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
1077
+ # initial state.
1078
+ #
1079
+ # @param resource_group_name [String] The name of the resource group.
1080
+ # @param vm_name [String] The name of the virtual machine.
1081
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
1082
+ # the Reimage Virtual Machine operation.
1083
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1084
+ # will be added to the HTTP request.
1085
+ #
1086
+ def reimage(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
1087
+ response = reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers).value!
1088
+ nil
1089
+ end
1090
+
1091
+ #
1092
+ # @param resource_group_name [String] The name of the resource group.
1093
+ # @param vm_name [String] The name of the virtual machine.
1094
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
1095
+ # the Reimage Virtual Machine operation.
1096
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1097
+ # will be added to the HTTP request.
1098
+ #
1099
+ # @return [Concurrent::Promise] promise which provides async access to http
1100
+ # response.
1101
+ #
1102
+ def reimage_async(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
1103
+ # Send request
1104
+ promise = begin_reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers)
1105
+
1106
+ promise = promise.then do |response|
1107
+ # Defining deserialization method.
1108
+ deserialize_method = lambda do |parsed_response|
1109
+ end
1110
+
1111
+ # Waiting for response.
1112
+ @client.get_long_running_operation_result(response, deserialize_method)
1113
+ end
1114
+
1115
+ promise
1116
+ end
1117
+
1118
+ #
1119
+ # The operation to perform maintenance on a virtual machine.
1120
+ #
1121
+ # @param resource_group_name [String] The name of the resource group.
1122
+ # @param vm_name [String] The name of the virtual machine.
1123
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1124
+ # will be added to the HTTP request.
1125
+ #
1126
+ def perform_maintenance(resource_group_name, vm_name, custom_headers:nil)
1127
+ response = perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1128
+ nil
1129
+ end
1130
+
1131
+ #
1132
+ # @param resource_group_name [String] The name of the resource group.
1133
+ # @param vm_name [String] The name of the virtual machine.
1134
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1135
+ # will be added to the HTTP request.
1136
+ #
1137
+ # @return [Concurrent::Promise] promise which provides async access to http
1138
+ # response.
1139
+ #
1140
+ def perform_maintenance_async(resource_group_name, vm_name, custom_headers:nil)
1141
+ # Send request
1142
+ promise = begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers)
1143
+
1144
+ promise = promise.then do |response|
1145
+ # Defining deserialization method.
1146
+ deserialize_method = lambda do |parsed_response|
1147
+ end
1148
+
1149
+ # Waiting for response.
1150
+ @client.get_long_running_operation_result(response, deserialize_method)
1151
+ end
1152
+
1153
+ promise
1154
+ end
1155
+
1156
+ #
1157
+ # Run command on the VM.
1158
+ #
1159
+ # @param resource_group_name [String] The name of the resource group.
1160
+ # @param vm_name [String] The name of the virtual machine.
1161
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
1162
+ # operation.
1163
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1164
+ # will be added to the HTTP request.
1165
+ #
1166
+ # @return [RunCommandResult] operation results.
1167
+ #
1168
+ def run_command(resource_group_name, vm_name, parameters, custom_headers:nil)
1169
+ response = run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1170
+ response.body unless response.nil?
1171
+ end
1172
+
1173
+ #
1174
+ # @param resource_group_name [String] The name of the resource group.
1175
+ # @param vm_name [String] The name of the virtual machine.
1176
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
1177
+ # operation.
1178
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1179
+ # will be added to the HTTP request.
1180
+ #
1181
+ # @return [Concurrent::Promise] promise which provides async access to http
1182
+ # response.
1183
+ #
1184
+ def run_command_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1185
+ # Send request
1186
+ promise = begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers)
1187
+
1188
+ promise = promise.then do |response|
1189
+ # Defining deserialization method.
1190
+ deserialize_method = lambda do |parsed_response|
1191
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::RunCommandResult.mapper()
1192
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
1193
+ end
1194
+
1195
+ # Waiting for response.
1196
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
1197
+ end
1198
+
1199
+ promise
1200
+ end
1201
+
1202
+ #
1203
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1204
+ # template that can be used to create similar VMs.
1205
+ #
1206
+ # @param resource_group_name [String] The name of the resource group.
1207
+ # @param vm_name [String] The name of the virtual machine.
1208
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1209
+ # the Capture Virtual Machine operation.
1210
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1211
+ # will be added to the HTTP request.
1212
+ #
1213
+ # @return [VirtualMachineCaptureResult] operation results.
1214
+ #
1215
+ def begin_capture(resource_group_name, vm_name, parameters, custom_headers:nil)
1216
+ response = begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1217
+ response.body unless response.nil?
1218
+ end
1219
+
1220
+ #
1221
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1222
+ # template that can be used to create similar VMs.
1223
+ #
1224
+ # @param resource_group_name [String] The name of the resource group.
1225
+ # @param vm_name [String] The name of the virtual machine.
1226
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1227
+ # the Capture Virtual Machine operation.
1228
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1229
+ # will be added to the HTTP request.
1230
+ #
1231
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1232
+ #
1233
+ def begin_capture_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1234
+ begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1235
+ end
1236
+
1237
+ #
1238
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1239
+ # template that can be used to create similar VMs.
1240
+ #
1241
+ # @param resource_group_name [String] The name of the resource group.
1242
+ # @param vm_name [String] The name of the virtual machine.
1243
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1244
+ # the Capture Virtual Machine operation.
1245
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1246
+ # to the HTTP request.
1247
+ #
1248
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1249
+ #
1250
+ def begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1251
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1252
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1253
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1254
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1255
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1256
+
1257
+
1258
+ request_headers = {}
1259
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1260
+
1261
+ # Set Headers
1262
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1263
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1264
+
1265
+ # Serialize Request
1266
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineCaptureParameters.mapper()
1267
+ request_content = @client.serialize(request_mapper, parameters)
1268
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1269
+
1270
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'
1271
+
1272
+ request_url = @base_url || @client.base_url
1273
+
1274
+ options = {
1275
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1276
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1277
+ query_params: {'api-version' => @client.api_version},
1278
+ body: request_content,
1279
+ headers: request_headers.merge(custom_headers || {}),
1280
+ base_url: request_url
1281
+ }
1282
+ promise = @client.make_request_async(:post, path_template, options)
1283
+
1284
+ promise = promise.then do |result|
1285
+ http_response = result.response
1286
+ status_code = http_response.status
1287
+ response_content = http_response.body
1288
+ unless status_code == 200 || status_code == 202
1289
+ error_model = JSON.load(response_content)
1290
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1291
+ end
1292
+
1293
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1294
+ # Deserialize Response
1295
+ if status_code == 200
1296
+ begin
1297
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1298
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineCaptureResult.mapper()
1299
+ result.body = @client.deserialize(result_mapper, parsed_response)
1300
+ rescue Exception => e
1301
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1302
+ end
1303
+ end
1304
+
1305
+ result
1306
+ end
1307
+
1308
+ promise.execute
1309
+ end
1310
+
1311
+ #
1312
+ # The operation to create or update a virtual machine.
1313
+ #
1314
+ # @param resource_group_name [String] The name of the resource group.
1315
+ # @param vm_name [String] The name of the virtual machine.
1316
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1317
+ # Machine operation.
1318
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1319
+ # will be added to the HTTP request.
1320
+ #
1321
+ # @return [VirtualMachine] operation results.
1322
+ #
1323
+ def begin_create_or_update(resource_group_name, vm_name, parameters, custom_headers:nil)
1324
+ response = begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1325
+ response.body unless response.nil?
1326
+ end
1327
+
1328
+ #
1329
+ # The operation to create or update a virtual machine.
1330
+ #
1331
+ # @param resource_group_name [String] The name of the resource group.
1332
+ # @param vm_name [String] The name of the virtual machine.
1333
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1334
+ # Machine operation.
1335
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1336
+ # will be added to the HTTP request.
1337
+ #
1338
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1339
+ #
1340
+ def begin_create_or_update_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1341
+ begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1342
+ end
1343
+
1344
+ #
1345
+ # The operation to create or update a virtual machine.
1346
+ #
1347
+ # @param resource_group_name [String] The name of the resource group.
1348
+ # @param vm_name [String] The name of the virtual machine.
1349
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1350
+ # Machine operation.
1351
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1352
+ # to the HTTP request.
1353
+ #
1354
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1355
+ #
1356
+ def begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1357
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1358
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1359
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1360
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1361
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1362
+
1363
+
1364
+ request_headers = {}
1365
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1366
+
1367
+ # Set Headers
1368
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1369
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1370
+
1371
+ # Serialize Request
1372
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachine.mapper()
1373
+ request_content = @client.serialize(request_mapper, parameters)
1374
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1375
+
1376
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1377
+
1378
+ request_url = @base_url || @client.base_url
1379
+
1380
+ options = {
1381
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1382
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1383
+ query_params: {'api-version' => @client.api_version},
1384
+ body: request_content,
1385
+ headers: request_headers.merge(custom_headers || {}),
1386
+ base_url: request_url
1387
+ }
1388
+ promise = @client.make_request_async(:put, path_template, options)
1389
+
1390
+ promise = promise.then do |result|
1391
+ http_response = result.response
1392
+ status_code = http_response.status
1393
+ response_content = http_response.body
1394
+ unless status_code == 200 || status_code == 201
1395
+ error_model = JSON.load(response_content)
1396
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1397
+ end
1398
+
1399
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1400
+ # Deserialize Response
1401
+ if status_code == 200
1402
+ begin
1403
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1404
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachine.mapper()
1405
+ result.body = @client.deserialize(result_mapper, parsed_response)
1406
+ rescue Exception => e
1407
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1408
+ end
1409
+ end
1410
+ # Deserialize Response
1411
+ if status_code == 201
1412
+ begin
1413
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1414
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachine.mapper()
1415
+ result.body = @client.deserialize(result_mapper, parsed_response)
1416
+ rescue Exception => e
1417
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1418
+ end
1419
+ end
1420
+
1421
+ result
1422
+ end
1423
+
1424
+ promise.execute
1425
+ end
1426
+
1427
+ #
1428
+ # The operation to update a virtual machine.
1429
+ #
1430
+ # @param resource_group_name [String] The name of the resource group.
1431
+ # @param vm_name [String] The name of the virtual machine.
1432
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1433
+ # Virtual Machine operation.
1434
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1435
+ # will be added to the HTTP request.
1436
+ #
1437
+ # @return [VirtualMachine] operation results.
1438
+ #
1439
+ def begin_update(resource_group_name, vm_name, parameters, custom_headers:nil)
1440
+ response = begin_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1441
+ response.body unless response.nil?
1442
+ end
1443
+
1444
+ #
1445
+ # The operation to update a virtual machine.
1446
+ #
1447
+ # @param resource_group_name [String] The name of the resource group.
1448
+ # @param vm_name [String] The name of the virtual machine.
1449
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1450
+ # Virtual Machine operation.
1451
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1452
+ # will be added to the HTTP request.
1453
+ #
1454
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1455
+ #
1456
+ def begin_update_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1457
+ begin_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1458
+ end
1459
+
1460
+ #
1461
+ # The operation to update a virtual machine.
1462
+ #
1463
+ # @param resource_group_name [String] The name of the resource group.
1464
+ # @param vm_name [String] The name of the virtual machine.
1465
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1466
+ # Virtual Machine operation.
1467
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1468
+ # to the HTTP request.
1469
+ #
1470
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1471
+ #
1472
+ def begin_update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1473
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1474
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1475
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1476
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1477
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1478
+
1479
+
1480
+ request_headers = {}
1481
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1482
+
1483
+ # Set Headers
1484
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1485
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1486
+
1487
+ # Serialize Request
1488
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineUpdate.mapper()
1489
+ request_content = @client.serialize(request_mapper, parameters)
1490
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1491
+
1492
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1493
+
1494
+ request_url = @base_url || @client.base_url
1495
+
1496
+ options = {
1497
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1498
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1499
+ query_params: {'api-version' => @client.api_version},
1500
+ body: request_content,
1501
+ headers: request_headers.merge(custom_headers || {}),
1502
+ base_url: request_url
1503
+ }
1504
+ promise = @client.make_request_async(:patch, path_template, options)
1505
+
1506
+ promise = promise.then do |result|
1507
+ http_response = result.response
1508
+ status_code = http_response.status
1509
+ response_content = http_response.body
1510
+ unless status_code == 200 || status_code == 201
1511
+ error_model = JSON.load(response_content)
1512
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1513
+ end
1514
+
1515
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1516
+ # Deserialize Response
1517
+ if status_code == 200
1518
+ begin
1519
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1520
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachine.mapper()
1521
+ result.body = @client.deserialize(result_mapper, parsed_response)
1522
+ rescue Exception => e
1523
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1524
+ end
1525
+ end
1526
+ # Deserialize Response
1527
+ if status_code == 201
1528
+ begin
1529
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1530
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachine.mapper()
1531
+ result.body = @client.deserialize(result_mapper, parsed_response)
1532
+ rescue Exception => e
1533
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1534
+ end
1535
+ end
1536
+
1537
+ result
1538
+ end
1539
+
1540
+ promise.execute
1541
+ end
1542
+
1543
+ #
1544
+ # The operation to delete a virtual machine.
1545
+ #
1546
+ # @param resource_group_name [String] The name of the resource group.
1547
+ # @param vm_name [String] The name of the virtual machine.
1548
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1549
+ # will be added to the HTTP request.
1550
+ #
1551
+ #
1552
+ def begin_delete(resource_group_name, vm_name, custom_headers:nil)
1553
+ response = begin_delete_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1554
+ nil
1555
+ end
1556
+
1557
+ #
1558
+ # The operation to delete a virtual machine.
1559
+ #
1560
+ # @param resource_group_name [String] The name of the resource group.
1561
+ # @param vm_name [String] The name of the virtual machine.
1562
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1563
+ # will be added to the HTTP request.
1564
+ #
1565
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1566
+ #
1567
+ def begin_delete_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1568
+ begin_delete_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1569
+ end
1570
+
1571
+ #
1572
+ # The operation to delete a virtual machine.
1573
+ #
1574
+ # @param resource_group_name [String] The name of the resource group.
1575
+ # @param vm_name [String] The name of the virtual machine.
1576
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1577
+ # to the HTTP request.
1578
+ #
1579
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1580
+ #
1581
+ def begin_delete_async(resource_group_name, vm_name, custom_headers:nil)
1582
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1583
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1584
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1585
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1586
+
1587
+
1588
+ request_headers = {}
1589
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1590
+
1591
+ # Set Headers
1592
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1593
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1594
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1595
+
1596
+ request_url = @base_url || @client.base_url
1597
+
1598
+ options = {
1599
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1600
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1601
+ query_params: {'api-version' => @client.api_version},
1602
+ headers: request_headers.merge(custom_headers || {}),
1603
+ base_url: request_url
1604
+ }
1605
+ promise = @client.make_request_async(:delete, path_template, options)
1606
+
1607
+ promise = promise.then do |result|
1608
+ http_response = result.response
1609
+ status_code = http_response.status
1610
+ response_content = http_response.body
1611
+ unless status_code == 200 || status_code == 202 || status_code == 204
1612
+ error_model = JSON.load(response_content)
1613
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1614
+ end
1615
+
1616
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1617
+
1618
+ result
1619
+ end
1620
+
1621
+ promise.execute
1622
+ end
1623
+
1624
+ #
1625
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1626
+ # machine must be stop-deallocated before invoking this operation.
1627
+ #
1628
+ # @param resource_group_name [String] The name of the resource group.
1629
+ # @param vm_name [String] The name of the virtual machine.
1630
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1631
+ # will be added to the HTTP request.
1632
+ #
1633
+ #
1634
+ def begin_convert_to_managed_disks(resource_group_name, vm_name, custom_headers:nil)
1635
+ response = begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1636
+ nil
1637
+ end
1638
+
1639
+ #
1640
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1641
+ # machine must be stop-deallocated before invoking this operation.
1642
+ #
1643
+ # @param resource_group_name [String] The name of the resource group.
1644
+ # @param vm_name [String] The name of the virtual machine.
1645
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1646
+ # will be added to the HTTP request.
1647
+ #
1648
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1649
+ #
1650
+ def begin_convert_to_managed_disks_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1651
+ begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1652
+ end
1653
+
1654
+ #
1655
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1656
+ # machine must be stop-deallocated before invoking this operation.
1657
+ #
1658
+ # @param resource_group_name [String] The name of the resource group.
1659
+ # @param vm_name [String] The name of the virtual machine.
1660
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1661
+ # to the HTTP request.
1662
+ #
1663
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1664
+ #
1665
+ def begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:nil)
1666
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1667
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1668
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1669
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1670
+
1671
+
1672
+ request_headers = {}
1673
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1674
+
1675
+ # Set Headers
1676
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1677
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1678
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'
1679
+
1680
+ request_url = @base_url || @client.base_url
1681
+
1682
+ options = {
1683
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1684
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1685
+ query_params: {'api-version' => @client.api_version},
1686
+ headers: request_headers.merge(custom_headers || {}),
1687
+ base_url: request_url
1688
+ }
1689
+ promise = @client.make_request_async(:post, path_template, options)
1690
+
1691
+ promise = promise.then do |result|
1692
+ http_response = result.response
1693
+ status_code = http_response.status
1694
+ response_content = http_response.body
1695
+ unless status_code == 200 || status_code == 202
1696
+ error_model = JSON.load(response_content)
1697
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1698
+ end
1699
+
1700
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1701
+
1702
+ result
1703
+ end
1704
+
1705
+ promise.execute
1706
+ end
1707
+
1708
+ #
1709
+ # Shuts down the virtual machine and releases the compute resources. You are
1710
+ # not billed for the compute resources that this virtual machine uses.
1711
+ #
1712
+ # @param resource_group_name [String] The name of the resource group.
1713
+ # @param vm_name [String] The name of the virtual machine.
1714
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1715
+ # will be added to the HTTP request.
1716
+ #
1717
+ #
1718
+ def begin_deallocate(resource_group_name, vm_name, custom_headers:nil)
1719
+ response = begin_deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1720
+ nil
1721
+ end
1722
+
1723
+ #
1724
+ # Shuts down the virtual machine and releases the compute resources. You are
1725
+ # not billed for the compute resources that this virtual machine uses.
1726
+ #
1727
+ # @param resource_group_name [String] The name of the resource group.
1728
+ # @param vm_name [String] The name of the virtual machine.
1729
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1730
+ # will be added to the HTTP request.
1731
+ #
1732
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1733
+ #
1734
+ def begin_deallocate_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1735
+ begin_deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1736
+ end
1737
+
1738
+ #
1739
+ # Shuts down the virtual machine and releases the compute resources. You are
1740
+ # not billed for the compute resources that this virtual machine uses.
1741
+ #
1742
+ # @param resource_group_name [String] The name of the resource group.
1743
+ # @param vm_name [String] The name of the virtual machine.
1744
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1745
+ # to the HTTP request.
1746
+ #
1747
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1748
+ #
1749
+ def begin_deallocate_async(resource_group_name, vm_name, custom_headers:nil)
1750
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1751
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1752
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1753
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1754
+
1755
+
1756
+ request_headers = {}
1757
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1758
+
1759
+ # Set Headers
1760
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1761
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1762
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'
1763
+
1764
+ request_url = @base_url || @client.base_url
1765
+
1766
+ options = {
1767
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1768
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1769
+ query_params: {'api-version' => @client.api_version},
1770
+ headers: request_headers.merge(custom_headers || {}),
1771
+ base_url: request_url
1772
+ }
1773
+ promise = @client.make_request_async(:post, path_template, options)
1774
+
1775
+ promise = promise.then do |result|
1776
+ http_response = result.response
1777
+ status_code = http_response.status
1778
+ response_content = http_response.body
1779
+ unless status_code == 200 || status_code == 202
1780
+ error_model = JSON.load(response_content)
1781
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1782
+ end
1783
+
1784
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1785
+
1786
+ result
1787
+ end
1788
+
1789
+ promise.execute
1790
+ end
1791
+
1792
+ #
1793
+ # The operation to power off (stop) a virtual machine. The virtual machine can
1794
+ # be restarted with the same provisioned resources. You are still charged for
1795
+ # this virtual machine.
1796
+ #
1797
+ # @param resource_group_name [String] The name of the resource group.
1798
+ # @param vm_name [String] The name of the virtual machine.
1799
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1800
+ # will be added to the HTTP request.
1801
+ #
1802
+ #
1803
+ def begin_power_off(resource_group_name, vm_name, custom_headers:nil)
1804
+ response = begin_power_off_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1805
+ nil
1806
+ end
1807
+
1808
+ #
1809
+ # The operation to power off (stop) a virtual machine. The virtual machine can
1810
+ # be restarted with the same provisioned resources. You are still charged for
1811
+ # this virtual machine.
1812
+ #
1813
+ # @param resource_group_name [String] The name of the resource group.
1814
+ # @param vm_name [String] The name of the virtual machine.
1815
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1816
+ # will be added to the HTTP request.
1817
+ #
1818
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1819
+ #
1820
+ def begin_power_off_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1821
+ begin_power_off_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1822
+ end
1823
+
1824
+ #
1825
+ # The operation to power off (stop) a virtual machine. The virtual machine can
1826
+ # be restarted with the same provisioned resources. You are still charged for
1827
+ # this virtual machine.
1828
+ #
1829
+ # @param resource_group_name [String] The name of the resource group.
1830
+ # @param vm_name [String] The name of the virtual machine.
1831
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1832
+ # to the HTTP request.
1833
+ #
1834
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1835
+ #
1836
+ def begin_power_off_async(resource_group_name, vm_name, custom_headers:nil)
1837
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1838
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1839
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1840
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1841
+
1842
+
1843
+ request_headers = {}
1844
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1845
+
1846
+ # Set Headers
1847
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1848
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1849
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'
1850
+
1851
+ request_url = @base_url || @client.base_url
1852
+
1853
+ options = {
1854
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1855
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1856
+ query_params: {'api-version' => @client.api_version},
1857
+ headers: request_headers.merge(custom_headers || {}),
1858
+ base_url: request_url
1859
+ }
1860
+ promise = @client.make_request_async(:post, path_template, options)
1861
+
1862
+ promise = promise.then do |result|
1863
+ http_response = result.response
1864
+ status_code = http_response.status
1865
+ response_content = http_response.body
1866
+ unless status_code == 200 || status_code == 202
1867
+ error_model = JSON.load(response_content)
1868
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1869
+ end
1870
+
1871
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1872
+
1873
+ result
1874
+ end
1875
+
1876
+ promise.execute
1877
+ end
1878
+
1879
+ #
1880
+ # The operation to restart a virtual machine.
1881
+ #
1882
+ # @param resource_group_name [String] The name of the resource group.
1883
+ # @param vm_name [String] The name of the virtual machine.
1884
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1885
+ # will be added to the HTTP request.
1886
+ #
1887
+ #
1888
+ def begin_restart(resource_group_name, vm_name, custom_headers:nil)
1889
+ response = begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1890
+ nil
1891
+ end
1892
+
1893
+ #
1894
+ # The operation to restart a virtual machine.
1895
+ #
1896
+ # @param resource_group_name [String] The name of the resource group.
1897
+ # @param vm_name [String] The name of the virtual machine.
1898
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1899
+ # will be added to the HTTP request.
1900
+ #
1901
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1902
+ #
1903
+ def begin_restart_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1904
+ begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1905
+ end
1906
+
1907
+ #
1908
+ # The operation to restart a virtual machine.
1909
+ #
1910
+ # @param resource_group_name [String] The name of the resource group.
1911
+ # @param vm_name [String] The name of the virtual machine.
1912
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1913
+ # to the HTTP request.
1914
+ #
1915
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1916
+ #
1917
+ def begin_restart_async(resource_group_name, vm_name, custom_headers:nil)
1918
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1919
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1920
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1921
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1922
+
1923
+
1924
+ request_headers = {}
1925
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1926
+
1927
+ # Set Headers
1928
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1929
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1930
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'
1931
+
1932
+ request_url = @base_url || @client.base_url
1933
+
1934
+ options = {
1935
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1936
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1937
+ query_params: {'api-version' => @client.api_version},
1938
+ headers: request_headers.merge(custom_headers || {}),
1939
+ base_url: request_url
1940
+ }
1941
+ promise = @client.make_request_async(:post, path_template, options)
1942
+
1943
+ promise = promise.then do |result|
1944
+ http_response = result.response
1945
+ status_code = http_response.status
1946
+ response_content = http_response.body
1947
+ unless status_code == 200 || status_code == 202
1948
+ error_model = JSON.load(response_content)
1949
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1950
+ end
1951
+
1952
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1953
+
1954
+ result
1955
+ end
1956
+
1957
+ promise.execute
1958
+ end
1959
+
1960
+ #
1961
+ # The operation to start a virtual machine.
1962
+ #
1963
+ # @param resource_group_name [String] The name of the resource group.
1964
+ # @param vm_name [String] The name of the virtual machine.
1965
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1966
+ # will be added to the HTTP request.
1967
+ #
1968
+ #
1969
+ def begin_start(resource_group_name, vm_name, custom_headers:nil)
1970
+ response = begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1971
+ nil
1972
+ end
1973
+
1974
+ #
1975
+ # The operation to start a virtual machine.
1976
+ #
1977
+ # @param resource_group_name [String] The name of the resource group.
1978
+ # @param vm_name [String] The name of the virtual machine.
1979
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1980
+ # will be added to the HTTP request.
1981
+ #
1982
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1983
+ #
1984
+ def begin_start_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1985
+ begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1986
+ end
1987
+
1988
+ #
1989
+ # The operation to start a virtual machine.
1990
+ #
1991
+ # @param resource_group_name [String] The name of the resource group.
1992
+ # @param vm_name [String] The name of the virtual machine.
1993
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1994
+ # to the HTTP request.
1995
+ #
1996
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1997
+ #
1998
+ def begin_start_async(resource_group_name, vm_name, custom_headers:nil)
1999
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2000
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2001
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2002
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2003
+
2004
+
2005
+ request_headers = {}
2006
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2007
+
2008
+ # Set Headers
2009
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2010
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2011
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'
2012
+
2013
+ request_url = @base_url || @client.base_url
2014
+
2015
+ options = {
2016
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2017
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2018
+ query_params: {'api-version' => @client.api_version},
2019
+ headers: request_headers.merge(custom_headers || {}),
2020
+ base_url: request_url
2021
+ }
2022
+ promise = @client.make_request_async(:post, path_template, options)
2023
+
2024
+ promise = promise.then do |result|
2025
+ http_response = result.response
2026
+ status_code = http_response.status
2027
+ response_content = http_response.body
2028
+ unless status_code == 200 || status_code == 202
2029
+ error_model = JSON.load(response_content)
2030
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2031
+ end
2032
+
2033
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2034
+
2035
+ result
2036
+ end
2037
+
2038
+ promise.execute
2039
+ end
2040
+
2041
+ #
2042
+ # The operation to redeploy a virtual machine.
2043
+ #
2044
+ # @param resource_group_name [String] The name of the resource group.
2045
+ # @param vm_name [String] The name of the virtual machine.
2046
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2047
+ # will be added to the HTTP request.
2048
+ #
2049
+ #
2050
+ def begin_redeploy(resource_group_name, vm_name, custom_headers:nil)
2051
+ response = begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2052
+ nil
2053
+ end
2054
+
2055
+ #
2056
+ # The operation to redeploy a virtual machine.
2057
+ #
2058
+ # @param resource_group_name [String] The name of the resource group.
2059
+ # @param vm_name [String] The name of the virtual machine.
2060
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2061
+ # will be added to the HTTP request.
2062
+ #
2063
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2064
+ #
2065
+ def begin_redeploy_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2066
+ begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2067
+ end
2068
+
2069
+ #
2070
+ # The operation to redeploy a virtual machine.
2071
+ #
2072
+ # @param resource_group_name [String] The name of the resource group.
2073
+ # @param vm_name [String] The name of the virtual machine.
2074
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2075
+ # to the HTTP request.
2076
+ #
2077
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2078
+ #
2079
+ def begin_redeploy_async(resource_group_name, vm_name, custom_headers:nil)
2080
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2081
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2082
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2083
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2084
+
2085
+
2086
+ request_headers = {}
2087
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2088
+
2089
+ # Set Headers
2090
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2091
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2092
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'
2093
+
2094
+ request_url = @base_url || @client.base_url
2095
+
2096
+ options = {
2097
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2098
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2099
+ query_params: {'api-version' => @client.api_version},
2100
+ headers: request_headers.merge(custom_headers || {}),
2101
+ base_url: request_url
2102
+ }
2103
+ promise = @client.make_request_async(:post, path_template, options)
2104
+
2105
+ promise = promise.then do |result|
2106
+ http_response = result.response
2107
+ status_code = http_response.status
2108
+ response_content = http_response.body
2109
+ unless status_code == 200 || status_code == 202
2110
+ error_model = JSON.load(response_content)
2111
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2112
+ end
2113
+
2114
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2115
+
2116
+ result
2117
+ end
2118
+
2119
+ promise.execute
2120
+ end
2121
+
2122
+ #
2123
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
2124
+ # initial state.
2125
+ #
2126
+ # @param resource_group_name [String] The name of the resource group.
2127
+ # @param vm_name [String] The name of the virtual machine.
2128
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
2129
+ # the Reimage Virtual Machine operation.
2130
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2131
+ # will be added to the HTTP request.
2132
+ #
2133
+ #
2134
+ def begin_reimage(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
2135
+ response = begin_reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers).value!
2136
+ nil
2137
+ end
2138
+
2139
+ #
2140
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
2141
+ # initial state.
2142
+ #
2143
+ # @param resource_group_name [String] The name of the resource group.
2144
+ # @param vm_name [String] The name of the virtual machine.
2145
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
2146
+ # the Reimage Virtual Machine operation.
2147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2148
+ # will be added to the HTTP request.
2149
+ #
2150
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2151
+ #
2152
+ def begin_reimage_with_http_info(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
2153
+ begin_reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers).value!
2154
+ end
2155
+
2156
+ #
2157
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
2158
+ # initial state.
2159
+ #
2160
+ # @param resource_group_name [String] The name of the resource group.
2161
+ # @param vm_name [String] The name of the virtual machine.
2162
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
2163
+ # the Reimage Virtual Machine operation.
2164
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2165
+ # to the HTTP request.
2166
+ #
2167
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2168
+ #
2169
+ def begin_reimage_async(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
2170
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2171
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2172
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2173
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2174
+
2175
+
2176
+ request_headers = {}
2177
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2178
+
2179
+ # Set Headers
2180
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2181
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2182
+
2183
+ # Serialize Request
2184
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineReimageParameters.mapper()
2185
+ request_content = @client.serialize(request_mapper, parameters)
2186
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2187
+
2188
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage'
2189
+
2190
+ request_url = @base_url || @client.base_url
2191
+
2192
+ options = {
2193
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2194
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2195
+ query_params: {'api-version' => @client.api_version},
2196
+ body: request_content,
2197
+ headers: request_headers.merge(custom_headers || {}),
2198
+ base_url: request_url
2199
+ }
2200
+ promise = @client.make_request_async(:post, path_template, options)
2201
+
2202
+ promise = promise.then do |result|
2203
+ http_response = result.response
2204
+ status_code = http_response.status
2205
+ response_content = http_response.body
2206
+ unless status_code == 200 || status_code == 202
2207
+ error_model = JSON.load(response_content)
2208
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2209
+ end
2210
+
2211
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2212
+
2213
+ result
2214
+ end
2215
+
2216
+ promise.execute
2217
+ end
2218
+
2219
+ #
2220
+ # The operation to perform maintenance on a virtual machine.
2221
+ #
2222
+ # @param resource_group_name [String] The name of the resource group.
2223
+ # @param vm_name [String] The name of the virtual machine.
2224
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2225
+ # will be added to the HTTP request.
2226
+ #
2227
+ #
2228
+ def begin_perform_maintenance(resource_group_name, vm_name, custom_headers:nil)
2229
+ response = begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2230
+ nil
2231
+ end
2232
+
2233
+ #
2234
+ # The operation to perform maintenance on a virtual machine.
2235
+ #
2236
+ # @param resource_group_name [String] The name of the resource group.
2237
+ # @param vm_name [String] The name of the virtual machine.
2238
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2239
+ # will be added to the HTTP request.
2240
+ #
2241
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2242
+ #
2243
+ def begin_perform_maintenance_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2244
+ begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2245
+ end
2246
+
2247
+ #
2248
+ # The operation to perform maintenance on a virtual machine.
2249
+ #
2250
+ # @param resource_group_name [String] The name of the resource group.
2251
+ # @param vm_name [String] The name of the virtual machine.
2252
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2253
+ # to the HTTP request.
2254
+ #
2255
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2256
+ #
2257
+ def begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:nil)
2258
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2259
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2260
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2261
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2262
+
2263
+
2264
+ request_headers = {}
2265
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2266
+
2267
+ # Set Headers
2268
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2269
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2270
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'
2271
+
2272
+ request_url = @base_url || @client.base_url
2273
+
2274
+ options = {
2275
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2276
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2277
+ query_params: {'api-version' => @client.api_version},
2278
+ headers: request_headers.merge(custom_headers || {}),
2279
+ base_url: request_url
2280
+ }
2281
+ promise = @client.make_request_async(:post, path_template, options)
2282
+
2283
+ promise = promise.then do |result|
2284
+ http_response = result.response
2285
+ status_code = http_response.status
2286
+ response_content = http_response.body
2287
+ unless status_code == 200 || status_code == 202
2288
+ error_model = JSON.load(response_content)
2289
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2290
+ end
2291
+
2292
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2293
+
2294
+ result
2295
+ end
2296
+
2297
+ promise.execute
2298
+ end
2299
+
2300
+ #
2301
+ # Run command on the VM.
2302
+ #
2303
+ # @param resource_group_name [String] The name of the resource group.
2304
+ # @param vm_name [String] The name of the virtual machine.
2305
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2306
+ # operation.
2307
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2308
+ # will be added to the HTTP request.
2309
+ #
2310
+ # @return [RunCommandResult] operation results.
2311
+ #
2312
+ def begin_run_command(resource_group_name, vm_name, parameters, custom_headers:nil)
2313
+ response = begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
2314
+ response.body unless response.nil?
2315
+ end
2316
+
2317
+ #
2318
+ # Run command on the VM.
2319
+ #
2320
+ # @param resource_group_name [String] The name of the resource group.
2321
+ # @param vm_name [String] The name of the virtual machine.
2322
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2323
+ # operation.
2324
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2325
+ # will be added to the HTTP request.
2326
+ #
2327
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2328
+ #
2329
+ def begin_run_command_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
2330
+ begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
2331
+ end
2332
+
2333
+ #
2334
+ # Run command on the VM.
2335
+ #
2336
+ # @param resource_group_name [String] The name of the resource group.
2337
+ # @param vm_name [String] The name of the virtual machine.
2338
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2339
+ # operation.
2340
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2341
+ # to the HTTP request.
2342
+ #
2343
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2344
+ #
2345
+ def begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:nil)
2346
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2347
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2348
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
2349
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2350
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2351
+
2352
+
2353
+ request_headers = {}
2354
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2355
+
2356
+ # Set Headers
2357
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2358
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2359
+
2360
+ # Serialize Request
2361
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::RunCommandInput.mapper()
2362
+ request_content = @client.serialize(request_mapper, parameters)
2363
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2364
+
2365
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'
2366
+
2367
+ request_url = @base_url || @client.base_url
2368
+
2369
+ options = {
2370
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2371
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2372
+ query_params: {'api-version' => @client.api_version},
2373
+ body: request_content,
2374
+ headers: request_headers.merge(custom_headers || {}),
2375
+ base_url: request_url
2376
+ }
2377
+ promise = @client.make_request_async(:post, path_template, options)
2378
+
2379
+ promise = promise.then do |result|
2380
+ http_response = result.response
2381
+ status_code = http_response.status
2382
+ response_content = http_response.body
2383
+ unless status_code == 200 || status_code == 202
2384
+ error_model = JSON.load(response_content)
2385
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2386
+ end
2387
+
2388
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2389
+ # Deserialize Response
2390
+ if status_code == 200
2391
+ begin
2392
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2393
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::RunCommandResult.mapper()
2394
+ result.body = @client.deserialize(result_mapper, parsed_response)
2395
+ rescue Exception => e
2396
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2397
+ end
2398
+ end
2399
+
2400
+ result
2401
+ end
2402
+
2403
+ promise.execute
2404
+ end
2405
+
2406
+ #
2407
+ # Gets all the virtual machines under the specified subscription for the
2408
+ # specified location.
2409
+ #
2410
+ # @param next_page_link [String] The NextLink from the previous successful call
2411
+ # to List operation.
2412
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2413
+ # will be added to the HTTP request.
2414
+ #
2415
+ # @return [VirtualMachineListResult] operation results.
2416
+ #
2417
+ def list_by_location_next(next_page_link, custom_headers:nil)
2418
+ response = list_by_location_next_async(next_page_link, custom_headers:custom_headers).value!
2419
+ response.body unless response.nil?
2420
+ end
2421
+
2422
+ #
2423
+ # Gets all the virtual machines under the specified subscription for the
2424
+ # specified location.
2425
+ #
2426
+ # @param next_page_link [String] The NextLink from the previous successful call
2427
+ # to List operation.
2428
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2429
+ # will be added to the HTTP request.
2430
+ #
2431
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2432
+ #
2433
+ def list_by_location_next_with_http_info(next_page_link, custom_headers:nil)
2434
+ list_by_location_next_async(next_page_link, custom_headers:custom_headers).value!
2435
+ end
2436
+
2437
+ #
2438
+ # Gets all the virtual machines under the specified subscription for the
2439
+ # specified location.
2440
+ #
2441
+ # @param next_page_link [String] The NextLink from the previous successful call
2442
+ # to List operation.
2443
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2444
+ # to the HTTP request.
2445
+ #
2446
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2447
+ #
2448
+ def list_by_location_next_async(next_page_link, custom_headers:nil)
2449
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2450
+
2451
+
2452
+ request_headers = {}
2453
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2454
+
2455
+ # Set Headers
2456
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2457
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2458
+ path_template = '{nextLink}'
2459
+
2460
+ request_url = @base_url || @client.base_url
2461
+
2462
+ options = {
2463
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2464
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2465
+ headers: request_headers.merge(custom_headers || {}),
2466
+ base_url: request_url
2467
+ }
2468
+ promise = @client.make_request_async(:get, path_template, options)
2469
+
2470
+ promise = promise.then do |result|
2471
+ http_response = result.response
2472
+ status_code = http_response.status
2473
+ response_content = http_response.body
2474
+ unless status_code == 200
2475
+ error_model = JSON.load(response_content)
2476
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2477
+ end
2478
+
2479
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2480
+ # Deserialize Response
2481
+ if status_code == 200
2482
+ begin
2483
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2484
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineListResult.mapper()
2485
+ result.body = @client.deserialize(result_mapper, parsed_response)
2486
+ rescue Exception => e
2487
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2488
+ end
2489
+ end
2490
+
2491
+ result
2492
+ end
2493
+
2494
+ promise.execute
2495
+ end
2496
+
2497
+ #
2498
+ # Lists all of the virtual machines in the specified resource group. Use the
2499
+ # nextLink property in the response to get the next page of virtual machines.
2500
+ #
2501
+ # @param next_page_link [String] The NextLink from the previous successful call
2502
+ # to List operation.
2503
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2504
+ # will be added to the HTTP request.
2505
+ #
2506
+ # @return [VirtualMachineListResult] operation results.
2507
+ #
2508
+ def list_next(next_page_link, custom_headers:nil)
2509
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
2510
+ response.body unless response.nil?
2511
+ end
2512
+
2513
+ #
2514
+ # Lists all of the virtual machines in the specified resource group. Use the
2515
+ # nextLink property in the response to get the next page of virtual machines.
2516
+ #
2517
+ # @param next_page_link [String] The NextLink from the previous successful call
2518
+ # to List operation.
2519
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2520
+ # will be added to the HTTP request.
2521
+ #
2522
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2523
+ #
2524
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
2525
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
2526
+ end
2527
+
2528
+ #
2529
+ # Lists all of the virtual machines in the specified resource group. Use the
2530
+ # nextLink property in the response to get the next page of virtual machines.
2531
+ #
2532
+ # @param next_page_link [String] The NextLink from the previous successful call
2533
+ # to List operation.
2534
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2535
+ # to the HTTP request.
2536
+ #
2537
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2538
+ #
2539
+ def list_next_async(next_page_link, custom_headers:nil)
2540
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2541
+
2542
+
2543
+ request_headers = {}
2544
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2545
+
2546
+ # Set Headers
2547
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2548
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2549
+ path_template = '{nextLink}'
2550
+
2551
+ request_url = @base_url || @client.base_url
2552
+
2553
+ options = {
2554
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2555
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2556
+ headers: request_headers.merge(custom_headers || {}),
2557
+ base_url: request_url
2558
+ }
2559
+ promise = @client.make_request_async(:get, path_template, options)
2560
+
2561
+ promise = promise.then do |result|
2562
+ http_response = result.response
2563
+ status_code = http_response.status
2564
+ response_content = http_response.body
2565
+ unless status_code == 200
2566
+ error_model = JSON.load(response_content)
2567
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2568
+ end
2569
+
2570
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2571
+ # Deserialize Response
2572
+ if status_code == 200
2573
+ begin
2574
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2575
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineListResult.mapper()
2576
+ result.body = @client.deserialize(result_mapper, parsed_response)
2577
+ rescue Exception => e
2578
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2579
+ end
2580
+ end
2581
+
2582
+ result
2583
+ end
2584
+
2585
+ promise.execute
2586
+ end
2587
+
2588
+ #
2589
+ # Lists all of the virtual machines in the specified subscription. Use the
2590
+ # nextLink property in the response to get the next page of virtual machines.
2591
+ #
2592
+ # @param next_page_link [String] The NextLink from the previous successful call
2593
+ # to List operation.
2594
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2595
+ # will be added to the HTTP request.
2596
+ #
2597
+ # @return [VirtualMachineListResult] operation results.
2598
+ #
2599
+ def list_all_next(next_page_link, custom_headers:nil)
2600
+ response = list_all_next_async(next_page_link, custom_headers:custom_headers).value!
2601
+ response.body unless response.nil?
2602
+ end
2603
+
2604
+ #
2605
+ # Lists all of the virtual machines in the specified subscription. Use the
2606
+ # nextLink property in the response to get the next page of virtual machines.
2607
+ #
2608
+ # @param next_page_link [String] The NextLink from the previous successful call
2609
+ # to List operation.
2610
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2611
+ # will be added to the HTTP request.
2612
+ #
2613
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2614
+ #
2615
+ def list_all_next_with_http_info(next_page_link, custom_headers:nil)
2616
+ list_all_next_async(next_page_link, custom_headers:custom_headers).value!
2617
+ end
2618
+
2619
+ #
2620
+ # Lists all of the virtual machines in the specified subscription. Use the
2621
+ # nextLink property in the response to get the next page of virtual machines.
2622
+ #
2623
+ # @param next_page_link [String] The NextLink from the previous successful call
2624
+ # to List operation.
2625
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2626
+ # to the HTTP request.
2627
+ #
2628
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2629
+ #
2630
+ def list_all_next_async(next_page_link, custom_headers:nil)
2631
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2632
+
2633
+
2634
+ request_headers = {}
2635
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2636
+
2637
+ # Set Headers
2638
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2639
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2640
+ path_template = '{nextLink}'
2641
+
2642
+ request_url = @base_url || @client.base_url
2643
+
2644
+ options = {
2645
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2646
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2647
+ headers: request_headers.merge(custom_headers || {}),
2648
+ base_url: request_url
2649
+ }
2650
+ promise = @client.make_request_async(:get, path_template, options)
2651
+
2652
+ promise = promise.then do |result|
2653
+ http_response = result.response
2654
+ status_code = http_response.status
2655
+ response_content = http_response.body
2656
+ unless status_code == 200
2657
+ error_model = JSON.load(response_content)
2658
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2659
+ end
2660
+
2661
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2662
+ # Deserialize Response
2663
+ if status_code == 200
2664
+ begin
2665
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2666
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineListResult.mapper()
2667
+ result.body = @client.deserialize(result_mapper, parsed_response)
2668
+ rescue Exception => e
2669
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2670
+ end
2671
+ end
2672
+
2673
+ result
2674
+ end
2675
+
2676
+ promise.execute
2677
+ end
2678
+
2679
+ #
2680
+ # Gets all the virtual machines under the specified subscription for the
2681
+ # specified location.
2682
+ #
2683
+ # @param location [String] The location for which virtual machines under the
2684
+ # subscription are queried.
2685
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2686
+ # will be added to the HTTP request.
2687
+ #
2688
+ # @return [VirtualMachineListResult] which provide lazy access to pages of the
2689
+ # response.
2690
+ #
2691
+ def list_by_location_as_lazy(location, custom_headers:nil)
2692
+ response = list_by_location_async(location, custom_headers:custom_headers).value!
2693
+ unless response.nil?
2694
+ page = response.body
2695
+ page.next_method = Proc.new do |next_page_link|
2696
+ list_by_location_next_async(next_page_link, custom_headers:custom_headers)
2697
+ end
2698
+ page
2699
+ end
2700
+ end
2701
+
2702
+ #
2703
+ # Lists all of the virtual machines in the specified resource group. Use the
2704
+ # nextLink property in the response to get the next page of virtual machines.
2705
+ #
2706
+ # @param resource_group_name [String] The name of the resource group.
2707
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2708
+ # will be added to the HTTP request.
2709
+ #
2710
+ # @return [VirtualMachineListResult] which provide lazy access to pages of the
2711
+ # response.
2712
+ #
2713
+ def list_as_lazy(resource_group_name, custom_headers:nil)
2714
+ response = list_async(resource_group_name, custom_headers:custom_headers).value!
2715
+ unless response.nil?
2716
+ page = response.body
2717
+ page.next_method = Proc.new do |next_page_link|
2718
+ list_next_async(next_page_link, custom_headers:custom_headers)
2719
+ end
2720
+ page
2721
+ end
2722
+ end
2723
+
2724
+ #
2725
+ # Lists all of the virtual machines in the specified subscription. Use the
2726
+ # nextLink property in the response to get the next page of virtual machines.
2727
+ #
2728
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2729
+ # will be added to the HTTP request.
2730
+ #
2731
+ # @return [VirtualMachineListResult] which provide lazy access to pages of the
2732
+ # response.
2733
+ #
2734
+ def list_all_as_lazy(custom_headers:nil)
2735
+ response = list_all_async(custom_headers:custom_headers).value!
2736
+ unless response.nil?
2737
+ page = response.body
2738
+ page.next_method = Proc.new do |next_page_link|
2739
+ list_all_next_async(next_page_link, custom_headers:custom_headers)
2740
+ end
2741
+ page
2742
+ end
2743
+ end
2744
+
2745
+ end
2746
+ end