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,1957 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Compute::Mgmt::V2019_03_01
7
+ #
8
+ # Compute Client
9
+ #
10
+ class VirtualMachineScaleSetVMs
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the VirtualMachineScaleSetVMs 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
+ # Reimages (upgrade the operating system) a specific virtual machine in a VM
26
+ # scale set.
27
+ #
28
+ # @param resource_group_name [String] The name of the resource group.
29
+ # @param vm_scale_set_name [String] The name of the VM scale set.
30
+ # @param instance_id [String] The instance ID of the virtual machine.
31
+ # @param vm_scale_set_vmreimage_input
32
+ # [VirtualMachineScaleSetVMReimageParameters] Parameters for the Reimaging
33
+ # Virtual machine in ScaleSet.
34
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
+ # will be added to the HTTP request.
36
+ #
37
+ def reimage(resource_group_name, vm_scale_set_name, instance_id, vm_scale_set_vmreimage_input:nil, custom_headers:nil)
38
+ response = reimage_async(resource_group_name, vm_scale_set_name, instance_id, vm_scale_set_vmreimage_input:vm_scale_set_vmreimage_input, custom_headers:custom_headers).value!
39
+ nil
40
+ end
41
+
42
+ #
43
+ # @param resource_group_name [String] The name of the resource group.
44
+ # @param vm_scale_set_name [String] The name of the VM scale set.
45
+ # @param instance_id [String] The instance ID of the virtual machine.
46
+ # @param vm_scale_set_vmreimage_input
47
+ # [VirtualMachineScaleSetVMReimageParameters] Parameters for the Reimaging
48
+ # Virtual machine in ScaleSet.
49
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
50
+ # will be added to the HTTP request.
51
+ #
52
+ # @return [Concurrent::Promise] promise which provides async access to http
53
+ # response.
54
+ #
55
+ def reimage_async(resource_group_name, vm_scale_set_name, instance_id, vm_scale_set_vmreimage_input:nil, custom_headers:nil)
56
+ # Send request
57
+ promise = begin_reimage_async(resource_group_name, vm_scale_set_name, instance_id, vm_scale_set_vmreimage_input:vm_scale_set_vmreimage_input, custom_headers:custom_headers)
58
+
59
+ promise = promise.then do |response|
60
+ # Defining deserialization method.
61
+ deserialize_method = lambda do |parsed_response|
62
+ end
63
+
64
+ # Waiting for response.
65
+ @client.get_long_running_operation_result(response, deserialize_method)
66
+ end
67
+
68
+ promise
69
+ end
70
+
71
+ #
72
+ # Allows you to re-image all the disks ( including data disks ) in the a VM
73
+ # scale set instance. This operation is only supported for managed disks.
74
+ #
75
+ # @param resource_group_name [String] The name of the resource group.
76
+ # @param vm_scale_set_name [String] The name of the VM scale set.
77
+ # @param instance_id [String] The instance ID of the virtual machine.
78
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
79
+ # will be added to the HTTP request.
80
+ #
81
+ def reimage_all(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
82
+ response = reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
83
+ nil
84
+ end
85
+
86
+ #
87
+ # @param resource_group_name [String] The name of the resource group.
88
+ # @param vm_scale_set_name [String] The name of the VM scale set.
89
+ # @param instance_id [String] The instance ID of the virtual machine.
90
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
91
+ # will be added to the HTTP request.
92
+ #
93
+ # @return [Concurrent::Promise] promise which provides async access to http
94
+ # response.
95
+ #
96
+ def reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
97
+ # Send request
98
+ promise = begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers)
99
+
100
+ promise = promise.then do |response|
101
+ # Defining deserialization method.
102
+ deserialize_method = lambda do |parsed_response|
103
+ end
104
+
105
+ # Waiting for response.
106
+ @client.get_long_running_operation_result(response, deserialize_method)
107
+ end
108
+
109
+ promise
110
+ end
111
+
112
+ #
113
+ # Deallocates a specific virtual machine in a VM scale set. Shuts down the
114
+ # virtual machine and releases the compute resources it uses. You are not
115
+ # billed for the compute resources of this virtual machine once it is
116
+ # deallocated.
117
+ #
118
+ # @param resource_group_name [String] The name of the resource group.
119
+ # @param vm_scale_set_name [String] The name of the VM scale set.
120
+ # @param instance_id [String] The instance ID of the virtual machine.
121
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
122
+ # will be added to the HTTP request.
123
+ #
124
+ def deallocate(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
125
+ response = deallocate_async(resource_group_name, vm_scale_set_name, instance_id, 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 instance_id [String] The instance ID of the virtual machine.
133
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
134
+ # will be added to the HTTP request.
135
+ #
136
+ # @return [Concurrent::Promise] promise which provides async access to http
137
+ # response.
138
+ #
139
+ def deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
140
+ # Send request
141
+ promise = begin_deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers)
142
+
143
+ promise = promise.then do |response|
144
+ # Defining deserialization method.
145
+ deserialize_method = lambda do |parsed_response|
146
+ end
147
+
148
+ # Waiting for response.
149
+ @client.get_long_running_operation_result(response, deserialize_method)
150
+ end
151
+
152
+ promise
153
+ end
154
+
155
+ #
156
+ # Updates a virtual machine of a VM scale set.
157
+ #
158
+ # @param resource_group_name [String] The name of the resource group.
159
+ # @param vm_scale_set_name [String] The name of the VM scale set where the
160
+ # extension should be create or updated.
161
+ # @param instance_id [String] The instance ID of the virtual machine.
162
+ # @param parameters [VirtualMachineScaleSetVM] Parameters supplied to the
163
+ # Update Virtual Machine Scale Sets VM operation.
164
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
165
+ # will be added to the HTTP request.
166
+ #
167
+ # @return [VirtualMachineScaleSetVM] operation results.
168
+ #
169
+ def update(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil)
170
+ response = update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers).value!
171
+ response.body unless response.nil?
172
+ end
173
+
174
+ #
175
+ # @param resource_group_name [String] The name of the resource group.
176
+ # @param vm_scale_set_name [String] The name of the VM scale set where the
177
+ # extension should be create or updated.
178
+ # @param instance_id [String] The instance ID of the virtual machine.
179
+ # @param parameters [VirtualMachineScaleSetVM] Parameters supplied to the
180
+ # Update Virtual Machine Scale Sets VM operation.
181
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
182
+ # will be added to the HTTP request.
183
+ #
184
+ # @return [Concurrent::Promise] promise which provides async access to http
185
+ # response.
186
+ #
187
+ def update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil)
188
+ # Send request
189
+ promise = begin_update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers)
190
+
191
+ promise = promise.then do |response|
192
+ # Defining deserialization method.
193
+ deserialize_method = lambda do |parsed_response|
194
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVM.mapper()
195
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
196
+ end
197
+
198
+ # Waiting for response.
199
+ @client.get_long_running_operation_result(response, deserialize_method)
200
+ end
201
+
202
+ promise
203
+ end
204
+
205
+ #
206
+ # Deletes a virtual machine from a VM scale set.
207
+ #
208
+ # @param resource_group_name [String] The name of the resource group.
209
+ # @param vm_scale_set_name [String] The name of the VM scale set.
210
+ # @param instance_id [String] The instance ID of the virtual machine.
211
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
212
+ # will be added to the HTTP request.
213
+ #
214
+ def delete(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
215
+ response = delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
216
+ nil
217
+ end
218
+
219
+ #
220
+ # @param resource_group_name [String] The name of the resource group.
221
+ # @param vm_scale_set_name [String] The name of the VM scale set.
222
+ # @param instance_id [String] The instance ID of the virtual machine.
223
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
224
+ # will be added to the HTTP request.
225
+ #
226
+ # @return [Concurrent::Promise] promise which provides async access to http
227
+ # response.
228
+ #
229
+ def delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
230
+ # Send request
231
+ promise = begin_delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers)
232
+
233
+ promise = promise.then do |response|
234
+ # Defining deserialization method.
235
+ deserialize_method = lambda do |parsed_response|
236
+ end
237
+
238
+ # Waiting for response.
239
+ @client.get_long_running_operation_result(response, deserialize_method)
240
+ end
241
+
242
+ promise
243
+ end
244
+
245
+ #
246
+ # Gets a virtual machine from a VM scale set.
247
+ #
248
+ # @param resource_group_name [String] The name of the resource group.
249
+ # @param vm_scale_set_name [String] The name of the VM scale set.
250
+ # @param instance_id [String] The instance ID of the virtual machine.
251
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
252
+ # will be added to the HTTP request.
253
+ #
254
+ # @return [VirtualMachineScaleSetVM] operation results.
255
+ #
256
+ def get(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
257
+ response = get_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
258
+ response.body unless response.nil?
259
+ end
260
+
261
+ #
262
+ # Gets a virtual machine from a VM scale set.
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 instance_id [String] The instance ID of the virtual machine.
267
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
268
+ # will be added to the HTTP request.
269
+ #
270
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
271
+ #
272
+ def get_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
273
+ get_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
274
+ end
275
+
276
+ #
277
+ # Gets a virtual machine from a VM scale set.
278
+ #
279
+ # @param resource_group_name [String] The name of the resource group.
280
+ # @param vm_scale_set_name [String] The name of the VM scale set.
281
+ # @param instance_id [String] The instance ID of the virtual machine.
282
+ # @param [Hash{String => String}] A hash of custom headers that will be added
283
+ # to the HTTP request.
284
+ #
285
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
286
+ #
287
+ def get_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
288
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
289
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
290
+ fail ArgumentError, 'instance_id is nil' if instance_id.nil?
291
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
292
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
293
+
294
+
295
+ request_headers = {}
296
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
297
+
298
+ # Set Headers
299
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
300
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
301
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'
302
+
303
+ request_url = @base_url || @client.base_url
304
+
305
+ options = {
306
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
307
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
308
+ query_params: {'api-version' => @client.api_version},
309
+ headers: request_headers.merge(custom_headers || {}),
310
+ base_url: request_url
311
+ }
312
+ promise = @client.make_request_async(:get, path_template, options)
313
+
314
+ promise = promise.then do |result|
315
+ http_response = result.response
316
+ status_code = http_response.status
317
+ response_content = http_response.body
318
+ unless status_code == 200
319
+ error_model = JSON.load(response_content)
320
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
321
+ end
322
+
323
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
324
+ # Deserialize Response
325
+ if status_code == 200
326
+ begin
327
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
328
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVM.mapper()
329
+ result.body = @client.deserialize(result_mapper, parsed_response)
330
+ rescue Exception => e
331
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
332
+ end
333
+ end
334
+
335
+ result
336
+ end
337
+
338
+ promise.execute
339
+ end
340
+
341
+ #
342
+ # Gets the status of a virtual machine from a VM scale set.
343
+ #
344
+ # @param resource_group_name [String] The name of the resource group.
345
+ # @param vm_scale_set_name [String] The name of the VM scale set.
346
+ # @param instance_id [String] The instance ID of the virtual machine.
347
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
348
+ # will be added to the HTTP request.
349
+ #
350
+ # @return [VirtualMachineScaleSetVMInstanceView] operation results.
351
+ #
352
+ def get_instance_view(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
353
+ response = get_instance_view_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
354
+ response.body unless response.nil?
355
+ end
356
+
357
+ #
358
+ # Gets the status of a virtual machine from a VM scale set.
359
+ #
360
+ # @param resource_group_name [String] The name of the resource group.
361
+ # @param vm_scale_set_name [String] The name of the VM scale set.
362
+ # @param instance_id [String] The instance ID of the virtual machine.
363
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
364
+ # will be added to the HTTP request.
365
+ #
366
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
367
+ #
368
+ def get_instance_view_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
369
+ get_instance_view_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
370
+ end
371
+
372
+ #
373
+ # Gets the status of a virtual machine from a VM scale set.
374
+ #
375
+ # @param resource_group_name [String] The name of the resource group.
376
+ # @param vm_scale_set_name [String] The name of the VM scale set.
377
+ # @param instance_id [String] The instance ID of the virtual machine.
378
+ # @param [Hash{String => String}] A hash of custom headers that will be added
379
+ # to the HTTP request.
380
+ #
381
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
382
+ #
383
+ def get_instance_view_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
384
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
385
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
386
+ fail ArgumentError, 'instance_id is nil' if instance_id.nil?
387
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
388
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
389
+
390
+
391
+ request_headers = {}
392
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
393
+
394
+ # Set Headers
395
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
396
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
397
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView'
398
+
399
+ request_url = @base_url || @client.base_url
400
+
401
+ options = {
402
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
403
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
404
+ query_params: {'api-version' => @client.api_version},
405
+ headers: request_headers.merge(custom_headers || {}),
406
+ base_url: request_url
407
+ }
408
+ promise = @client.make_request_async(:get, path_template, options)
409
+
410
+ promise = promise.then do |result|
411
+ http_response = result.response
412
+ status_code = http_response.status
413
+ response_content = http_response.body
414
+ unless status_code == 200
415
+ error_model = JSON.load(response_content)
416
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
417
+ end
418
+
419
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
420
+ # Deserialize Response
421
+ if status_code == 200
422
+ begin
423
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
424
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVMInstanceView.mapper()
425
+ result.body = @client.deserialize(result_mapper, parsed_response)
426
+ rescue Exception => e
427
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
428
+ end
429
+ end
430
+
431
+ result
432
+ end
433
+
434
+ promise.execute
435
+ end
436
+
437
+ #
438
+ # Gets a list of all virtual machines in a VM scale sets.
439
+ #
440
+ # @param resource_group_name [String] The name of the resource group.
441
+ # @param virtual_machine_scale_set_name [String] The name of the VM scale set.
442
+ # @param filter [String] The filter to apply to the operation.
443
+ # @param select [String] The list parameters.
444
+ # @param expand [String] The expand expression to apply to the operation.
445
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
446
+ # will be added to the HTTP request.
447
+ #
448
+ # @return [Array<VirtualMachineScaleSetVM>] operation results.
449
+ #
450
+ def list(resource_group_name, virtual_machine_scale_set_name, filter:nil, select:nil, expand:nil, custom_headers:nil)
451
+ first_page = list_as_lazy(resource_group_name, virtual_machine_scale_set_name, filter:filter, select:select, expand:expand, custom_headers:custom_headers)
452
+ first_page.get_all_items
453
+ end
454
+
455
+ #
456
+ # Gets a list of all virtual machines in a VM scale sets.
457
+ #
458
+ # @param resource_group_name [String] The name of the resource group.
459
+ # @param virtual_machine_scale_set_name [String] The name of the VM scale set.
460
+ # @param filter [String] The filter to apply to the operation.
461
+ # @param select [String] The list parameters.
462
+ # @param expand [String] The expand expression to apply to the operation.
463
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
464
+ # will be added to the HTTP request.
465
+ #
466
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
467
+ #
468
+ def list_with_http_info(resource_group_name, virtual_machine_scale_set_name, filter:nil, select:nil, expand:nil, custom_headers:nil)
469
+ list_async(resource_group_name, virtual_machine_scale_set_name, filter:filter, select:select, expand:expand, custom_headers:custom_headers).value!
470
+ end
471
+
472
+ #
473
+ # Gets a list of all virtual machines in a VM scale sets.
474
+ #
475
+ # @param resource_group_name [String] The name of the resource group.
476
+ # @param virtual_machine_scale_set_name [String] The name of the VM scale set.
477
+ # @param filter [String] The filter to apply to the operation.
478
+ # @param select [String] The list parameters.
479
+ # @param expand [String] The expand expression to apply to the operation.
480
+ # @param [Hash{String => String}] A hash of custom headers that will be added
481
+ # to the HTTP request.
482
+ #
483
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
484
+ #
485
+ def list_async(resource_group_name, virtual_machine_scale_set_name, filter:nil, select:nil, expand:nil, custom_headers:nil)
486
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
487
+ fail ArgumentError, 'virtual_machine_scale_set_name is nil' if virtual_machine_scale_set_name.nil?
488
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
489
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
490
+
491
+
492
+ request_headers = {}
493
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
494
+
495
+ # Set Headers
496
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
497
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
498
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines'
499
+
500
+ request_url = @base_url || @client.base_url
501
+
502
+ options = {
503
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
504
+ path_params: {'resourceGroupName' => resource_group_name,'virtualMachineScaleSetName' => virtual_machine_scale_set_name,'subscriptionId' => @client.subscription_id},
505
+ query_params: {'$filter' => filter,'$select' => select,'$expand' => expand,'api-version' => @client.api_version},
506
+ headers: request_headers.merge(custom_headers || {}),
507
+ base_url: request_url
508
+ }
509
+ promise = @client.make_request_async(:get, path_template, options)
510
+
511
+ promise = promise.then do |result|
512
+ http_response = result.response
513
+ status_code = http_response.status
514
+ response_content = http_response.body
515
+ unless status_code == 200
516
+ error_model = JSON.load(response_content)
517
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
518
+ end
519
+
520
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
521
+ # Deserialize Response
522
+ if status_code == 200
523
+ begin
524
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
525
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVMListResult.mapper()
526
+ result.body = @client.deserialize(result_mapper, parsed_response)
527
+ rescue Exception => e
528
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
529
+ end
530
+ end
531
+
532
+ result
533
+ end
534
+
535
+ promise.execute
536
+ end
537
+
538
+ #
539
+ # Power off (stop) a virtual machine in a VM scale set. Note that resources are
540
+ # still attached and you are getting charged for the resources. Instead, use
541
+ # deallocate to release resources and avoid charges.
542
+ #
543
+ # @param resource_group_name [String] The name of the resource group.
544
+ # @param vm_scale_set_name [String] The name of the VM scale set.
545
+ # @param instance_id [String] The instance ID of the virtual machine.
546
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
547
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
548
+ # false indicates otherwise. Default value for this flag is false if not
549
+ # specified
550
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
551
+ # will be added to the HTTP request.
552
+ #
553
+ def power_off(resource_group_name, vm_scale_set_name, instance_id, skip_shutdown:false, custom_headers:nil)
554
+ response = power_off_async(resource_group_name, vm_scale_set_name, instance_id, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
555
+ nil
556
+ end
557
+
558
+ #
559
+ # @param resource_group_name [String] The name of the resource group.
560
+ # @param vm_scale_set_name [String] The name of the VM scale set.
561
+ # @param instance_id [String] The instance ID of the virtual machine.
562
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
563
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
564
+ # false indicates otherwise. Default value for this flag is false if not
565
+ # specified
566
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
567
+ # will be added to the HTTP request.
568
+ #
569
+ # @return [Concurrent::Promise] promise which provides async access to http
570
+ # response.
571
+ #
572
+ def power_off_async(resource_group_name, vm_scale_set_name, instance_id, skip_shutdown:false, custom_headers:nil)
573
+ # Send request
574
+ promise = begin_power_off_async(resource_group_name, vm_scale_set_name, instance_id, skip_shutdown:skip_shutdown, custom_headers:custom_headers)
575
+
576
+ promise = promise.then do |response|
577
+ # Defining deserialization method.
578
+ deserialize_method = lambda do |parsed_response|
579
+ end
580
+
581
+ # Waiting for response.
582
+ @client.get_long_running_operation_result(response, deserialize_method)
583
+ end
584
+
585
+ promise
586
+ end
587
+
588
+ #
589
+ # Restarts a virtual machine in a VM scale set.
590
+ #
591
+ # @param resource_group_name [String] The name of the resource group.
592
+ # @param vm_scale_set_name [String] The name of the VM scale set.
593
+ # @param instance_id [String] The instance ID of the virtual machine.
594
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
595
+ # will be added to the HTTP request.
596
+ #
597
+ def restart(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
598
+ response = restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
599
+ nil
600
+ end
601
+
602
+ #
603
+ # @param resource_group_name [String] The name of the resource group.
604
+ # @param vm_scale_set_name [String] The name of the VM scale set.
605
+ # @param instance_id [String] The instance ID of the virtual machine.
606
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
607
+ # will be added to the HTTP request.
608
+ #
609
+ # @return [Concurrent::Promise] promise which provides async access to http
610
+ # response.
611
+ #
612
+ def restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
613
+ # Send request
614
+ promise = begin_restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers)
615
+
616
+ promise = promise.then do |response|
617
+ # Defining deserialization method.
618
+ deserialize_method = lambda do |parsed_response|
619
+ end
620
+
621
+ # Waiting for response.
622
+ @client.get_long_running_operation_result(response, deserialize_method)
623
+ end
624
+
625
+ promise
626
+ end
627
+
628
+ #
629
+ # Starts a virtual machine in a VM scale set.
630
+ #
631
+ # @param resource_group_name [String] The name of the resource group.
632
+ # @param vm_scale_set_name [String] The name of the VM scale set.
633
+ # @param instance_id [String] The instance ID of the virtual machine.
634
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
635
+ # will be added to the HTTP request.
636
+ #
637
+ def start(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
638
+ response = start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
639
+ nil
640
+ end
641
+
642
+ #
643
+ # @param resource_group_name [String] The name of the resource group.
644
+ # @param vm_scale_set_name [String] The name of the VM scale set.
645
+ # @param instance_id [String] The instance ID of the virtual machine.
646
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
647
+ # will be added to the HTTP request.
648
+ #
649
+ # @return [Concurrent::Promise] promise which provides async access to http
650
+ # response.
651
+ #
652
+ def start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
653
+ # Send request
654
+ promise = begin_start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers)
655
+
656
+ promise = promise.then do |response|
657
+ # Defining deserialization method.
658
+ deserialize_method = lambda do |parsed_response|
659
+ end
660
+
661
+ # Waiting for response.
662
+ @client.get_long_running_operation_result(response, deserialize_method)
663
+ end
664
+
665
+ promise
666
+ end
667
+
668
+ #
669
+ # Redeploys a virtual machine in a VM scale set.
670
+ #
671
+ # @param resource_group_name [String] The name of the resource group.
672
+ # @param vm_scale_set_name [String] The name of the VM scale set.
673
+ # @param instance_id [String] The instance ID of the virtual machine.
674
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
675
+ # will be added to the HTTP request.
676
+ #
677
+ def redeploy(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
678
+ response = redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
679
+ nil
680
+ end
681
+
682
+ #
683
+ # @param resource_group_name [String] The name of the resource group.
684
+ # @param vm_scale_set_name [String] The name of the VM scale set.
685
+ # @param instance_id [String] The instance ID of the virtual machine.
686
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
687
+ # will be added to the HTTP request.
688
+ #
689
+ # @return [Concurrent::Promise] promise which provides async access to http
690
+ # response.
691
+ #
692
+ def redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
693
+ # Send request
694
+ promise = begin_redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers)
695
+
696
+ promise = promise.then do |response|
697
+ # Defining deserialization method.
698
+ deserialize_method = lambda do |parsed_response|
699
+ end
700
+
701
+ # Waiting for response.
702
+ @client.get_long_running_operation_result(response, deserialize_method)
703
+ end
704
+
705
+ promise
706
+ end
707
+
708
+ #
709
+ # Performs maintenance on a virtual machine in a VM scale set.
710
+ #
711
+ # @param resource_group_name [String] The name of the resource group.
712
+ # @param vm_scale_set_name [String] The name of the VM scale set.
713
+ # @param instance_id [String] The instance ID of the virtual machine.
714
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
715
+ # will be added to the HTTP request.
716
+ #
717
+ def perform_maintenance(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
718
+ response = perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
719
+ nil
720
+ end
721
+
722
+ #
723
+ # @param resource_group_name [String] The name of the resource group.
724
+ # @param vm_scale_set_name [String] The name of the VM scale set.
725
+ # @param instance_id [String] The instance ID of the virtual machine.
726
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
727
+ # will be added to the HTTP request.
728
+ #
729
+ # @return [Concurrent::Promise] promise which provides async access to http
730
+ # response.
731
+ #
732
+ def perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
733
+ # Send request
734
+ promise = begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers)
735
+
736
+ promise = promise.then do |response|
737
+ # Defining deserialization method.
738
+ deserialize_method = lambda do |parsed_response|
739
+ end
740
+
741
+ # Waiting for response.
742
+ @client.get_long_running_operation_result(response, deserialize_method)
743
+ end
744
+
745
+ promise
746
+ end
747
+
748
+ #
749
+ # Run command on a virtual machine in a VM scale set.
750
+ #
751
+ # @param resource_group_name [String] The name of the resource group.
752
+ # @param vm_scale_set_name [String] The name of the VM scale set.
753
+ # @param instance_id [String] The instance ID of the virtual machine.
754
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
755
+ # operation.
756
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
757
+ # will be added to the HTTP request.
758
+ #
759
+ # @return [RunCommandResult] operation results.
760
+ #
761
+ def run_command(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil)
762
+ response = run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers).value!
763
+ response.body unless response.nil?
764
+ end
765
+
766
+ #
767
+ # @param resource_group_name [String] The name of the resource group.
768
+ # @param vm_scale_set_name [String] The name of the VM scale set.
769
+ # @param instance_id [String] The instance ID of the virtual machine.
770
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
771
+ # operation.
772
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
773
+ # will be added to the HTTP request.
774
+ #
775
+ # @return [Concurrent::Promise] promise which provides async access to http
776
+ # response.
777
+ #
778
+ def run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil)
779
+ # Send request
780
+ promise = begin_run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers)
781
+
782
+ promise = promise.then do |response|
783
+ # Defining deserialization method.
784
+ deserialize_method = lambda do |parsed_response|
785
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::RunCommandResult.mapper()
786
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
787
+ end
788
+
789
+ # Waiting for response.
790
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
791
+ end
792
+
793
+ promise
794
+ end
795
+
796
+ #
797
+ # Reimages (upgrade the operating system) a specific virtual machine in a VM
798
+ # scale set.
799
+ #
800
+ # @param resource_group_name [String] The name of the resource group.
801
+ # @param vm_scale_set_name [String] The name of the VM scale set.
802
+ # @param instance_id [String] The instance ID of the virtual machine.
803
+ # @param vm_scale_set_vmreimage_input
804
+ # [VirtualMachineScaleSetVMReimageParameters] Parameters for the Reimaging
805
+ # Virtual machine in ScaleSet.
806
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
807
+ # will be added to the HTTP request.
808
+ #
809
+ #
810
+ def begin_reimage(resource_group_name, vm_scale_set_name, instance_id, vm_scale_set_vmreimage_input:nil, custom_headers:nil)
811
+ response = begin_reimage_async(resource_group_name, vm_scale_set_name, instance_id, vm_scale_set_vmreimage_input:vm_scale_set_vmreimage_input, custom_headers:custom_headers).value!
812
+ nil
813
+ end
814
+
815
+ #
816
+ # Reimages (upgrade the operating system) a specific virtual machine in a VM
817
+ # scale set.
818
+ #
819
+ # @param resource_group_name [String] The name of the resource group.
820
+ # @param vm_scale_set_name [String] The name of the VM scale set.
821
+ # @param instance_id [String] The instance ID of the virtual machine.
822
+ # @param vm_scale_set_vmreimage_input
823
+ # [VirtualMachineScaleSetVMReimageParameters] Parameters for the Reimaging
824
+ # Virtual machine in ScaleSet.
825
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
826
+ # will be added to the HTTP request.
827
+ #
828
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
829
+ #
830
+ def begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, instance_id, vm_scale_set_vmreimage_input:nil, custom_headers:nil)
831
+ begin_reimage_async(resource_group_name, vm_scale_set_name, instance_id, vm_scale_set_vmreimage_input:vm_scale_set_vmreimage_input, custom_headers:custom_headers).value!
832
+ end
833
+
834
+ #
835
+ # Reimages (upgrade the operating system) a specific virtual machine in a VM
836
+ # scale set.
837
+ #
838
+ # @param resource_group_name [String] The name of the resource group.
839
+ # @param vm_scale_set_name [String] The name of the VM scale set.
840
+ # @param instance_id [String] The instance ID of the virtual machine.
841
+ # @param vm_scale_set_vmreimage_input
842
+ # [VirtualMachineScaleSetVMReimageParameters] Parameters for the Reimaging
843
+ # Virtual machine in ScaleSet.
844
+ # @param [Hash{String => String}] A hash of custom headers that will be added
845
+ # to the HTTP request.
846
+ #
847
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
848
+ #
849
+ def begin_reimage_async(resource_group_name, vm_scale_set_name, instance_id, vm_scale_set_vmreimage_input:nil, custom_headers:nil)
850
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
851
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
852
+ fail ArgumentError, 'instance_id is nil' if instance_id.nil?
853
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
854
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
855
+
856
+
857
+ request_headers = {}
858
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
859
+
860
+ # Set Headers
861
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
862
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
863
+
864
+ # Serialize Request
865
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVMReimageParameters.mapper()
866
+ request_content = @client.serialize(request_mapper, vm_scale_set_vmreimage_input)
867
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
868
+
869
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage'
870
+
871
+ request_url = @base_url || @client.base_url
872
+
873
+ options = {
874
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
875
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
876
+ query_params: {'api-version' => @client.api_version},
877
+ body: request_content,
878
+ headers: request_headers.merge(custom_headers || {}),
879
+ base_url: request_url
880
+ }
881
+ promise = @client.make_request_async(:post, path_template, options)
882
+
883
+ promise = promise.then do |result|
884
+ http_response = result.response
885
+ status_code = http_response.status
886
+ response_content = http_response.body
887
+ unless status_code == 200 || status_code == 202
888
+ error_model = JSON.load(response_content)
889
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
890
+ end
891
+
892
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
893
+
894
+ result
895
+ end
896
+
897
+ promise.execute
898
+ end
899
+
900
+ #
901
+ # Allows you to re-image all the disks ( including data disks ) in the a VM
902
+ # scale set instance. This operation is only supported for managed disks.
903
+ #
904
+ # @param resource_group_name [String] The name of the resource group.
905
+ # @param vm_scale_set_name [String] The name of the VM scale set.
906
+ # @param instance_id [String] The instance ID of the virtual machine.
907
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
908
+ # will be added to the HTTP request.
909
+ #
910
+ #
911
+ def begin_reimage_all(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
912
+ response = begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
913
+ nil
914
+ end
915
+
916
+ #
917
+ # Allows you to re-image all the disks ( including data disks ) in the a VM
918
+ # scale set instance. This operation is only supported for managed disks.
919
+ #
920
+ # @param resource_group_name [String] The name of the resource group.
921
+ # @param vm_scale_set_name [String] The name of the VM scale set.
922
+ # @param instance_id [String] The instance ID of the virtual machine.
923
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
924
+ # will be added to the HTTP request.
925
+ #
926
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
927
+ #
928
+ def begin_reimage_all_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
929
+ begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
930
+ end
931
+
932
+ #
933
+ # Allows you to re-image all the disks ( including data disks ) in the a VM
934
+ # scale set instance. This operation is only supported for managed disks.
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 instance_id [String] The instance ID of the virtual machine.
939
+ # @param [Hash{String => String}] A hash of custom headers that will be added
940
+ # to the HTTP request.
941
+ #
942
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
943
+ #
944
+ def begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
945
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
946
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
947
+ fail ArgumentError, 'instance_id is nil' if instance_id.nil?
948
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
949
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
950
+
951
+
952
+ request_headers = {}
953
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
954
+
955
+ # Set Headers
956
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
957
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
958
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'
959
+
960
+ request_url = @base_url || @client.base_url
961
+
962
+ options = {
963
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
964
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
965
+ query_params: {'api-version' => @client.api_version},
966
+ headers: request_headers.merge(custom_headers || {}),
967
+ base_url: request_url
968
+ }
969
+ promise = @client.make_request_async(:post, path_template, options)
970
+
971
+ promise = promise.then do |result|
972
+ http_response = result.response
973
+ status_code = http_response.status
974
+ response_content = http_response.body
975
+ unless status_code == 200 || status_code == 202
976
+ error_model = JSON.load(response_content)
977
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
978
+ end
979
+
980
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
981
+
982
+ result
983
+ end
984
+
985
+ promise.execute
986
+ end
987
+
988
+ #
989
+ # Deallocates a specific virtual machine in a VM scale set. Shuts down the
990
+ # virtual machine and releases the compute resources it uses. You are not
991
+ # billed for the compute resources of this virtual machine once it is
992
+ # deallocated.
993
+ #
994
+ # @param resource_group_name [String] The name of the resource group.
995
+ # @param vm_scale_set_name [String] The name of the VM scale set.
996
+ # @param instance_id [String] The instance ID of the virtual machine.
997
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
998
+ # will be added to the HTTP request.
999
+ #
1000
+ #
1001
+ def begin_deallocate(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1002
+ response = begin_deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
1003
+ nil
1004
+ end
1005
+
1006
+ #
1007
+ # Deallocates a specific virtual machine in a VM scale set. Shuts down the
1008
+ # virtual machine and releases the compute resources it uses. You are not
1009
+ # billed for the compute resources of this virtual machine once it is
1010
+ # deallocated.
1011
+ #
1012
+ # @param resource_group_name [String] The name of the resource group.
1013
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1014
+ # @param instance_id [String] The instance ID of the virtual machine.
1015
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1016
+ # will be added to the HTTP request.
1017
+ #
1018
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1019
+ #
1020
+ def begin_deallocate_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1021
+ begin_deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
1022
+ end
1023
+
1024
+ #
1025
+ # Deallocates a specific virtual machine in a VM scale set. Shuts down the
1026
+ # virtual machine and releases the compute resources it uses. You are not
1027
+ # billed for the compute resources of this virtual machine once it is
1028
+ # deallocated.
1029
+ #
1030
+ # @param resource_group_name [String] The name of the resource group.
1031
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1032
+ # @param instance_id [String] The instance ID of the virtual machine.
1033
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1034
+ # to the HTTP request.
1035
+ #
1036
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1037
+ #
1038
+ def begin_deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1039
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1040
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1041
+ fail ArgumentError, 'instance_id is nil' if instance_id.nil?
1042
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1043
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1044
+
1045
+
1046
+ request_headers = {}
1047
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1048
+
1049
+ # Set Headers
1050
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1051
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1052
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate'
1053
+
1054
+ request_url = @base_url || @client.base_url
1055
+
1056
+ options = {
1057
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1058
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
1059
+ query_params: {'api-version' => @client.api_version},
1060
+ headers: request_headers.merge(custom_headers || {}),
1061
+ base_url: request_url
1062
+ }
1063
+ promise = @client.make_request_async(:post, path_template, options)
1064
+
1065
+ promise = promise.then do |result|
1066
+ http_response = result.response
1067
+ status_code = http_response.status
1068
+ response_content = http_response.body
1069
+ unless status_code == 200 || status_code == 202
1070
+ error_model = JSON.load(response_content)
1071
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1072
+ end
1073
+
1074
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1075
+
1076
+ result
1077
+ end
1078
+
1079
+ promise.execute
1080
+ end
1081
+
1082
+ #
1083
+ # Updates a virtual machine of a VM scale set.
1084
+ #
1085
+ # @param resource_group_name [String] The name of the resource group.
1086
+ # @param vm_scale_set_name [String] The name of the VM scale set where the
1087
+ # extension should be create or updated.
1088
+ # @param instance_id [String] The instance ID of the virtual machine.
1089
+ # @param parameters [VirtualMachineScaleSetVM] Parameters supplied to the
1090
+ # Update Virtual Machine Scale Sets VM operation.
1091
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1092
+ # will be added to the HTTP request.
1093
+ #
1094
+ # @return [VirtualMachineScaleSetVM] operation results.
1095
+ #
1096
+ def begin_update(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil)
1097
+ response = begin_update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers).value!
1098
+ response.body unless response.nil?
1099
+ end
1100
+
1101
+ #
1102
+ # Updates a virtual machine of a VM scale set.
1103
+ #
1104
+ # @param resource_group_name [String] The name of the resource group.
1105
+ # @param vm_scale_set_name [String] The name of the VM scale set where the
1106
+ # extension should be create or updated.
1107
+ # @param instance_id [String] The instance ID of the virtual machine.
1108
+ # @param parameters [VirtualMachineScaleSetVM] Parameters supplied to the
1109
+ # Update Virtual Machine Scale Sets VM operation.
1110
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1111
+ # will be added to the HTTP request.
1112
+ #
1113
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1114
+ #
1115
+ def begin_update_with_http_info(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil)
1116
+ begin_update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers).value!
1117
+ end
1118
+
1119
+ #
1120
+ # Updates a virtual machine of a VM scale set.
1121
+ #
1122
+ # @param resource_group_name [String] The name of the resource group.
1123
+ # @param vm_scale_set_name [String] The name of the VM scale set where the
1124
+ # extension should be create or updated.
1125
+ # @param instance_id [String] The instance ID of the virtual machine.
1126
+ # @param parameters [VirtualMachineScaleSetVM] Parameters supplied to the
1127
+ # Update Virtual Machine Scale Sets VM operation.
1128
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1129
+ # to the HTTP request.
1130
+ #
1131
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1132
+ #
1133
+ def begin_update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil)
1134
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1135
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1136
+ fail ArgumentError, 'instance_id is nil' if instance_id.nil?
1137
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1138
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1139
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1140
+
1141
+
1142
+ request_headers = {}
1143
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1144
+
1145
+ # Set Headers
1146
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1147
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1148
+
1149
+ # Serialize Request
1150
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVM.mapper()
1151
+ request_content = @client.serialize(request_mapper, parameters)
1152
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1153
+
1154
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'
1155
+
1156
+ request_url = @base_url || @client.base_url
1157
+
1158
+ options = {
1159
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1160
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
1161
+ query_params: {'api-version' => @client.api_version},
1162
+ body: request_content,
1163
+ headers: request_headers.merge(custom_headers || {}),
1164
+ base_url: request_url
1165
+ }
1166
+ promise = @client.make_request_async(:put, path_template, options)
1167
+
1168
+ promise = promise.then do |result|
1169
+ http_response = result.response
1170
+ status_code = http_response.status
1171
+ response_content = http_response.body
1172
+ unless status_code == 200 || status_code == 202
1173
+ error_model = JSON.load(response_content)
1174
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1175
+ end
1176
+
1177
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1178
+ # Deserialize Response
1179
+ if status_code == 200
1180
+ begin
1181
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1182
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVM.mapper()
1183
+ result.body = @client.deserialize(result_mapper, parsed_response)
1184
+ rescue Exception => e
1185
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1186
+ end
1187
+ end
1188
+ # Deserialize Response
1189
+ if status_code == 202
1190
+ begin
1191
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1192
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVM.mapper()
1193
+ result.body = @client.deserialize(result_mapper, parsed_response)
1194
+ rescue Exception => e
1195
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1196
+ end
1197
+ end
1198
+
1199
+ result
1200
+ end
1201
+
1202
+ promise.execute
1203
+ end
1204
+
1205
+ #
1206
+ # Deletes a virtual machine from a VM scale set.
1207
+ #
1208
+ # @param resource_group_name [String] The name of the resource group.
1209
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1210
+ # @param instance_id [String] The instance ID of the virtual machine.
1211
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1212
+ # will be added to the HTTP request.
1213
+ #
1214
+ #
1215
+ def begin_delete(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1216
+ response = begin_delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
1217
+ nil
1218
+ end
1219
+
1220
+ #
1221
+ # Deletes a virtual machine from a VM scale set.
1222
+ #
1223
+ # @param resource_group_name [String] The name of the resource group.
1224
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1225
+ # @param instance_id [String] The instance ID of the virtual machine.
1226
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1227
+ # will be added to the HTTP request.
1228
+ #
1229
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1230
+ #
1231
+ def begin_delete_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1232
+ begin_delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
1233
+ end
1234
+
1235
+ #
1236
+ # Deletes a virtual machine from a VM scale set.
1237
+ #
1238
+ # @param resource_group_name [String] The name of the resource group.
1239
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1240
+ # @param instance_id [String] The instance ID of the virtual machine.
1241
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1242
+ # to the HTTP request.
1243
+ #
1244
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1245
+ #
1246
+ def begin_delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1247
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1248
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1249
+ fail ArgumentError, 'instance_id is nil' if instance_id.nil?
1250
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1251
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1252
+
1253
+
1254
+ request_headers = {}
1255
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1256
+
1257
+ # Set Headers
1258
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1259
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1260
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}'
1261
+
1262
+ request_url = @base_url || @client.base_url
1263
+
1264
+ options = {
1265
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1266
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
1267
+ query_params: {'api-version' => @client.api_version},
1268
+ headers: request_headers.merge(custom_headers || {}),
1269
+ base_url: request_url
1270
+ }
1271
+ promise = @client.make_request_async(:delete, path_template, options)
1272
+
1273
+ promise = promise.then do |result|
1274
+ http_response = result.response
1275
+ status_code = http_response.status
1276
+ response_content = http_response.body
1277
+ unless status_code == 200 || status_code == 202 || status_code == 204
1278
+ error_model = JSON.load(response_content)
1279
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1280
+ end
1281
+
1282
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1283
+
1284
+ result
1285
+ end
1286
+
1287
+ promise.execute
1288
+ end
1289
+
1290
+ #
1291
+ # Power off (stop) a virtual machine in a VM scale set. Note that resources are
1292
+ # still attached and you are getting charged for the resources. Instead, use
1293
+ # deallocate to release resources and avoid charges.
1294
+ #
1295
+ # @param resource_group_name [String] The name of the resource group.
1296
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1297
+ # @param instance_id [String] The instance ID of the virtual machine.
1298
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
1299
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
1300
+ # false indicates otherwise. Default value for this flag is false if not
1301
+ # specified
1302
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1303
+ # will be added to the HTTP request.
1304
+ #
1305
+ #
1306
+ def begin_power_off(resource_group_name, vm_scale_set_name, instance_id, skip_shutdown:false, custom_headers:nil)
1307
+ response = begin_power_off_async(resource_group_name, vm_scale_set_name, instance_id, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
1308
+ nil
1309
+ end
1310
+
1311
+ #
1312
+ # Power off (stop) a virtual machine in a VM scale set. Note that resources are
1313
+ # still attached and you are getting charged for the resources. Instead, use
1314
+ # deallocate to release resources and avoid charges.
1315
+ #
1316
+ # @param resource_group_name [String] The name of the resource group.
1317
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1318
+ # @param instance_id [String] The instance ID of the virtual machine.
1319
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
1320
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
1321
+ # false indicates otherwise. Default value for this flag is false if not
1322
+ # specified
1323
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1324
+ # will be added to the HTTP request.
1325
+ #
1326
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1327
+ #
1328
+ def begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, instance_id, skip_shutdown:false, custom_headers:nil)
1329
+ begin_power_off_async(resource_group_name, vm_scale_set_name, instance_id, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
1330
+ end
1331
+
1332
+ #
1333
+ # Power off (stop) a virtual machine in a VM scale set. Note that resources are
1334
+ # still attached and you are getting charged for the resources. Instead, use
1335
+ # deallocate to release resources and avoid charges.
1336
+ #
1337
+ # @param resource_group_name [String] The name of the resource group.
1338
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1339
+ # @param instance_id [String] The instance ID of the virtual machine.
1340
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
1341
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
1342
+ # false indicates otherwise. Default value for this flag is false if not
1343
+ # specified
1344
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1345
+ # to the HTTP request.
1346
+ #
1347
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1348
+ #
1349
+ def begin_power_off_async(resource_group_name, vm_scale_set_name, instance_id, skip_shutdown:false, custom_headers:nil)
1350
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1351
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1352
+ fail ArgumentError, 'instance_id is nil' if instance_id.nil?
1353
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1354
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1355
+
1356
+
1357
+ request_headers = {}
1358
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1359
+
1360
+ # Set Headers
1361
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1362
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1363
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff'
1364
+
1365
+ request_url = @base_url || @client.base_url
1366
+
1367
+ options = {
1368
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1369
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
1370
+ query_params: {'skipShutdown' => skip_shutdown,'api-version' => @client.api_version},
1371
+ headers: request_headers.merge(custom_headers || {}),
1372
+ base_url: request_url
1373
+ }
1374
+ promise = @client.make_request_async(:post, path_template, options)
1375
+
1376
+ promise = promise.then do |result|
1377
+ http_response = result.response
1378
+ status_code = http_response.status
1379
+ response_content = http_response.body
1380
+ unless status_code == 200 || status_code == 202
1381
+ error_model = JSON.load(response_content)
1382
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1383
+ end
1384
+
1385
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1386
+
1387
+ result
1388
+ end
1389
+
1390
+ promise.execute
1391
+ end
1392
+
1393
+ #
1394
+ # Restarts a virtual machine in a VM scale set.
1395
+ #
1396
+ # @param resource_group_name [String] The name of the resource group.
1397
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1398
+ # @param instance_id [String] The instance ID of the virtual machine.
1399
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1400
+ # will be added to the HTTP request.
1401
+ #
1402
+ #
1403
+ def begin_restart(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1404
+ response = begin_restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
1405
+ nil
1406
+ end
1407
+
1408
+ #
1409
+ # Restarts a virtual machine in a VM scale set.
1410
+ #
1411
+ # @param resource_group_name [String] The name of the resource group.
1412
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1413
+ # @param instance_id [String] The instance ID of the virtual machine.
1414
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1415
+ # will be added to the HTTP request.
1416
+ #
1417
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1418
+ #
1419
+ def begin_restart_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1420
+ begin_restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
1421
+ end
1422
+
1423
+ #
1424
+ # Restarts a virtual machine in a VM scale set.
1425
+ #
1426
+ # @param resource_group_name [String] The name of the resource group.
1427
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1428
+ # @param instance_id [String] The instance ID of the virtual machine.
1429
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1430
+ # to the HTTP request.
1431
+ #
1432
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1433
+ #
1434
+ def begin_restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1435
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1436
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1437
+ fail ArgumentError, 'instance_id is nil' if instance_id.nil?
1438
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1439
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1440
+
1441
+
1442
+ request_headers = {}
1443
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1444
+
1445
+ # Set Headers
1446
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1447
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1448
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart'
1449
+
1450
+ request_url = @base_url || @client.base_url
1451
+
1452
+ options = {
1453
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1454
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
1455
+ query_params: {'api-version' => @client.api_version},
1456
+ headers: request_headers.merge(custom_headers || {}),
1457
+ base_url: request_url
1458
+ }
1459
+ promise = @client.make_request_async(:post, path_template, options)
1460
+
1461
+ promise = promise.then do |result|
1462
+ http_response = result.response
1463
+ status_code = http_response.status
1464
+ response_content = http_response.body
1465
+ unless status_code == 200 || status_code == 202
1466
+ error_model = JSON.load(response_content)
1467
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1468
+ end
1469
+
1470
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1471
+
1472
+ result
1473
+ end
1474
+
1475
+ promise.execute
1476
+ end
1477
+
1478
+ #
1479
+ # Starts a virtual machine in a VM scale set.
1480
+ #
1481
+ # @param resource_group_name [String] The name of the resource group.
1482
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1483
+ # @param instance_id [String] The instance ID of the virtual machine.
1484
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1485
+ # will be added to the HTTP request.
1486
+ #
1487
+ #
1488
+ def begin_start(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1489
+ response = begin_start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
1490
+ nil
1491
+ end
1492
+
1493
+ #
1494
+ # Starts a virtual machine in a VM scale set.
1495
+ #
1496
+ # @param resource_group_name [String] The name of the resource group.
1497
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1498
+ # @param instance_id [String] The instance ID of the virtual machine.
1499
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1500
+ # will be added to the HTTP request.
1501
+ #
1502
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1503
+ #
1504
+ def begin_start_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1505
+ begin_start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
1506
+ end
1507
+
1508
+ #
1509
+ # Starts a virtual machine in a VM scale set.
1510
+ #
1511
+ # @param resource_group_name [String] The name of the resource group.
1512
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1513
+ # @param instance_id [String] The instance ID of the virtual machine.
1514
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1515
+ # to the HTTP request.
1516
+ #
1517
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1518
+ #
1519
+ def begin_start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1520
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1521
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1522
+ fail ArgumentError, 'instance_id is nil' if instance_id.nil?
1523
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1524
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1525
+
1526
+
1527
+ request_headers = {}
1528
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1529
+
1530
+ # Set Headers
1531
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1532
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1533
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start'
1534
+
1535
+ request_url = @base_url || @client.base_url
1536
+
1537
+ options = {
1538
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1539
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
1540
+ query_params: {'api-version' => @client.api_version},
1541
+ headers: request_headers.merge(custom_headers || {}),
1542
+ base_url: request_url
1543
+ }
1544
+ promise = @client.make_request_async(:post, path_template, options)
1545
+
1546
+ promise = promise.then do |result|
1547
+ http_response = result.response
1548
+ status_code = http_response.status
1549
+ response_content = http_response.body
1550
+ unless status_code == 200 || status_code == 202
1551
+ error_model = JSON.load(response_content)
1552
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1553
+ end
1554
+
1555
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1556
+
1557
+ result
1558
+ end
1559
+
1560
+ promise.execute
1561
+ end
1562
+
1563
+ #
1564
+ # Redeploys a virtual machine in a VM scale set.
1565
+ #
1566
+ # @param resource_group_name [String] The name of the resource group.
1567
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1568
+ # @param instance_id [String] The instance ID of the virtual machine.
1569
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1570
+ # will be added to the HTTP request.
1571
+ #
1572
+ #
1573
+ def begin_redeploy(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1574
+ response = begin_redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
1575
+ nil
1576
+ end
1577
+
1578
+ #
1579
+ # Redeploys a virtual machine in a VM scale set.
1580
+ #
1581
+ # @param resource_group_name [String] The name of the resource group.
1582
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1583
+ # @param instance_id [String] The instance ID of the virtual machine.
1584
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1585
+ # will be added to the HTTP request.
1586
+ #
1587
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1588
+ #
1589
+ def begin_redeploy_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1590
+ begin_redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
1591
+ end
1592
+
1593
+ #
1594
+ # Redeploys a virtual machine in a VM scale set.
1595
+ #
1596
+ # @param resource_group_name [String] The name of the resource group.
1597
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1598
+ # @param instance_id [String] The instance ID of the virtual machine.
1599
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1600
+ # to the HTTP request.
1601
+ #
1602
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1603
+ #
1604
+ def begin_redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1605
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1606
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1607
+ fail ArgumentError, 'instance_id is nil' if instance_id.nil?
1608
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1609
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1610
+
1611
+
1612
+ request_headers = {}
1613
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1614
+
1615
+ # Set Headers
1616
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1617
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1618
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy'
1619
+
1620
+ request_url = @base_url || @client.base_url
1621
+
1622
+ options = {
1623
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1624
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
1625
+ query_params: {'api-version' => @client.api_version},
1626
+ headers: request_headers.merge(custom_headers || {}),
1627
+ base_url: request_url
1628
+ }
1629
+ promise = @client.make_request_async(:post, path_template, options)
1630
+
1631
+ promise = promise.then do |result|
1632
+ http_response = result.response
1633
+ status_code = http_response.status
1634
+ response_content = http_response.body
1635
+ unless status_code == 200 || status_code == 202
1636
+ error_model = JSON.load(response_content)
1637
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1638
+ end
1639
+
1640
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1641
+
1642
+ result
1643
+ end
1644
+
1645
+ promise.execute
1646
+ end
1647
+
1648
+ #
1649
+ # Performs maintenance on a virtual machine in a VM scale set.
1650
+ #
1651
+ # @param resource_group_name [String] The name of the resource group.
1652
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1653
+ # @param instance_id [String] The instance ID of the virtual machine.
1654
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1655
+ # will be added to the HTTP request.
1656
+ #
1657
+ #
1658
+ def begin_perform_maintenance(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1659
+ response = begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
1660
+ nil
1661
+ end
1662
+
1663
+ #
1664
+ # Performs maintenance on a virtual machine in a VM scale set.
1665
+ #
1666
+ # @param resource_group_name [String] The name of the resource group.
1667
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1668
+ # @param instance_id [String] The instance ID of the virtual machine.
1669
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1670
+ # will be added to the HTTP request.
1671
+ #
1672
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1673
+ #
1674
+ def begin_perform_maintenance_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1675
+ begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value!
1676
+ end
1677
+
1678
+ #
1679
+ # Performs maintenance on a virtual machine in a VM scale set.
1680
+ #
1681
+ # @param resource_group_name [String] The name of the resource group.
1682
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1683
+ # @param instance_id [String] The instance ID of the virtual machine.
1684
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1685
+ # to the HTTP request.
1686
+ #
1687
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1688
+ #
1689
+ def begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil)
1690
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1691
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1692
+ fail ArgumentError, 'instance_id is nil' if instance_id.nil?
1693
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1694
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1695
+
1696
+
1697
+ request_headers = {}
1698
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1699
+
1700
+ # Set Headers
1701
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1702
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1703
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance'
1704
+
1705
+ request_url = @base_url || @client.base_url
1706
+
1707
+ options = {
1708
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1709
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
1710
+ query_params: {'api-version' => @client.api_version},
1711
+ headers: request_headers.merge(custom_headers || {}),
1712
+ base_url: request_url
1713
+ }
1714
+ promise = @client.make_request_async(:post, path_template, options)
1715
+
1716
+ promise = promise.then do |result|
1717
+ http_response = result.response
1718
+ status_code = http_response.status
1719
+ response_content = http_response.body
1720
+ unless status_code == 200 || status_code == 202
1721
+ error_model = JSON.load(response_content)
1722
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1723
+ end
1724
+
1725
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1726
+
1727
+ result
1728
+ end
1729
+
1730
+ promise.execute
1731
+ end
1732
+
1733
+ #
1734
+ # Run command on a virtual machine in a VM scale set.
1735
+ #
1736
+ # @param resource_group_name [String] The name of the resource group.
1737
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1738
+ # @param instance_id [String] The instance ID of the virtual machine.
1739
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
1740
+ # operation.
1741
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1742
+ # will be added to the HTTP request.
1743
+ #
1744
+ # @return [RunCommandResult] operation results.
1745
+ #
1746
+ def begin_run_command(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil)
1747
+ response = begin_run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers).value!
1748
+ response.body unless response.nil?
1749
+ end
1750
+
1751
+ #
1752
+ # Run command on a virtual machine in a VM scale set.
1753
+ #
1754
+ # @param resource_group_name [String] The name of the resource group.
1755
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1756
+ # @param instance_id [String] The instance ID of the virtual machine.
1757
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
1758
+ # operation.
1759
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1760
+ # will be added to the HTTP request.
1761
+ #
1762
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1763
+ #
1764
+ def begin_run_command_with_http_info(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil)
1765
+ begin_run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers).value!
1766
+ end
1767
+
1768
+ #
1769
+ # Run command on a virtual machine in a VM scale set.
1770
+ #
1771
+ # @param resource_group_name [String] The name of the resource group.
1772
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1773
+ # @param instance_id [String] The instance ID of the virtual machine.
1774
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
1775
+ # operation.
1776
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1777
+ # to the HTTP request.
1778
+ #
1779
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1780
+ #
1781
+ def begin_run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil)
1782
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1783
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1784
+ fail ArgumentError, 'instance_id is nil' if instance_id.nil?
1785
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1786
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1787
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1788
+
1789
+
1790
+ request_headers = {}
1791
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1792
+
1793
+ # Set Headers
1794
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1795
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1796
+
1797
+ # Serialize Request
1798
+ request_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::RunCommandInput.mapper()
1799
+ request_content = @client.serialize(request_mapper, parameters)
1800
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1801
+
1802
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand'
1803
+
1804
+ request_url = @base_url || @client.base_url
1805
+
1806
+ options = {
1807
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1808
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
1809
+ query_params: {'api-version' => @client.api_version},
1810
+ body: request_content,
1811
+ headers: request_headers.merge(custom_headers || {}),
1812
+ base_url: request_url
1813
+ }
1814
+ promise = @client.make_request_async(:post, path_template, options)
1815
+
1816
+ promise = promise.then do |result|
1817
+ http_response = result.response
1818
+ status_code = http_response.status
1819
+ response_content = http_response.body
1820
+ unless status_code == 200 || status_code == 202
1821
+ error_model = JSON.load(response_content)
1822
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1823
+ end
1824
+
1825
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1826
+ # Deserialize Response
1827
+ if status_code == 200
1828
+ begin
1829
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1830
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::RunCommandResult.mapper()
1831
+ result.body = @client.deserialize(result_mapper, parsed_response)
1832
+ rescue Exception => e
1833
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1834
+ end
1835
+ end
1836
+
1837
+ result
1838
+ end
1839
+
1840
+ promise.execute
1841
+ end
1842
+
1843
+ #
1844
+ # Gets a list of all virtual machines in a VM scale sets.
1845
+ #
1846
+ # @param next_page_link [String] The NextLink from the previous successful call
1847
+ # to List operation.
1848
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1849
+ # will be added to the HTTP request.
1850
+ #
1851
+ # @return [VirtualMachineScaleSetVMListResult] operation results.
1852
+ #
1853
+ def list_next(next_page_link, custom_headers:nil)
1854
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1855
+ response.body unless response.nil?
1856
+ end
1857
+
1858
+ #
1859
+ # Gets a list of all virtual machines in a VM scale sets.
1860
+ #
1861
+ # @param next_page_link [String] The NextLink from the previous successful call
1862
+ # to List operation.
1863
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1864
+ # will be added to the HTTP request.
1865
+ #
1866
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1867
+ #
1868
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1869
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1870
+ end
1871
+
1872
+ #
1873
+ # Gets a list of all virtual machines in a VM scale sets.
1874
+ #
1875
+ # @param next_page_link [String] The NextLink from the previous successful call
1876
+ # to List operation.
1877
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1878
+ # to the HTTP request.
1879
+ #
1880
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1881
+ #
1882
+ def list_next_async(next_page_link, custom_headers:nil)
1883
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1884
+
1885
+
1886
+ request_headers = {}
1887
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1888
+
1889
+ # Set Headers
1890
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1891
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1892
+ path_template = '{nextLink}'
1893
+
1894
+ request_url = @base_url || @client.base_url
1895
+
1896
+ options = {
1897
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1898
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1899
+ headers: request_headers.merge(custom_headers || {}),
1900
+ base_url: request_url
1901
+ }
1902
+ promise = @client.make_request_async(:get, path_template, options)
1903
+
1904
+ promise = promise.then do |result|
1905
+ http_response = result.response
1906
+ status_code = http_response.status
1907
+ response_content = http_response.body
1908
+ unless status_code == 200
1909
+ error_model = JSON.load(response_content)
1910
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1911
+ end
1912
+
1913
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1914
+ # Deserialize Response
1915
+ if status_code == 200
1916
+ begin
1917
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1918
+ result_mapper = Azure::Compute::Mgmt::V2019_03_01::Models::VirtualMachineScaleSetVMListResult.mapper()
1919
+ result.body = @client.deserialize(result_mapper, parsed_response)
1920
+ rescue Exception => e
1921
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1922
+ end
1923
+ end
1924
+
1925
+ result
1926
+ end
1927
+
1928
+ promise.execute
1929
+ end
1930
+
1931
+ #
1932
+ # Gets a list of all virtual machines in a VM scale sets.
1933
+ #
1934
+ # @param resource_group_name [String] The name of the resource group.
1935
+ # @param virtual_machine_scale_set_name [String] The name of the VM scale set.
1936
+ # @param filter [String] The filter to apply to the operation.
1937
+ # @param select [String] The list parameters.
1938
+ # @param expand [String] The expand expression to apply to the operation.
1939
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1940
+ # will be added to the HTTP request.
1941
+ #
1942
+ # @return [VirtualMachineScaleSetVMListResult] which provide lazy access to
1943
+ # pages of the response.
1944
+ #
1945
+ def list_as_lazy(resource_group_name, virtual_machine_scale_set_name, filter:nil, select:nil, expand:nil, custom_headers:nil)
1946
+ response = list_async(resource_group_name, virtual_machine_scale_set_name, filter:filter, select:select, expand:expand, custom_headers:custom_headers).value!
1947
+ unless response.nil?
1948
+ page = response.body
1949
+ page.next_method = Proc.new do |next_page_link|
1950
+ list_next_async(next_page_link, custom_headers:custom_headers)
1951
+ end
1952
+ page
1953
+ end
1954
+ end
1955
+
1956
+ end
1957
+ end