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,2971 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Compute::Mgmt::V2018_10_01
7
+ #
8
+ # Compute Client
9
+ #
10
+ class 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::V2018_10_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::V2018_10_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::V2018_10_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::V2018_10_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::V2018_10_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::V2018_10_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::V2018_10_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::V2018_10_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 custom_headers [Hash{String => String}] A hash of custom headers that
802
+ # will be added to the HTTP request.
803
+ #
804
+ def power_off(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
805
+ response = power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
806
+ nil
807
+ end
808
+
809
+ #
810
+ # @param resource_group_name [String] The name of the resource group.
811
+ # @param vm_scale_set_name [String] The name of the VM scale set.
812
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
813
+ # virtual machine instance IDs from the VM scale set.
814
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
815
+ # will be added to the HTTP request.
816
+ #
817
+ # @return [Concurrent::Promise] promise which provides async access to http
818
+ # response.
819
+ #
820
+ def power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
821
+ # Send request
822
+ promise = begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
823
+
824
+ promise = promise.then do |response|
825
+ # Defining deserialization method.
826
+ deserialize_method = lambda do |parsed_response|
827
+ end
828
+
829
+ # Waiting for response.
830
+ @client.get_long_running_operation_result(response, deserialize_method)
831
+ end
832
+
833
+ promise
834
+ end
835
+
836
+ #
837
+ # Restarts one or more virtual machines in a VM scale set.
838
+ #
839
+ # @param resource_group_name [String] The name of the resource group.
840
+ # @param vm_scale_set_name [String] The name of the VM scale set.
841
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
842
+ # virtual machine instance IDs from the VM scale set.
843
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
844
+ # will be added to the HTTP request.
845
+ #
846
+ def restart(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
847
+ response = restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
848
+ nil
849
+ end
850
+
851
+ #
852
+ # @param resource_group_name [String] The name of the resource group.
853
+ # @param vm_scale_set_name [String] The name of the VM scale set.
854
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
855
+ # virtual machine instance IDs from the VM scale set.
856
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
857
+ # will be added to the HTTP request.
858
+ #
859
+ # @return [Concurrent::Promise] promise which provides async access to http
860
+ # response.
861
+ #
862
+ def restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
863
+ # Send request
864
+ promise = begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
865
+
866
+ promise = promise.then do |response|
867
+ # Defining deserialization method.
868
+ deserialize_method = lambda do |parsed_response|
869
+ end
870
+
871
+ # Waiting for response.
872
+ @client.get_long_running_operation_result(response, deserialize_method)
873
+ end
874
+
875
+ promise
876
+ end
877
+
878
+ #
879
+ # Starts one or more virtual machines in a VM scale set.
880
+ #
881
+ # @param resource_group_name [String] The name of the resource group.
882
+ # @param vm_scale_set_name [String] The name of the VM scale set.
883
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
884
+ # virtual machine instance IDs from the VM scale set.
885
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
886
+ # will be added to the HTTP request.
887
+ #
888
+ def start(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
889
+ response = start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
890
+ nil
891
+ end
892
+
893
+ #
894
+ # @param resource_group_name [String] The name of the resource group.
895
+ # @param vm_scale_set_name [String] The name of the VM scale set.
896
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
897
+ # virtual machine instance IDs from the VM scale set.
898
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
899
+ # will be added to the HTTP request.
900
+ #
901
+ # @return [Concurrent::Promise] promise which provides async access to http
902
+ # response.
903
+ #
904
+ def start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
905
+ # Send request
906
+ promise = begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
907
+
908
+ promise = promise.then do |response|
909
+ # Defining deserialization method.
910
+ deserialize_method = lambda do |parsed_response|
911
+ end
912
+
913
+ # Waiting for response.
914
+ @client.get_long_running_operation_result(response, deserialize_method)
915
+ end
916
+
917
+ promise
918
+ end
919
+
920
+ #
921
+ # Redeploy one or more virtual machines in a VM scale set.
922
+ #
923
+ # @param resource_group_name [String] The name of the resource group.
924
+ # @param vm_scale_set_name [String] The name of the VM scale set.
925
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
926
+ # virtual machine instance IDs from the VM scale set.
927
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
928
+ # will be added to the HTTP request.
929
+ #
930
+ def redeploy(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
931
+ response = redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
932
+ nil
933
+ end
934
+
935
+ #
936
+ # @param resource_group_name [String] The name of the resource group.
937
+ # @param vm_scale_set_name [String] The name of the VM scale set.
938
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
939
+ # virtual machine instance IDs from the VM scale set.
940
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
941
+ # will be added to the HTTP request.
942
+ #
943
+ # @return [Concurrent::Promise] promise which provides async access to http
944
+ # response.
945
+ #
946
+ def redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
947
+ # Send request
948
+ promise = begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
949
+
950
+ promise = promise.then do |response|
951
+ # Defining deserialization method.
952
+ deserialize_method = lambda do |parsed_response|
953
+ end
954
+
955
+ # Waiting for response.
956
+ @client.get_long_running_operation_result(response, deserialize_method)
957
+ end
958
+
959
+ promise
960
+ end
961
+
962
+ #
963
+ # Perform maintenance on one or more virtual machines in a VM scale set.
964
+ # Operation on instances which are not eligible for perform maintenance will be
965
+ # failed. Please refer to best practices for more details:
966
+ # https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
967
+ #
968
+ # @param resource_group_name [String] The name of the resource group.
969
+ # @param vm_scale_set_name [String] The name of the VM scale set.
970
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
971
+ # virtual machine instance IDs from the VM scale set.
972
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
973
+ # will be added to the HTTP request.
974
+ #
975
+ def perform_maintenance(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
976
+ response = perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
977
+ nil
978
+ end
979
+
980
+ #
981
+ # @param resource_group_name [String] The name of the resource group.
982
+ # @param vm_scale_set_name [String] The name of the VM scale set.
983
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
984
+ # virtual machine instance IDs from the VM scale set.
985
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
986
+ # will be added to the HTTP request.
987
+ #
988
+ # @return [Concurrent::Promise] promise which provides async access to http
989
+ # response.
990
+ #
991
+ def perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
992
+ # Send request
993
+ promise = begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
994
+
995
+ promise = promise.then do |response|
996
+ # Defining deserialization method.
997
+ deserialize_method = lambda do |parsed_response|
998
+ end
999
+
1000
+ # Waiting for response.
1001
+ @client.get_long_running_operation_result(response, deserialize_method)
1002
+ end
1003
+
1004
+ promise
1005
+ end
1006
+
1007
+ #
1008
+ # Upgrades one or more virtual machines to the latest SKU set in the VM scale
1009
+ # set model.
1010
+ #
1011
+ # @param resource_group_name [String] The name of the resource group.
1012
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1013
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1014
+ # of virtual machine instance IDs from the VM scale set.
1015
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1016
+ # will be added to the HTTP request.
1017
+ #
1018
+ def update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
1019
+ response = update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
1020
+ nil
1021
+ end
1022
+
1023
+ #
1024
+ # @param resource_group_name [String] The name of the resource group.
1025
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1026
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1027
+ # of virtual machine instance IDs from the VM scale set.
1028
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1029
+ # will be added to the HTTP request.
1030
+ #
1031
+ # @return [Concurrent::Promise] promise which provides async access to http
1032
+ # response.
1033
+ #
1034
+ def update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
1035
+ # Send request
1036
+ promise = begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers)
1037
+
1038
+ promise = promise.then do |response|
1039
+ # Defining deserialization method.
1040
+ deserialize_method = lambda do |parsed_response|
1041
+ end
1042
+
1043
+ # Waiting for response.
1044
+ @client.get_long_running_operation_result(response, deserialize_method)
1045
+ end
1046
+
1047
+ promise
1048
+ end
1049
+
1050
+ #
1051
+ # Reimages (upgrade the operating system) one or more virtual machines in a VM
1052
+ # scale set which don't have a ephemeral OS disk, for virtual machines who have
1053
+ # a ephemeral OS disk the virtual machine is reset to initial state.
1054
+ #
1055
+ # @param resource_group_name [String] The name of the resource group.
1056
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1057
+ # @param vm_scale_set_reimage_input [VirtualMachineScaleSetReimageParameters]
1058
+ # Parameters for Reimaging VM ScaleSet.
1059
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1060
+ # will be added to the HTTP request.
1061
+ #
1062
+ def reimage(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil)
1063
+ 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!
1064
+ nil
1065
+ end
1066
+
1067
+ #
1068
+ # @param resource_group_name [String] The name of the resource group.
1069
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1070
+ # @param vm_scale_set_reimage_input [VirtualMachineScaleSetReimageParameters]
1071
+ # Parameters for Reimaging VM ScaleSet.
1072
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1073
+ # will be added to the HTTP request.
1074
+ #
1075
+ # @return [Concurrent::Promise] promise which provides async access to http
1076
+ # response.
1077
+ #
1078
+ def reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil)
1079
+ # Send request
1080
+ 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)
1081
+
1082
+ promise = promise.then do |response|
1083
+ # Defining deserialization method.
1084
+ deserialize_method = lambda do |parsed_response|
1085
+ end
1086
+
1087
+ # Waiting for response.
1088
+ @client.get_long_running_operation_result(response, deserialize_method)
1089
+ end
1090
+
1091
+ promise
1092
+ end
1093
+
1094
+ #
1095
+ # Reimages all the disks ( including data disks ) in the virtual machines in a
1096
+ # VM scale set. This operation is only supported for managed disks.
1097
+ #
1098
+ # @param resource_group_name [String] The name of the resource group.
1099
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1100
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1101
+ # virtual machine instance IDs from the VM scale set.
1102
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1103
+ # will be added to the HTTP request.
1104
+ #
1105
+ def reimage_all(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1106
+ response = reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
1107
+ nil
1108
+ end
1109
+
1110
+ #
1111
+ # @param resource_group_name [String] The name of the resource group.
1112
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1113
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1114
+ # virtual machine instance IDs from the VM scale set.
1115
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1116
+ # will be added to the HTTP request.
1117
+ #
1118
+ # @return [Concurrent::Promise] promise which provides async access to http
1119
+ # response.
1120
+ #
1121
+ def reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1122
+ # Send request
1123
+ promise = begin_reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers)
1124
+
1125
+ promise = promise.then do |response|
1126
+ # Defining deserialization method.
1127
+ deserialize_method = lambda do |parsed_response|
1128
+ end
1129
+
1130
+ # Waiting for response.
1131
+ @client.get_long_running_operation_result(response, deserialize_method)
1132
+ end
1133
+
1134
+ promise
1135
+ end
1136
+
1137
+ #
1138
+ # Manual platform update domain walk to update virtual machines in a service
1139
+ # fabric virtual machine scale set.
1140
+ #
1141
+ # @param resource_group_name [String] The name of the resource group.
1142
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1143
+ # @param platform_update_domain [Integer] The platform update domain for which
1144
+ # a manual recovery walk is requested
1145
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1146
+ # will be added to the HTTP request.
1147
+ #
1148
+ # @return [RecoveryWalkResponse] operation results.
1149
+ #
1150
+ def force_recovery_service_fabric_platform_update_domain_walk(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:nil)
1151
+ 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!
1152
+ response.body unless response.nil?
1153
+ end
1154
+
1155
+ #
1156
+ # Manual platform update domain walk to update virtual machines in a service
1157
+ # fabric virtual machine scale set.
1158
+ #
1159
+ # @param resource_group_name [String] The name of the resource group.
1160
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1161
+ # @param platform_update_domain [Integer] The platform update domain for which
1162
+ # a manual recovery walk is requested
1163
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1164
+ # will be added to the HTTP request.
1165
+ #
1166
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1167
+ #
1168
+ 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)
1169
+ force_recovery_service_fabric_platform_update_domain_walk_async(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:custom_headers).value!
1170
+ end
1171
+
1172
+ #
1173
+ # Manual platform update domain walk to update virtual machines in a service
1174
+ # fabric virtual machine scale set.
1175
+ #
1176
+ # @param resource_group_name [String] The name of the resource group.
1177
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1178
+ # @param platform_update_domain [Integer] The platform update domain for which
1179
+ # a manual recovery walk is requested
1180
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1181
+ # to the HTTP request.
1182
+ #
1183
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1184
+ #
1185
+ def force_recovery_service_fabric_platform_update_domain_walk_async(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:nil)
1186
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1187
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1188
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1189
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1190
+ fail ArgumentError, 'platform_update_domain is nil' if platform_update_domain.nil?
1191
+
1192
+
1193
+ request_headers = {}
1194
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1195
+
1196
+ # Set Headers
1197
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1198
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1199
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk'
1200
+
1201
+ request_url = @base_url || @client.base_url
1202
+
1203
+ options = {
1204
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1205
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1206
+ query_params: {'api-version' => @client.api_version,'platformUpdateDomain' => platform_update_domain},
1207
+ headers: request_headers.merge(custom_headers || {}),
1208
+ base_url: request_url
1209
+ }
1210
+ promise = @client.make_request_async(:post, path_template, options)
1211
+
1212
+ promise = promise.then do |result|
1213
+ http_response = result.response
1214
+ status_code = http_response.status
1215
+ response_content = http_response.body
1216
+ unless status_code == 200
1217
+ error_model = JSON.load(response_content)
1218
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1219
+ end
1220
+
1221
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1222
+ # Deserialize Response
1223
+ if status_code == 200
1224
+ begin
1225
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1226
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::RecoveryWalkResponse.mapper()
1227
+ result.body = @client.deserialize(result_mapper, parsed_response)
1228
+ rescue Exception => e
1229
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1230
+ end
1231
+ end
1232
+
1233
+ result
1234
+ end
1235
+
1236
+ promise.execute
1237
+ end
1238
+
1239
+ #
1240
+ # Create or update a VM scale set.
1241
+ #
1242
+ # @param resource_group_name [String] The name of the resource group.
1243
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
1244
+ # update.
1245
+ # @param parameters [VirtualMachineScaleSet] The scale set object.
1246
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1247
+ # will be added to the HTTP request.
1248
+ #
1249
+ # @return [VirtualMachineScaleSet] operation results.
1250
+ #
1251
+ def begin_create_or_update(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1252
+ response = begin_create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
1253
+ response.body unless response.nil?
1254
+ end
1255
+
1256
+ #
1257
+ # Create or update a VM scale set.
1258
+ #
1259
+ # @param resource_group_name [String] The name of the resource group.
1260
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
1261
+ # update.
1262
+ # @param parameters [VirtualMachineScaleSet] The scale set object.
1263
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1264
+ # will be added to the HTTP request.
1265
+ #
1266
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1267
+ #
1268
+ def begin_create_or_update_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1269
+ begin_create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
1270
+ end
1271
+
1272
+ #
1273
+ # Create or update a VM scale set.
1274
+ #
1275
+ # @param resource_group_name [String] The name of the resource group.
1276
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
1277
+ # update.
1278
+ # @param parameters [VirtualMachineScaleSet] The scale set object.
1279
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1280
+ # to the HTTP request.
1281
+ #
1282
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1283
+ #
1284
+ def begin_create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1285
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1286
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1287
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1288
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1289
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1290
+
1291
+
1292
+ request_headers = {}
1293
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1294
+
1295
+ # Set Headers
1296
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1297
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1298
+
1299
+ # Serialize Request
1300
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSet.mapper()
1301
+ request_content = @client.serialize(request_mapper, parameters)
1302
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1303
+
1304
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'
1305
+
1306
+ request_url = @base_url || @client.base_url
1307
+
1308
+ options = {
1309
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1310
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1311
+ query_params: {'api-version' => @client.api_version},
1312
+ body: request_content,
1313
+ headers: request_headers.merge(custom_headers || {}),
1314
+ base_url: request_url
1315
+ }
1316
+ promise = @client.make_request_async(:put, path_template, options)
1317
+
1318
+ promise = promise.then do |result|
1319
+ http_response = result.response
1320
+ status_code = http_response.status
1321
+ response_content = http_response.body
1322
+ unless status_code == 200 || status_code == 201
1323
+ error_model = JSON.load(response_content)
1324
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1325
+ end
1326
+
1327
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1328
+ # Deserialize Response
1329
+ if status_code == 200
1330
+ begin
1331
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1332
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSet.mapper()
1333
+ result.body = @client.deserialize(result_mapper, parsed_response)
1334
+ rescue Exception => e
1335
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1336
+ end
1337
+ end
1338
+ # Deserialize Response
1339
+ if status_code == 201
1340
+ begin
1341
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1342
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSet.mapper()
1343
+ result.body = @client.deserialize(result_mapper, parsed_response)
1344
+ rescue Exception => e
1345
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1346
+ end
1347
+ end
1348
+
1349
+ result
1350
+ end
1351
+
1352
+ promise.execute
1353
+ end
1354
+
1355
+ #
1356
+ # Update a VM scale set.
1357
+ #
1358
+ # @param resource_group_name [String] The name of the resource group.
1359
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
1360
+ # update.
1361
+ # @param parameters [VirtualMachineScaleSetUpdate] The scale set object.
1362
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1363
+ # will be added to the HTTP request.
1364
+ #
1365
+ # @return [VirtualMachineScaleSet] operation results.
1366
+ #
1367
+ def begin_update(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1368
+ response = begin_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
1369
+ response.body unless response.nil?
1370
+ end
1371
+
1372
+ #
1373
+ # Update a VM scale set.
1374
+ #
1375
+ # @param resource_group_name [String] The name of the resource group.
1376
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
1377
+ # update.
1378
+ # @param parameters [VirtualMachineScaleSetUpdate] The scale set object.
1379
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1380
+ # will be added to the HTTP request.
1381
+ #
1382
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1383
+ #
1384
+ def begin_update_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1385
+ begin_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value!
1386
+ end
1387
+
1388
+ #
1389
+ # Update a VM scale set.
1390
+ #
1391
+ # @param resource_group_name [String] The name of the resource group.
1392
+ # @param vm_scale_set_name [String] The name of the VM scale set to create or
1393
+ # update.
1394
+ # @param parameters [VirtualMachineScaleSetUpdate] The scale set object.
1395
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1396
+ # to the HTTP request.
1397
+ #
1398
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1399
+ #
1400
+ def begin_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil)
1401
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1402
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1403
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1404
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1405
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1406
+
1407
+
1408
+ request_headers = {}
1409
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1410
+
1411
+ # Set Headers
1412
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1413
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1414
+
1415
+ # Serialize Request
1416
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetUpdate.mapper()
1417
+ request_content = @client.serialize(request_mapper, parameters)
1418
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1419
+
1420
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'
1421
+
1422
+ request_url = @base_url || @client.base_url
1423
+
1424
+ options = {
1425
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1426
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1427
+ query_params: {'api-version' => @client.api_version},
1428
+ body: request_content,
1429
+ headers: request_headers.merge(custom_headers || {}),
1430
+ base_url: request_url
1431
+ }
1432
+ promise = @client.make_request_async(:patch, path_template, options)
1433
+
1434
+ promise = promise.then do |result|
1435
+ http_response = result.response
1436
+ status_code = http_response.status
1437
+ response_content = http_response.body
1438
+ unless status_code == 200
1439
+ error_model = JSON.load(response_content)
1440
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1441
+ end
1442
+
1443
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1444
+ # Deserialize Response
1445
+ if status_code == 200
1446
+ begin
1447
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1448
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSet.mapper()
1449
+ result.body = @client.deserialize(result_mapper, parsed_response)
1450
+ rescue Exception => e
1451
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1452
+ end
1453
+ end
1454
+
1455
+ result
1456
+ end
1457
+
1458
+ promise.execute
1459
+ end
1460
+
1461
+ #
1462
+ # Deletes a VM scale set.
1463
+ #
1464
+ # @param resource_group_name [String] The name of the resource group.
1465
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1466
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1467
+ # will be added to the HTTP request.
1468
+ #
1469
+ #
1470
+ def begin_delete(resource_group_name, vm_scale_set_name, custom_headers:nil)
1471
+ response = begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
1472
+ nil
1473
+ end
1474
+
1475
+ #
1476
+ # Deletes a VM scale set.
1477
+ #
1478
+ # @param resource_group_name [String] The name of the resource group.
1479
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1480
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1481
+ # will be added to the HTTP request.
1482
+ #
1483
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1484
+ #
1485
+ def begin_delete_with_http_info(resource_group_name, vm_scale_set_name, custom_headers:nil)
1486
+ begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
1487
+ end
1488
+
1489
+ #
1490
+ # Deletes a VM scale set.
1491
+ #
1492
+ # @param resource_group_name [String] The name of the resource group.
1493
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1494
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1495
+ # to the HTTP request.
1496
+ #
1497
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1498
+ #
1499
+ def begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers:nil)
1500
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1501
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1502
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1503
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1504
+
1505
+
1506
+ request_headers = {}
1507
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1508
+
1509
+ # Set Headers
1510
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1511
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1512
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'
1513
+
1514
+ request_url = @base_url || @client.base_url
1515
+
1516
+ options = {
1517
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1518
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1519
+ query_params: {'api-version' => @client.api_version},
1520
+ headers: request_headers.merge(custom_headers || {}),
1521
+ base_url: request_url
1522
+ }
1523
+ promise = @client.make_request_async(:delete, path_template, options)
1524
+
1525
+ promise = promise.then do |result|
1526
+ http_response = result.response
1527
+ status_code = http_response.status
1528
+ response_content = http_response.body
1529
+ unless status_code == 200 || status_code == 202 || status_code == 204
1530
+ error_model = JSON.load(response_content)
1531
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1532
+ end
1533
+
1534
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1535
+
1536
+ result
1537
+ end
1538
+
1539
+ promise.execute
1540
+ end
1541
+
1542
+ #
1543
+ # Deallocates specific virtual machines in a VM scale set. Shuts down the
1544
+ # virtual machines and releases the compute resources. You are not billed for
1545
+ # the compute resources that this virtual machine scale set deallocates.
1546
+ #
1547
+ # @param resource_group_name [String] The name of the resource group.
1548
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1549
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1550
+ # virtual machine instance IDs from the VM scale set.
1551
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1552
+ # will be added to the HTTP request.
1553
+ #
1554
+ #
1555
+ def begin_deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1556
+ response = begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
1557
+ nil
1558
+ end
1559
+
1560
+ #
1561
+ # Deallocates specific virtual machines in a VM scale set. Shuts down the
1562
+ # virtual machines and releases the compute resources. You are not billed for
1563
+ # the compute resources that this virtual machine scale set deallocates.
1564
+ #
1565
+ # @param resource_group_name [String] The name of the resource group.
1566
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1567
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1568
+ # virtual machine instance IDs from the VM scale set.
1569
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1570
+ # will be added to the HTTP request.
1571
+ #
1572
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1573
+ #
1574
+ def begin_deallocate_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1575
+ begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
1576
+ end
1577
+
1578
+ #
1579
+ # Deallocates specific virtual machines in a VM scale set. Shuts down the
1580
+ # virtual machines and releases the compute resources. You are not billed for
1581
+ # the compute resources that this virtual machine scale set deallocates.
1582
+ #
1583
+ # @param resource_group_name [String] The name of the resource group.
1584
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1585
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1586
+ # virtual machine instance IDs from the VM scale set.
1587
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1588
+ # to the HTTP request.
1589
+ #
1590
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1591
+ #
1592
+ def begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1593
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1594
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1595
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1596
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1597
+
1598
+
1599
+ request_headers = {}
1600
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1601
+
1602
+ # Set Headers
1603
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1604
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1605
+
1606
+ # Serialize Request
1607
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
1608
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
1609
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1610
+
1611
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'
1612
+
1613
+ request_url = @base_url || @client.base_url
1614
+
1615
+ options = {
1616
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1617
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1618
+ query_params: {'api-version' => @client.api_version},
1619
+ body: request_content,
1620
+ headers: request_headers.merge(custom_headers || {}),
1621
+ base_url: request_url
1622
+ }
1623
+ promise = @client.make_request_async(:post, path_template, options)
1624
+
1625
+ promise = promise.then do |result|
1626
+ http_response = result.response
1627
+ status_code = http_response.status
1628
+ response_content = http_response.body
1629
+ unless status_code == 200 || status_code == 202
1630
+ error_model = JSON.load(response_content)
1631
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1632
+ end
1633
+
1634
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1635
+
1636
+ result
1637
+ end
1638
+
1639
+ promise.execute
1640
+ end
1641
+
1642
+ #
1643
+ # Deletes virtual machines in a VM scale set.
1644
+ #
1645
+ # @param resource_group_name [String] The name of the resource group.
1646
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1647
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1648
+ # of virtual machine instance IDs from the VM scale set.
1649
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1650
+ # will be added to the HTTP request.
1651
+ #
1652
+ #
1653
+ def begin_delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
1654
+ response = begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
1655
+ nil
1656
+ end
1657
+
1658
+ #
1659
+ # Deletes virtual machines in a VM scale set.
1660
+ #
1661
+ # @param resource_group_name [String] The name of the resource group.
1662
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1663
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1664
+ # of virtual machine instance IDs from the VM scale set.
1665
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1666
+ # will be added to the HTTP request.
1667
+ #
1668
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1669
+ #
1670
+ def begin_delete_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
1671
+ begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
1672
+ end
1673
+
1674
+ #
1675
+ # Deletes virtual machines in a VM scale set.
1676
+ #
1677
+ # @param resource_group_name [String] The name of the resource group.
1678
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1679
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1680
+ # of virtual machine instance IDs from the VM scale set.
1681
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1682
+ # to the HTTP request.
1683
+ #
1684
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1685
+ #
1686
+ def begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
1687
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1688
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1689
+ fail ArgumentError, 'vm_instance_ids is nil' if vm_instance_ids.nil?
1690
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1691
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1692
+
1693
+
1694
+ request_headers = {}
1695
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1696
+
1697
+ # Set Headers
1698
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1699
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1700
+
1701
+ # Serialize Request
1702
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetVMInstanceRequiredIDs.mapper()
1703
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
1704
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1705
+
1706
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'
1707
+
1708
+ request_url = @base_url || @client.base_url
1709
+
1710
+ options = {
1711
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1712
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1713
+ query_params: {'api-version' => @client.api_version},
1714
+ body: request_content,
1715
+ headers: request_headers.merge(custom_headers || {}),
1716
+ base_url: request_url
1717
+ }
1718
+ promise = @client.make_request_async(:post, path_template, options)
1719
+
1720
+ promise = promise.then do |result|
1721
+ http_response = result.response
1722
+ status_code = http_response.status
1723
+ response_content = http_response.body
1724
+ unless status_code == 200 || status_code == 202
1725
+ error_model = JSON.load(response_content)
1726
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1727
+ end
1728
+
1729
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1730
+
1731
+ result
1732
+ end
1733
+
1734
+ promise.execute
1735
+ end
1736
+
1737
+ #
1738
+ # Power off (stop) one or more virtual machines in a VM scale set. Note that
1739
+ # resources are still attached and you are getting charged for the resources.
1740
+ # Instead, use deallocate to release resources and avoid charges.
1741
+ #
1742
+ # @param resource_group_name [String] The name of the resource group.
1743
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1744
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1745
+ # virtual machine instance IDs from the VM scale set.
1746
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1747
+ # will be added to the HTTP request.
1748
+ #
1749
+ #
1750
+ def begin_power_off(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1751
+ response = begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
1752
+ nil
1753
+ end
1754
+
1755
+ #
1756
+ # Power off (stop) one or more virtual machines in a VM scale set. Note that
1757
+ # resources are still attached and you are getting charged for the resources.
1758
+ # Instead, use deallocate to release resources and avoid charges.
1759
+ #
1760
+ # @param resource_group_name [String] The name of the resource group.
1761
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1762
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1763
+ # virtual machine instance IDs from the VM scale set.
1764
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1765
+ # will be added to the HTTP request.
1766
+ #
1767
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1768
+ #
1769
+ def begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1770
+ begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
1771
+ end
1772
+
1773
+ #
1774
+ # Power off (stop) one or more virtual machines in a VM scale set. Note that
1775
+ # resources are still attached and you are getting charged for the resources.
1776
+ # Instead, use deallocate to release resources and avoid charges.
1777
+ #
1778
+ # @param resource_group_name [String] The name of the resource group.
1779
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1780
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1781
+ # virtual machine instance IDs from the VM scale set.
1782
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1783
+ # to the HTTP request.
1784
+ #
1785
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1786
+ #
1787
+ def begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1788
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1789
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1790
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1791
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1792
+
1793
+
1794
+ request_headers = {}
1795
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1796
+
1797
+ # Set Headers
1798
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1799
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1800
+
1801
+ # Serialize Request
1802
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
1803
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
1804
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1805
+
1806
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'
1807
+
1808
+ request_url = @base_url || @client.base_url
1809
+
1810
+ options = {
1811
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1812
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1813
+ query_params: {'api-version' => @client.api_version},
1814
+ body: request_content,
1815
+ headers: request_headers.merge(custom_headers || {}),
1816
+ base_url: request_url
1817
+ }
1818
+ promise = @client.make_request_async(:post, path_template, options)
1819
+
1820
+ promise = promise.then do |result|
1821
+ http_response = result.response
1822
+ status_code = http_response.status
1823
+ response_content = http_response.body
1824
+ unless status_code == 200 || status_code == 202
1825
+ error_model = JSON.load(response_content)
1826
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1827
+ end
1828
+
1829
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1830
+
1831
+ result
1832
+ end
1833
+
1834
+ promise.execute
1835
+ end
1836
+
1837
+ #
1838
+ # Restarts one or more virtual machines in a VM scale set.
1839
+ #
1840
+ # @param resource_group_name [String] The name of the resource group.
1841
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1842
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1843
+ # virtual machine instance IDs from the VM scale set.
1844
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1845
+ # will be added to the HTTP request.
1846
+ #
1847
+ #
1848
+ def begin_restart(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1849
+ response = begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
1850
+ nil
1851
+ end
1852
+
1853
+ #
1854
+ # Restarts one or more virtual machines in a VM scale set.
1855
+ #
1856
+ # @param resource_group_name [String] The name of the resource group.
1857
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1858
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1859
+ # virtual machine instance IDs from the VM scale set.
1860
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1861
+ # will be added to the HTTP request.
1862
+ #
1863
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1864
+ #
1865
+ def begin_restart_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1866
+ begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
1867
+ end
1868
+
1869
+ #
1870
+ # Restarts one or more virtual machines in a VM scale set.
1871
+ #
1872
+ # @param resource_group_name [String] The name of the resource group.
1873
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1874
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1875
+ # virtual machine instance IDs from the VM scale set.
1876
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1877
+ # to the HTTP request.
1878
+ #
1879
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1880
+ #
1881
+ def begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1882
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1883
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1884
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1885
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1886
+
1887
+
1888
+ request_headers = {}
1889
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1890
+
1891
+ # Set Headers
1892
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1893
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1894
+
1895
+ # Serialize Request
1896
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
1897
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
1898
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1899
+
1900
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'
1901
+
1902
+ request_url = @base_url || @client.base_url
1903
+
1904
+ options = {
1905
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1906
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1907
+ query_params: {'api-version' => @client.api_version},
1908
+ body: request_content,
1909
+ headers: request_headers.merge(custom_headers || {}),
1910
+ base_url: request_url
1911
+ }
1912
+ promise = @client.make_request_async(:post, path_template, options)
1913
+
1914
+ promise = promise.then do |result|
1915
+ http_response = result.response
1916
+ status_code = http_response.status
1917
+ response_content = http_response.body
1918
+ unless status_code == 200 || status_code == 202
1919
+ error_model = JSON.load(response_content)
1920
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1921
+ end
1922
+
1923
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1924
+
1925
+ result
1926
+ end
1927
+
1928
+ promise.execute
1929
+ end
1930
+
1931
+ #
1932
+ # Starts one or more virtual machines in a VM scale set.
1933
+ #
1934
+ # @param resource_group_name [String] The name of the resource group.
1935
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1936
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1937
+ # virtual machine instance IDs from the VM scale set.
1938
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1939
+ # will be added to the HTTP request.
1940
+ #
1941
+ #
1942
+ def begin_start(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1943
+ response = begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
1944
+ nil
1945
+ end
1946
+
1947
+ #
1948
+ # Starts one or more virtual machines in a VM scale set.
1949
+ #
1950
+ # @param resource_group_name [String] The name of the resource group.
1951
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1952
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1953
+ # virtual machine instance IDs from the VM scale set.
1954
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1955
+ # will be added to the HTTP request.
1956
+ #
1957
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1958
+ #
1959
+ def begin_start_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1960
+ begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
1961
+ end
1962
+
1963
+ #
1964
+ # Starts one or more virtual machines in a VM scale set.
1965
+ #
1966
+ # @param resource_group_name [String] The name of the resource group.
1967
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1968
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1969
+ # virtual machine instance IDs from the VM scale set.
1970
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1971
+ # to the HTTP request.
1972
+ #
1973
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1974
+ #
1975
+ def begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
1976
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1977
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1978
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1979
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1980
+
1981
+
1982
+ request_headers = {}
1983
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1984
+
1985
+ # Set Headers
1986
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1987
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1988
+
1989
+ # Serialize Request
1990
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
1991
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
1992
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1993
+
1994
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'
1995
+
1996
+ request_url = @base_url || @client.base_url
1997
+
1998
+ options = {
1999
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2000
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
2001
+ query_params: {'api-version' => @client.api_version},
2002
+ body: request_content,
2003
+ headers: request_headers.merge(custom_headers || {}),
2004
+ base_url: request_url
2005
+ }
2006
+ promise = @client.make_request_async(:post, path_template, options)
2007
+
2008
+ promise = promise.then do |result|
2009
+ http_response = result.response
2010
+ status_code = http_response.status
2011
+ response_content = http_response.body
2012
+ unless status_code == 200 || status_code == 202
2013
+ error_model = JSON.load(response_content)
2014
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2015
+ end
2016
+
2017
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2018
+
2019
+ result
2020
+ end
2021
+
2022
+ promise.execute
2023
+ end
2024
+
2025
+ #
2026
+ # Redeploy one or more virtual machines in a VM scale set.
2027
+ #
2028
+ # @param resource_group_name [String] The name of the resource group.
2029
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2030
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2031
+ # virtual machine instance IDs from the VM scale set.
2032
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2033
+ # will be added to the HTTP request.
2034
+ #
2035
+ #
2036
+ def begin_redeploy(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2037
+ response = begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
2038
+ nil
2039
+ end
2040
+
2041
+ #
2042
+ # Redeploy one or more virtual machines in a VM scale set.
2043
+ #
2044
+ # @param resource_group_name [String] The name of the resource group.
2045
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2046
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2047
+ # virtual machine instance IDs from the VM scale set.
2048
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2049
+ # will be added to the HTTP request.
2050
+ #
2051
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2052
+ #
2053
+ def begin_redeploy_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2054
+ begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
2055
+ end
2056
+
2057
+ #
2058
+ # Redeploy one or more virtual machines in a VM scale set.
2059
+ #
2060
+ # @param resource_group_name [String] The name of the resource group.
2061
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2062
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2063
+ # virtual machine instance IDs from the VM scale set.
2064
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2065
+ # to the HTTP request.
2066
+ #
2067
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2068
+ #
2069
+ def begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2070
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2071
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
2072
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2073
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2074
+
2075
+
2076
+ request_headers = {}
2077
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2078
+
2079
+ # Set Headers
2080
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2081
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2082
+
2083
+ # Serialize Request
2084
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
2085
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
2086
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2087
+
2088
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy'
2089
+
2090
+ request_url = @base_url || @client.base_url
2091
+
2092
+ options = {
2093
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2094
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
2095
+ query_params: {'api-version' => @client.api_version},
2096
+ body: request_content,
2097
+ headers: request_headers.merge(custom_headers || {}),
2098
+ base_url: request_url
2099
+ }
2100
+ promise = @client.make_request_async(:post, path_template, options)
2101
+
2102
+ promise = promise.then do |result|
2103
+ http_response = result.response
2104
+ status_code = http_response.status
2105
+ response_content = http_response.body
2106
+ unless status_code == 200 || status_code == 202
2107
+ error_model = JSON.load(response_content)
2108
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2109
+ end
2110
+
2111
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2112
+
2113
+ result
2114
+ end
2115
+
2116
+ promise.execute
2117
+ end
2118
+
2119
+ #
2120
+ # Perform maintenance on one or more virtual machines in a VM scale set.
2121
+ # Operation on instances which are not eligible for perform maintenance will be
2122
+ # failed. Please refer to best practices for more details:
2123
+ # https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
2124
+ #
2125
+ # @param resource_group_name [String] The name of the resource group.
2126
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2127
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2128
+ # virtual machine instance IDs from the VM scale set.
2129
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2130
+ # will be added to the HTTP request.
2131
+ #
2132
+ #
2133
+ def begin_perform_maintenance(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2134
+ response = begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
2135
+ nil
2136
+ end
2137
+
2138
+ #
2139
+ # Perform maintenance on one or more virtual machines in a VM scale set.
2140
+ # Operation on instances which are not eligible for perform maintenance will be
2141
+ # failed. Please refer to best practices for more details:
2142
+ # https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
2143
+ #
2144
+ # @param resource_group_name [String] The name of the resource group.
2145
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2146
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2147
+ # virtual machine instance IDs from the VM scale set.
2148
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2149
+ # will be added to the HTTP request.
2150
+ #
2151
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2152
+ #
2153
+ def begin_perform_maintenance_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2154
+ begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
2155
+ end
2156
+
2157
+ #
2158
+ # Perform maintenance on one or more virtual machines in a VM scale set.
2159
+ # Operation on instances which are not eligible for perform maintenance will be
2160
+ # failed. Please refer to best practices for more details:
2161
+ # https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
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 [Hash{String => String}] A hash of custom headers that will be added
2168
+ # to the HTTP request.
2169
+ #
2170
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2171
+ #
2172
+ def begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2173
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2174
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
2175
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2176
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2177
+
2178
+
2179
+ request_headers = {}
2180
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2181
+
2182
+ # Set Headers
2183
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2184
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2185
+
2186
+ # Serialize Request
2187
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
2188
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
2189
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2190
+
2191
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance'
2192
+
2193
+ request_url = @base_url || @client.base_url
2194
+
2195
+ options = {
2196
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2197
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
2198
+ query_params: {'api-version' => @client.api_version},
2199
+ body: request_content,
2200
+ headers: request_headers.merge(custom_headers || {}),
2201
+ base_url: request_url
2202
+ }
2203
+ promise = @client.make_request_async(:post, path_template, options)
2204
+
2205
+ promise = promise.then do |result|
2206
+ http_response = result.response
2207
+ status_code = http_response.status
2208
+ response_content = http_response.body
2209
+ unless status_code == 200 || status_code == 202
2210
+ error_model = JSON.load(response_content)
2211
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2212
+ end
2213
+
2214
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2215
+
2216
+ result
2217
+ end
2218
+
2219
+ promise.execute
2220
+ end
2221
+
2222
+ #
2223
+ # Upgrades one or more virtual machines to the latest SKU set in the VM scale
2224
+ # set model.
2225
+ #
2226
+ # @param resource_group_name [String] The name of the resource group.
2227
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2228
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
2229
+ # of virtual machine instance IDs from the VM scale set.
2230
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2231
+ # will be added to the HTTP request.
2232
+ #
2233
+ #
2234
+ def begin_update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
2235
+ response = begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
2236
+ nil
2237
+ end
2238
+
2239
+ #
2240
+ # Upgrades one or more virtual machines to the latest SKU set in the VM scale
2241
+ # set model.
2242
+ #
2243
+ # @param resource_group_name [String] The name of the resource group.
2244
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2245
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
2246
+ # of virtual machine instance IDs from the VM scale set.
2247
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2248
+ # will be added to the HTTP request.
2249
+ #
2250
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2251
+ #
2252
+ def begin_update_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
2253
+ begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value!
2254
+ end
2255
+
2256
+ #
2257
+ # Upgrades one or more virtual machines to the latest SKU set in the VM scale
2258
+ # set model.
2259
+ #
2260
+ # @param resource_group_name [String] The name of the resource group.
2261
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2262
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
2263
+ # of virtual machine instance IDs from the VM scale set.
2264
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2265
+ # to the HTTP request.
2266
+ #
2267
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2268
+ #
2269
+ def begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil)
2270
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2271
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
2272
+ fail ArgumentError, 'vm_instance_ids is nil' if vm_instance_ids.nil?
2273
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2274
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2275
+
2276
+
2277
+ request_headers = {}
2278
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2279
+
2280
+ # Set Headers
2281
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2282
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2283
+
2284
+ # Serialize Request
2285
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetVMInstanceRequiredIDs.mapper()
2286
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
2287
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2288
+
2289
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'
2290
+
2291
+ request_url = @base_url || @client.base_url
2292
+
2293
+ options = {
2294
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2295
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
2296
+ query_params: {'api-version' => @client.api_version},
2297
+ body: request_content,
2298
+ headers: request_headers.merge(custom_headers || {}),
2299
+ base_url: request_url
2300
+ }
2301
+ promise = @client.make_request_async(:post, path_template, options)
2302
+
2303
+ promise = promise.then do |result|
2304
+ http_response = result.response
2305
+ status_code = http_response.status
2306
+ response_content = http_response.body
2307
+ unless status_code == 200 || status_code == 202
2308
+ error_model = JSON.load(response_content)
2309
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2310
+ end
2311
+
2312
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2313
+
2314
+ result
2315
+ end
2316
+
2317
+ promise.execute
2318
+ end
2319
+
2320
+ #
2321
+ # Reimages (upgrade the operating system) one or more virtual machines in a VM
2322
+ # scale set which don't have a ephemeral OS disk, for virtual machines who have
2323
+ # a ephemeral OS disk the virtual machine is reset to initial state.
2324
+ #
2325
+ # @param resource_group_name [String] The name of the resource group.
2326
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2327
+ # @param vm_scale_set_reimage_input [VirtualMachineScaleSetReimageParameters]
2328
+ # Parameters for Reimaging VM ScaleSet.
2329
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2330
+ # will be added to the HTTP request.
2331
+ #
2332
+ #
2333
+ def begin_reimage(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil)
2334
+ 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!
2335
+ nil
2336
+ end
2337
+
2338
+ #
2339
+ # Reimages (upgrade the operating system) one or more virtual machines in a VM
2340
+ # scale set which don't have a ephemeral OS disk, for virtual machines who have
2341
+ # a ephemeral OS disk the virtual machine is reset to initial state.
2342
+ #
2343
+ # @param resource_group_name [String] The name of the resource group.
2344
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2345
+ # @param vm_scale_set_reimage_input [VirtualMachineScaleSetReimageParameters]
2346
+ # Parameters for Reimaging VM ScaleSet.
2347
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2348
+ # will be added to the HTTP request.
2349
+ #
2350
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2351
+ #
2352
+ def begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil)
2353
+ 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!
2354
+ end
2355
+
2356
+ #
2357
+ # Reimages (upgrade the operating system) one or more virtual machines in a VM
2358
+ # scale set which don't have a ephemeral OS disk, for virtual machines who have
2359
+ # a ephemeral OS disk the virtual machine is reset to initial state.
2360
+ #
2361
+ # @param resource_group_name [String] The name of the resource group.
2362
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2363
+ # @param vm_scale_set_reimage_input [VirtualMachineScaleSetReimageParameters]
2364
+ # Parameters for Reimaging VM ScaleSet.
2365
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2366
+ # to the HTTP request.
2367
+ #
2368
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2369
+ #
2370
+ def begin_reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil)
2371
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2372
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
2373
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2374
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2375
+
2376
+
2377
+ request_headers = {}
2378
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2379
+
2380
+ # Set Headers
2381
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2382
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2383
+
2384
+ # Serialize Request
2385
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetReimageParameters.mapper()
2386
+ request_content = @client.serialize(request_mapper, vm_scale_set_reimage_input)
2387
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2388
+
2389
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'
2390
+
2391
+ request_url = @base_url || @client.base_url
2392
+
2393
+ options = {
2394
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2395
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
2396
+ query_params: {'api-version' => @client.api_version},
2397
+ body: request_content,
2398
+ headers: request_headers.merge(custom_headers || {}),
2399
+ base_url: request_url
2400
+ }
2401
+ promise = @client.make_request_async(:post, path_template, options)
2402
+
2403
+ promise = promise.then do |result|
2404
+ http_response = result.response
2405
+ status_code = http_response.status
2406
+ response_content = http_response.body
2407
+ unless status_code == 200 || status_code == 202
2408
+ error_model = JSON.load(response_content)
2409
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2410
+ end
2411
+
2412
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2413
+
2414
+ result
2415
+ end
2416
+
2417
+ promise.execute
2418
+ end
2419
+
2420
+ #
2421
+ # Reimages all the disks ( including data disks ) in the virtual machines in a
2422
+ # VM scale set. This operation is only supported for managed disks.
2423
+ #
2424
+ # @param resource_group_name [String] The name of the resource group.
2425
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2426
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2427
+ # virtual machine instance IDs from the VM scale set.
2428
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2429
+ # will be added to the HTTP request.
2430
+ #
2431
+ #
2432
+ def begin_reimage_all(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2433
+ response = begin_reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
2434
+ nil
2435
+ end
2436
+
2437
+ #
2438
+ # Reimages all the disks ( including data disks ) in the virtual machines in a
2439
+ # VM scale set. This operation is only supported for managed disks.
2440
+ #
2441
+ # @param resource_group_name [String] The name of the resource group.
2442
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2443
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2444
+ # virtual machine instance IDs from the VM scale set.
2445
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2446
+ # will be added to the HTTP request.
2447
+ #
2448
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2449
+ #
2450
+ def begin_reimage_all_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2451
+ begin_reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value!
2452
+ end
2453
+
2454
+ #
2455
+ # Reimages all the disks ( including data disks ) in the virtual machines in a
2456
+ # VM scale set. This operation is only supported for managed disks.
2457
+ #
2458
+ # @param resource_group_name [String] The name of the resource group.
2459
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2460
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
2461
+ # virtual machine instance IDs from the VM scale set.
2462
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2463
+ # to the HTTP request.
2464
+ #
2465
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2466
+ #
2467
+ def begin_reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil)
2468
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2469
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
2470
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2471
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2472
+
2473
+
2474
+ request_headers = {}
2475
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2476
+
2477
+ # Set Headers
2478
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2479
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2480
+
2481
+ # Serialize Request
2482
+ request_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
2483
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
2484
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2485
+
2486
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall'
2487
+
2488
+ request_url = @base_url || @client.base_url
2489
+
2490
+ options = {
2491
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2492
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
2493
+ query_params: {'api-version' => @client.api_version},
2494
+ body: request_content,
2495
+ headers: request_headers.merge(custom_headers || {}),
2496
+ base_url: request_url
2497
+ }
2498
+ promise = @client.make_request_async(:post, path_template, options)
2499
+
2500
+ promise = promise.then do |result|
2501
+ http_response = result.response
2502
+ status_code = http_response.status
2503
+ response_content = http_response.body
2504
+ unless status_code == 200 || status_code == 202
2505
+ error_model = JSON.load(response_content)
2506
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2507
+ end
2508
+
2509
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2510
+
2511
+ result
2512
+ end
2513
+
2514
+ promise.execute
2515
+ end
2516
+
2517
+ #
2518
+ # Gets a list of all VM scale sets under a resource group.
2519
+ #
2520
+ # @param next_page_link [String] The NextLink from the previous successful call
2521
+ # to List operation.
2522
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2523
+ # will be added to the HTTP request.
2524
+ #
2525
+ # @return [VirtualMachineScaleSetListResult] operation results.
2526
+ #
2527
+ def list_next(next_page_link, custom_headers:nil)
2528
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
2529
+ response.body unless response.nil?
2530
+ end
2531
+
2532
+ #
2533
+ # Gets a list of all VM scale sets under a resource group.
2534
+ #
2535
+ # @param next_page_link [String] The NextLink from the previous successful call
2536
+ # to List operation.
2537
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2538
+ # will be added to the HTTP request.
2539
+ #
2540
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2541
+ #
2542
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
2543
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
2544
+ end
2545
+
2546
+ #
2547
+ # Gets a list of all VM scale sets under a resource group.
2548
+ #
2549
+ # @param next_page_link [String] The NextLink from the previous successful call
2550
+ # to List operation.
2551
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2552
+ # to the HTTP request.
2553
+ #
2554
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2555
+ #
2556
+ def list_next_async(next_page_link, custom_headers:nil)
2557
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2558
+
2559
+
2560
+ request_headers = {}
2561
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2562
+
2563
+ # Set Headers
2564
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2565
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2566
+ path_template = '{nextLink}'
2567
+
2568
+ request_url = @base_url || @client.base_url
2569
+
2570
+ options = {
2571
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2572
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2573
+ headers: request_headers.merge(custom_headers || {}),
2574
+ base_url: request_url
2575
+ }
2576
+ promise = @client.make_request_async(:get, path_template, options)
2577
+
2578
+ promise = promise.then do |result|
2579
+ http_response = result.response
2580
+ status_code = http_response.status
2581
+ response_content = http_response.body
2582
+ unless status_code == 200
2583
+ error_model = JSON.load(response_content)
2584
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2585
+ end
2586
+
2587
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2588
+ # Deserialize Response
2589
+ if status_code == 200
2590
+ begin
2591
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2592
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetListResult.mapper()
2593
+ result.body = @client.deserialize(result_mapper, parsed_response)
2594
+ rescue Exception => e
2595
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2596
+ end
2597
+ end
2598
+
2599
+ result
2600
+ end
2601
+
2602
+ promise.execute
2603
+ end
2604
+
2605
+ #
2606
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
2607
+ # associated resource group. Use nextLink property in the response to get the
2608
+ # next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM
2609
+ # Scale Sets.
2610
+ #
2611
+ # @param next_page_link [String] The NextLink from the previous successful call
2612
+ # to List operation.
2613
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2614
+ # will be added to the HTTP request.
2615
+ #
2616
+ # @return [VirtualMachineScaleSetListWithLinkResult] operation results.
2617
+ #
2618
+ def list_all_next(next_page_link, custom_headers:nil)
2619
+ response = list_all_next_async(next_page_link, custom_headers:custom_headers).value!
2620
+ response.body unless response.nil?
2621
+ end
2622
+
2623
+ #
2624
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
2625
+ # associated resource group. Use nextLink property in the response to get the
2626
+ # next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM
2627
+ # Scale Sets.
2628
+ #
2629
+ # @param next_page_link [String] The NextLink from the previous successful call
2630
+ # to List operation.
2631
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2632
+ # will be added to the HTTP request.
2633
+ #
2634
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2635
+ #
2636
+ def list_all_next_with_http_info(next_page_link, custom_headers:nil)
2637
+ list_all_next_async(next_page_link, custom_headers:custom_headers).value!
2638
+ end
2639
+
2640
+ #
2641
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
2642
+ # associated resource group. Use nextLink property in the response to get the
2643
+ # next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM
2644
+ # Scale Sets.
2645
+ #
2646
+ # @param next_page_link [String] The NextLink from the previous successful call
2647
+ # to List operation.
2648
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2649
+ # to the HTTP request.
2650
+ #
2651
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2652
+ #
2653
+ def list_all_next_async(next_page_link, custom_headers:nil)
2654
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2655
+
2656
+
2657
+ request_headers = {}
2658
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2659
+
2660
+ # Set Headers
2661
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2662
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2663
+ path_template = '{nextLink}'
2664
+
2665
+ request_url = @base_url || @client.base_url
2666
+
2667
+ options = {
2668
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2669
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2670
+ headers: request_headers.merge(custom_headers || {}),
2671
+ base_url: request_url
2672
+ }
2673
+ promise = @client.make_request_async(:get, path_template, options)
2674
+
2675
+ promise = promise.then do |result|
2676
+ http_response = result.response
2677
+ status_code = http_response.status
2678
+ response_content = http_response.body
2679
+ unless status_code == 200
2680
+ error_model = JSON.load(response_content)
2681
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2682
+ end
2683
+
2684
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2685
+ # Deserialize Response
2686
+ if status_code == 200
2687
+ begin
2688
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2689
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetListWithLinkResult.mapper()
2690
+ result.body = @client.deserialize(result_mapper, parsed_response)
2691
+ rescue Exception => e
2692
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2693
+ end
2694
+ end
2695
+
2696
+ result
2697
+ end
2698
+
2699
+ promise.execute
2700
+ end
2701
+
2702
+ #
2703
+ # Gets a list of SKUs available for your VM scale set, including the minimum
2704
+ # and maximum VM instances allowed for each SKU.
2705
+ #
2706
+ # @param next_page_link [String] The NextLink from the previous successful call
2707
+ # to List operation.
2708
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2709
+ # will be added to the HTTP request.
2710
+ #
2711
+ # @return [VirtualMachineScaleSetListSkusResult] operation results.
2712
+ #
2713
+ def list_skus_next(next_page_link, custom_headers:nil)
2714
+ response = list_skus_next_async(next_page_link, custom_headers:custom_headers).value!
2715
+ response.body unless response.nil?
2716
+ end
2717
+
2718
+ #
2719
+ # Gets a list of SKUs available for your VM scale set, including the minimum
2720
+ # and maximum VM instances allowed for each SKU.
2721
+ #
2722
+ # @param next_page_link [String] The NextLink from the previous successful call
2723
+ # to List operation.
2724
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2725
+ # will be added to the HTTP request.
2726
+ #
2727
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2728
+ #
2729
+ def list_skus_next_with_http_info(next_page_link, custom_headers:nil)
2730
+ list_skus_next_async(next_page_link, custom_headers:custom_headers).value!
2731
+ end
2732
+
2733
+ #
2734
+ # Gets a list of SKUs available for your VM scale set, including the minimum
2735
+ # and maximum VM instances allowed for each SKU.
2736
+ #
2737
+ # @param next_page_link [String] The NextLink from the previous successful call
2738
+ # to List operation.
2739
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2740
+ # to the HTTP request.
2741
+ #
2742
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2743
+ #
2744
+ def list_skus_next_async(next_page_link, custom_headers:nil)
2745
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2746
+
2747
+
2748
+ request_headers = {}
2749
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2750
+
2751
+ # Set Headers
2752
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2753
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2754
+ path_template = '{nextLink}'
2755
+
2756
+ request_url = @base_url || @client.base_url
2757
+
2758
+ options = {
2759
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2760
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2761
+ headers: request_headers.merge(custom_headers || {}),
2762
+ base_url: request_url
2763
+ }
2764
+ promise = @client.make_request_async(:get, path_template, options)
2765
+
2766
+ promise = promise.then do |result|
2767
+ http_response = result.response
2768
+ status_code = http_response.status
2769
+ response_content = http_response.body
2770
+ unless status_code == 200
2771
+ error_model = JSON.load(response_content)
2772
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2773
+ end
2774
+
2775
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2776
+ # Deserialize Response
2777
+ if status_code == 200
2778
+ begin
2779
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2780
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetListSkusResult.mapper()
2781
+ result.body = @client.deserialize(result_mapper, parsed_response)
2782
+ rescue Exception => e
2783
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2784
+ end
2785
+ end
2786
+
2787
+ result
2788
+ end
2789
+
2790
+ promise.execute
2791
+ end
2792
+
2793
+ #
2794
+ # Gets list of OS upgrades on a VM scale set instance.
2795
+ #
2796
+ # @param next_page_link [String] The NextLink from the previous successful call
2797
+ # to List operation.
2798
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2799
+ # will be added to the HTTP request.
2800
+ #
2801
+ # @return [VirtualMachineScaleSetListOSUpgradeHistory] operation results.
2802
+ #
2803
+ def get_osupgrade_history_next(next_page_link, custom_headers:nil)
2804
+ response = get_osupgrade_history_next_async(next_page_link, custom_headers:custom_headers).value!
2805
+ response.body unless response.nil?
2806
+ end
2807
+
2808
+ #
2809
+ # Gets list of OS upgrades on a VM scale set instance.
2810
+ #
2811
+ # @param next_page_link [String] The NextLink from the previous successful call
2812
+ # to List operation.
2813
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2814
+ # will be added to the HTTP request.
2815
+ #
2816
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2817
+ #
2818
+ def get_osupgrade_history_next_with_http_info(next_page_link, custom_headers:nil)
2819
+ get_osupgrade_history_next_async(next_page_link, custom_headers:custom_headers).value!
2820
+ end
2821
+
2822
+ #
2823
+ # Gets list of OS upgrades on a VM scale set instance.
2824
+ #
2825
+ # @param next_page_link [String] The NextLink from the previous successful call
2826
+ # to List operation.
2827
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2828
+ # to the HTTP request.
2829
+ #
2830
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2831
+ #
2832
+ def get_osupgrade_history_next_async(next_page_link, custom_headers:nil)
2833
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2834
+
2835
+
2836
+ request_headers = {}
2837
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2838
+
2839
+ # Set Headers
2840
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2841
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2842
+ path_template = '{nextLink}'
2843
+
2844
+ request_url = @base_url || @client.base_url
2845
+
2846
+ options = {
2847
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2848
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2849
+ headers: request_headers.merge(custom_headers || {}),
2850
+ base_url: request_url
2851
+ }
2852
+ promise = @client.make_request_async(:get, path_template, options)
2853
+
2854
+ promise = promise.then do |result|
2855
+ http_response = result.response
2856
+ status_code = http_response.status
2857
+ response_content = http_response.body
2858
+ unless status_code == 200
2859
+ error_model = JSON.load(response_content)
2860
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2861
+ end
2862
+
2863
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2864
+ # Deserialize Response
2865
+ if status_code == 200
2866
+ begin
2867
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2868
+ result_mapper = Azure::Compute::Mgmt::V2018_10_01::Models::VirtualMachineScaleSetListOSUpgradeHistory.mapper()
2869
+ result.body = @client.deserialize(result_mapper, parsed_response)
2870
+ rescue Exception => e
2871
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2872
+ end
2873
+ end
2874
+
2875
+ result
2876
+ end
2877
+
2878
+ promise.execute
2879
+ end
2880
+
2881
+ #
2882
+ # Gets a list of all VM scale sets under a resource group.
2883
+ #
2884
+ # @param resource_group_name [String] The name of the resource group.
2885
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2886
+ # will be added to the HTTP request.
2887
+ #
2888
+ # @return [VirtualMachineScaleSetListResult] which provide lazy access to pages
2889
+ # of the response.
2890
+ #
2891
+ def list_as_lazy(resource_group_name, custom_headers:nil)
2892
+ response = list_async(resource_group_name, custom_headers:custom_headers).value!
2893
+ unless response.nil?
2894
+ page = response.body
2895
+ page.next_method = Proc.new do |next_page_link|
2896
+ list_next_async(next_page_link, custom_headers:custom_headers)
2897
+ end
2898
+ page
2899
+ end
2900
+ end
2901
+
2902
+ #
2903
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
2904
+ # associated resource group. Use nextLink property in the response to get the
2905
+ # next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM
2906
+ # Scale Sets.
2907
+ #
2908
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2909
+ # will be added to the HTTP request.
2910
+ #
2911
+ # @return [VirtualMachineScaleSetListWithLinkResult] which provide lazy access
2912
+ # to pages of the response.
2913
+ #
2914
+ def list_all_as_lazy(custom_headers:nil)
2915
+ response = list_all_async(custom_headers:custom_headers).value!
2916
+ unless response.nil?
2917
+ page = response.body
2918
+ page.next_method = Proc.new do |next_page_link|
2919
+ list_all_next_async(next_page_link, custom_headers:custom_headers)
2920
+ end
2921
+ page
2922
+ end
2923
+ end
2924
+
2925
+ #
2926
+ # Gets a list of SKUs available for your VM scale set, including the minimum
2927
+ # and maximum VM instances allowed for each SKU.
2928
+ #
2929
+ # @param resource_group_name [String] The name of the resource group.
2930
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2931
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2932
+ # will be added to the HTTP request.
2933
+ #
2934
+ # @return [VirtualMachineScaleSetListSkusResult] which provide lazy access to
2935
+ # pages of the response.
2936
+ #
2937
+ def list_skus_as_lazy(resource_group_name, vm_scale_set_name, custom_headers:nil)
2938
+ response = list_skus_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
2939
+ unless response.nil?
2940
+ page = response.body
2941
+ page.next_method = Proc.new do |next_page_link|
2942
+ list_skus_next_async(next_page_link, custom_headers:custom_headers)
2943
+ end
2944
+ page
2945
+ end
2946
+ end
2947
+
2948
+ #
2949
+ # Gets list of OS upgrades on a VM scale set instance.
2950
+ #
2951
+ # @param resource_group_name [String] The name of the resource group.
2952
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2953
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2954
+ # will be added to the HTTP request.
2955
+ #
2956
+ # @return [VirtualMachineScaleSetListOSUpgradeHistory] which provide lazy
2957
+ # access to pages of the response.
2958
+ #
2959
+ def get_osupgrade_history_as_lazy(resource_group_name, vm_scale_set_name, custom_headers:nil)
2960
+ response = get_osupgrade_history_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value!
2961
+ unless response.nil?
2962
+ page = response.body
2963
+ page.next_method = Proc.new do |next_page_link|
2964
+ get_osupgrade_history_next_async(next_page_link, custom_headers:custom_headers)
2965
+ end
2966
+ page
2967
+ end
2968
+ end
2969
+
2970
+ end
2971
+ end