azure_mgmt_compute 0.17.1 → 0.18.0

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