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::V2019_03_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::V2019_03_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,2766 @@
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::V2019_03_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::V2019_03_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::V2019_03_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::V2019_03_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::V2019_03_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::V2019_03_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::V2019_03_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::V2019_03_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::V2019_03_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::V2019_03_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 skip_shutdown [Boolean] The parameter to request non-graceful VM
929
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
930
+ # false indicates otherwise. Default value for this flag is false if not
931
+ # specified
932
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
933
+ # will be added to the HTTP request.
934
+ #
935
+ def power_off(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
936
+ response = power_off_async(resource_group_name, vm_name, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
937
+ nil
938
+ end
939
+
940
+ #
941
+ # @param resource_group_name [String] The name of the resource group.
942
+ # @param vm_name [String] The name of the virtual machine.
943
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
944
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
945
+ # false indicates otherwise. Default value for this flag is false if not
946
+ # specified
947
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
948
+ # will be added to the HTTP request.
949
+ #
950
+ # @return [Concurrent::Promise] promise which provides async access to http
951
+ # response.
952
+ #
953
+ def power_off_async(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
954
+ # Send request
955
+ promise = begin_power_off_async(resource_group_name, vm_name, skip_shutdown:skip_shutdown, custom_headers:custom_headers)
956
+
957
+ promise = promise.then do |response|
958
+ # Defining deserialization method.
959
+ deserialize_method = lambda do |parsed_response|
960
+ end
961
+
962
+ # Waiting for response.
963
+ @client.get_long_running_operation_result(response, deserialize_method)
964
+ end
965
+
966
+ promise
967
+ end
968
+
969
+ #
970
+ # The operation to restart a virtual machine.
971
+ #
972
+ # @param resource_group_name [String] The name of the resource group.
973
+ # @param vm_name [String] The name of the virtual machine.
974
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
975
+ # will be added to the HTTP request.
976
+ #
977
+ def restart(resource_group_name, vm_name, custom_headers:nil)
978
+ response = restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
979
+ nil
980
+ end
981
+
982
+ #
983
+ # @param resource_group_name [String] The name of the resource group.
984
+ # @param vm_name [String] The name of the virtual machine.
985
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
986
+ # will be added to the HTTP request.
987
+ #
988
+ # @return [Concurrent::Promise] promise which provides async access to http
989
+ # response.
990
+ #
991
+ def restart_async(resource_group_name, vm_name, custom_headers:nil)
992
+ # Send request
993
+ promise = begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers)
994
+
995
+ promise = promise.then do |response|
996
+ # Defining deserialization method.
997
+ deserialize_method = lambda do |parsed_response|
998
+ end
999
+
1000
+ # Waiting for response.
1001
+ @client.get_long_running_operation_result(response, deserialize_method)
1002
+ end
1003
+
1004
+ promise
1005
+ end
1006
+
1007
+ #
1008
+ # The operation to start a virtual machine.
1009
+ #
1010
+ # @param resource_group_name [String] The name of the resource group.
1011
+ # @param vm_name [String] The name of the virtual machine.
1012
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1013
+ # will be added to the HTTP request.
1014
+ #
1015
+ def start(resource_group_name, vm_name, custom_headers:nil)
1016
+ response = start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1017
+ nil
1018
+ end
1019
+
1020
+ #
1021
+ # @param resource_group_name [String] The name of the resource group.
1022
+ # @param vm_name [String] The name of the virtual machine.
1023
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1024
+ # will be added to the HTTP request.
1025
+ #
1026
+ # @return [Concurrent::Promise] promise which provides async access to http
1027
+ # response.
1028
+ #
1029
+ def start_async(resource_group_name, vm_name, custom_headers:nil)
1030
+ # Send request
1031
+ promise = begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers)
1032
+
1033
+ promise = promise.then do |response|
1034
+ # Defining deserialization method.
1035
+ deserialize_method = lambda do |parsed_response|
1036
+ end
1037
+
1038
+ # Waiting for response.
1039
+ @client.get_long_running_operation_result(response, deserialize_method)
1040
+ end
1041
+
1042
+ promise
1043
+ end
1044
+
1045
+ #
1046
+ # The operation to redeploy a virtual machine.
1047
+ #
1048
+ # @param resource_group_name [String] The name of the resource group.
1049
+ # @param vm_name [String] The name of the virtual machine.
1050
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1051
+ # will be added to the HTTP request.
1052
+ #
1053
+ def redeploy(resource_group_name, vm_name, custom_headers:nil)
1054
+ response = redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1055
+ nil
1056
+ end
1057
+
1058
+ #
1059
+ # @param resource_group_name [String] The name of the resource group.
1060
+ # @param vm_name [String] The name of the virtual machine.
1061
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1062
+ # will be added to the HTTP request.
1063
+ #
1064
+ # @return [Concurrent::Promise] promise which provides async access to http
1065
+ # response.
1066
+ #
1067
+ def redeploy_async(resource_group_name, vm_name, custom_headers:nil)
1068
+ # Send request
1069
+ promise = begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers)
1070
+
1071
+ promise = promise.then do |response|
1072
+ # Defining deserialization method.
1073
+ deserialize_method = lambda do |parsed_response|
1074
+ end
1075
+
1076
+ # Waiting for response.
1077
+ @client.get_long_running_operation_result(response, deserialize_method)
1078
+ end
1079
+
1080
+ promise
1081
+ end
1082
+
1083
+ #
1084
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
1085
+ # initial state.
1086
+ #
1087
+ # @param resource_group_name [String] The name of the resource group.
1088
+ # @param vm_name [String] The name of the virtual machine.
1089
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
1090
+ # the Reimage Virtual Machine operation.
1091
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1092
+ # will be added to the HTTP request.
1093
+ #
1094
+ def reimage(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
1095
+ response = reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers).value!
1096
+ nil
1097
+ end
1098
+
1099
+ #
1100
+ # @param resource_group_name [String] The name of the resource group.
1101
+ # @param vm_name [String] The name of the virtual machine.
1102
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
1103
+ # the Reimage Virtual Machine operation.
1104
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1105
+ # will be added to the HTTP request.
1106
+ #
1107
+ # @return [Concurrent::Promise] promise which provides async access to http
1108
+ # response.
1109
+ #
1110
+ def reimage_async(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
1111
+ # Send request
1112
+ promise = begin_reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers)
1113
+
1114
+ promise = promise.then do |response|
1115
+ # Defining deserialization method.
1116
+ deserialize_method = lambda do |parsed_response|
1117
+ end
1118
+
1119
+ # Waiting for response.
1120
+ @client.get_long_running_operation_result(response, deserialize_method)
1121
+ end
1122
+
1123
+ promise
1124
+ end
1125
+
1126
+ #
1127
+ # The operation to perform maintenance on a virtual machine.
1128
+ #
1129
+ # @param resource_group_name [String] The name of the resource group.
1130
+ # @param vm_name [String] The name of the virtual machine.
1131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1132
+ # will be added to the HTTP request.
1133
+ #
1134
+ def perform_maintenance(resource_group_name, vm_name, custom_headers:nil)
1135
+ response = perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1136
+ nil
1137
+ end
1138
+
1139
+ #
1140
+ # @param resource_group_name [String] The name of the resource group.
1141
+ # @param vm_name [String] The name of the virtual machine.
1142
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1143
+ # will be added to the HTTP request.
1144
+ #
1145
+ # @return [Concurrent::Promise] promise which provides async access to http
1146
+ # response.
1147
+ #
1148
+ def perform_maintenance_async(resource_group_name, vm_name, custom_headers:nil)
1149
+ # Send request
1150
+ promise = begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers)
1151
+
1152
+ promise = promise.then do |response|
1153
+ # Defining deserialization method.
1154
+ deserialize_method = lambda do |parsed_response|
1155
+ end
1156
+
1157
+ # Waiting for response.
1158
+ @client.get_long_running_operation_result(response, deserialize_method)
1159
+ end
1160
+
1161
+ promise
1162
+ end
1163
+
1164
+ #
1165
+ # Run command on the VM.
1166
+ #
1167
+ # @param resource_group_name [String] The name of the resource group.
1168
+ # @param vm_name [String] The name of the virtual machine.
1169
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
1170
+ # operation.
1171
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1172
+ # will be added to the HTTP request.
1173
+ #
1174
+ # @return [RunCommandResult] operation results.
1175
+ #
1176
+ def run_command(resource_group_name, vm_name, parameters, custom_headers:nil)
1177
+ response = run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1178
+ response.body unless response.nil?
1179
+ end
1180
+
1181
+ #
1182
+ # @param resource_group_name [String] The name of the resource group.
1183
+ # @param vm_name [String] The name of the virtual machine.
1184
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
1185
+ # operation.
1186
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1187
+ # will be added to the HTTP request.
1188
+ #
1189
+ # @return [Concurrent::Promise] promise which provides async access to http
1190
+ # response.
1191
+ #
1192
+ def run_command_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1193
+ # Send request
1194
+ promise = begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers)
1195
+
1196
+ promise = promise.then do |response|
1197
+ # Defining deserialization method.
1198
+ deserialize_method = lambda do |parsed_response|
1199
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::RunCommandResult.mapper()
1200
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
1201
+ end
1202
+
1203
+ # Waiting for response.
1204
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
1205
+ end
1206
+
1207
+ promise
1208
+ end
1209
+
1210
+ #
1211
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1212
+ # template that can be used to create similar VMs.
1213
+ #
1214
+ # @param resource_group_name [String] The name of the resource group.
1215
+ # @param vm_name [String] The name of the virtual machine.
1216
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1217
+ # the Capture Virtual Machine operation.
1218
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1219
+ # will be added to the HTTP request.
1220
+ #
1221
+ # @return [VirtualMachineCaptureResult] operation results.
1222
+ #
1223
+ def begin_capture(resource_group_name, vm_name, parameters, custom_headers:nil)
1224
+ response = begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1225
+ response.body unless response.nil?
1226
+ end
1227
+
1228
+ #
1229
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1230
+ # template that can be used to create similar VMs.
1231
+ #
1232
+ # @param resource_group_name [String] The name of the resource group.
1233
+ # @param vm_name [String] The name of the virtual machine.
1234
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1235
+ # the Capture Virtual Machine operation.
1236
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1237
+ # will be added to the HTTP request.
1238
+ #
1239
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1240
+ #
1241
+ def begin_capture_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1242
+ begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1243
+ end
1244
+
1245
+ #
1246
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1247
+ # template that can be used to create similar VMs.
1248
+ #
1249
+ # @param resource_group_name [String] The name of the resource group.
1250
+ # @param vm_name [String] The name of the virtual machine.
1251
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1252
+ # the Capture Virtual Machine operation.
1253
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1254
+ # to the HTTP request.
1255
+ #
1256
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1257
+ #
1258
+ def begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1259
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1260
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1261
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1262
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1263
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1264
+
1265
+
1266
+ request_headers = {}
1267
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1268
+
1269
+ # Set Headers
1270
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1271
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1272
+
1273
+ # Serialize Request
1274
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineCaptureParameters.mapper()
1275
+ request_content = @client.serialize(request_mapper, parameters)
1276
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1277
+
1278
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'
1279
+
1280
+ request_url = @base_url || @client.base_url
1281
+
1282
+ options = {
1283
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1284
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1285
+ query_params: {'api-version' => @client.api_version},
1286
+ body: request_content,
1287
+ headers: request_headers.merge(custom_headers || {}),
1288
+ base_url: request_url
1289
+ }
1290
+ promise = @client.make_request_async(:post, path_template, options)
1291
+
1292
+ promise = promise.then do |result|
1293
+ http_response = result.response
1294
+ status_code = http_response.status
1295
+ response_content = http_response.body
1296
+ unless status_code == 200 || status_code == 202
1297
+ error_model = JSON.load(response_content)
1298
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1299
+ end
1300
+
1301
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1302
+ # Deserialize Response
1303
+ if status_code == 200
1304
+ begin
1305
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1306
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineCaptureResult.mapper()
1307
+ result.body = @client.deserialize(result_mapper, parsed_response)
1308
+ rescue Exception => e
1309
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1310
+ end
1311
+ end
1312
+
1313
+ result
1314
+ end
1315
+
1316
+ promise.execute
1317
+ end
1318
+
1319
+ #
1320
+ # The operation to create or update a virtual machine.
1321
+ #
1322
+ # @param resource_group_name [String] The name of the resource group.
1323
+ # @param vm_name [String] The name of the virtual machine.
1324
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1325
+ # Machine operation.
1326
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1327
+ # will be added to the HTTP request.
1328
+ #
1329
+ # @return [VirtualMachine] operation results.
1330
+ #
1331
+ def begin_create_or_update(resource_group_name, vm_name, parameters, custom_headers:nil)
1332
+ response = begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1333
+ response.body unless response.nil?
1334
+ end
1335
+
1336
+ #
1337
+ # The operation to create or update a virtual machine.
1338
+ #
1339
+ # @param resource_group_name [String] The name of the resource group.
1340
+ # @param vm_name [String] The name of the virtual machine.
1341
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1342
+ # Machine operation.
1343
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1344
+ # will be added to the HTTP request.
1345
+ #
1346
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1347
+ #
1348
+ def begin_create_or_update_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1349
+ begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1350
+ end
1351
+
1352
+ #
1353
+ # The operation to create or update a virtual machine.
1354
+ #
1355
+ # @param resource_group_name [String] The name of the resource group.
1356
+ # @param vm_name [String] The name of the virtual machine.
1357
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1358
+ # Machine operation.
1359
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1360
+ # to the HTTP request.
1361
+ #
1362
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1363
+ #
1364
+ def begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1365
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1366
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1367
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1368
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1369
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1370
+
1371
+
1372
+ request_headers = {}
1373
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1374
+
1375
+ # Set Headers
1376
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1377
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1378
+
1379
+ # Serialize Request
1380
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachine.mapper()
1381
+ request_content = @client.serialize(request_mapper, parameters)
1382
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1383
+
1384
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1385
+
1386
+ request_url = @base_url || @client.base_url
1387
+
1388
+ options = {
1389
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1390
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1391
+ query_params: {'api-version' => @client.api_version},
1392
+ body: request_content,
1393
+ headers: request_headers.merge(custom_headers || {}),
1394
+ base_url: request_url
1395
+ }
1396
+ promise = @client.make_request_async(:put, path_template, options)
1397
+
1398
+ promise = promise.then do |result|
1399
+ http_response = result.response
1400
+ status_code = http_response.status
1401
+ response_content = http_response.body
1402
+ unless status_code == 200 || status_code == 201
1403
+ error_model = JSON.load(response_content)
1404
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1405
+ end
1406
+
1407
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1408
+ # Deserialize Response
1409
+ if status_code == 200
1410
+ begin
1411
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1412
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachine.mapper()
1413
+ result.body = @client.deserialize(result_mapper, parsed_response)
1414
+ rescue Exception => e
1415
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1416
+ end
1417
+ end
1418
+ # Deserialize Response
1419
+ if status_code == 201
1420
+ begin
1421
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1422
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachine.mapper()
1423
+ result.body = @client.deserialize(result_mapper, parsed_response)
1424
+ rescue Exception => e
1425
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1426
+ end
1427
+ end
1428
+
1429
+ result
1430
+ end
1431
+
1432
+ promise.execute
1433
+ end
1434
+
1435
+ #
1436
+ # The operation to update a virtual machine.
1437
+ #
1438
+ # @param resource_group_name [String] The name of the resource group.
1439
+ # @param vm_name [String] The name of the virtual machine.
1440
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1441
+ # Virtual Machine operation.
1442
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1443
+ # will be added to the HTTP request.
1444
+ #
1445
+ # @return [VirtualMachine] operation results.
1446
+ #
1447
+ def begin_update(resource_group_name, vm_name, parameters, custom_headers:nil)
1448
+ response = begin_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1449
+ response.body unless response.nil?
1450
+ end
1451
+
1452
+ #
1453
+ # The operation to update a virtual machine.
1454
+ #
1455
+ # @param resource_group_name [String] The name of the resource group.
1456
+ # @param vm_name [String] The name of the virtual machine.
1457
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1458
+ # Virtual Machine operation.
1459
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1460
+ # will be added to the HTTP request.
1461
+ #
1462
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1463
+ #
1464
+ def begin_update_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1465
+ begin_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1466
+ end
1467
+
1468
+ #
1469
+ # The operation to update a virtual machine.
1470
+ #
1471
+ # @param resource_group_name [String] The name of the resource group.
1472
+ # @param vm_name [String] The name of the virtual machine.
1473
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1474
+ # Virtual Machine operation.
1475
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1476
+ # to the HTTP request.
1477
+ #
1478
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1479
+ #
1480
+ def begin_update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1481
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1482
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1483
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1484
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1485
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1486
+
1487
+
1488
+ request_headers = {}
1489
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1490
+
1491
+ # Set Headers
1492
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1493
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1494
+
1495
+ # Serialize Request
1496
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineUpdate.mapper()
1497
+ request_content = @client.serialize(request_mapper, parameters)
1498
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1499
+
1500
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1501
+
1502
+ request_url = @base_url || @client.base_url
1503
+
1504
+ options = {
1505
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1506
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1507
+ query_params: {'api-version' => @client.api_version},
1508
+ body: request_content,
1509
+ headers: request_headers.merge(custom_headers || {}),
1510
+ base_url: request_url
1511
+ }
1512
+ promise = @client.make_request_async(:patch, path_template, options)
1513
+
1514
+ promise = promise.then do |result|
1515
+ http_response = result.response
1516
+ status_code = http_response.status
1517
+ response_content = http_response.body
1518
+ unless status_code == 200 || status_code == 201
1519
+ error_model = JSON.load(response_content)
1520
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1521
+ end
1522
+
1523
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1524
+ # Deserialize Response
1525
+ if status_code == 200
1526
+ begin
1527
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1528
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachine.mapper()
1529
+ result.body = @client.deserialize(result_mapper, parsed_response)
1530
+ rescue Exception => e
1531
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1532
+ end
1533
+ end
1534
+ # Deserialize Response
1535
+ if status_code == 201
1536
+ begin
1537
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1538
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachine.mapper()
1539
+ result.body = @client.deserialize(result_mapper, parsed_response)
1540
+ rescue Exception => e
1541
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1542
+ end
1543
+ end
1544
+
1545
+ result
1546
+ end
1547
+
1548
+ promise.execute
1549
+ end
1550
+
1551
+ #
1552
+ # The operation to delete a virtual machine.
1553
+ #
1554
+ # @param resource_group_name [String] The name of the resource group.
1555
+ # @param vm_name [String] The name of the virtual machine.
1556
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1557
+ # will be added to the HTTP request.
1558
+ #
1559
+ #
1560
+ def begin_delete(resource_group_name, vm_name, custom_headers:nil)
1561
+ response = begin_delete_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1562
+ nil
1563
+ end
1564
+
1565
+ #
1566
+ # The operation to delete a virtual machine.
1567
+ #
1568
+ # @param resource_group_name [String] The name of the resource group.
1569
+ # @param vm_name [String] The name of the virtual machine.
1570
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1571
+ # will be added to the HTTP request.
1572
+ #
1573
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1574
+ #
1575
+ def begin_delete_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1576
+ begin_delete_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1577
+ end
1578
+
1579
+ #
1580
+ # The operation to delete a virtual machine.
1581
+ #
1582
+ # @param resource_group_name [String] The name of the resource group.
1583
+ # @param vm_name [String] The name of the virtual machine.
1584
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1585
+ # to the HTTP request.
1586
+ #
1587
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1588
+ #
1589
+ def begin_delete_async(resource_group_name, vm_name, custom_headers:nil)
1590
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1591
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1592
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1593
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1594
+
1595
+
1596
+ request_headers = {}
1597
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1598
+
1599
+ # Set Headers
1600
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1601
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1602
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1603
+
1604
+ request_url = @base_url || @client.base_url
1605
+
1606
+ options = {
1607
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1608
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1609
+ query_params: {'api-version' => @client.api_version},
1610
+ headers: request_headers.merge(custom_headers || {}),
1611
+ base_url: request_url
1612
+ }
1613
+ promise = @client.make_request_async(:delete, path_template, options)
1614
+
1615
+ promise = promise.then do |result|
1616
+ http_response = result.response
1617
+ status_code = http_response.status
1618
+ response_content = http_response.body
1619
+ unless status_code == 200 || status_code == 202 || status_code == 204
1620
+ error_model = JSON.load(response_content)
1621
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1622
+ end
1623
+
1624
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1625
+
1626
+ result
1627
+ end
1628
+
1629
+ promise.execute
1630
+ end
1631
+
1632
+ #
1633
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1634
+ # machine must be stop-deallocated before invoking this operation.
1635
+ #
1636
+ # @param resource_group_name [String] The name of the resource group.
1637
+ # @param vm_name [String] The name of the virtual machine.
1638
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1639
+ # will be added to the HTTP request.
1640
+ #
1641
+ #
1642
+ def begin_convert_to_managed_disks(resource_group_name, vm_name, custom_headers:nil)
1643
+ response = begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1644
+ nil
1645
+ end
1646
+
1647
+ #
1648
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1649
+ # machine must be stop-deallocated before invoking this operation.
1650
+ #
1651
+ # @param resource_group_name [String] The name of the resource group.
1652
+ # @param vm_name [String] The name of the virtual machine.
1653
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1654
+ # will be added to the HTTP request.
1655
+ #
1656
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1657
+ #
1658
+ def begin_convert_to_managed_disks_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1659
+ begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1660
+ end
1661
+
1662
+ #
1663
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1664
+ # machine must be stop-deallocated before invoking this operation.
1665
+ #
1666
+ # @param resource_group_name [String] The name of the resource group.
1667
+ # @param vm_name [String] The name of the virtual machine.
1668
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1669
+ # to the HTTP request.
1670
+ #
1671
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1672
+ #
1673
+ def begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:nil)
1674
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1675
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1676
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1677
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1678
+
1679
+
1680
+ request_headers = {}
1681
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1682
+
1683
+ # Set Headers
1684
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1685
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1686
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'
1687
+
1688
+ request_url = @base_url || @client.base_url
1689
+
1690
+ options = {
1691
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1692
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1693
+ query_params: {'api-version' => @client.api_version},
1694
+ headers: request_headers.merge(custom_headers || {}),
1695
+ base_url: request_url
1696
+ }
1697
+ promise = @client.make_request_async(:post, path_template, options)
1698
+
1699
+ promise = promise.then do |result|
1700
+ http_response = result.response
1701
+ status_code = http_response.status
1702
+ response_content = http_response.body
1703
+ unless status_code == 200 || status_code == 202
1704
+ error_model = JSON.load(response_content)
1705
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1706
+ end
1707
+
1708
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1709
+
1710
+ result
1711
+ end
1712
+
1713
+ promise.execute
1714
+ end
1715
+
1716
+ #
1717
+ # Shuts down the virtual machine and releases the compute resources. You are
1718
+ # not billed for the compute resources that this virtual machine uses.
1719
+ #
1720
+ # @param resource_group_name [String] The name of the resource group.
1721
+ # @param vm_name [String] The name of the virtual machine.
1722
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1723
+ # will be added to the HTTP request.
1724
+ #
1725
+ #
1726
+ def begin_deallocate(resource_group_name, vm_name, custom_headers:nil)
1727
+ response = begin_deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1728
+ nil
1729
+ end
1730
+
1731
+ #
1732
+ # Shuts down the virtual machine and releases the compute resources. You are
1733
+ # not billed for the compute resources that this virtual machine uses.
1734
+ #
1735
+ # @param resource_group_name [String] The name of the resource group.
1736
+ # @param vm_name [String] The name of the virtual machine.
1737
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1738
+ # will be added to the HTTP request.
1739
+ #
1740
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1741
+ #
1742
+ def begin_deallocate_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1743
+ begin_deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1744
+ end
1745
+
1746
+ #
1747
+ # Shuts down the virtual machine and releases the compute resources. You are
1748
+ # not billed for the compute resources that this virtual machine uses.
1749
+ #
1750
+ # @param resource_group_name [String] The name of the resource group.
1751
+ # @param vm_name [String] The name of the virtual machine.
1752
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1753
+ # to the HTTP request.
1754
+ #
1755
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1756
+ #
1757
+ def begin_deallocate_async(resource_group_name, vm_name, custom_headers:nil)
1758
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1759
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1760
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1761
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1762
+
1763
+
1764
+ request_headers = {}
1765
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1766
+
1767
+ # Set Headers
1768
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1769
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1770
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'
1771
+
1772
+ request_url = @base_url || @client.base_url
1773
+
1774
+ options = {
1775
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1776
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1777
+ query_params: {'api-version' => @client.api_version},
1778
+ headers: request_headers.merge(custom_headers || {}),
1779
+ base_url: request_url
1780
+ }
1781
+ promise = @client.make_request_async(:post, path_template, options)
1782
+
1783
+ promise = promise.then do |result|
1784
+ http_response = result.response
1785
+ status_code = http_response.status
1786
+ response_content = http_response.body
1787
+ unless status_code == 200 || status_code == 202
1788
+ error_model = JSON.load(response_content)
1789
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1790
+ end
1791
+
1792
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1793
+
1794
+ result
1795
+ end
1796
+
1797
+ promise.execute
1798
+ end
1799
+
1800
+ #
1801
+ # The operation to power off (stop) a virtual machine. The virtual machine can
1802
+ # be restarted with the same provisioned resources. You are still charged for
1803
+ # this virtual machine.
1804
+ #
1805
+ # @param resource_group_name [String] The name of the resource group.
1806
+ # @param vm_name [String] The name of the virtual machine.
1807
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
1808
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
1809
+ # false indicates otherwise. Default value for this flag is false if not
1810
+ # specified
1811
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1812
+ # will be added to the HTTP request.
1813
+ #
1814
+ #
1815
+ def begin_power_off(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
1816
+ response = begin_power_off_async(resource_group_name, vm_name, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
1817
+ nil
1818
+ end
1819
+
1820
+ #
1821
+ # The operation to power off (stop) a virtual machine. The virtual machine can
1822
+ # be restarted with the same provisioned resources. You are still charged for
1823
+ # this virtual machine.
1824
+ #
1825
+ # @param resource_group_name [String] The name of the resource group.
1826
+ # @param vm_name [String] The name of the virtual machine.
1827
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
1828
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
1829
+ # false indicates otherwise. Default value for this flag is false if not
1830
+ # specified
1831
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1832
+ # will be added to the HTTP request.
1833
+ #
1834
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1835
+ #
1836
+ def begin_power_off_with_http_info(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
1837
+ begin_power_off_async(resource_group_name, vm_name, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
1838
+ end
1839
+
1840
+ #
1841
+ # The operation to power off (stop) a virtual machine. The virtual machine can
1842
+ # be restarted with the same provisioned resources. You are still charged for
1843
+ # this virtual machine.
1844
+ #
1845
+ # @param resource_group_name [String] The name of the resource group.
1846
+ # @param vm_name [String] The name of the virtual machine.
1847
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
1848
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
1849
+ # false indicates otherwise. Default value for this flag is false if not
1850
+ # specified
1851
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1852
+ # to the HTTP request.
1853
+ #
1854
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1855
+ #
1856
+ def begin_power_off_async(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
1857
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1858
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1859
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1860
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1861
+
1862
+
1863
+ request_headers = {}
1864
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1865
+
1866
+ # Set Headers
1867
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1868
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1869
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'
1870
+
1871
+ request_url = @base_url || @client.base_url
1872
+
1873
+ options = {
1874
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1875
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1876
+ query_params: {'skipShutdown' => skip_shutdown,'api-version' => @client.api_version},
1877
+ headers: request_headers.merge(custom_headers || {}),
1878
+ base_url: request_url
1879
+ }
1880
+ promise = @client.make_request_async(:post, path_template, options)
1881
+
1882
+ promise = promise.then do |result|
1883
+ http_response = result.response
1884
+ status_code = http_response.status
1885
+ response_content = http_response.body
1886
+ unless status_code == 200 || status_code == 202
1887
+ error_model = JSON.load(response_content)
1888
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1889
+ end
1890
+
1891
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1892
+
1893
+ result
1894
+ end
1895
+
1896
+ promise.execute
1897
+ end
1898
+
1899
+ #
1900
+ # The operation to restart a virtual machine.
1901
+ #
1902
+ # @param resource_group_name [String] The name of the resource group.
1903
+ # @param vm_name [String] The name of the virtual machine.
1904
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1905
+ # will be added to the HTTP request.
1906
+ #
1907
+ #
1908
+ def begin_restart(resource_group_name, vm_name, custom_headers:nil)
1909
+ response = begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1910
+ nil
1911
+ end
1912
+
1913
+ #
1914
+ # The operation to restart a virtual machine.
1915
+ #
1916
+ # @param resource_group_name [String] The name of the resource group.
1917
+ # @param vm_name [String] The name of the virtual machine.
1918
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1919
+ # will be added to the HTTP request.
1920
+ #
1921
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1922
+ #
1923
+ def begin_restart_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1924
+ begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1925
+ end
1926
+
1927
+ #
1928
+ # The operation to restart a virtual machine.
1929
+ #
1930
+ # @param resource_group_name [String] The name of the resource group.
1931
+ # @param vm_name [String] The name of the virtual machine.
1932
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1933
+ # to the HTTP request.
1934
+ #
1935
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1936
+ #
1937
+ def begin_restart_async(resource_group_name, vm_name, custom_headers:nil)
1938
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1939
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1940
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1941
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1942
+
1943
+
1944
+ request_headers = {}
1945
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1946
+
1947
+ # Set Headers
1948
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1949
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1950
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'
1951
+
1952
+ request_url = @base_url || @client.base_url
1953
+
1954
+ options = {
1955
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1956
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1957
+ query_params: {'api-version' => @client.api_version},
1958
+ headers: request_headers.merge(custom_headers || {}),
1959
+ base_url: request_url
1960
+ }
1961
+ promise = @client.make_request_async(:post, path_template, options)
1962
+
1963
+ promise = promise.then do |result|
1964
+ http_response = result.response
1965
+ status_code = http_response.status
1966
+ response_content = http_response.body
1967
+ unless status_code == 200 || status_code == 202
1968
+ error_model = JSON.load(response_content)
1969
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1970
+ end
1971
+
1972
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1973
+
1974
+ result
1975
+ end
1976
+
1977
+ promise.execute
1978
+ end
1979
+
1980
+ #
1981
+ # The operation to start a virtual machine.
1982
+ #
1983
+ # @param resource_group_name [String] The name of the resource group.
1984
+ # @param vm_name [String] The name of the virtual machine.
1985
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1986
+ # will be added to the HTTP request.
1987
+ #
1988
+ #
1989
+ def begin_start(resource_group_name, vm_name, custom_headers:nil)
1990
+ response = begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1991
+ nil
1992
+ end
1993
+
1994
+ #
1995
+ # The operation to start a virtual machine.
1996
+ #
1997
+ # @param resource_group_name [String] The name of the resource group.
1998
+ # @param vm_name [String] The name of the virtual machine.
1999
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2000
+ # will be added to the HTTP request.
2001
+ #
2002
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2003
+ #
2004
+ def begin_start_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2005
+ begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2006
+ end
2007
+
2008
+ #
2009
+ # The operation to start a virtual machine.
2010
+ #
2011
+ # @param resource_group_name [String] The name of the resource group.
2012
+ # @param vm_name [String] The name of the virtual machine.
2013
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2014
+ # to the HTTP request.
2015
+ #
2016
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2017
+ #
2018
+ def begin_start_async(resource_group_name, vm_name, custom_headers:nil)
2019
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2020
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2021
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2022
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2023
+
2024
+
2025
+ request_headers = {}
2026
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2027
+
2028
+ # Set Headers
2029
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2030
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2031
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'
2032
+
2033
+ request_url = @base_url || @client.base_url
2034
+
2035
+ options = {
2036
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2037
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2038
+ query_params: {'api-version' => @client.api_version},
2039
+ headers: request_headers.merge(custom_headers || {}),
2040
+ base_url: request_url
2041
+ }
2042
+ promise = @client.make_request_async(:post, path_template, options)
2043
+
2044
+ promise = promise.then do |result|
2045
+ http_response = result.response
2046
+ status_code = http_response.status
2047
+ response_content = http_response.body
2048
+ unless status_code == 200 || status_code == 202
2049
+ error_model = JSON.load(response_content)
2050
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2051
+ end
2052
+
2053
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2054
+
2055
+ result
2056
+ end
2057
+
2058
+ promise.execute
2059
+ end
2060
+
2061
+ #
2062
+ # The operation to redeploy a virtual machine.
2063
+ #
2064
+ # @param resource_group_name [String] The name of the resource group.
2065
+ # @param vm_name [String] The name of the virtual machine.
2066
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2067
+ # will be added to the HTTP request.
2068
+ #
2069
+ #
2070
+ def begin_redeploy(resource_group_name, vm_name, custom_headers:nil)
2071
+ response = begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2072
+ nil
2073
+ end
2074
+
2075
+ #
2076
+ # The operation to redeploy a virtual machine.
2077
+ #
2078
+ # @param resource_group_name [String] The name of the resource group.
2079
+ # @param vm_name [String] The name of the virtual machine.
2080
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2081
+ # will be added to the HTTP request.
2082
+ #
2083
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2084
+ #
2085
+ def begin_redeploy_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2086
+ begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2087
+ end
2088
+
2089
+ #
2090
+ # The operation to redeploy a virtual machine.
2091
+ #
2092
+ # @param resource_group_name [String] The name of the resource group.
2093
+ # @param vm_name [String] The name of the virtual machine.
2094
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2095
+ # to the HTTP request.
2096
+ #
2097
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2098
+ #
2099
+ def begin_redeploy_async(resource_group_name, vm_name, custom_headers:nil)
2100
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2101
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2102
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2103
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2104
+
2105
+
2106
+ request_headers = {}
2107
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2108
+
2109
+ # Set Headers
2110
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2111
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2112
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'
2113
+
2114
+ request_url = @base_url || @client.base_url
2115
+
2116
+ options = {
2117
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2118
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2119
+ query_params: {'api-version' => @client.api_version},
2120
+ headers: request_headers.merge(custom_headers || {}),
2121
+ base_url: request_url
2122
+ }
2123
+ promise = @client.make_request_async(:post, path_template, options)
2124
+
2125
+ promise = promise.then do |result|
2126
+ http_response = result.response
2127
+ status_code = http_response.status
2128
+ response_content = http_response.body
2129
+ unless status_code == 200 || status_code == 202
2130
+ error_model = JSON.load(response_content)
2131
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2132
+ end
2133
+
2134
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2135
+
2136
+ result
2137
+ end
2138
+
2139
+ promise.execute
2140
+ end
2141
+
2142
+ #
2143
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
2144
+ # initial state.
2145
+ #
2146
+ # @param resource_group_name [String] The name of the resource group.
2147
+ # @param vm_name [String] The name of the virtual machine.
2148
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
2149
+ # the Reimage Virtual Machine operation.
2150
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2151
+ # will be added to the HTTP request.
2152
+ #
2153
+ #
2154
+ def begin_reimage(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
2155
+ response = begin_reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers).value!
2156
+ nil
2157
+ end
2158
+
2159
+ #
2160
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
2161
+ # initial state.
2162
+ #
2163
+ # @param resource_group_name [String] The name of the resource group.
2164
+ # @param vm_name [String] The name of the virtual machine.
2165
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
2166
+ # the Reimage Virtual Machine operation.
2167
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2168
+ # will be added to the HTTP request.
2169
+ #
2170
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2171
+ #
2172
+ def begin_reimage_with_http_info(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
2173
+ begin_reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers).value!
2174
+ end
2175
+
2176
+ #
2177
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
2178
+ # initial state.
2179
+ #
2180
+ # @param resource_group_name [String] The name of the resource group.
2181
+ # @param vm_name [String] The name of the virtual machine.
2182
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
2183
+ # the Reimage Virtual Machine operation.
2184
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2185
+ # to the HTTP request.
2186
+ #
2187
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2188
+ #
2189
+ def begin_reimage_async(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
2190
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2191
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2192
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2193
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2194
+
2195
+
2196
+ request_headers = {}
2197
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2198
+
2199
+ # Set Headers
2200
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2201
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2202
+
2203
+ # Serialize Request
2204
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineReimageParameters.mapper()
2205
+ request_content = @client.serialize(request_mapper, parameters)
2206
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2207
+
2208
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage'
2209
+
2210
+ request_url = @base_url || @client.base_url
2211
+
2212
+ options = {
2213
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2214
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2215
+ query_params: {'api-version' => @client.api_version},
2216
+ body: request_content,
2217
+ headers: request_headers.merge(custom_headers || {}),
2218
+ base_url: request_url
2219
+ }
2220
+ promise = @client.make_request_async(:post, path_template, options)
2221
+
2222
+ promise = promise.then do |result|
2223
+ http_response = result.response
2224
+ status_code = http_response.status
2225
+ response_content = http_response.body
2226
+ unless status_code == 200 || status_code == 202
2227
+ error_model = JSON.load(response_content)
2228
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2229
+ end
2230
+
2231
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2232
+
2233
+ result
2234
+ end
2235
+
2236
+ promise.execute
2237
+ end
2238
+
2239
+ #
2240
+ # The operation to perform maintenance on a virtual machine.
2241
+ #
2242
+ # @param resource_group_name [String] The name of the resource group.
2243
+ # @param vm_name [String] The name of the virtual machine.
2244
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2245
+ # will be added to the HTTP request.
2246
+ #
2247
+ #
2248
+ def begin_perform_maintenance(resource_group_name, vm_name, custom_headers:nil)
2249
+ response = begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2250
+ nil
2251
+ end
2252
+
2253
+ #
2254
+ # The operation to perform maintenance on a virtual machine.
2255
+ #
2256
+ # @param resource_group_name [String] The name of the resource group.
2257
+ # @param vm_name [String] The name of the virtual machine.
2258
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2259
+ # will be added to the HTTP request.
2260
+ #
2261
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2262
+ #
2263
+ def begin_perform_maintenance_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2264
+ begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2265
+ end
2266
+
2267
+ #
2268
+ # The operation to perform maintenance on a virtual machine.
2269
+ #
2270
+ # @param resource_group_name [String] The name of the resource group.
2271
+ # @param vm_name [String] The name of the virtual machine.
2272
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2273
+ # to the HTTP request.
2274
+ #
2275
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2276
+ #
2277
+ def begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:nil)
2278
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2279
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2280
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2281
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2282
+
2283
+
2284
+ request_headers = {}
2285
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2286
+
2287
+ # Set Headers
2288
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2289
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2290
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'
2291
+
2292
+ request_url = @base_url || @client.base_url
2293
+
2294
+ options = {
2295
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2296
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2297
+ query_params: {'api-version' => @client.api_version},
2298
+ headers: request_headers.merge(custom_headers || {}),
2299
+ base_url: request_url
2300
+ }
2301
+ promise = @client.make_request_async(:post, path_template, options)
2302
+
2303
+ promise = promise.then do |result|
2304
+ http_response = result.response
2305
+ status_code = http_response.status
2306
+ response_content = http_response.body
2307
+ unless status_code == 200 || status_code == 202
2308
+ error_model = JSON.load(response_content)
2309
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2310
+ end
2311
+
2312
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2313
+
2314
+ result
2315
+ end
2316
+
2317
+ promise.execute
2318
+ end
2319
+
2320
+ #
2321
+ # Run command on the VM.
2322
+ #
2323
+ # @param resource_group_name [String] The name of the resource group.
2324
+ # @param vm_name [String] The name of the virtual machine.
2325
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2326
+ # operation.
2327
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2328
+ # will be added to the HTTP request.
2329
+ #
2330
+ # @return [RunCommandResult] operation results.
2331
+ #
2332
+ def begin_run_command(resource_group_name, vm_name, parameters, custom_headers:nil)
2333
+ response = begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
2334
+ response.body unless response.nil?
2335
+ end
2336
+
2337
+ #
2338
+ # Run command on the VM.
2339
+ #
2340
+ # @param resource_group_name [String] The name of the resource group.
2341
+ # @param vm_name [String] The name of the virtual machine.
2342
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2343
+ # operation.
2344
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2345
+ # will be added to the HTTP request.
2346
+ #
2347
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2348
+ #
2349
+ def begin_run_command_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
2350
+ begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
2351
+ end
2352
+
2353
+ #
2354
+ # Run command on the VM.
2355
+ #
2356
+ # @param resource_group_name [String] The name of the resource group.
2357
+ # @param vm_name [String] The name of the virtual machine.
2358
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2359
+ # operation.
2360
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2361
+ # to the HTTP request.
2362
+ #
2363
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2364
+ #
2365
+ def begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:nil)
2366
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2367
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2368
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
2369
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2370
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2371
+
2372
+
2373
+ request_headers = {}
2374
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2375
+
2376
+ # Set Headers
2377
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2378
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2379
+
2380
+ # Serialize Request
2381
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::RunCommandInput.mapper()
2382
+ request_content = @client.serialize(request_mapper, parameters)
2383
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2384
+
2385
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'
2386
+
2387
+ request_url = @base_url || @client.base_url
2388
+
2389
+ options = {
2390
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2391
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2392
+ query_params: {'api-version' => @client.api_version},
2393
+ body: request_content,
2394
+ headers: request_headers.merge(custom_headers || {}),
2395
+ base_url: request_url
2396
+ }
2397
+ promise = @client.make_request_async(:post, path_template, options)
2398
+
2399
+ promise = promise.then do |result|
2400
+ http_response = result.response
2401
+ status_code = http_response.status
2402
+ response_content = http_response.body
2403
+ unless status_code == 200 || status_code == 202
2404
+ error_model = JSON.load(response_content)
2405
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2406
+ end
2407
+
2408
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2409
+ # Deserialize Response
2410
+ if status_code == 200
2411
+ begin
2412
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2413
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::RunCommandResult.mapper()
2414
+ result.body = @client.deserialize(result_mapper, parsed_response)
2415
+ rescue Exception => e
2416
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2417
+ end
2418
+ end
2419
+
2420
+ result
2421
+ end
2422
+
2423
+ promise.execute
2424
+ end
2425
+
2426
+ #
2427
+ # Gets all the virtual machines under the specified subscription for the
2428
+ # specified location.
2429
+ #
2430
+ # @param next_page_link [String] The NextLink from the previous successful call
2431
+ # to List operation.
2432
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2433
+ # will be added to the HTTP request.
2434
+ #
2435
+ # @return [VirtualMachineListResult] operation results.
2436
+ #
2437
+ def list_by_location_next(next_page_link, custom_headers:nil)
2438
+ response = list_by_location_next_async(next_page_link, custom_headers:custom_headers).value!
2439
+ response.body unless response.nil?
2440
+ end
2441
+
2442
+ #
2443
+ # Gets all the virtual machines under the specified subscription for the
2444
+ # specified location.
2445
+ #
2446
+ # @param next_page_link [String] The NextLink from the previous successful call
2447
+ # to List operation.
2448
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2449
+ # will be added to the HTTP request.
2450
+ #
2451
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2452
+ #
2453
+ def list_by_location_next_with_http_info(next_page_link, custom_headers:nil)
2454
+ list_by_location_next_async(next_page_link, custom_headers:custom_headers).value!
2455
+ end
2456
+
2457
+ #
2458
+ # Gets all the virtual machines under the specified subscription for the
2459
+ # specified location.
2460
+ #
2461
+ # @param next_page_link [String] The NextLink from the previous successful call
2462
+ # to List operation.
2463
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2464
+ # to the HTTP request.
2465
+ #
2466
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2467
+ #
2468
+ def list_by_location_next_async(next_page_link, custom_headers:nil)
2469
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2470
+
2471
+
2472
+ request_headers = {}
2473
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2474
+
2475
+ # Set Headers
2476
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2477
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2478
+ path_template = '{nextLink}'
2479
+
2480
+ request_url = @base_url || @client.base_url
2481
+
2482
+ options = {
2483
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2484
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2485
+ headers: request_headers.merge(custom_headers || {}),
2486
+ base_url: request_url
2487
+ }
2488
+ promise = @client.make_request_async(:get, path_template, options)
2489
+
2490
+ promise = promise.then do |result|
2491
+ http_response = result.response
2492
+ status_code = http_response.status
2493
+ response_content = http_response.body
2494
+ unless status_code == 200
2495
+ error_model = JSON.load(response_content)
2496
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2497
+ end
2498
+
2499
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2500
+ # Deserialize Response
2501
+ if status_code == 200
2502
+ begin
2503
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2504
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineListResult.mapper()
2505
+ result.body = @client.deserialize(result_mapper, parsed_response)
2506
+ rescue Exception => e
2507
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2508
+ end
2509
+ end
2510
+
2511
+ result
2512
+ end
2513
+
2514
+ promise.execute
2515
+ end
2516
+
2517
+ #
2518
+ # Lists all of the virtual machines in the specified resource group. Use the
2519
+ # nextLink property in the response to get the next page of virtual machines.
2520
+ #
2521
+ # @param next_page_link [String] The NextLink from the previous successful call
2522
+ # to List operation.
2523
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2524
+ # will be added to the HTTP request.
2525
+ #
2526
+ # @return [VirtualMachineListResult] operation results.
2527
+ #
2528
+ def list_next(next_page_link, custom_headers:nil)
2529
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
2530
+ response.body unless response.nil?
2531
+ end
2532
+
2533
+ #
2534
+ # Lists all of the virtual machines in the specified resource group. Use the
2535
+ # nextLink property in the response to get the next page of virtual machines.
2536
+ #
2537
+ # @param next_page_link [String] The NextLink from the previous successful call
2538
+ # to List operation.
2539
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2540
+ # will be added to the HTTP request.
2541
+ #
2542
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2543
+ #
2544
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
2545
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
2546
+ end
2547
+
2548
+ #
2549
+ # Lists all of the virtual machines in the specified resource group. Use the
2550
+ # nextLink property in the response to get the next page of virtual machines.
2551
+ #
2552
+ # @param next_page_link [String] The NextLink from the previous successful call
2553
+ # to List operation.
2554
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2555
+ # to the HTTP request.
2556
+ #
2557
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2558
+ #
2559
+ def list_next_async(next_page_link, custom_headers:nil)
2560
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2561
+
2562
+
2563
+ request_headers = {}
2564
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2565
+
2566
+ # Set Headers
2567
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2568
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2569
+ path_template = '{nextLink}'
2570
+
2571
+ request_url = @base_url || @client.base_url
2572
+
2573
+ options = {
2574
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2575
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2576
+ headers: request_headers.merge(custom_headers || {}),
2577
+ base_url: request_url
2578
+ }
2579
+ promise = @client.make_request_async(:get, path_template, options)
2580
+
2581
+ promise = promise.then do |result|
2582
+ http_response = result.response
2583
+ status_code = http_response.status
2584
+ response_content = http_response.body
2585
+ unless status_code == 200
2586
+ error_model = JSON.load(response_content)
2587
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2588
+ end
2589
+
2590
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2591
+ # Deserialize Response
2592
+ if status_code == 200
2593
+ begin
2594
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2595
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineListResult.mapper()
2596
+ result.body = @client.deserialize(result_mapper, parsed_response)
2597
+ rescue Exception => e
2598
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2599
+ end
2600
+ end
2601
+
2602
+ result
2603
+ end
2604
+
2605
+ promise.execute
2606
+ end
2607
+
2608
+ #
2609
+ # Lists all of the virtual machines in the specified subscription. Use the
2610
+ # nextLink property in the response to get the next page of virtual machines.
2611
+ #
2612
+ # @param next_page_link [String] The NextLink from the previous successful call
2613
+ # to List operation.
2614
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2615
+ # will be added to the HTTP request.
2616
+ #
2617
+ # @return [VirtualMachineListResult] operation results.
2618
+ #
2619
+ def list_all_next(next_page_link, custom_headers:nil)
2620
+ response = list_all_next_async(next_page_link, custom_headers:custom_headers).value!
2621
+ response.body unless response.nil?
2622
+ end
2623
+
2624
+ #
2625
+ # Lists all of the virtual machines in the specified subscription. Use the
2626
+ # nextLink property in the response to get the next page of virtual machines.
2627
+ #
2628
+ # @param next_page_link [String] The NextLink from the previous successful call
2629
+ # to List operation.
2630
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2631
+ # will be added to the HTTP request.
2632
+ #
2633
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2634
+ #
2635
+ def list_all_next_with_http_info(next_page_link, custom_headers:nil)
2636
+ list_all_next_async(next_page_link, custom_headers:custom_headers).value!
2637
+ end
2638
+
2639
+ #
2640
+ # Lists all of the virtual machines in the specified subscription. Use the
2641
+ # nextLink property in the response to get the next page of virtual machines.
2642
+ #
2643
+ # @param next_page_link [String] The NextLink from the previous successful call
2644
+ # to List operation.
2645
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2646
+ # to the HTTP request.
2647
+ #
2648
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2649
+ #
2650
+ def list_all_next_async(next_page_link, custom_headers:nil)
2651
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2652
+
2653
+
2654
+ request_headers = {}
2655
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2656
+
2657
+ # Set Headers
2658
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2659
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2660
+ path_template = '{nextLink}'
2661
+
2662
+ request_url = @base_url || @client.base_url
2663
+
2664
+ options = {
2665
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2666
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2667
+ headers: request_headers.merge(custom_headers || {}),
2668
+ base_url: request_url
2669
+ }
2670
+ promise = @client.make_request_async(:get, path_template, options)
2671
+
2672
+ promise = promise.then do |result|
2673
+ http_response = result.response
2674
+ status_code = http_response.status
2675
+ response_content = http_response.body
2676
+ unless status_code == 200
2677
+ error_model = JSON.load(response_content)
2678
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2679
+ end
2680
+
2681
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2682
+ # Deserialize Response
2683
+ if status_code == 200
2684
+ begin
2685
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2686
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineListResult.mapper()
2687
+ result.body = @client.deserialize(result_mapper, parsed_response)
2688
+ rescue Exception => e
2689
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2690
+ end
2691
+ end
2692
+
2693
+ result
2694
+ end
2695
+
2696
+ promise.execute
2697
+ end
2698
+
2699
+ #
2700
+ # Gets all the virtual machines under the specified subscription for the
2701
+ # specified location.
2702
+ #
2703
+ # @param location [String] The location for which virtual machines under the
2704
+ # subscription are queried.
2705
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2706
+ # will be added to the HTTP request.
2707
+ #
2708
+ # @return [VirtualMachineListResult] which provide lazy access to pages of the
2709
+ # response.
2710
+ #
2711
+ def list_by_location_as_lazy(location, custom_headers:nil)
2712
+ response = list_by_location_async(location, custom_headers:custom_headers).value!
2713
+ unless response.nil?
2714
+ page = response.body
2715
+ page.next_method = Proc.new do |next_page_link|
2716
+ list_by_location_next_async(next_page_link, custom_headers:custom_headers)
2717
+ end
2718
+ page
2719
+ end
2720
+ end
2721
+
2722
+ #
2723
+ # Lists all of the virtual machines in the specified resource group. Use the
2724
+ # nextLink property in the response to get the next page of virtual machines.
2725
+ #
2726
+ # @param resource_group_name [String] The name of the resource group.
2727
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2728
+ # will be added to the HTTP request.
2729
+ #
2730
+ # @return [VirtualMachineListResult] which provide lazy access to pages of the
2731
+ # response.
2732
+ #
2733
+ def list_as_lazy(resource_group_name, custom_headers:nil)
2734
+ response = list_async(resource_group_name, custom_headers:custom_headers).value!
2735
+ unless response.nil?
2736
+ page = response.body
2737
+ page.next_method = Proc.new do |next_page_link|
2738
+ list_next_async(next_page_link, custom_headers:custom_headers)
2739
+ end
2740
+ page
2741
+ end
2742
+ end
2743
+
2744
+ #
2745
+ # Lists all of the virtual machines in the specified subscription. Use the
2746
+ # nextLink property in the response to get the next page of virtual machines.
2747
+ #
2748
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2749
+ # will be added to the HTTP request.
2750
+ #
2751
+ # @return [VirtualMachineListResult] which provide lazy access to pages of the
2752
+ # response.
2753
+ #
2754
+ def list_all_as_lazy(custom_headers:nil)
2755
+ response = list_all_async(custom_headers:custom_headers).value!
2756
+ unless response.nil?
2757
+ page = response.body
2758
+ page.next_method = Proc.new do |next_page_link|
2759
+ list_all_next_async(next_page_link, custom_headers:custom_headers)
2760
+ end
2761
+ page
2762
+ end
2763
+ end
2764
+
2765
+ end
2766
+ end