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,3090 @@
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 VirtualMachineScaleSets
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the VirtualMachineScaleSets 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
+ # Create or update a VM scale set.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group.
28
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
29
+ # update.
30
+ # @param parameters [VirtualMachineScaleSet] The scale set object.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [VirtualMachineScaleSet] operation results.
35
+ #
36
+ def create_or_update(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
37
+ response = create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
38
+ response.body unless response.nil?
39
+ end
40
+
41
+ #
42
+ # @param resource_group_name [String] The name of the resource group.
43
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
44
+ # update.
45
+ # @param parameters [VirtualMachineScaleSet] The scale set object.
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [Concurrent::Promise] promise which provides async access to http
50
+ # response.
51
+ #
52
+ def create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
53
+ # Send request
54
+ promise = begin_create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers)
55
+
56
+ promise = promise.then do |response|
57
+ # Defining deserialization method.
58
+ deserialize_method = lambda do |parsed_response|
59
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSet.mapper()
60
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
61
+ end
62
+
63
+ # Waiting for response.
64
+ @client.get_long_running_operation_result(response, deserialize_method)
65
+ end
66
+
67
+ promise
68
+ end
69
+
70
+ #
71
+ # Update a VM scale set.
72
+ #
73
+ # @param resource_group_name [String] The name of the resource group.
74
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
75
+ # update.
76
+ # @param parameters [VirtualMachineScaleSetUpdate] The scale set object.
77
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
78
+ # will be added to the HTTP request.
79
+ #
80
+ # @return [VirtualMachineScaleSet] operation results.
81
+ #
82
+ def update(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
83
+ response = update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
84
+ response.body unless response.nil?
85
+ end
86
+
87
+ #
88
+ # @param resource_group_name [String] The name of the resource group.
89
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
90
+ # update.
91
+ # @param parameters [VirtualMachineScaleSetUpdate] The scale set object.
92
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
93
+ # will be added to the HTTP request.
94
+ #
95
+ # @return [Concurrent::Promise] promise which provides async access to http
96
+ # response.
97
+ #
98
+ def update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
99
+ # Send request
100
+ promise = begin_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers)
101
+
102
+ promise = promise.then do |response|
103
+ # Defining deserialization method.
104
+ deserialize_method = lambda do |parsed_response|
105
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSet.mapper()
106
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
107
+ end
108
+
109
+ # Waiting for response.
110
+ @client.get_long_running_operation_result(response, deserialize_method)
111
+ end
112
+
113
+ promise
114
+ end
115
+
116
+ #
117
+ # Deletes a VM scale set.
118
+ #
119
+ # @param resource_group_name [String] The name of the resource group.
120
+ # @param vm_scale_set_name [String] The name of the VM scale set.
121
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
122
+ # will be added to the HTTP request.
123
+ #
124
+ def delete(resource_group_name, vm_scale_set_name, custom_headers:nil)
125
+ response = delete_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
126
+ nil
127
+ end
128
+
129
+ #
130
+ # @param resource_group_name [String] The name of the resource group.
131
+ # @param vm_scale_set_name [String] The name of the VM scale set.
132
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
133
+ # will be added to the HTTP request.
134
+ #
135
+ # @return [Concurrent::Promise] promise which provides async access to http
136
+ # response.
137
+ #
138
+ def delete_async(resource_group_name, vm_scale_set_name, custom_headers:nil)
139
+ # Send request
140
+ promise = begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers)
141
+
142
+ promise = promise.then do |response|
143
+ # Defining deserialization method.
144
+ deserialize_method = lambda do |parsed_response|
145
+ end
146
+
147
+ # Waiting for response.
148
+ @client.get_long_running_operation_result(response, deserialize_method)
149
+ end
150
+
151
+ promise
152
+ end
153
+
154
+ #
155
+ # Display information about a virtual machine scale set.
156
+ #
157
+ # @param resource_group_name [String] The name of the resource group.
158
+ # @param vm_scale_set_name [String] The name of the VM scale set.
159
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
160
+ # will be added to the HTTP request.
161
+ #
162
+ # @return [VirtualMachineScaleSet] operation results.
163
+ #
164
+ def get(resource_group_name, vm_scale_set_name, custom_headers:nil)
165
+ response = get_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
166
+ response.body unless response.nil?
167
+ end
168
+
169
+ #
170
+ # Display information about a virtual machine scale set.
171
+ #
172
+ # @param resource_group_name [String] The name of the resource group.
173
+ # @param vm_scale_set_name [String] The name of the VM scale set.
174
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
175
+ # will be added to the HTTP request.
176
+ #
177
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
178
+ #
179
+ def get_with_http_info(resource_group_name, vm_scale_set_name, custom_headers:nil)
180
+ get_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
181
+ end
182
+
183
+ #
184
+ # Display information about a virtual machine scale set.
185
+ #
186
+ # @param resource_group_name [String] The name of the resource group.
187
+ # @param vm_scale_set_name [String] The name of the VM scale set.
188
+ # @param [Hash{String => String}] A hash of custom headers that will be added
189
+ # to the HTTP request.
190
+ #
191
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
192
+ #
193
+ def get_async(resource_group_name, vm_scale_set_name, custom_headers:nil)
194
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
195
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
196
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
197
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
198
+
199
+
200
+ request_headers = {}
201
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
202
+
203
+ # Set Headers
204
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
205
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
206
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'
207
+
208
+ request_url = @base_url || @client.base_url
209
+
210
+ options = {
211
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
212
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
213
+ query_params: {'api-version' => @client.api_version},
214
+ headers: request_headers.merge(custom_headers || {}),
215
+ base_url: request_url
216
+ }
217
+ promise = @client.make_request_async(:get, path_template, options)
218
+
219
+ promise = promise.then do |result|
220
+ http_response = result.response
221
+ status_code = http_response.status
222
+ response_content = http_response.body
223
+ unless status_code == 200
224
+ error_model = JSON.load(response_content)
225
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
226
+ end
227
+
228
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
229
+ # Deserialize Response
230
+ if status_code == 200
231
+ begin
232
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
233
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSet.mapper()
234
+ result.body = @client.deserialize(result_mapper, parsed_response)
235
+ rescue Exception => e
236
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
237
+ end
238
+ end
239
+
240
+ result
241
+ end
242
+
243
+ promise.execute
244
+ end
245
+
246
+ #
247
+ # Deallocates specific virtual machines in a VM scale set. Shuts down the
248
+ # virtual machines and releases the compute resources. You are not billed for
249
+ # the compute resources that this virtual machine scale set deallocates.
250
+ #
251
+ # @param resource_group_name [String] The name of the resource group.
252
+ # @param vm_scale_set_name [String] The name of the VM scale set.
253
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
254
+ # virtual machine instance IDs from the VM scale set.
255
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
256
+ # will be added to the HTTP request.
257
+ #
258
+ def deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
259
+ response = deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
260
+ nil
261
+ end
262
+
263
+ #
264
+ # @param resource_group_name [String] The name of the resource group.
265
+ # @param vm_scale_set_name [String] The name of the VM scale set.
266
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
267
+ # virtual machine instance IDs from the VM scale set.
268
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
269
+ # will be added to the HTTP request.
270
+ #
271
+ # @return [Concurrent::Promise] promise which provides async access to http
272
+ # response.
273
+ #
274
+ def deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
275
+ # Send request
276
+ promise = begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
277
+
278
+ promise = promise.then do |response|
279
+ # Defining deserialization method.
280
+ deserialize_method = lambda do |parsed_response|
281
+ end
282
+
283
+ # Waiting for response.
284
+ @client.get_long_running_operation_result(response, deserialize_method)
285
+ end
286
+
287
+ promise
288
+ end
289
+
290
+ #
291
+ # Deletes virtual machines in a VM scale set.
292
+ #
293
+ # @param resource_group_name [String] The name of the resource group.
294
+ # @param vm_scale_set_name [String] The name of the VM scale set.
295
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
296
+ # of virtual machine instance IDs from the VM scale set.
297
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
298
+ # will be added to the HTTP request.
299
+ #
300
+ def delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
301
+ response = delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
302
+ nil
303
+ end
304
+
305
+ #
306
+ # @param resource_group_name [String] The name of the resource group.
307
+ # @param vm_scale_set_name [String] The name of the VM scale set.
308
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
309
+ # of virtual machine instance IDs from the VM scale set.
310
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
311
+ # will be added to the HTTP request.
312
+ #
313
+ # @return [Concurrent::Promise] promise which provides async access to http
314
+ # response.
315
+ #
316
+ def delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
317
+ # Send request
318
+ promise = begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers)
319
+
320
+ promise = promise.then do |response|
321
+ # Defining deserialization method.
322
+ deserialize_method = lambda do |parsed_response|
323
+ end
324
+
325
+ # Waiting for response.
326
+ @client.get_long_running_operation_result(response, deserialize_method)
327
+ end
328
+
329
+ promise
330
+ end
331
+
332
+ #
333
+ # Gets the status of a VM scale set instance.
334
+ #
335
+ # @param resource_group_name [String] The name of the resource group.
336
+ # @param vm_scale_set_name [String] The name of the VM scale set.
337
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
338
+ # will be added to the HTTP request.
339
+ #
340
+ # @return [VirtualMachineScaleSetInstanceView] operation results.
341
+ #
342
+ def get_instance_view(resource_group_name, vm_scale_set_name, custom_headers:nil)
343
+ response = get_instance_view_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
344
+ response.body unless response.nil?
345
+ end
346
+
347
+ #
348
+ # Gets the status of a VM scale set instance.
349
+ #
350
+ # @param resource_group_name [String] The name of the resource group.
351
+ # @param vm_scale_set_name [String] The name of the VM scale set.
352
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
353
+ # will be added to the HTTP request.
354
+ #
355
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
356
+ #
357
+ def get_instance_view_with_http_info(resource_group_name, vm_scale_set_name, custom_headers:nil)
358
+ get_instance_view_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
359
+ end
360
+
361
+ #
362
+ # Gets the status of a VM scale set instance.
363
+ #
364
+ # @param resource_group_name [String] The name of the resource group.
365
+ # @param vm_scale_set_name [String] The name of the VM scale set.
366
+ # @param [Hash{String => String}] A hash of custom headers that will be added
367
+ # to the HTTP request.
368
+ #
369
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
370
+ #
371
+ def get_instance_view_async(resource_group_name, vm_scale_set_name, custom_headers:nil)
372
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
373
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
374
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
375
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
376
+
377
+
378
+ request_headers = {}
379
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
380
+
381
+ # Set Headers
382
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
383
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
384
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'
385
+
386
+ request_url = @base_url || @client.base_url
387
+
388
+ options = {
389
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
390
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
391
+ query_params: {'api-version' => @client.api_version},
392
+ headers: request_headers.merge(custom_headers || {}),
393
+ base_url: request_url
394
+ }
395
+ promise = @client.make_request_async(:get, path_template, options)
396
+
397
+ promise = promise.then do |result|
398
+ http_response = result.response
399
+ status_code = http_response.status
400
+ response_content = http_response.body
401
+ unless status_code == 200
402
+ error_model = JSON.load(response_content)
403
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
404
+ end
405
+
406
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
407
+ # Deserialize Response
408
+ if status_code == 200
409
+ begin
410
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
411
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetInstanceView.mapper()
412
+ result.body = @client.deserialize(result_mapper, parsed_response)
413
+ rescue Exception => e
414
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
415
+ end
416
+ end
417
+
418
+ result
419
+ end
420
+
421
+ promise.execute
422
+ end
423
+
424
+ #
425
+ # Gets a list of all VM scale sets under a resource group.
426
+ #
427
+ # @param resource_group_name [String] The name of the resource group.
428
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
429
+ # will be added to the HTTP request.
430
+ #
431
+ # @return [Array<VirtualMachineScaleSet>] operation results.
432
+ #
433
+ def list(resource_group_name, custom_headers:nil)
434
+ first_page = list_as_lazy(resource_group_name, custom_headers:custom_headers)
435
+ first_page.get_all_items
436
+ end
437
+
438
+ #
439
+ # Gets a list of all VM scale sets under a resource group.
440
+ #
441
+ # @param resource_group_name [String] The name of the resource group.
442
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
443
+ # will be added to the HTTP request.
444
+ #
445
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
446
+ #
447
+ def list_with_http_info(resource_group_name, custom_headers:nil)
448
+ list_async(resource_group_name, custom_headers:custom_headers).value!
449
+ end
450
+
451
+ #
452
+ # Gets a list of all VM scale sets under a resource group.
453
+ #
454
+ # @param resource_group_name [String] The name of the resource group.
455
+ # @param [Hash{String => String}] A hash of custom headers that will be added
456
+ # to the HTTP request.
457
+ #
458
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
459
+ #
460
+ def list_async(resource_group_name, custom_headers:nil)
461
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
462
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
463
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
464
+
465
+
466
+ request_headers = {}
467
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
468
+
469
+ # Set Headers
470
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
471
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
472
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'
473
+
474
+ request_url = @base_url || @client.base_url
475
+
476
+ options = {
477
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
478
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
479
+ query_params: {'api-version' => @client.api_version},
480
+ headers: request_headers.merge(custom_headers || {}),
481
+ base_url: request_url
482
+ }
483
+ promise = @client.make_request_async(:get, path_template, options)
484
+
485
+ promise = promise.then do |result|
486
+ http_response = result.response
487
+ status_code = http_response.status
488
+ response_content = http_response.body
489
+ unless status_code == 200
490
+ error_model = JSON.load(response_content)
491
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
492
+ end
493
+
494
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
495
+ # Deserialize Response
496
+ if status_code == 200
497
+ begin
498
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
499
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetListResult.mapper()
500
+ result.body = @client.deserialize(result_mapper, parsed_response)
501
+ rescue Exception => e
502
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
503
+ end
504
+ end
505
+
506
+ result
507
+ end
508
+
509
+ promise.execute
510
+ end
511
+
512
+ #
513
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
514
+ # associated resource group. Use nextLink property in the response to get the
515
+ # next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM
516
+ # Scale Sets.
517
+ #
518
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
519
+ # will be added to the HTTP request.
520
+ #
521
+ # @return [Array<VirtualMachineScaleSet>] operation results.
522
+ #
523
+ def list_all(custom_headers:nil)
524
+ first_page = list_all_as_lazy(custom_headers:custom_headers)
525
+ first_page.get_all_items
526
+ end
527
+
528
+ #
529
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
530
+ # associated resource group. Use nextLink property in the response to get the
531
+ # next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM
532
+ # Scale Sets.
533
+ #
534
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
535
+ # will be added to the HTTP request.
536
+ #
537
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
538
+ #
539
+ def list_all_with_http_info(custom_headers:nil)
540
+ list_all_async(custom_headers:custom_headers).value!
541
+ end
542
+
543
+ #
544
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
545
+ # associated resource group. Use nextLink property in the response to get the
546
+ # next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM
547
+ # Scale Sets.
548
+ #
549
+ # @param [Hash{String => String}] A hash of custom headers that will be added
550
+ # to the HTTP request.
551
+ #
552
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
553
+ #
554
+ def list_all_async(custom_headers:nil)
555
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
556
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
557
+
558
+
559
+ request_headers = {}
560
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
561
+
562
+ # Set Headers
563
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
564
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
565
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'
566
+
567
+ request_url = @base_url || @client.base_url
568
+
569
+ options = {
570
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
571
+ path_params: {'subscriptionId' => @client.subscription_id},
572
+ query_params: {'api-version' => @client.api_version},
573
+ headers: request_headers.merge(custom_headers || {}),
574
+ base_url: request_url
575
+ }
576
+ promise = @client.make_request_async(:get, path_template, options)
577
+
578
+ promise = promise.then do |result|
579
+ http_response = result.response
580
+ status_code = http_response.status
581
+ response_content = http_response.body
582
+ unless status_code == 200
583
+ error_model = JSON.load(response_content)
584
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
585
+ end
586
+
587
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
588
+ # Deserialize Response
589
+ if status_code == 200
590
+ begin
591
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
592
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetListWithLinkResult.mapper()
593
+ result.body = @client.deserialize(result_mapper, parsed_response)
594
+ rescue Exception => e
595
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
596
+ end
597
+ end
598
+
599
+ result
600
+ end
601
+
602
+ promise.execute
603
+ end
604
+
605
+ #
606
+ # Gets a list of SKUs available for your VM scale set, including the minimum
607
+ # and maximum VM instances allowed for each SKU.
608
+ #
609
+ # @param resource_group_name [String] The name of the resource group.
610
+ # @param vm_scale_set_name [String] The name of the VM scale set.
611
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
612
+ # will be added to the HTTP request.
613
+ #
614
+ # @return [Array<VirtualMachineScaleSetSku>] operation results.
615
+ #
616
+ def list_skus(resource_group_name, vm_scale_set_name, custom_headers:nil)
617
+ first_page = list_skus_as_lazy(resource_group_name, vm_scale_set_name, custom_headers:custom_headers)
618
+ first_page.get_all_items
619
+ end
620
+
621
+ #
622
+ # Gets a list of SKUs available for your VM scale set, including the minimum
623
+ # and maximum VM instances allowed for each SKU.
624
+ #
625
+ # @param resource_group_name [String] The name of the resource group.
626
+ # @param vm_scale_set_name [String] The name of the VM scale set.
627
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
628
+ # will be added to the HTTP request.
629
+ #
630
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
631
+ #
632
+ def list_skus_with_http_info(resource_group_name, vm_scale_set_name, custom_headers:nil)
633
+ list_skus_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
634
+ end
635
+
636
+ #
637
+ # Gets a list of SKUs available for your VM scale set, including the minimum
638
+ # and maximum VM instances allowed for each SKU.
639
+ #
640
+ # @param resource_group_name [String] The name of the resource group.
641
+ # @param vm_scale_set_name [String] The name of the VM scale set.
642
+ # @param [Hash{String => String}] A hash of custom headers that will be added
643
+ # to the HTTP request.
644
+ #
645
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
646
+ #
647
+ def list_skus_async(resource_group_name, vm_scale_set_name, custom_headers:nil)
648
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
649
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
650
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
651
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
652
+
653
+
654
+ request_headers = {}
655
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
656
+
657
+ # Set Headers
658
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
659
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
660
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'
661
+
662
+ request_url = @base_url || @client.base_url
663
+
664
+ options = {
665
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
666
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
667
+ query_params: {'api-version' => @client.api_version},
668
+ headers: request_headers.merge(custom_headers || {}),
669
+ base_url: request_url
670
+ }
671
+ promise = @client.make_request_async(:get, path_template, options)
672
+
673
+ promise = promise.then do |result|
674
+ http_response = result.response
675
+ status_code = http_response.status
676
+ response_content = http_response.body
677
+ unless status_code == 200
678
+ error_model = JSON.load(response_content)
679
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
680
+ end
681
+
682
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
683
+ # Deserialize Response
684
+ if status_code == 200
685
+ begin
686
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
687
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetListSkusResult.mapper()
688
+ result.body = @client.deserialize(result_mapper, parsed_response)
689
+ rescue Exception => e
690
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
691
+ end
692
+ end
693
+
694
+ result
695
+ end
696
+
697
+ promise.execute
698
+ end
699
+
700
+ #
701
+ # Gets list of OS upgrades on a VM scale set instance.
702
+ #
703
+ # @param resource_group_name [String] The name of the resource group.
704
+ # @param vm_scale_set_name [String] The name of the VM scale set.
705
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
706
+ # will be added to the HTTP request.
707
+ #
708
+ # @return [Array<UpgradeOperationHistoricalStatusInfo>] operation results.
709
+ #
710
+ def get_osupgrade_history(resource_group_name, vm_scale_set_name, custom_headers:nil)
711
+ first_page = get_osupgrade_history_as_lazy(resource_group_name, vm_scale_set_name, custom_headers:custom_headers)
712
+ first_page.get_all_items
713
+ end
714
+
715
+ #
716
+ # Gets list of OS upgrades on a VM scale set instance.
717
+ #
718
+ # @param resource_group_name [String] The name of the resource group.
719
+ # @param vm_scale_set_name [String] The name of the VM scale set.
720
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
721
+ # will be added to the HTTP request.
722
+ #
723
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
724
+ #
725
+ def get_osupgrade_history_with_http_info(resource_group_name, vm_scale_set_name, custom_headers:nil)
726
+ get_osupgrade_history_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
727
+ end
728
+
729
+ #
730
+ # Gets list of OS upgrades on a VM scale set instance.
731
+ #
732
+ # @param resource_group_name [String] The name of the resource group.
733
+ # @param vm_scale_set_name [String] The name of the VM scale set.
734
+ # @param [Hash{String => String}] A hash of custom headers that will be added
735
+ # to the HTTP request.
736
+ #
737
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
738
+ #
739
+ def get_osupgrade_history_async(resource_group_name, vm_scale_set_name, custom_headers:nil)
740
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
741
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
742
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
743
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
744
+
745
+
746
+ request_headers = {}
747
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
748
+
749
+ # Set Headers
750
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
751
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
752
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory'
753
+
754
+ request_url = @base_url || @client.base_url
755
+
756
+ options = {
757
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
758
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
759
+ query_params: {'api-version' => @client.api_version},
760
+ headers: request_headers.merge(custom_headers || {}),
761
+ base_url: request_url
762
+ }
763
+ promise = @client.make_request_async(:get, path_template, options)
764
+
765
+ promise = promise.then do |result|
766
+ http_response = result.response
767
+ status_code = http_response.status
768
+ response_content = http_response.body
769
+ unless status_code == 200
770
+ error_model = JSON.load(response_content)
771
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
772
+ end
773
+
774
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
775
+ # Deserialize Response
776
+ if status_code == 200
777
+ begin
778
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
779
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetListOSUpgradeHistory.mapper()
780
+ result.body = @client.deserialize(result_mapper, parsed_response)
781
+ rescue Exception => e
782
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
783
+ end
784
+ end
785
+
786
+ result
787
+ end
788
+
789
+ promise.execute
790
+ end
791
+
792
+ #
793
+ # Power off (stop) one or more virtual machines in a VM scale set. Note that
794
+ # resources are still attached and you are getting charged for the resources.
795
+ # Instead, use deallocate to release resources and avoid charges.
796
+ #
797
+ # @param resource_group_name [String] The name of the resource group.
798
+ # @param vm_scale_set_name [String] The name of the VM scale set.
799
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
800
+ # virtual machine instance IDs from the VM scale set.
801
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
802
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
803
+ # false indicates otherwise. Default value for this flag is false if not
804
+ # specified
805
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
806
+ # will be added to the HTTP request.
807
+ #
808
+ def power_off(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, skip_shutdown:false, custom_headers:nil)
809
+ response = power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
810
+ nil
811
+ end
812
+
813
+ #
814
+ # @param resource_group_name [String] The name of the resource group.
815
+ # @param vm_scale_set_name [String] The name of the VM scale set.
816
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
817
+ # virtual machine instance IDs from the VM scale set.
818
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
819
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
820
+ # false indicates otherwise. Default value for this flag is false if not
821
+ # specified
822
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
823
+ # will be added to the HTTP request.
824
+ #
825
+ # @return [Concurrent::Promise] promise which provides async access to http
826
+ # response.
827
+ #
828
+ def power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, skip_shutdown:false, custom_headers:nil)
829
+ # Send request
830
+ promise = begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, skip_shutdown:skip_shutdown, custom_headers:custom_headers)
831
+
832
+ promise = promise.then do |response|
833
+ # Defining deserialization method.
834
+ deserialize_method = lambda do |parsed_response|
835
+ end
836
+
837
+ # Waiting for response.
838
+ @client.get_long_running_operation_result(response, deserialize_method)
839
+ end
840
+
841
+ promise
842
+ end
843
+
844
+ #
845
+ # Restarts one or more virtual machines in a VM scale set.
846
+ #
847
+ # @param resource_group_name [String] The name of the resource group.
848
+ # @param vm_scale_set_name [String] The name of the VM scale set.
849
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
850
+ # virtual machine instance IDs from the VM scale set.
851
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
852
+ # will be added to the HTTP request.
853
+ #
854
+ def restart(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
855
+ response = restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
856
+ nil
857
+ end
858
+
859
+ #
860
+ # @param resource_group_name [String] The name of the resource group.
861
+ # @param vm_scale_set_name [String] The name of the VM scale set.
862
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
863
+ # virtual machine instance IDs from the VM scale set.
864
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
865
+ # will be added to the HTTP request.
866
+ #
867
+ # @return [Concurrent::Promise] promise which provides async access to http
868
+ # response.
869
+ #
870
+ def restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
871
+ # Send request
872
+ promise = begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
873
+
874
+ promise = promise.then do |response|
875
+ # Defining deserialization method.
876
+ deserialize_method = lambda do |parsed_response|
877
+ end
878
+
879
+ # Waiting for response.
880
+ @client.get_long_running_operation_result(response, deserialize_method)
881
+ end
882
+
883
+ promise
884
+ end
885
+
886
+ #
887
+ # Starts one or more virtual machines in a VM scale set.
888
+ #
889
+ # @param resource_group_name [String] The name of the resource group.
890
+ # @param vm_scale_set_name [String] The name of the VM scale set.
891
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
892
+ # virtual machine instance IDs from the VM scale set.
893
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
894
+ # will be added to the HTTP request.
895
+ #
896
+ def start(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
897
+ response = start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
898
+ nil
899
+ end
900
+
901
+ #
902
+ # @param resource_group_name [String] The name of the resource group.
903
+ # @param vm_scale_set_name [String] The name of the VM scale set.
904
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
905
+ # virtual machine instance IDs from the VM scale set.
906
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
907
+ # will be added to the HTTP request.
908
+ #
909
+ # @return [Concurrent::Promise] promise which provides async access to http
910
+ # response.
911
+ #
912
+ def start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
913
+ # Send request
914
+ promise = begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
915
+
916
+ promise = promise.then do |response|
917
+ # Defining deserialization method.
918
+ deserialize_method = lambda do |parsed_response|
919
+ end
920
+
921
+ # Waiting for response.
922
+ @client.get_long_running_operation_result(response, deserialize_method)
923
+ end
924
+
925
+ promise
926
+ end
927
+
928
+ #
929
+ # Redeploy one or more virtual machines in a VM scale set.
930
+ #
931
+ # @param resource_group_name [String] The name of the resource group.
932
+ # @param vm_scale_set_name [String] The name of the VM scale set.
933
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
934
+ # virtual machine instance IDs from the VM scale set.
935
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
936
+ # will be added to the HTTP request.
937
+ #
938
+ def redeploy(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
939
+ response = redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
940
+ nil
941
+ end
942
+
943
+ #
944
+ # @param resource_group_name [String] The name of the resource group.
945
+ # @param vm_scale_set_name [String] The name of the VM scale set.
946
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
947
+ # virtual machine instance IDs from the VM scale set.
948
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
949
+ # will be added to the HTTP request.
950
+ #
951
+ # @return [Concurrent::Promise] promise which provides async access to http
952
+ # response.
953
+ #
954
+ def redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
955
+ # Send request
956
+ promise = begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
957
+
958
+ promise = promise.then do |response|
959
+ # Defining deserialization method.
960
+ deserialize_method = lambda do |parsed_response|
961
+ end
962
+
963
+ # Waiting for response.
964
+ @client.get_long_running_operation_result(response, deserialize_method)
965
+ end
966
+
967
+ promise
968
+ end
969
+
970
+ #
971
+ # Perform maintenance on one or more virtual machines in a VM scale set.
972
+ # Operation on instances which are not eligible for perform maintenance will be
973
+ # failed. Please refer to best practices for more details:
974
+ # https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
975
+ #
976
+ # @param resource_group_name [String] The name of the resource group.
977
+ # @param vm_scale_set_name [String] The name of the VM scale set.
978
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
979
+ # virtual machine instance IDs from the VM scale set.
980
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
981
+ # will be added to the HTTP request.
982
+ #
983
+ def perform_maintenance(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
984
+ response = perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
985
+ nil
986
+ end
987
+
988
+ #
989
+ # @param resource_group_name [String] The name of the resource group.
990
+ # @param vm_scale_set_name [String] The name of the VM scale set.
991
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
992
+ # virtual machine instance IDs from the VM scale set.
993
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
994
+ # will be added to the HTTP request.
995
+ #
996
+ # @return [Concurrent::Promise] promise which provides async access to http
997
+ # response.
998
+ #
999
+ def perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1000
+ # Send request
1001
+ promise = begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
1002
+
1003
+ promise = promise.then do |response|
1004
+ # Defining deserialization method.
1005
+ deserialize_method = lambda do |parsed_response|
1006
+ end
1007
+
1008
+ # Waiting for response.
1009
+ @client.get_long_running_operation_result(response, deserialize_method)
1010
+ end
1011
+
1012
+ promise
1013
+ end
1014
+
1015
+ #
1016
+ # Upgrades one or more virtual machines to the latest SKU set in the VM scale
1017
+ # set model.
1018
+ #
1019
+ # @param resource_group_name [String] The name of the resource group.
1020
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1021
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1022
+ # of virtual machine instance IDs from the VM scale set.
1023
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1024
+ # will be added to the HTTP request.
1025
+ #
1026
+ def update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
1027
+ response = update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
1028
+ nil
1029
+ end
1030
+
1031
+ #
1032
+ # @param resource_group_name [String] The name of the resource group.
1033
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1034
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1035
+ # of virtual machine instance IDs from the VM scale set.
1036
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1037
+ # will be added to the HTTP request.
1038
+ #
1039
+ # @return [Concurrent::Promise] promise which provides async access to http
1040
+ # response.
1041
+ #
1042
+ def update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
1043
+ # Send request
1044
+ promise = begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers)
1045
+
1046
+ promise = promise.then do |response|
1047
+ # Defining deserialization method.
1048
+ deserialize_method = lambda do |parsed_response|
1049
+ end
1050
+
1051
+ # Waiting for response.
1052
+ @client.get_long_running_operation_result(response, deserialize_method)
1053
+ end
1054
+
1055
+ promise
1056
+ end
1057
+
1058
+ #
1059
+ # Reimages (upgrade the operating system) one or more virtual machines in a VM
1060
+ # scale set which don't have a ephemeral OS disk, for virtual machines who have
1061
+ # a ephemeral OS disk the virtual machine is reset to initial state.
1062
+ #
1063
+ # @param resource_group_name [String] The name of the resource group.
1064
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1065
+ # @param vm_scale_set_reimage_input [VirtualMachineScaleSetReimageParameters]
1066
+ # Parameters for Reimaging VM ScaleSet.
1067
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1068
+ # will be added to the HTTP request.
1069
+ #
1070
+ def reimage(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil)
1071
+ response = reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:vm_scale_set_reimage_input, custom_headers:custom_headers).value!
1072
+ nil
1073
+ end
1074
+
1075
+ #
1076
+ # @param resource_group_name [String] The name of the resource group.
1077
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1078
+ # @param vm_scale_set_reimage_input [VirtualMachineScaleSetReimageParameters]
1079
+ # Parameters for Reimaging VM ScaleSet.
1080
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1081
+ # will be added to the HTTP request.
1082
+ #
1083
+ # @return [Concurrent::Promise] promise which provides async access to http
1084
+ # response.
1085
+ #
1086
+ def reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil)
1087
+ # Send request
1088
+ promise = begin_reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:vm_scale_set_reimage_input, custom_headers:custom_headers)
1089
+
1090
+ promise = promise.then do |response|
1091
+ # Defining deserialization method.
1092
+ deserialize_method = lambda do |parsed_response|
1093
+ end
1094
+
1095
+ # Waiting for response.
1096
+ @client.get_long_running_operation_result(response, deserialize_method)
1097
+ end
1098
+
1099
+ promise
1100
+ end
1101
+
1102
+ #
1103
+ # Reimages all the disks ( including data disks ) in the virtual machines in a
1104
+ # VM scale set. This operation is only supported for managed disks.
1105
+ #
1106
+ # @param resource_group_name [String] The name of the resource group.
1107
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1108
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1109
+ # virtual machine instance IDs from the VM scale set.
1110
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1111
+ # will be added to the HTTP request.
1112
+ #
1113
+ def reimage_all(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1114
+ response = reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
1115
+ nil
1116
+ end
1117
+
1118
+ #
1119
+ # @param resource_group_name [String] The name of the resource group.
1120
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1121
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1122
+ # virtual machine instance IDs from the VM scale set.
1123
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1124
+ # will be added to the HTTP request.
1125
+ #
1126
+ # @return [Concurrent::Promise] promise which provides async access to http
1127
+ # response.
1128
+ #
1129
+ def reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1130
+ # Send request
1131
+ promise = begin_reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
1132
+
1133
+ promise = promise.then do |response|
1134
+ # Defining deserialization method.
1135
+ deserialize_method = lambda do |parsed_response|
1136
+ end
1137
+
1138
+ # Waiting for response.
1139
+ @client.get_long_running_operation_result(response, deserialize_method)
1140
+ end
1141
+
1142
+ promise
1143
+ end
1144
+
1145
+ #
1146
+ # Manual platform update domain walk to update virtual machines in a service
1147
+ # fabric virtual machine scale set.
1148
+ #
1149
+ # @param resource_group_name [String] The name of the resource group.
1150
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1151
+ # @param platform_update_domain [Integer] The platform update domain for which
1152
+ # a manual recovery walk is requested
1153
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1154
+ # will be added to the HTTP request.
1155
+ #
1156
+ # @return [RecoveryWalkResponse] operation results.
1157
+ #
1158
+ def force_recovery_service_fabric_platform_update_domain_walk(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:nil)
1159
+ response = force_recovery_service_fabric_platform_update_domain_walk_async(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:custom_headers).value!
1160
+ response.body unless response.nil?
1161
+ end
1162
+
1163
+ #
1164
+ # Manual platform update domain walk to update virtual machines in a service
1165
+ # fabric virtual machine scale set.
1166
+ #
1167
+ # @param resource_group_name [String] The name of the resource group.
1168
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1169
+ # @param platform_update_domain [Integer] The platform update domain for which
1170
+ # a manual recovery walk is requested
1171
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1172
+ # will be added to the HTTP request.
1173
+ #
1174
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1175
+ #
1176
+ def force_recovery_service_fabric_platform_update_domain_walk_with_http_info(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:nil)
1177
+ force_recovery_service_fabric_platform_update_domain_walk_async(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:custom_headers).value!
1178
+ end
1179
+
1180
+ #
1181
+ # Manual platform update domain walk to update virtual machines in a service
1182
+ # fabric virtual machine scale set.
1183
+ #
1184
+ # @param resource_group_name [String] The name of the resource group.
1185
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1186
+ # @param platform_update_domain [Integer] The platform update domain for which
1187
+ # a manual recovery walk is requested
1188
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1189
+ # to the HTTP request.
1190
+ #
1191
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1192
+ #
1193
+ def force_recovery_service_fabric_platform_update_domain_walk_async(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:nil)
1194
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1195
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1196
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1197
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1198
+ fail ArgumentError, 'platform_update_domain is nil' if platform_update_domain.nil?
1199
+
1200
+
1201
+ request_headers = {}
1202
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1203
+
1204
+ # Set Headers
1205
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1206
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1207
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk'
1208
+
1209
+ request_url = @base_url || @client.base_url
1210
+
1211
+ options = {
1212
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1213
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1214
+ query_params: {'api-version' => @client.api_version,'platformUpdateDomain' => platform_update_domain},
1215
+ headers: request_headers.merge(custom_headers || {}),
1216
+ base_url: request_url
1217
+ }
1218
+ promise = @client.make_request_async(:post, path_template, options)
1219
+
1220
+ promise = promise.then do |result|
1221
+ http_response = result.response
1222
+ status_code = http_response.status
1223
+ response_content = http_response.body
1224
+ unless status_code == 200
1225
+ error_model = JSON.load(response_content)
1226
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1227
+ end
1228
+
1229
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1230
+ # Deserialize Response
1231
+ if status_code == 200
1232
+ begin
1233
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1234
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::RecoveryWalkResponse.mapper()
1235
+ result.body = @client.deserialize(result_mapper, parsed_response)
1236
+ rescue Exception => e
1237
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1238
+ end
1239
+ end
1240
+
1241
+ result
1242
+ end
1243
+
1244
+ promise.execute
1245
+ end
1246
+
1247
+ #
1248
+ # Converts SinglePlacementGroup property to false for a existing virtual
1249
+ # machine scale set.
1250
+ #
1251
+ # @param resource_group_name [String] The name of the resource group.
1252
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set
1253
+ # to create or update.
1254
+ # @param parameters [VMScaleSetConvertToSinglePlacementGroupInput] The input
1255
+ # object for ConvertToSinglePlacementGroup API.
1256
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1257
+ # will be added to the HTTP request.
1258
+ #
1259
+ #
1260
+ def convert_to_single_placement_group(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1261
+ response = convert_to_single_placement_group_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
1262
+ nil
1263
+ end
1264
+
1265
+ #
1266
+ # Converts SinglePlacementGroup property to false for a existing virtual
1267
+ # machine scale set.
1268
+ #
1269
+ # @param resource_group_name [String] The name of the resource group.
1270
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set
1271
+ # to create or update.
1272
+ # @param parameters [VMScaleSetConvertToSinglePlacementGroupInput] The input
1273
+ # object for ConvertToSinglePlacementGroup API.
1274
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1275
+ # will be added to the HTTP request.
1276
+ #
1277
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1278
+ #
1279
+ def convert_to_single_placement_group_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1280
+ convert_to_single_placement_group_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
1281
+ end
1282
+
1283
+ #
1284
+ # Converts SinglePlacementGroup property to false for a existing virtual
1285
+ # machine scale set.
1286
+ #
1287
+ # @param resource_group_name [String] The name of the resource group.
1288
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set
1289
+ # to create or update.
1290
+ # @param parameters [VMScaleSetConvertToSinglePlacementGroupInput] The input
1291
+ # object for ConvertToSinglePlacementGroup API.
1292
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1293
+ # to the HTTP request.
1294
+ #
1295
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1296
+ #
1297
+ def convert_to_single_placement_group_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1298
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1299
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1300
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1301
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1302
+
1303
+
1304
+ request_headers = {}
1305
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1306
+
1307
+ # Set Headers
1308
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1309
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1310
+
1311
+ # Serialize Request
1312
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VMScaleSetConvertToSinglePlacementGroupInput.mapper()
1313
+ request_content = @client.serialize(request_mapper, parameters)
1314
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1315
+
1316
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/convertToSinglePlacementGroup'
1317
+
1318
+ request_url = @base_url || @client.base_url
1319
+
1320
+ options = {
1321
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1322
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1323
+ body: request_content,
1324
+ headers: request_headers.merge(custom_headers || {}),
1325
+ base_url: request_url
1326
+ }
1327
+ promise = @client.make_request_async(:post, path_template, options)
1328
+
1329
+ promise = promise.then do |result|
1330
+ http_response = result.response
1331
+ status_code = http_response.status
1332
+ response_content = http_response.body
1333
+ unless status_code == 200
1334
+ error_model = JSON.load(response_content)
1335
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1336
+ end
1337
+
1338
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1339
+
1340
+ result
1341
+ end
1342
+
1343
+ promise.execute
1344
+ end
1345
+
1346
+ #
1347
+ # Create or update a VM scale set.
1348
+ #
1349
+ # @param resource_group_name [String] The name of the resource group.
1350
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
1351
+ # update.
1352
+ # @param parameters [VirtualMachineScaleSet] The scale set object.
1353
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1354
+ # will be added to the HTTP request.
1355
+ #
1356
+ # @return [VirtualMachineScaleSet] operation results.
1357
+ #
1358
+ def begin_create_or_update(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1359
+ response = begin_create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
1360
+ response.body unless response.nil?
1361
+ end
1362
+
1363
+ #
1364
+ # Create or update a VM scale set.
1365
+ #
1366
+ # @param resource_group_name [String] The name of the resource group.
1367
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
1368
+ # update.
1369
+ # @param parameters [VirtualMachineScaleSet] The scale set object.
1370
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1371
+ # will be added to the HTTP request.
1372
+ #
1373
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1374
+ #
1375
+ def begin_create_or_update_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1376
+ begin_create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
1377
+ end
1378
+
1379
+ #
1380
+ # Create or update a VM scale set.
1381
+ #
1382
+ # @param resource_group_name [String] The name of the resource group.
1383
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
1384
+ # update.
1385
+ # @param parameters [VirtualMachineScaleSet] The scale set object.
1386
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1387
+ # to the HTTP request.
1388
+ #
1389
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1390
+ #
1391
+ def begin_create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1392
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1393
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1394
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1395
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1396
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1397
+
1398
+
1399
+ request_headers = {}
1400
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1401
+
1402
+ # Set Headers
1403
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1404
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1405
+
1406
+ # Serialize Request
1407
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSet.mapper()
1408
+ request_content = @client.serialize(request_mapper, parameters)
1409
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1410
+
1411
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'
1412
+
1413
+ request_url = @base_url || @client.base_url
1414
+
1415
+ options = {
1416
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1417
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1418
+ query_params: {'api-version' => @client.api_version},
1419
+ body: request_content,
1420
+ headers: request_headers.merge(custom_headers || {}),
1421
+ base_url: request_url
1422
+ }
1423
+ promise = @client.make_request_async(:put, path_template, options)
1424
+
1425
+ promise = promise.then do |result|
1426
+ http_response = result.response
1427
+ status_code = http_response.status
1428
+ response_content = http_response.body
1429
+ unless status_code == 200 || status_code == 201
1430
+ error_model = JSON.load(response_content)
1431
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1432
+ end
1433
+
1434
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1435
+ # Deserialize Response
1436
+ if status_code == 200
1437
+ begin
1438
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1439
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSet.mapper()
1440
+ result.body = @client.deserialize(result_mapper, parsed_response)
1441
+ rescue Exception => e
1442
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1443
+ end
1444
+ end
1445
+ # Deserialize Response
1446
+ if status_code == 201
1447
+ begin
1448
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1449
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSet.mapper()
1450
+ result.body = @client.deserialize(result_mapper, parsed_response)
1451
+ rescue Exception => e
1452
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1453
+ end
1454
+ end
1455
+
1456
+ result
1457
+ end
1458
+
1459
+ promise.execute
1460
+ end
1461
+
1462
+ #
1463
+ # Update a VM scale set.
1464
+ #
1465
+ # @param resource_group_name [String] The name of the resource group.
1466
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
1467
+ # update.
1468
+ # @param parameters [VirtualMachineScaleSetUpdate] The scale set object.
1469
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1470
+ # will be added to the HTTP request.
1471
+ #
1472
+ # @return [VirtualMachineScaleSet] operation results.
1473
+ #
1474
+ def begin_update(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1475
+ response = begin_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
1476
+ response.body unless response.nil?
1477
+ end
1478
+
1479
+ #
1480
+ # Update a VM scale set.
1481
+ #
1482
+ # @param resource_group_name [String] The name of the resource group.
1483
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
1484
+ # update.
1485
+ # @param parameters [VirtualMachineScaleSetUpdate] The scale set object.
1486
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1487
+ # will be added to the HTTP request.
1488
+ #
1489
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1490
+ #
1491
+ def begin_update_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1492
+ begin_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
1493
+ end
1494
+
1495
+ #
1496
+ # Update a VM scale set.
1497
+ #
1498
+ # @param resource_group_name [String] The name of the resource group.
1499
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
1500
+ # update.
1501
+ # @param parameters [VirtualMachineScaleSetUpdate] The scale set object.
1502
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1503
+ # to the HTTP request.
1504
+ #
1505
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1506
+ #
1507
+ def begin_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1508
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1509
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1510
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1511
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1512
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1513
+
1514
+
1515
+ request_headers = {}
1516
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1517
+
1518
+ # Set Headers
1519
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1520
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1521
+
1522
+ # Serialize Request
1523
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetUpdate.mapper()
1524
+ request_content = @client.serialize(request_mapper, parameters)
1525
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1526
+
1527
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'
1528
+
1529
+ request_url = @base_url || @client.base_url
1530
+
1531
+ options = {
1532
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1533
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1534
+ query_params: {'api-version' => @client.api_version},
1535
+ body: request_content,
1536
+ headers: request_headers.merge(custom_headers || {}),
1537
+ base_url: request_url
1538
+ }
1539
+ promise = @client.make_request_async(:patch, path_template, options)
1540
+
1541
+ promise = promise.then do |result|
1542
+ http_response = result.response
1543
+ status_code = http_response.status
1544
+ response_content = http_response.body
1545
+ unless status_code == 200
1546
+ error_model = JSON.load(response_content)
1547
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1548
+ end
1549
+
1550
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1551
+ # Deserialize Response
1552
+ if status_code == 200
1553
+ begin
1554
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1555
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSet.mapper()
1556
+ result.body = @client.deserialize(result_mapper, parsed_response)
1557
+ rescue Exception => e
1558
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1559
+ end
1560
+ end
1561
+
1562
+ result
1563
+ end
1564
+
1565
+ promise.execute
1566
+ end
1567
+
1568
+ #
1569
+ # Deletes a VM scale set.
1570
+ #
1571
+ # @param resource_group_name [String] The name of the resource group.
1572
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1573
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1574
+ # will be added to the HTTP request.
1575
+ #
1576
+ #
1577
+ def begin_delete(resource_group_name, vm_scale_set_name, custom_headers:nil)
1578
+ response = begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
1579
+ nil
1580
+ end
1581
+
1582
+ #
1583
+ # Deletes a VM scale set.
1584
+ #
1585
+ # @param resource_group_name [String] The name of the resource group.
1586
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1587
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1588
+ # will be added to the HTTP request.
1589
+ #
1590
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1591
+ #
1592
+ def begin_delete_with_http_info(resource_group_name, vm_scale_set_name, custom_headers:nil)
1593
+ begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
1594
+ end
1595
+
1596
+ #
1597
+ # Deletes a VM scale set.
1598
+ #
1599
+ # @param resource_group_name [String] The name of the resource group.
1600
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1601
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1602
+ # to the HTTP request.
1603
+ #
1604
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1605
+ #
1606
+ def begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers:nil)
1607
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1608
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1609
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1610
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1611
+
1612
+
1613
+ request_headers = {}
1614
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1615
+
1616
+ # Set Headers
1617
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1618
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1619
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'
1620
+
1621
+ request_url = @base_url || @client.base_url
1622
+
1623
+ options = {
1624
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1625
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1626
+ query_params: {'api-version' => @client.api_version},
1627
+ headers: request_headers.merge(custom_headers || {}),
1628
+ base_url: request_url
1629
+ }
1630
+ promise = @client.make_request_async(:delete, path_template, options)
1631
+
1632
+ promise = promise.then do |result|
1633
+ http_response = result.response
1634
+ status_code = http_response.status
1635
+ response_content = http_response.body
1636
+ unless status_code == 200 || status_code == 202 || status_code == 204
1637
+ error_model = JSON.load(response_content)
1638
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1639
+ end
1640
+
1641
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1642
+
1643
+ result
1644
+ end
1645
+
1646
+ promise.execute
1647
+ end
1648
+
1649
+ #
1650
+ # Deallocates specific virtual machines in a VM scale set. Shuts down the
1651
+ # virtual machines and releases the compute resources. You are not billed for
1652
+ # the compute resources that this virtual machine scale set deallocates.
1653
+ #
1654
+ # @param resource_group_name [String] The name of the resource group.
1655
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1656
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1657
+ # virtual machine instance IDs from the VM scale set.
1658
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1659
+ # will be added to the HTTP request.
1660
+ #
1661
+ #
1662
+ def begin_deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1663
+ response = begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
1664
+ nil
1665
+ end
1666
+
1667
+ #
1668
+ # Deallocates specific virtual machines in a VM scale set. Shuts down the
1669
+ # virtual machines and releases the compute resources. You are not billed for
1670
+ # the compute resources that this virtual machine scale set deallocates.
1671
+ #
1672
+ # @param resource_group_name [String] The name of the resource group.
1673
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1674
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1675
+ # virtual machine instance IDs from the VM scale set.
1676
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1677
+ # will be added to the HTTP request.
1678
+ #
1679
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1680
+ #
1681
+ def begin_deallocate_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1682
+ begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
1683
+ end
1684
+
1685
+ #
1686
+ # Deallocates specific virtual machines in a VM scale set. Shuts down the
1687
+ # virtual machines and releases the compute resources. You are not billed for
1688
+ # the compute resources that this virtual machine scale set deallocates.
1689
+ #
1690
+ # @param resource_group_name [String] The name of the resource group.
1691
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1692
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1693
+ # virtual machine instance IDs from the VM scale set.
1694
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1695
+ # to the HTTP request.
1696
+ #
1697
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1698
+ #
1699
+ def begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1700
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1701
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1702
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1703
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1704
+
1705
+
1706
+ request_headers = {}
1707
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1708
+
1709
+ # Set Headers
1710
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1711
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1712
+
1713
+ # Serialize Request
1714
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
1715
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
1716
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1717
+
1718
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'
1719
+
1720
+ request_url = @base_url || @client.base_url
1721
+
1722
+ options = {
1723
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1724
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1725
+ query_params: {'api-version' => @client.api_version},
1726
+ body: request_content,
1727
+ headers: request_headers.merge(custom_headers || {}),
1728
+ base_url: request_url
1729
+ }
1730
+ promise = @client.make_request_async(:post, path_template, options)
1731
+
1732
+ promise = promise.then do |result|
1733
+ http_response = result.response
1734
+ status_code = http_response.status
1735
+ response_content = http_response.body
1736
+ unless status_code == 200 || status_code == 202
1737
+ error_model = JSON.load(response_content)
1738
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1739
+ end
1740
+
1741
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1742
+
1743
+ result
1744
+ end
1745
+
1746
+ promise.execute
1747
+ end
1748
+
1749
+ #
1750
+ # Deletes virtual machines in a VM scale set.
1751
+ #
1752
+ # @param resource_group_name [String] The name of the resource group.
1753
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1754
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1755
+ # of virtual machine instance IDs from the VM scale set.
1756
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1757
+ # will be added to the HTTP request.
1758
+ #
1759
+ #
1760
+ def begin_delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
1761
+ response = begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
1762
+ nil
1763
+ end
1764
+
1765
+ #
1766
+ # Deletes virtual machines in a VM scale set.
1767
+ #
1768
+ # @param resource_group_name [String] The name of the resource group.
1769
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1770
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1771
+ # of virtual machine instance IDs from the VM scale set.
1772
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1773
+ # will be added to the HTTP request.
1774
+ #
1775
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1776
+ #
1777
+ def begin_delete_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
1778
+ begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
1779
+ end
1780
+
1781
+ #
1782
+ # Deletes virtual machines in a VM scale set.
1783
+ #
1784
+ # @param resource_group_name [String] The name of the resource group.
1785
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1786
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1787
+ # of virtual machine instance IDs from the VM scale set.
1788
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1789
+ # to the HTTP request.
1790
+ #
1791
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1792
+ #
1793
+ def begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
1794
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1795
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1796
+ fail ArgumentError, 'vm_instance_ids is nil' if vm_instance_ids.nil?
1797
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1798
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1799
+
1800
+
1801
+ request_headers = {}
1802
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1803
+
1804
+ # Set Headers
1805
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1806
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1807
+
1808
+ # Serialize Request
1809
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVMInstanceRequiredIDs.mapper()
1810
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
1811
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1812
+
1813
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'
1814
+
1815
+ request_url = @base_url || @client.base_url
1816
+
1817
+ options = {
1818
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1819
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1820
+ query_params: {'api-version' => @client.api_version},
1821
+ body: request_content,
1822
+ headers: request_headers.merge(custom_headers || {}),
1823
+ base_url: request_url
1824
+ }
1825
+ promise = @client.make_request_async(:post, path_template, options)
1826
+
1827
+ promise = promise.then do |result|
1828
+ http_response = result.response
1829
+ status_code = http_response.status
1830
+ response_content = http_response.body
1831
+ unless status_code == 200 || status_code == 202
1832
+ error_model = JSON.load(response_content)
1833
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1834
+ end
1835
+
1836
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1837
+
1838
+ result
1839
+ end
1840
+
1841
+ promise.execute
1842
+ end
1843
+
1844
+ #
1845
+ # Power off (stop) one or more virtual machines in a VM scale set. Note that
1846
+ # resources are still attached and you are getting charged for the resources.
1847
+ # Instead, use deallocate to release resources and avoid charges.
1848
+ #
1849
+ # @param resource_group_name [String] The name of the resource group.
1850
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1851
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1852
+ # virtual machine instance IDs from the VM scale set.
1853
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
1854
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
1855
+ # false indicates otherwise. Default value for this flag is false if not
1856
+ # specified
1857
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1858
+ # will be added to the HTTP request.
1859
+ #
1860
+ #
1861
+ def begin_power_off(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, skip_shutdown:false, custom_headers:nil)
1862
+ response = begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
1863
+ nil
1864
+ end
1865
+
1866
+ #
1867
+ # Power off (stop) one or more virtual machines in a VM scale set. Note that
1868
+ # resources are still attached and you are getting charged for the resources.
1869
+ # Instead, use deallocate to release resources and avoid charges.
1870
+ #
1871
+ # @param resource_group_name [String] The name of the resource group.
1872
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1873
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1874
+ # virtual machine instance IDs from the VM scale set.
1875
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
1876
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
1877
+ # false indicates otherwise. Default value for this flag is false if not
1878
+ # specified
1879
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1880
+ # will be added to the HTTP request.
1881
+ #
1882
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1883
+ #
1884
+ def begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, skip_shutdown:false, custom_headers:nil)
1885
+ begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
1886
+ end
1887
+
1888
+ #
1889
+ # Power off (stop) one or more virtual machines in a VM scale set. Note that
1890
+ # resources are still attached and you are getting charged for the resources.
1891
+ # Instead, use deallocate to release resources and avoid charges.
1892
+ #
1893
+ # @param resource_group_name [String] The name of the resource group.
1894
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1895
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1896
+ # virtual machine instance IDs from the VM scale set.
1897
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
1898
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
1899
+ # false indicates otherwise. Default value for this flag is false if not
1900
+ # specified
1901
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1902
+ # to the HTTP request.
1903
+ #
1904
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1905
+ #
1906
+ def begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, skip_shutdown:false, custom_headers:nil)
1907
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1908
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1909
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1910
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1911
+
1912
+
1913
+ request_headers = {}
1914
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1915
+
1916
+ # Set Headers
1917
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1918
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1919
+
1920
+ # Serialize Request
1921
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
1922
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
1923
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1924
+
1925
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'
1926
+
1927
+ request_url = @base_url || @client.base_url
1928
+
1929
+ options = {
1930
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1931
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1932
+ query_params: {'skipShutdown' => skip_shutdown,'api-version' => @client.api_version},
1933
+ body: request_content,
1934
+ headers: request_headers.merge(custom_headers || {}),
1935
+ base_url: request_url
1936
+ }
1937
+ promise = @client.make_request_async(:post, path_template, options)
1938
+
1939
+ promise = promise.then do |result|
1940
+ http_response = result.response
1941
+ status_code = http_response.status
1942
+ response_content = http_response.body
1943
+ unless status_code == 200 || status_code == 202
1944
+ error_model = JSON.load(response_content)
1945
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1946
+ end
1947
+
1948
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1949
+
1950
+ result
1951
+ end
1952
+
1953
+ promise.execute
1954
+ end
1955
+
1956
+ #
1957
+ # Restarts one or more virtual machines in a VM scale set.
1958
+ #
1959
+ # @param resource_group_name [String] The name of the resource group.
1960
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1961
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1962
+ # virtual machine instance IDs from the VM scale set.
1963
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1964
+ # will be added to the HTTP request.
1965
+ #
1966
+ #
1967
+ def begin_restart(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1968
+ response = begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
1969
+ nil
1970
+ end
1971
+
1972
+ #
1973
+ # Restarts one or more virtual machines in a VM scale set.
1974
+ #
1975
+ # @param resource_group_name [String] The name of the resource group.
1976
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1977
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1978
+ # virtual machine instance IDs from the VM scale set.
1979
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1980
+ # will be added to the HTTP request.
1981
+ #
1982
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1983
+ #
1984
+ def begin_restart_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1985
+ begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
1986
+ end
1987
+
1988
+ #
1989
+ # Restarts one or more virtual machines in a VM scale set.
1990
+ #
1991
+ # @param resource_group_name [String] The name of the resource group.
1992
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1993
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1994
+ # virtual machine instance IDs from the VM scale set.
1995
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1996
+ # to the HTTP request.
1997
+ #
1998
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1999
+ #
2000
+ def begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2001
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2002
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
2003
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2004
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2005
+
2006
+
2007
+ request_headers = {}
2008
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2009
+
2010
+ # Set Headers
2011
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2012
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2013
+
2014
+ # Serialize Request
2015
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
2016
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
2017
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2018
+
2019
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'
2020
+
2021
+ request_url = @base_url || @client.base_url
2022
+
2023
+ options = {
2024
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2025
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
2026
+ query_params: {'api-version' => @client.api_version},
2027
+ body: request_content,
2028
+ headers: request_headers.merge(custom_headers || {}),
2029
+ base_url: request_url
2030
+ }
2031
+ promise = @client.make_request_async(:post, path_template, options)
2032
+
2033
+ promise = promise.then do |result|
2034
+ http_response = result.response
2035
+ status_code = http_response.status
2036
+ response_content = http_response.body
2037
+ unless status_code == 200 || status_code == 202
2038
+ error_model = JSON.load(response_content)
2039
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2040
+ end
2041
+
2042
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2043
+
2044
+ result
2045
+ end
2046
+
2047
+ promise.execute
2048
+ end
2049
+
2050
+ #
2051
+ # Starts one or more virtual machines in a VM scale set.
2052
+ #
2053
+ # @param resource_group_name [String] The name of the resource group.
2054
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2055
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2056
+ # virtual machine instance IDs from the VM scale set.
2057
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2058
+ # will be added to the HTTP request.
2059
+ #
2060
+ #
2061
+ def begin_start(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2062
+ response = begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
2063
+ nil
2064
+ end
2065
+
2066
+ #
2067
+ # Starts one or more virtual machines in a VM scale set.
2068
+ #
2069
+ # @param resource_group_name [String] The name of the resource group.
2070
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2071
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2072
+ # virtual machine instance IDs from the VM scale set.
2073
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2074
+ # will be added to the HTTP request.
2075
+ #
2076
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2077
+ #
2078
+ def begin_start_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2079
+ begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
2080
+ end
2081
+
2082
+ #
2083
+ # Starts one or more virtual machines in a VM scale set.
2084
+ #
2085
+ # @param resource_group_name [String] The name of the resource group.
2086
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2087
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2088
+ # virtual machine instance IDs from the VM scale set.
2089
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2090
+ # to the HTTP request.
2091
+ #
2092
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2093
+ #
2094
+ def begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2095
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2096
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
2097
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2098
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2099
+
2100
+
2101
+ request_headers = {}
2102
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2103
+
2104
+ # Set Headers
2105
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2106
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2107
+
2108
+ # Serialize Request
2109
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
2110
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
2111
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2112
+
2113
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'
2114
+
2115
+ request_url = @base_url || @client.base_url
2116
+
2117
+ options = {
2118
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2119
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
2120
+ query_params: {'api-version' => @client.api_version},
2121
+ body: request_content,
2122
+ headers: request_headers.merge(custom_headers || {}),
2123
+ base_url: request_url
2124
+ }
2125
+ promise = @client.make_request_async(:post, path_template, options)
2126
+
2127
+ promise = promise.then do |result|
2128
+ http_response = result.response
2129
+ status_code = http_response.status
2130
+ response_content = http_response.body
2131
+ unless status_code == 200 || status_code == 202
2132
+ error_model = JSON.load(response_content)
2133
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2134
+ end
2135
+
2136
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2137
+
2138
+ result
2139
+ end
2140
+
2141
+ promise.execute
2142
+ end
2143
+
2144
+ #
2145
+ # Redeploy one or more virtual machines in a VM scale set.
2146
+ #
2147
+ # @param resource_group_name [String] The name of the resource group.
2148
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2149
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2150
+ # virtual machine instance IDs from the VM scale set.
2151
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2152
+ # will be added to the HTTP request.
2153
+ #
2154
+ #
2155
+ def begin_redeploy(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2156
+ response = begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
2157
+ nil
2158
+ end
2159
+
2160
+ #
2161
+ # Redeploy one or more virtual machines in a VM scale set.
2162
+ #
2163
+ # @param resource_group_name [String] The name of the resource group.
2164
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2165
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2166
+ # virtual machine instance IDs from the VM scale set.
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_redeploy_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2173
+ begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
2174
+ end
2175
+
2176
+ #
2177
+ # Redeploy one or more virtual machines in a VM scale set.
2178
+ #
2179
+ # @param resource_group_name [String] The name of the resource group.
2180
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2181
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2182
+ # virtual machine instance IDs from the VM scale set.
2183
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2184
+ # to the HTTP request.
2185
+ #
2186
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2187
+ #
2188
+ def begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2189
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2190
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
2191
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2192
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2193
+
2194
+
2195
+ request_headers = {}
2196
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2197
+
2198
+ # Set Headers
2199
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2200
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2201
+
2202
+ # Serialize Request
2203
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
2204
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
2205
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2206
+
2207
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy'
2208
+
2209
+ request_url = @base_url || @client.base_url
2210
+
2211
+ options = {
2212
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2213
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
2214
+ query_params: {'api-version' => @client.api_version},
2215
+ body: request_content,
2216
+ headers: request_headers.merge(custom_headers || {}),
2217
+ base_url: request_url
2218
+ }
2219
+ promise = @client.make_request_async(:post, path_template, options)
2220
+
2221
+ promise = promise.then do |result|
2222
+ http_response = result.response
2223
+ status_code = http_response.status
2224
+ response_content = http_response.body
2225
+ unless status_code == 200 || status_code == 202
2226
+ error_model = JSON.load(response_content)
2227
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2228
+ end
2229
+
2230
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2231
+
2232
+ result
2233
+ end
2234
+
2235
+ promise.execute
2236
+ end
2237
+
2238
+ #
2239
+ # Perform maintenance on one or more virtual machines in a VM scale set.
2240
+ # Operation on instances which are not eligible for perform maintenance will be
2241
+ # failed. Please refer to best practices for more details:
2242
+ # https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
2243
+ #
2244
+ # @param resource_group_name [String] The name of the resource group.
2245
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2246
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2247
+ # virtual machine instance IDs from the VM scale set.
2248
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2249
+ # will be added to the HTTP request.
2250
+ #
2251
+ #
2252
+ def begin_perform_maintenance(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2253
+ response = begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
2254
+ nil
2255
+ end
2256
+
2257
+ #
2258
+ # Perform maintenance on one or more virtual machines in a VM scale set.
2259
+ # Operation on instances which are not eligible for perform maintenance will be
2260
+ # failed. Please refer to best practices for more details:
2261
+ # https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
2262
+ #
2263
+ # @param resource_group_name [String] The name of the resource group.
2264
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2265
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2266
+ # virtual machine instance IDs from the VM scale set.
2267
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2268
+ # will be added to the HTTP request.
2269
+ #
2270
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2271
+ #
2272
+ def begin_perform_maintenance_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2273
+ begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
2274
+ end
2275
+
2276
+ #
2277
+ # Perform maintenance on one or more virtual machines in a VM scale set.
2278
+ # Operation on instances which are not eligible for perform maintenance will be
2279
+ # failed. Please refer to best practices for more details:
2280
+ # https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
2281
+ #
2282
+ # @param resource_group_name [String] The name of the resource group.
2283
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2284
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2285
+ # virtual machine instance IDs from the VM scale set.
2286
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2287
+ # to the HTTP request.
2288
+ #
2289
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2290
+ #
2291
+ def begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2292
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2293
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
2294
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2295
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2296
+
2297
+
2298
+ request_headers = {}
2299
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2300
+
2301
+ # Set Headers
2302
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2303
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2304
+
2305
+ # Serialize Request
2306
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
2307
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
2308
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2309
+
2310
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance'
2311
+
2312
+ request_url = @base_url || @client.base_url
2313
+
2314
+ options = {
2315
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2316
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
2317
+ query_params: {'api-version' => @client.api_version},
2318
+ body: request_content,
2319
+ headers: request_headers.merge(custom_headers || {}),
2320
+ base_url: request_url
2321
+ }
2322
+ promise = @client.make_request_async(:post, path_template, options)
2323
+
2324
+ promise = promise.then do |result|
2325
+ http_response = result.response
2326
+ status_code = http_response.status
2327
+ response_content = http_response.body
2328
+ unless status_code == 200 || status_code == 202
2329
+ error_model = JSON.load(response_content)
2330
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2331
+ end
2332
+
2333
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2334
+
2335
+ result
2336
+ end
2337
+
2338
+ promise.execute
2339
+ end
2340
+
2341
+ #
2342
+ # Upgrades one or more virtual machines to the latest SKU set in the VM scale
2343
+ # set model.
2344
+ #
2345
+ # @param resource_group_name [String] The name of the resource group.
2346
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2347
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
2348
+ # of virtual machine instance IDs from the VM scale set.
2349
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2350
+ # will be added to the HTTP request.
2351
+ #
2352
+ #
2353
+ def begin_update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
2354
+ response = begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
2355
+ nil
2356
+ end
2357
+
2358
+ #
2359
+ # Upgrades one or more virtual machines to the latest SKU set in the VM scale
2360
+ # set model.
2361
+ #
2362
+ # @param resource_group_name [String] The name of the resource group.
2363
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2364
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
2365
+ # of virtual machine instance IDs from the VM scale set.
2366
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2367
+ # will be added to the HTTP request.
2368
+ #
2369
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2370
+ #
2371
+ def begin_update_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
2372
+ begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
2373
+ end
2374
+
2375
+ #
2376
+ # Upgrades one or more virtual machines to the latest SKU set in the VM scale
2377
+ # set model.
2378
+ #
2379
+ # @param resource_group_name [String] The name of the resource group.
2380
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2381
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
2382
+ # of virtual machine instance IDs from the VM scale set.
2383
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2384
+ # to the HTTP request.
2385
+ #
2386
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2387
+ #
2388
+ def begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
2389
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2390
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
2391
+ fail ArgumentError, 'vm_instance_ids is nil' if vm_instance_ids.nil?
2392
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2393
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2394
+
2395
+
2396
+ request_headers = {}
2397
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2398
+
2399
+ # Set Headers
2400
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2401
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2402
+
2403
+ # Serialize Request
2404
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVMInstanceRequiredIDs.mapper()
2405
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
2406
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2407
+
2408
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'
2409
+
2410
+ request_url = @base_url || @client.base_url
2411
+
2412
+ options = {
2413
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2414
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
2415
+ query_params: {'api-version' => @client.api_version},
2416
+ body: request_content,
2417
+ headers: request_headers.merge(custom_headers || {}),
2418
+ base_url: request_url
2419
+ }
2420
+ promise = @client.make_request_async(:post, path_template, options)
2421
+
2422
+ promise = promise.then do |result|
2423
+ http_response = result.response
2424
+ status_code = http_response.status
2425
+ response_content = http_response.body
2426
+ unless status_code == 200 || status_code == 202
2427
+ error_model = JSON.load(response_content)
2428
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2429
+ end
2430
+
2431
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2432
+
2433
+ result
2434
+ end
2435
+
2436
+ promise.execute
2437
+ end
2438
+
2439
+ #
2440
+ # Reimages (upgrade the operating system) one or more virtual machines in a VM
2441
+ # scale set which don't have a ephemeral OS disk, for virtual machines who have
2442
+ # a ephemeral OS disk the virtual machine is reset to initial state.
2443
+ #
2444
+ # @param resource_group_name [String] The name of the resource group.
2445
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2446
+ # @param vm_scale_set_reimage_input [VirtualMachineScaleSetReimageParameters]
2447
+ # Parameters for Reimaging VM ScaleSet.
2448
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2449
+ # will be added to the HTTP request.
2450
+ #
2451
+ #
2452
+ def begin_reimage(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil)
2453
+ response = begin_reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:vm_scale_set_reimage_input, custom_headers:custom_headers).value!
2454
+ nil
2455
+ end
2456
+
2457
+ #
2458
+ # Reimages (upgrade the operating system) one or more virtual machines in a VM
2459
+ # scale set which don't have a ephemeral OS disk, for virtual machines who have
2460
+ # a ephemeral OS disk the virtual machine is reset to initial state.
2461
+ #
2462
+ # @param resource_group_name [String] The name of the resource group.
2463
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2464
+ # @param vm_scale_set_reimage_input [VirtualMachineScaleSetReimageParameters]
2465
+ # Parameters for Reimaging VM ScaleSet.
2466
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2467
+ # will be added to the HTTP request.
2468
+ #
2469
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2470
+ #
2471
+ def begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil)
2472
+ begin_reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:vm_scale_set_reimage_input, custom_headers:custom_headers).value!
2473
+ end
2474
+
2475
+ #
2476
+ # Reimages (upgrade the operating system) one or more virtual machines in a VM
2477
+ # scale set which don't have a ephemeral OS disk, for virtual machines who have
2478
+ # a ephemeral OS disk the virtual machine is reset to initial state.
2479
+ #
2480
+ # @param resource_group_name [String] The name of the resource group.
2481
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2482
+ # @param vm_scale_set_reimage_input [VirtualMachineScaleSetReimageParameters]
2483
+ # Parameters for Reimaging VM ScaleSet.
2484
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2485
+ # to the HTTP request.
2486
+ #
2487
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2488
+ #
2489
+ def begin_reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil)
2490
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2491
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
2492
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2493
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2494
+
2495
+
2496
+ request_headers = {}
2497
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2498
+
2499
+ # Set Headers
2500
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2501
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2502
+
2503
+ # Serialize Request
2504
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetReimageParameters.mapper()
2505
+ request_content = @client.serialize(request_mapper, vm_scale_set_reimage_input)
2506
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2507
+
2508
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'
2509
+
2510
+ request_url = @base_url || @client.base_url
2511
+
2512
+ options = {
2513
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2514
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
2515
+ query_params: {'api-version' => @client.api_version},
2516
+ body: request_content,
2517
+ headers: request_headers.merge(custom_headers || {}),
2518
+ base_url: request_url
2519
+ }
2520
+ promise = @client.make_request_async(:post, path_template, options)
2521
+
2522
+ promise = promise.then do |result|
2523
+ http_response = result.response
2524
+ status_code = http_response.status
2525
+ response_content = http_response.body
2526
+ unless status_code == 200 || status_code == 202
2527
+ error_model = JSON.load(response_content)
2528
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2529
+ end
2530
+
2531
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2532
+
2533
+ result
2534
+ end
2535
+
2536
+ promise.execute
2537
+ end
2538
+
2539
+ #
2540
+ # Reimages all the disks ( including data disks ) in the virtual machines in a
2541
+ # VM scale set. This operation is only supported for managed disks.
2542
+ #
2543
+ # @param resource_group_name [String] The name of the resource group.
2544
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2545
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2546
+ # virtual machine instance IDs from the VM scale set.
2547
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2548
+ # will be added to the HTTP request.
2549
+ #
2550
+ #
2551
+ def begin_reimage_all(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2552
+ response = begin_reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
2553
+ nil
2554
+ end
2555
+
2556
+ #
2557
+ # Reimages all the disks ( including data disks ) in the virtual machines in a
2558
+ # VM scale set. This operation is only supported for managed disks.
2559
+ #
2560
+ # @param resource_group_name [String] The name of the resource group.
2561
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2562
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2563
+ # virtual machine instance IDs from the VM scale set.
2564
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2565
+ # will be added to the HTTP request.
2566
+ #
2567
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2568
+ #
2569
+ def begin_reimage_all_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2570
+ begin_reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
2571
+ end
2572
+
2573
+ #
2574
+ # Reimages all the disks ( including data disks ) in the virtual machines in a
2575
+ # VM scale set. This operation is only supported for managed disks.
2576
+ #
2577
+ # @param resource_group_name [String] The name of the resource group.
2578
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2579
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2580
+ # virtual machine instance IDs from the VM scale set.
2581
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2582
+ # to the HTTP request.
2583
+ #
2584
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2585
+ #
2586
+ def begin_reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2587
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2588
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
2589
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2590
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2591
+
2592
+
2593
+ request_headers = {}
2594
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2595
+
2596
+ # Set Headers
2597
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2598
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2599
+
2600
+ # Serialize Request
2601
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
2602
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
2603
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2604
+
2605
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'
2606
+
2607
+ request_url = @base_url || @client.base_url
2608
+
2609
+ options = {
2610
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2611
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
2612
+ query_params: {'api-version' => @client.api_version},
2613
+ body: request_content,
2614
+ headers: request_headers.merge(custom_headers || {}),
2615
+ base_url: request_url
2616
+ }
2617
+ promise = @client.make_request_async(:post, path_template, options)
2618
+
2619
+ promise = promise.then do |result|
2620
+ http_response = result.response
2621
+ status_code = http_response.status
2622
+ response_content = http_response.body
2623
+ unless status_code == 200 || status_code == 202
2624
+ error_model = JSON.load(response_content)
2625
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2626
+ end
2627
+
2628
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2629
+
2630
+ result
2631
+ end
2632
+
2633
+ promise.execute
2634
+ end
2635
+
2636
+ #
2637
+ # Gets a list of all VM scale sets under a resource group.
2638
+ #
2639
+ # @param next_page_link [String] The NextLink from the previous successful call
2640
+ # to List operation.
2641
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2642
+ # will be added to the HTTP request.
2643
+ #
2644
+ # @return [VirtualMachineScaleSetListResult] operation results.
2645
+ #
2646
+ def list_next(next_page_link, custom_headers:nil)
2647
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
2648
+ response.body unless response.nil?
2649
+ end
2650
+
2651
+ #
2652
+ # Gets a list of all VM scale sets under a resource group.
2653
+ #
2654
+ # @param next_page_link [String] The NextLink from the previous successful call
2655
+ # to List operation.
2656
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2657
+ # will be added to the HTTP request.
2658
+ #
2659
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2660
+ #
2661
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
2662
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
2663
+ end
2664
+
2665
+ #
2666
+ # Gets a list of all VM scale sets under a resource group.
2667
+ #
2668
+ # @param next_page_link [String] The NextLink from the previous successful call
2669
+ # to List operation.
2670
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2671
+ # to the HTTP request.
2672
+ #
2673
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2674
+ #
2675
+ def list_next_async(next_page_link, custom_headers:nil)
2676
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2677
+
2678
+
2679
+ request_headers = {}
2680
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2681
+
2682
+ # Set Headers
2683
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2684
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2685
+ path_template = '{nextLink}'
2686
+
2687
+ request_url = @base_url || @client.base_url
2688
+
2689
+ options = {
2690
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2691
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2692
+ headers: request_headers.merge(custom_headers || {}),
2693
+ base_url: request_url
2694
+ }
2695
+ promise = @client.make_request_async(:get, path_template, options)
2696
+
2697
+ promise = promise.then do |result|
2698
+ http_response = result.response
2699
+ status_code = http_response.status
2700
+ response_content = http_response.body
2701
+ unless status_code == 200
2702
+ error_model = JSON.load(response_content)
2703
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2704
+ end
2705
+
2706
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2707
+ # Deserialize Response
2708
+ if status_code == 200
2709
+ begin
2710
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2711
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetListResult.mapper()
2712
+ result.body = @client.deserialize(result_mapper, parsed_response)
2713
+ rescue Exception => e
2714
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2715
+ end
2716
+ end
2717
+
2718
+ result
2719
+ end
2720
+
2721
+ promise.execute
2722
+ end
2723
+
2724
+ #
2725
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
2726
+ # associated resource group. Use nextLink property in the response to get the
2727
+ # next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM
2728
+ # Scale Sets.
2729
+ #
2730
+ # @param next_page_link [String] The NextLink from the previous successful call
2731
+ # to List operation.
2732
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2733
+ # will be added to the HTTP request.
2734
+ #
2735
+ # @return [VirtualMachineScaleSetListWithLinkResult] operation results.
2736
+ #
2737
+ def list_all_next(next_page_link, custom_headers:nil)
2738
+ response = list_all_next_async(next_page_link, custom_headers:custom_headers).value!
2739
+ response.body unless response.nil?
2740
+ end
2741
+
2742
+ #
2743
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
2744
+ # associated resource group. Use nextLink property in the response to get the
2745
+ # next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM
2746
+ # Scale Sets.
2747
+ #
2748
+ # @param next_page_link [String] The NextLink from the previous successful call
2749
+ # to List operation.
2750
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2751
+ # will be added to the HTTP request.
2752
+ #
2753
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2754
+ #
2755
+ def list_all_next_with_http_info(next_page_link, custom_headers:nil)
2756
+ list_all_next_async(next_page_link, custom_headers:custom_headers).value!
2757
+ end
2758
+
2759
+ #
2760
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
2761
+ # associated resource group. Use nextLink property in the response to get the
2762
+ # next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM
2763
+ # Scale Sets.
2764
+ #
2765
+ # @param next_page_link [String] The NextLink from the previous successful call
2766
+ # to List operation.
2767
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2768
+ # to the HTTP request.
2769
+ #
2770
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2771
+ #
2772
+ def list_all_next_async(next_page_link, custom_headers:nil)
2773
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2774
+
2775
+
2776
+ request_headers = {}
2777
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2778
+
2779
+ # Set Headers
2780
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2781
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2782
+ path_template = '{nextLink}'
2783
+
2784
+ request_url = @base_url || @client.base_url
2785
+
2786
+ options = {
2787
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2788
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2789
+ headers: request_headers.merge(custom_headers || {}),
2790
+ base_url: request_url
2791
+ }
2792
+ promise = @client.make_request_async(:get, path_template, options)
2793
+
2794
+ promise = promise.then do |result|
2795
+ http_response = result.response
2796
+ status_code = http_response.status
2797
+ response_content = http_response.body
2798
+ unless status_code == 200
2799
+ error_model = JSON.load(response_content)
2800
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2801
+ end
2802
+
2803
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2804
+ # Deserialize Response
2805
+ if status_code == 200
2806
+ begin
2807
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2808
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetListWithLinkResult.mapper()
2809
+ result.body = @client.deserialize(result_mapper, parsed_response)
2810
+ rescue Exception => e
2811
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2812
+ end
2813
+ end
2814
+
2815
+ result
2816
+ end
2817
+
2818
+ promise.execute
2819
+ end
2820
+
2821
+ #
2822
+ # Gets a list of SKUs available for your VM scale set, including the minimum
2823
+ # and maximum VM instances allowed for each SKU.
2824
+ #
2825
+ # @param next_page_link [String] The NextLink from the previous successful call
2826
+ # to List operation.
2827
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2828
+ # will be added to the HTTP request.
2829
+ #
2830
+ # @return [VirtualMachineScaleSetListSkusResult] operation results.
2831
+ #
2832
+ def list_skus_next(next_page_link, custom_headers:nil)
2833
+ response = list_skus_next_async(next_page_link, custom_headers:custom_headers).value!
2834
+ response.body unless response.nil?
2835
+ end
2836
+
2837
+ #
2838
+ # Gets a list of SKUs available for your VM scale set, including the minimum
2839
+ # and maximum VM instances allowed for each SKU.
2840
+ #
2841
+ # @param next_page_link [String] The NextLink from the previous successful call
2842
+ # to List operation.
2843
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2844
+ # will be added to the HTTP request.
2845
+ #
2846
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2847
+ #
2848
+ def list_skus_next_with_http_info(next_page_link, custom_headers:nil)
2849
+ list_skus_next_async(next_page_link, custom_headers:custom_headers).value!
2850
+ end
2851
+
2852
+ #
2853
+ # Gets a list of SKUs available for your VM scale set, including the minimum
2854
+ # and maximum VM instances allowed for each SKU.
2855
+ #
2856
+ # @param next_page_link [String] The NextLink from the previous successful call
2857
+ # to List operation.
2858
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2859
+ # to the HTTP request.
2860
+ #
2861
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2862
+ #
2863
+ def list_skus_next_async(next_page_link, custom_headers:nil)
2864
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2865
+
2866
+
2867
+ request_headers = {}
2868
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2869
+
2870
+ # Set Headers
2871
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2872
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2873
+ path_template = '{nextLink}'
2874
+
2875
+ request_url = @base_url || @client.base_url
2876
+
2877
+ options = {
2878
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2879
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2880
+ headers: request_headers.merge(custom_headers || {}),
2881
+ base_url: request_url
2882
+ }
2883
+ promise = @client.make_request_async(:get, path_template, options)
2884
+
2885
+ promise = promise.then do |result|
2886
+ http_response = result.response
2887
+ status_code = http_response.status
2888
+ response_content = http_response.body
2889
+ unless status_code == 200
2890
+ error_model = JSON.load(response_content)
2891
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2892
+ end
2893
+
2894
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2895
+ # Deserialize Response
2896
+ if status_code == 200
2897
+ begin
2898
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2899
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetListSkusResult.mapper()
2900
+ result.body = @client.deserialize(result_mapper, parsed_response)
2901
+ rescue Exception => e
2902
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2903
+ end
2904
+ end
2905
+
2906
+ result
2907
+ end
2908
+
2909
+ promise.execute
2910
+ end
2911
+
2912
+ #
2913
+ # Gets list of OS upgrades on a VM scale set instance.
2914
+ #
2915
+ # @param next_page_link [String] The NextLink from the previous successful call
2916
+ # to List operation.
2917
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2918
+ # will be added to the HTTP request.
2919
+ #
2920
+ # @return [VirtualMachineScaleSetListOSUpgradeHistory] operation results.
2921
+ #
2922
+ def get_osupgrade_history_next(next_page_link, custom_headers:nil)
2923
+ response = get_osupgrade_history_next_async(next_page_link, custom_headers:custom_headers).value!
2924
+ response.body unless response.nil?
2925
+ end
2926
+
2927
+ #
2928
+ # Gets list of OS upgrades on a VM scale set instance.
2929
+ #
2930
+ # @param next_page_link [String] The NextLink from the previous successful call
2931
+ # to List operation.
2932
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2933
+ # will be added to the HTTP request.
2934
+ #
2935
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2936
+ #
2937
+ def get_osupgrade_history_next_with_http_info(next_page_link, custom_headers:nil)
2938
+ get_osupgrade_history_next_async(next_page_link, custom_headers:custom_headers).value!
2939
+ end
2940
+
2941
+ #
2942
+ # Gets list of OS upgrades on a VM scale set instance.
2943
+ #
2944
+ # @param next_page_link [String] The NextLink from the previous successful call
2945
+ # to List operation.
2946
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2947
+ # to the HTTP request.
2948
+ #
2949
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2950
+ #
2951
+ def get_osupgrade_history_next_async(next_page_link, custom_headers:nil)
2952
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2953
+
2954
+
2955
+ request_headers = {}
2956
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2957
+
2958
+ # Set Headers
2959
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2960
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2961
+ path_template = '{nextLink}'
2962
+
2963
+ request_url = @base_url || @client.base_url
2964
+
2965
+ options = {
2966
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2967
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2968
+ headers: request_headers.merge(custom_headers || {}),
2969
+ base_url: request_url
2970
+ }
2971
+ promise = @client.make_request_async(:get, path_template, options)
2972
+
2973
+ promise = promise.then do |result|
2974
+ http_response = result.response
2975
+ status_code = http_response.status
2976
+ response_content = http_response.body
2977
+ unless status_code == 200
2978
+ error_model = JSON.load(response_content)
2979
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2980
+ end
2981
+
2982
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2983
+ # Deserialize Response
2984
+ if status_code == 200
2985
+ begin
2986
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2987
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetListOSUpgradeHistory.mapper()
2988
+ result.body = @client.deserialize(result_mapper, parsed_response)
2989
+ rescue Exception => e
2990
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2991
+ end
2992
+ end
2993
+
2994
+ result
2995
+ end
2996
+
2997
+ promise.execute
2998
+ end
2999
+
3000
+ #
3001
+ # Gets a list of all VM scale sets under a resource group.
3002
+ #
3003
+ # @param resource_group_name [String] The name of the resource group.
3004
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3005
+ # will be added to the HTTP request.
3006
+ #
3007
+ # @return [VirtualMachineScaleSetListResult] which provide lazy access to pages
3008
+ # of the response.
3009
+ #
3010
+ def list_as_lazy(resource_group_name, custom_headers:nil)
3011
+ response = list_async(resource_group_name, custom_headers:custom_headers).value!
3012
+ unless response.nil?
3013
+ page = response.body
3014
+ page.next_method = Proc.new do |next_page_link|
3015
+ list_next_async(next_page_link, custom_headers:custom_headers)
3016
+ end
3017
+ page
3018
+ end
3019
+ end
3020
+
3021
+ #
3022
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
3023
+ # associated resource group. Use nextLink property in the response to get the
3024
+ # next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM
3025
+ # Scale Sets.
3026
+ #
3027
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3028
+ # will be added to the HTTP request.
3029
+ #
3030
+ # @return [VirtualMachineScaleSetListWithLinkResult] which provide lazy access
3031
+ # to pages of the response.
3032
+ #
3033
+ def list_all_as_lazy(custom_headers:nil)
3034
+ response = list_all_async(custom_headers:custom_headers).value!
3035
+ unless response.nil?
3036
+ page = response.body
3037
+ page.next_method = Proc.new do |next_page_link|
3038
+ list_all_next_async(next_page_link, custom_headers:custom_headers)
3039
+ end
3040
+ page
3041
+ end
3042
+ end
3043
+
3044
+ #
3045
+ # Gets a list of SKUs available for your VM scale set, including the minimum
3046
+ # and maximum VM instances allowed for each SKU.
3047
+ #
3048
+ # @param resource_group_name [String] The name of the resource group.
3049
+ # @param vm_scale_set_name [String] The name of the VM scale set.
3050
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3051
+ # will be added to the HTTP request.
3052
+ #
3053
+ # @return [VirtualMachineScaleSetListSkusResult] which provide lazy access to
3054
+ # pages of the response.
3055
+ #
3056
+ def list_skus_as_lazy(resource_group_name, vm_scale_set_name, custom_headers:nil)
3057
+ response = list_skus_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
3058
+ unless response.nil?
3059
+ page = response.body
3060
+ page.next_method = Proc.new do |next_page_link|
3061
+ list_skus_next_async(next_page_link, custom_headers:custom_headers)
3062
+ end
3063
+ page
3064
+ end
3065
+ end
3066
+
3067
+ #
3068
+ # Gets list of OS upgrades on a VM scale set instance.
3069
+ #
3070
+ # @param resource_group_name [String] The name of the resource group.
3071
+ # @param vm_scale_set_name [String] The name of the VM scale set.
3072
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3073
+ # will be added to the HTTP request.
3074
+ #
3075
+ # @return [VirtualMachineScaleSetListOSUpgradeHistory] which provide lazy
3076
+ # access to pages of the response.
3077
+ #
3078
+ def get_osupgrade_history_as_lazy(resource_group_name, vm_scale_set_name, custom_headers:nil)
3079
+ response = get_osupgrade_history_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
3080
+ unless response.nil?
3081
+ page = response.body
3082
+ page.next_method = Proc.new do |next_page_link|
3083
+ get_osupgrade_history_next_async(next_page_link, custom_headers:custom_headers)
3084
+ end
3085
+ page
3086
+ end
3087
+ end
3088
+
3089
+ end
3090
+ end