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