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,117 @@
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 VirtualMachineSizes
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the VirtualMachineSizes 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
+ # Lists all available virtual machine sizes for a subscription in a location.
26
+ #
27
+ # @param location [String] The location upon which virtual-machine-sizes is
28
+ # queried.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [VirtualMachineSizeListResult] operation results.
33
+ #
34
+ def list(location, custom_headers:nil)
35
+ response = list_async(location, custom_headers:custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # Lists all available virtual machine sizes for a subscription in a location.
41
+ #
42
+ # @param location [String] The location upon which virtual-machine-sizes is
43
+ # queried.
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_with_http_info(location, custom_headers:nil)
50
+ list_async(location, custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Lists all available virtual machine sizes for a subscription in a location.
55
+ #
56
+ # @param location [String] The location upon which virtual-machine-sizes is
57
+ # queried.
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(location, custom_headers:nil)
64
+ fail ArgumentError, 'location is nil' if location.nil?
65
+ fail ArgumentError, "'location' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !location.nil? && location.match(Regexp.new('^^[-\w\._]+$$')).nil?
66
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
67
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
68
+
69
+
70
+ request_headers = {}
71
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
72
+
73
+ # Set Headers
74
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
75
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
76
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'
77
+
78
+ request_url = @base_url || @client.base_url
79
+
80
+ options = {
81
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
82
+ path_params: {'location' => location,'subscriptionId' => @client.subscription_id},
83
+ query_params: {'api-version' => @client.api_version},
84
+ headers: request_headers.merge(custom_headers || {}),
85
+ base_url: request_url
86
+ }
87
+ promise = @client.make_request_async(:get, path_template, options)
88
+
89
+ promise = promise.then do |result|
90
+ http_response = result.response
91
+ status_code = http_response.status
92
+ response_content = http_response.body
93
+ unless status_code == 200
94
+ error_model = JSON.load(response_content)
95
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
96
+ end
97
+
98
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
99
+ # Deserialize Response
100
+ if status_code == 200
101
+ begin
102
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
103
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachineSizeListResult.mapper()
104
+ result.body = @client.deserialize(result_mapper, parsed_response)
105
+ rescue Exception => e
106
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
107
+ end
108
+ end
109
+
110
+ result
111
+ end
112
+
113
+ promise.execute
114
+ end
115
+
116
+ end
117
+ end
@@ -0,0 +1,2397 @@
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 VirtualMachines
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the VirtualMachines 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
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
26
+ # template that can be used to create similar VMs.
27
+ #
28
+ # @param resource_group_name [String] The name of the resource group.
29
+ # @param vm_name [String] The name of the virtual machine.
30
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
31
+ # the Capture Virtual Machine operation.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [VirtualMachineCaptureResult] operation results.
36
+ #
37
+ def capture(resource_group_name, vm_name, parameters, custom_headers:nil)
38
+ response = capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # @param resource_group_name [String] The name of the resource group.
44
+ # @param vm_name [String] The name of the virtual machine.
45
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
46
+ # the Capture Virtual Machine operation.
47
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
48
+ # will be added to the HTTP request.
49
+ #
50
+ # @return [Concurrent::Promise] promise which provides async access to http
51
+ # response.
52
+ #
53
+ def capture_async(resource_group_name, vm_name, parameters, custom_headers:nil)
54
+ # Send request
55
+ promise = begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers)
56
+
57
+ promise = promise.then do |response|
58
+ # Defining deserialization method.
59
+ deserialize_method = lambda do |parsed_response|
60
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachineCaptureResult.mapper()
61
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
62
+ end
63
+
64
+ # Waiting for response.
65
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
66
+ end
67
+
68
+ promise
69
+ end
70
+
71
+ #
72
+ # The operation to create or update a virtual machine.
73
+ #
74
+ # @param resource_group_name [String] The name of the resource group.
75
+ # @param vm_name [String] The name of the virtual machine.
76
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
77
+ # Machine operation.
78
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
79
+ # will be added to the HTTP request.
80
+ #
81
+ # @return [VirtualMachine] operation results.
82
+ #
83
+ def create_or_update(resource_group_name, vm_name, parameters, custom_headers:nil)
84
+ response = create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
85
+ response.body unless response.nil?
86
+ end
87
+
88
+ #
89
+ # @param resource_group_name [String] The name of the resource group.
90
+ # @param vm_name [String] The name of the virtual machine.
91
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
92
+ # Machine operation.
93
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
94
+ # will be added to the HTTP request.
95
+ #
96
+ # @return [Concurrent::Promise] promise which provides async access to http
97
+ # response.
98
+ #
99
+ def create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
100
+ # Send request
101
+ promise = begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers)
102
+
103
+ promise = promise.then do |response|
104
+ # Defining deserialization method.
105
+ deserialize_method = lambda do |parsed_response|
106
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachine.mapper()
107
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
108
+ end
109
+
110
+ # Waiting for response.
111
+ @client.get_long_running_operation_result(response, deserialize_method)
112
+ end
113
+
114
+ promise
115
+ end
116
+
117
+ #
118
+ # The operation to update a virtual machine.
119
+ #
120
+ # @param resource_group_name [String] The name of the resource group.
121
+ # @param vm_name [String] The name of the virtual machine.
122
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
123
+ # Virtual Machine operation.
124
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
125
+ # will be added to the HTTP request.
126
+ #
127
+ # @return [VirtualMachine] operation results.
128
+ #
129
+ def update(resource_group_name, vm_name, parameters, custom_headers:nil)
130
+ response = update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
131
+ response.body unless response.nil?
132
+ end
133
+
134
+ #
135
+ # @param resource_group_name [String] The name of the resource group.
136
+ # @param vm_name [String] The name of the virtual machine.
137
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
138
+ # Virtual Machine operation.
139
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
140
+ # will be added to the HTTP request.
141
+ #
142
+ # @return [Concurrent::Promise] promise which provides async access to http
143
+ # response.
144
+ #
145
+ def update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
146
+ # Send request
147
+ promise = begin_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers)
148
+
149
+ promise = promise.then do |response|
150
+ # Defining deserialization method.
151
+ deserialize_method = lambda do |parsed_response|
152
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachine.mapper()
153
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
154
+ end
155
+
156
+ # Waiting for response.
157
+ @client.get_long_running_operation_result(response, deserialize_method)
158
+ end
159
+
160
+ promise
161
+ end
162
+
163
+ #
164
+ # The operation to delete a virtual machine.
165
+ #
166
+ # @param resource_group_name [String] The name of the resource group.
167
+ # @param vm_name [String] The name of the virtual machine.
168
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
169
+ # will be added to the HTTP request.
170
+ #
171
+ def delete(resource_group_name, vm_name, custom_headers:nil)
172
+ response = delete_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
173
+ nil
174
+ end
175
+
176
+ #
177
+ # @param resource_group_name [String] The name of the resource group.
178
+ # @param vm_name [String] The name of the virtual machine.
179
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
180
+ # will be added to the HTTP request.
181
+ #
182
+ # @return [Concurrent::Promise] promise which provides async access to http
183
+ # response.
184
+ #
185
+ def delete_async(resource_group_name, vm_name, custom_headers:nil)
186
+ # Send request
187
+ promise = begin_delete_async(resource_group_name, vm_name, custom_headers:custom_headers)
188
+
189
+ promise = promise.then do |response|
190
+ # Defining deserialization method.
191
+ deserialize_method = lambda do |parsed_response|
192
+ end
193
+
194
+ # Waiting for response.
195
+ @client.get_long_running_operation_result(response, deserialize_method)
196
+ end
197
+
198
+ promise
199
+ end
200
+
201
+ #
202
+ # Retrieves information about the model view or the instance view of a virtual
203
+ # machine.
204
+ #
205
+ # @param resource_group_name [String] The name of the resource group.
206
+ # @param vm_name [String] The name of the virtual machine.
207
+ # @param expand [InstanceViewTypes] The expand expression to apply on the
208
+ # operation. Possible values include: 'instanceView'
209
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
210
+ # will be added to the HTTP request.
211
+ #
212
+ # @return [VirtualMachine] operation results.
213
+ #
214
+ def get(resource_group_name, vm_name, expand:nil, custom_headers:nil)
215
+ response = get_async(resource_group_name, vm_name, expand:expand, custom_headers:custom_headers).value!
216
+ response.body unless response.nil?
217
+ end
218
+
219
+ #
220
+ # Retrieves information about the model view or the instance view of a virtual
221
+ # machine.
222
+ #
223
+ # @param resource_group_name [String] The name of the resource group.
224
+ # @param vm_name [String] The name of the virtual machine.
225
+ # @param expand [InstanceViewTypes] The expand expression to apply on the
226
+ # operation. Possible values include: 'instanceView'
227
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
228
+ # will be added to the HTTP request.
229
+ #
230
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
231
+ #
232
+ def get_with_http_info(resource_group_name, vm_name, expand:nil, custom_headers:nil)
233
+ get_async(resource_group_name, vm_name, expand:expand, custom_headers:custom_headers).value!
234
+ end
235
+
236
+ #
237
+ # Retrieves information about the model view or the instance view of a virtual
238
+ # machine.
239
+ #
240
+ # @param resource_group_name [String] The name of the resource group.
241
+ # @param vm_name [String] The name of the virtual machine.
242
+ # @param expand [InstanceViewTypes] The expand expression to apply on the
243
+ # operation. Possible values include: 'instanceView'
244
+ # @param [Hash{String => String}] A hash of custom headers that will be added
245
+ # to the HTTP request.
246
+ #
247
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
248
+ #
249
+ def get_async(resource_group_name, vm_name, expand:nil, custom_headers:nil)
250
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
251
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
252
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
253
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
254
+
255
+
256
+ request_headers = {}
257
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
258
+
259
+ # Set Headers
260
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
261
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
262
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
263
+
264
+ request_url = @base_url || @client.base_url
265
+
266
+ options = {
267
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
268
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
269
+ query_params: {'$expand' => expand,'api-version' => @client.api_version},
270
+ headers: request_headers.merge(custom_headers || {}),
271
+ base_url: request_url
272
+ }
273
+ promise = @client.make_request_async(:get, path_template, options)
274
+
275
+ promise = promise.then do |result|
276
+ http_response = result.response
277
+ status_code = http_response.status
278
+ response_content = http_response.body
279
+ unless status_code == 200
280
+ error_model = JSON.load(response_content)
281
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
282
+ end
283
+
284
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
285
+ # Deserialize Response
286
+ if status_code == 200
287
+ begin
288
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
289
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachine.mapper()
290
+ result.body = @client.deserialize(result_mapper, parsed_response)
291
+ rescue Exception => e
292
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
293
+ end
294
+ end
295
+
296
+ result
297
+ end
298
+
299
+ promise.execute
300
+ end
301
+
302
+ #
303
+ # Retrieves information about the run-time state of a virtual machine.
304
+ #
305
+ # @param resource_group_name [String] The name of the resource group.
306
+ # @param vm_name [String] The name of the virtual machine.
307
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
308
+ # will be added to the HTTP request.
309
+ #
310
+ # @return [VirtualMachineInstanceView] operation results.
311
+ #
312
+ def instance_view(resource_group_name, vm_name, custom_headers:nil)
313
+ response = instance_view_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
314
+ response.body unless response.nil?
315
+ end
316
+
317
+ #
318
+ # Retrieves information about the run-time state of a virtual machine.
319
+ #
320
+ # @param resource_group_name [String] The name of the resource group.
321
+ # @param vm_name [String] The name of the virtual machine.
322
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
323
+ # will be added to the HTTP request.
324
+ #
325
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
326
+ #
327
+ def instance_view_with_http_info(resource_group_name, vm_name, custom_headers:nil)
328
+ instance_view_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
329
+ end
330
+
331
+ #
332
+ # Retrieves information about the run-time state of a virtual machine.
333
+ #
334
+ # @param resource_group_name [String] The name of the resource group.
335
+ # @param vm_name [String] The name of the virtual machine.
336
+ # @param [Hash{String => String}] A hash of custom headers that will be added
337
+ # to the HTTP request.
338
+ #
339
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
340
+ #
341
+ def instance_view_async(resource_group_name, vm_name, custom_headers:nil)
342
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
343
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
344
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
345
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
346
+
347
+
348
+ request_headers = {}
349
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
350
+
351
+ # Set Headers
352
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
353
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
354
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'
355
+
356
+ request_url = @base_url || @client.base_url
357
+
358
+ options = {
359
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
360
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
361
+ query_params: {'api-version' => @client.api_version},
362
+ headers: request_headers.merge(custom_headers || {}),
363
+ base_url: request_url
364
+ }
365
+ promise = @client.make_request_async(:get, path_template, options)
366
+
367
+ promise = promise.then do |result|
368
+ http_response = result.response
369
+ status_code = http_response.status
370
+ response_content = http_response.body
371
+ unless status_code == 200
372
+ error_model = JSON.load(response_content)
373
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
374
+ end
375
+
376
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
377
+ # Deserialize Response
378
+ if status_code == 200
379
+ begin
380
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
381
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachineInstanceView.mapper()
382
+ result.body = @client.deserialize(result_mapper, parsed_response)
383
+ rescue Exception => e
384
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
385
+ end
386
+ end
387
+
388
+ result
389
+ end
390
+
391
+ promise.execute
392
+ end
393
+
394
+ #
395
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
396
+ # machine must be stop-deallocated before invoking this operation.
397
+ #
398
+ # @param resource_group_name [String] The name of the resource group.
399
+ # @param vm_name [String] The name of the virtual machine.
400
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
401
+ # will be added to the HTTP request.
402
+ #
403
+ def convert_to_managed_disks(resource_group_name, vm_name, custom_headers:nil)
404
+ response = convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
405
+ nil
406
+ end
407
+
408
+ #
409
+ # @param resource_group_name [String] The name of the resource group.
410
+ # @param vm_name [String] The name of the virtual machine.
411
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
412
+ # will be added to the HTTP request.
413
+ #
414
+ # @return [Concurrent::Promise] promise which provides async access to http
415
+ # response.
416
+ #
417
+ def convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:nil)
418
+ # Send request
419
+ promise = begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers)
420
+
421
+ promise = promise.then do |response|
422
+ # Defining deserialization method.
423
+ deserialize_method = lambda do |parsed_response|
424
+ end
425
+
426
+ # Waiting for response.
427
+ @client.get_long_running_operation_result(response, deserialize_method)
428
+ end
429
+
430
+ promise
431
+ end
432
+
433
+ #
434
+ # Shuts down the virtual machine and releases the compute resources. You are
435
+ # not billed for the compute resources that this virtual machine uses.
436
+ #
437
+ # @param resource_group_name [String] The name of the resource group.
438
+ # @param vm_name [String] The name of the virtual machine.
439
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
440
+ # will be added to the HTTP request.
441
+ #
442
+ def deallocate(resource_group_name, vm_name, custom_headers:nil)
443
+ response = deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
444
+ nil
445
+ end
446
+
447
+ #
448
+ # @param resource_group_name [String] The name of the resource group.
449
+ # @param vm_name [String] The name of the virtual machine.
450
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
451
+ # will be added to the HTTP request.
452
+ #
453
+ # @return [Concurrent::Promise] promise which provides async access to http
454
+ # response.
455
+ #
456
+ def deallocate_async(resource_group_name, vm_name, custom_headers:nil)
457
+ # Send request
458
+ promise = begin_deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers)
459
+
460
+ promise = promise.then do |response|
461
+ # Defining deserialization method.
462
+ deserialize_method = lambda do |parsed_response|
463
+ end
464
+
465
+ # Waiting for response.
466
+ @client.get_long_running_operation_result(response, deserialize_method)
467
+ end
468
+
469
+ promise
470
+ end
471
+
472
+ #
473
+ # Sets the state of the virtual machine to generalized.
474
+ #
475
+ # @param resource_group_name [String] The name of the resource group.
476
+ # @param vm_name [String] The name of the virtual machine.
477
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
478
+ # will be added to the HTTP request.
479
+ #
480
+ #
481
+ def generalize(resource_group_name, vm_name, custom_headers:nil)
482
+ response = generalize_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
483
+ nil
484
+ end
485
+
486
+ #
487
+ # Sets the state of the virtual machine to generalized.
488
+ #
489
+ # @param resource_group_name [String] The name of the resource group.
490
+ # @param vm_name [String] The name of the virtual machine.
491
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
492
+ # will be added to the HTTP request.
493
+ #
494
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
495
+ #
496
+ def generalize_with_http_info(resource_group_name, vm_name, custom_headers:nil)
497
+ generalize_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
498
+ end
499
+
500
+ #
501
+ # Sets the state of the virtual machine to generalized.
502
+ #
503
+ # @param resource_group_name [String] The name of the resource group.
504
+ # @param vm_name [String] The name of the virtual machine.
505
+ # @param [Hash{String => String}] A hash of custom headers that will be added
506
+ # to the HTTP request.
507
+ #
508
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
509
+ #
510
+ def generalize_async(resource_group_name, vm_name, custom_headers:nil)
511
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
512
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
513
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
514
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
515
+
516
+
517
+ request_headers = {}
518
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
519
+
520
+ # Set Headers
521
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
522
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
523
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'
524
+
525
+ request_url = @base_url || @client.base_url
526
+
527
+ options = {
528
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
529
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
530
+ query_params: {'api-version' => @client.api_version},
531
+ headers: request_headers.merge(custom_headers || {}),
532
+ base_url: request_url
533
+ }
534
+ promise = @client.make_request_async(:post, path_template, options)
535
+
536
+ promise = promise.then do |result|
537
+ http_response = result.response
538
+ status_code = http_response.status
539
+ response_content = http_response.body
540
+ unless status_code == 200
541
+ error_model = JSON.load(response_content)
542
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
543
+ end
544
+
545
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
546
+
547
+ result
548
+ end
549
+
550
+ promise.execute
551
+ end
552
+
553
+ #
554
+ # Lists all of the virtual machines in the specified resource group. Use the
555
+ # nextLink property in the response to get the next page of virtual machines.
556
+ #
557
+ # @param resource_group_name [String] The name of the resource group.
558
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
559
+ # will be added to the HTTP request.
560
+ #
561
+ # @return [Array<VirtualMachine>] operation results.
562
+ #
563
+ def list(resource_group_name, custom_headers:nil)
564
+ first_page = list_as_lazy(resource_group_name, custom_headers:custom_headers)
565
+ first_page.get_all_items
566
+ end
567
+
568
+ #
569
+ # Lists all of the virtual machines in the specified resource group. Use the
570
+ # nextLink property in the response to get the next page of virtual machines.
571
+ #
572
+ # @param resource_group_name [String] The name of the resource group.
573
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
574
+ # will be added to the HTTP request.
575
+ #
576
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
577
+ #
578
+ def list_with_http_info(resource_group_name, custom_headers:nil)
579
+ list_async(resource_group_name, custom_headers:custom_headers).value!
580
+ end
581
+
582
+ #
583
+ # Lists all of the virtual machines in the specified resource group. Use the
584
+ # nextLink property in the response to get the next page of virtual machines.
585
+ #
586
+ # @param resource_group_name [String] The name of the resource group.
587
+ # @param [Hash{String => String}] A hash of custom headers that will be added
588
+ # to the HTTP request.
589
+ #
590
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
591
+ #
592
+ def list_async(resource_group_name, custom_headers:nil)
593
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
594
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
595
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
596
+
597
+
598
+ request_headers = {}
599
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
600
+
601
+ # Set Headers
602
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
603
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
604
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'
605
+
606
+ request_url = @base_url || @client.base_url
607
+
608
+ options = {
609
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
610
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
611
+ query_params: {'api-version' => @client.api_version},
612
+ headers: request_headers.merge(custom_headers || {}),
613
+ base_url: request_url
614
+ }
615
+ promise = @client.make_request_async(:get, path_template, options)
616
+
617
+ promise = promise.then do |result|
618
+ http_response = result.response
619
+ status_code = http_response.status
620
+ response_content = http_response.body
621
+ unless status_code == 200
622
+ error_model = JSON.load(response_content)
623
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
624
+ end
625
+
626
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
627
+ # Deserialize Response
628
+ if status_code == 200
629
+ begin
630
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
631
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachineListResult.mapper()
632
+ result.body = @client.deserialize(result_mapper, parsed_response)
633
+ rescue Exception => e
634
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
635
+ end
636
+ end
637
+
638
+ result
639
+ end
640
+
641
+ promise.execute
642
+ end
643
+
644
+ #
645
+ # Lists all of the virtual machines in the specified subscription. Use the
646
+ # nextLink property in the response to get the next page of virtual machines.
647
+ #
648
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
649
+ # will be added to the HTTP request.
650
+ #
651
+ # @return [Array<VirtualMachine>] operation results.
652
+ #
653
+ def list_all(custom_headers:nil)
654
+ first_page = list_all_as_lazy(custom_headers:custom_headers)
655
+ first_page.get_all_items
656
+ end
657
+
658
+ #
659
+ # Lists all of the virtual machines in the specified subscription. Use the
660
+ # nextLink property in the response to get the next page of virtual machines.
661
+ #
662
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
663
+ # will be added to the HTTP request.
664
+ #
665
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
666
+ #
667
+ def list_all_with_http_info(custom_headers:nil)
668
+ list_all_async(custom_headers:custom_headers).value!
669
+ end
670
+
671
+ #
672
+ # Lists all of the virtual machines in the specified subscription. Use the
673
+ # nextLink property in the response to get the next page of virtual machines.
674
+ #
675
+ # @param [Hash{String => String}] A hash of custom headers that will be added
676
+ # to the HTTP request.
677
+ #
678
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
679
+ #
680
+ def list_all_async(custom_headers:nil)
681
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
682
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
683
+
684
+
685
+ request_headers = {}
686
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
687
+
688
+ # Set Headers
689
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
690
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
691
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'
692
+
693
+ request_url = @base_url || @client.base_url
694
+
695
+ options = {
696
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
697
+ path_params: {'subscriptionId' => @client.subscription_id},
698
+ query_params: {'api-version' => @client.api_version},
699
+ headers: request_headers.merge(custom_headers || {}),
700
+ base_url: request_url
701
+ }
702
+ promise = @client.make_request_async(:get, path_template, options)
703
+
704
+ promise = promise.then do |result|
705
+ http_response = result.response
706
+ status_code = http_response.status
707
+ response_content = http_response.body
708
+ unless status_code == 200
709
+ error_model = JSON.load(response_content)
710
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
711
+ end
712
+
713
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
714
+ # Deserialize Response
715
+ if status_code == 200
716
+ begin
717
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
718
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachineListResult.mapper()
719
+ result.body = @client.deserialize(result_mapper, parsed_response)
720
+ rescue Exception => e
721
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
722
+ end
723
+ end
724
+
725
+ result
726
+ end
727
+
728
+ promise.execute
729
+ end
730
+
731
+ #
732
+ # Lists all available virtual machine sizes to which the specified virtual
733
+ # machine can be resized.
734
+ #
735
+ # @param resource_group_name [String] The name of the resource group.
736
+ # @param vm_name [String] The name of the virtual machine.
737
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
738
+ # will be added to the HTTP request.
739
+ #
740
+ # @return [VirtualMachineSizeListResult] operation results.
741
+ #
742
+ def list_available_sizes(resource_group_name, vm_name, custom_headers:nil)
743
+ response = list_available_sizes_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
744
+ response.body unless response.nil?
745
+ end
746
+
747
+ #
748
+ # Lists all available virtual machine sizes to which the specified virtual
749
+ # machine can be resized.
750
+ #
751
+ # @param resource_group_name [String] The name of the resource group.
752
+ # @param vm_name [String] The name of the virtual machine.
753
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
754
+ # will be added to the HTTP request.
755
+ #
756
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
757
+ #
758
+ def list_available_sizes_with_http_info(resource_group_name, vm_name, custom_headers:nil)
759
+ list_available_sizes_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
760
+ end
761
+
762
+ #
763
+ # Lists all available virtual machine sizes to which the specified virtual
764
+ # machine can be resized.
765
+ #
766
+ # @param resource_group_name [String] The name of the resource group.
767
+ # @param vm_name [String] The name of the virtual machine.
768
+ # @param [Hash{String => String}] A hash of custom headers that will be added
769
+ # to the HTTP request.
770
+ #
771
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
772
+ #
773
+ def list_available_sizes_async(resource_group_name, vm_name, custom_headers:nil)
774
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
775
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
776
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
777
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
778
+
779
+
780
+ request_headers = {}
781
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
782
+
783
+ # Set Headers
784
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
785
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
786
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'
787
+
788
+ request_url = @base_url || @client.base_url
789
+
790
+ options = {
791
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
792
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
793
+ query_params: {'api-version' => @client.api_version},
794
+ headers: request_headers.merge(custom_headers || {}),
795
+ base_url: request_url
796
+ }
797
+ promise = @client.make_request_async(:get, path_template, options)
798
+
799
+ promise = promise.then do |result|
800
+ http_response = result.response
801
+ status_code = http_response.status
802
+ response_content = http_response.body
803
+ unless status_code == 200
804
+ error_model = JSON.load(response_content)
805
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
806
+ end
807
+
808
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
809
+ # Deserialize Response
810
+ if status_code == 200
811
+ begin
812
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
813
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachineSizeListResult.mapper()
814
+ result.body = @client.deserialize(result_mapper, parsed_response)
815
+ rescue Exception => e
816
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
817
+ end
818
+ end
819
+
820
+ result
821
+ end
822
+
823
+ promise.execute
824
+ end
825
+
826
+ #
827
+ # The operation to power off (stop) a virtual machine. The virtual machine can
828
+ # be restarted with the same provisioned resources. You are still charged for
829
+ # this virtual machine.
830
+ #
831
+ # @param resource_group_name [String] The name of the resource group.
832
+ # @param vm_name [String] The name of the virtual machine.
833
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
834
+ # will be added to the HTTP request.
835
+ #
836
+ def power_off(resource_group_name, vm_name, custom_headers:nil)
837
+ response = power_off_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
838
+ nil
839
+ end
840
+
841
+ #
842
+ # @param resource_group_name [String] The name of the resource group.
843
+ # @param vm_name [String] The name of the virtual machine.
844
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
845
+ # will be added to the HTTP request.
846
+ #
847
+ # @return [Concurrent::Promise] promise which provides async access to http
848
+ # response.
849
+ #
850
+ def power_off_async(resource_group_name, vm_name, custom_headers:nil)
851
+ # Send request
852
+ promise = begin_power_off_async(resource_group_name, vm_name, custom_headers:custom_headers)
853
+
854
+ promise = promise.then do |response|
855
+ # Defining deserialization method.
856
+ deserialize_method = lambda do |parsed_response|
857
+ end
858
+
859
+ # Waiting for response.
860
+ @client.get_long_running_operation_result(response, deserialize_method)
861
+ end
862
+
863
+ promise
864
+ end
865
+
866
+ #
867
+ # The operation to restart a virtual machine.
868
+ #
869
+ # @param resource_group_name [String] The name of the resource group.
870
+ # @param vm_name [String] The name of the virtual machine.
871
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
872
+ # will be added to the HTTP request.
873
+ #
874
+ def restart(resource_group_name, vm_name, custom_headers:nil)
875
+ response = restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
876
+ nil
877
+ end
878
+
879
+ #
880
+ # @param resource_group_name [String] The name of the resource group.
881
+ # @param vm_name [String] The name of the virtual machine.
882
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
883
+ # will be added to the HTTP request.
884
+ #
885
+ # @return [Concurrent::Promise] promise which provides async access to http
886
+ # response.
887
+ #
888
+ def restart_async(resource_group_name, vm_name, custom_headers:nil)
889
+ # Send request
890
+ promise = begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers)
891
+
892
+ promise = promise.then do |response|
893
+ # Defining deserialization method.
894
+ deserialize_method = lambda do |parsed_response|
895
+ end
896
+
897
+ # Waiting for response.
898
+ @client.get_long_running_operation_result(response, deserialize_method)
899
+ end
900
+
901
+ promise
902
+ end
903
+
904
+ #
905
+ # The operation to start a virtual machine.
906
+ #
907
+ # @param resource_group_name [String] The name of the resource group.
908
+ # @param vm_name [String] The name of the virtual machine.
909
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
910
+ # will be added to the HTTP request.
911
+ #
912
+ def start(resource_group_name, vm_name, custom_headers:nil)
913
+ response = start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
914
+ nil
915
+ end
916
+
917
+ #
918
+ # @param resource_group_name [String] The name of the resource group.
919
+ # @param vm_name [String] The name of the virtual machine.
920
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
921
+ # will be added to the HTTP request.
922
+ #
923
+ # @return [Concurrent::Promise] promise which provides async access to http
924
+ # response.
925
+ #
926
+ def start_async(resource_group_name, vm_name, custom_headers:nil)
927
+ # Send request
928
+ promise = begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers)
929
+
930
+ promise = promise.then do |response|
931
+ # Defining deserialization method.
932
+ deserialize_method = lambda do |parsed_response|
933
+ end
934
+
935
+ # Waiting for response.
936
+ @client.get_long_running_operation_result(response, deserialize_method)
937
+ end
938
+
939
+ promise
940
+ end
941
+
942
+ #
943
+ # The operation to redeploy a virtual machine.
944
+ #
945
+ # @param resource_group_name [String] The name of the resource group.
946
+ # @param vm_name [String] The name of the virtual machine.
947
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
948
+ # will be added to the HTTP request.
949
+ #
950
+ def redeploy(resource_group_name, vm_name, custom_headers:nil)
951
+ response = redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
952
+ nil
953
+ end
954
+
955
+ #
956
+ # @param resource_group_name [String] The name of the resource group.
957
+ # @param vm_name [String] The name of the virtual machine.
958
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
959
+ # will be added to the HTTP request.
960
+ #
961
+ # @return [Concurrent::Promise] promise which provides async access to http
962
+ # response.
963
+ #
964
+ def redeploy_async(resource_group_name, vm_name, custom_headers:nil)
965
+ # Send request
966
+ promise = begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers)
967
+
968
+ promise = promise.then do |response|
969
+ # Defining deserialization method.
970
+ deserialize_method = lambda do |parsed_response|
971
+ end
972
+
973
+ # Waiting for response.
974
+ @client.get_long_running_operation_result(response, deserialize_method)
975
+ end
976
+
977
+ promise
978
+ end
979
+
980
+ #
981
+ # The operation to perform maintenance on a virtual machine.
982
+ #
983
+ # @param resource_group_name [String] The name of the resource group.
984
+ # @param vm_name [String] The name 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
+ def perform_maintenance(resource_group_name, vm_name, custom_headers:nil)
989
+ response = perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
990
+ nil
991
+ end
992
+
993
+ #
994
+ # @param resource_group_name [String] The name of the resource group.
995
+ # @param vm_name [String] The name of the virtual machine.
996
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
997
+ # will be added to the HTTP request.
998
+ #
999
+ # @return [Concurrent::Promise] promise which provides async access to http
1000
+ # response.
1001
+ #
1002
+ def perform_maintenance_async(resource_group_name, vm_name, custom_headers:nil)
1003
+ # Send request
1004
+ promise = begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers)
1005
+
1006
+ promise = promise.then do |response|
1007
+ # Defining deserialization method.
1008
+ deserialize_method = lambda do |parsed_response|
1009
+ end
1010
+
1011
+ # Waiting for response.
1012
+ @client.get_long_running_operation_result(response, deserialize_method)
1013
+ end
1014
+
1015
+ promise
1016
+ end
1017
+
1018
+ #
1019
+ # Run command on the VM.
1020
+ #
1021
+ # @param resource_group_name [String] The name of the resource group.
1022
+ # @param vm_name [String] The name of the virtual machine.
1023
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
1024
+ # operation.
1025
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1026
+ # will be added to the HTTP request.
1027
+ #
1028
+ # @return [RunCommandResult] operation results.
1029
+ #
1030
+ def run_command(resource_group_name, vm_name, parameters, custom_headers:nil)
1031
+ response = run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1032
+ response.body unless response.nil?
1033
+ end
1034
+
1035
+ #
1036
+ # @param resource_group_name [String] The name of the resource group.
1037
+ # @param vm_name [String] The name of the virtual machine.
1038
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
1039
+ # operation.
1040
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1041
+ # will be added to the HTTP request.
1042
+ #
1043
+ # @return [Concurrent::Promise] promise which provides async access to http
1044
+ # response.
1045
+ #
1046
+ def run_command_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1047
+ # Send request
1048
+ promise = begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers)
1049
+
1050
+ promise = promise.then do |response|
1051
+ # Defining deserialization method.
1052
+ deserialize_method = lambda do |parsed_response|
1053
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::RunCommandResult.mapper()
1054
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
1055
+ end
1056
+
1057
+ # Waiting for response.
1058
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
1059
+ end
1060
+
1061
+ promise
1062
+ end
1063
+
1064
+ #
1065
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1066
+ # template that can be used to create similar VMs.
1067
+ #
1068
+ # @param resource_group_name [String] The name of the resource group.
1069
+ # @param vm_name [String] The name of the virtual machine.
1070
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1071
+ # the Capture Virtual Machine operation.
1072
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1073
+ # will be added to the HTTP request.
1074
+ #
1075
+ # @return [VirtualMachineCaptureResult] operation results.
1076
+ #
1077
+ def begin_capture(resource_group_name, vm_name, parameters, custom_headers:nil)
1078
+ response = begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1079
+ response.body unless response.nil?
1080
+ end
1081
+
1082
+ #
1083
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1084
+ # template that can be used to create similar VMs.
1085
+ #
1086
+ # @param resource_group_name [String] The name of the resource group.
1087
+ # @param vm_name [String] The name of the virtual machine.
1088
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1089
+ # the Capture Virtual Machine operation.
1090
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1091
+ # will be added to the HTTP request.
1092
+ #
1093
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1094
+ #
1095
+ def begin_capture_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1096
+ begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1097
+ end
1098
+
1099
+ #
1100
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1101
+ # template that can be used to create similar VMs.
1102
+ #
1103
+ # @param resource_group_name [String] The name of the resource group.
1104
+ # @param vm_name [String] The name of the virtual machine.
1105
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1106
+ # the Capture Virtual Machine operation.
1107
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1108
+ # to the HTTP request.
1109
+ #
1110
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1111
+ #
1112
+ def begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1113
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1114
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1115
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1116
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1117
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1118
+
1119
+
1120
+ request_headers = {}
1121
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1122
+
1123
+ # Set Headers
1124
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1125
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1126
+
1127
+ # Serialize Request
1128
+ request_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachineCaptureParameters.mapper()
1129
+ request_content = @client.serialize(request_mapper, parameters)
1130
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1131
+
1132
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'
1133
+
1134
+ request_url = @base_url || @client.base_url
1135
+
1136
+ options = {
1137
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1138
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1139
+ query_params: {'api-version' => @client.api_version},
1140
+ body: request_content,
1141
+ headers: request_headers.merge(custom_headers || {}),
1142
+ base_url: request_url
1143
+ }
1144
+ promise = @client.make_request_async(:post, path_template, options)
1145
+
1146
+ promise = promise.then do |result|
1147
+ http_response = result.response
1148
+ status_code = http_response.status
1149
+ response_content = http_response.body
1150
+ unless status_code == 200 || status_code == 202
1151
+ error_model = JSON.load(response_content)
1152
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1153
+ end
1154
+
1155
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1156
+ # Deserialize Response
1157
+ if status_code == 200
1158
+ begin
1159
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1160
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachineCaptureResult.mapper()
1161
+ result.body = @client.deserialize(result_mapper, parsed_response)
1162
+ rescue Exception => e
1163
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1164
+ end
1165
+ end
1166
+
1167
+ result
1168
+ end
1169
+
1170
+ promise.execute
1171
+ end
1172
+
1173
+ #
1174
+ # The operation to create or update a virtual machine.
1175
+ #
1176
+ # @param resource_group_name [String] The name of the resource group.
1177
+ # @param vm_name [String] The name of the virtual machine.
1178
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1179
+ # Machine operation.
1180
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1181
+ # will be added to the HTTP request.
1182
+ #
1183
+ # @return [VirtualMachine] operation results.
1184
+ #
1185
+ def begin_create_or_update(resource_group_name, vm_name, parameters, custom_headers:nil)
1186
+ response = begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1187
+ response.body unless response.nil?
1188
+ end
1189
+
1190
+ #
1191
+ # The operation to create or update a virtual machine.
1192
+ #
1193
+ # @param resource_group_name [String] The name of the resource group.
1194
+ # @param vm_name [String] The name of the virtual machine.
1195
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1196
+ # Machine operation.
1197
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1198
+ # will be added to the HTTP request.
1199
+ #
1200
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1201
+ #
1202
+ def begin_create_or_update_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1203
+ begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1204
+ end
1205
+
1206
+ #
1207
+ # The operation to create or update a virtual machine.
1208
+ #
1209
+ # @param resource_group_name [String] The name of the resource group.
1210
+ # @param vm_name [String] The name of the virtual machine.
1211
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1212
+ # Machine operation.
1213
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1214
+ # to the HTTP request.
1215
+ #
1216
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1217
+ #
1218
+ def begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1219
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1220
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1221
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1222
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1223
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1224
+
1225
+
1226
+ request_headers = {}
1227
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1228
+
1229
+ # Set Headers
1230
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1231
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1232
+
1233
+ # Serialize Request
1234
+ request_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachine.mapper()
1235
+ request_content = @client.serialize(request_mapper, parameters)
1236
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1237
+
1238
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1239
+
1240
+ request_url = @base_url || @client.base_url
1241
+
1242
+ options = {
1243
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1244
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1245
+ query_params: {'api-version' => @client.api_version},
1246
+ body: request_content,
1247
+ headers: request_headers.merge(custom_headers || {}),
1248
+ base_url: request_url
1249
+ }
1250
+ promise = @client.make_request_async(:put, path_template, options)
1251
+
1252
+ promise = promise.then do |result|
1253
+ http_response = result.response
1254
+ status_code = http_response.status
1255
+ response_content = http_response.body
1256
+ unless status_code == 200 || status_code == 201
1257
+ error_model = JSON.load(response_content)
1258
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1259
+ end
1260
+
1261
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1262
+ # Deserialize Response
1263
+ if status_code == 200
1264
+ begin
1265
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1266
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachine.mapper()
1267
+ result.body = @client.deserialize(result_mapper, parsed_response)
1268
+ rescue Exception => e
1269
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1270
+ end
1271
+ end
1272
+ # Deserialize Response
1273
+ if status_code == 201
1274
+ begin
1275
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1276
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachine.mapper()
1277
+ result.body = @client.deserialize(result_mapper, parsed_response)
1278
+ rescue Exception => e
1279
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1280
+ end
1281
+ end
1282
+
1283
+ result
1284
+ end
1285
+
1286
+ promise.execute
1287
+ end
1288
+
1289
+ #
1290
+ # The operation to update a virtual machine.
1291
+ #
1292
+ # @param resource_group_name [String] The name of the resource group.
1293
+ # @param vm_name [String] The name of the virtual machine.
1294
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1295
+ # Virtual Machine operation.
1296
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1297
+ # will be added to the HTTP request.
1298
+ #
1299
+ # @return [VirtualMachine] operation results.
1300
+ #
1301
+ def begin_update(resource_group_name, vm_name, parameters, custom_headers:nil)
1302
+ response = begin_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1303
+ response.body unless response.nil?
1304
+ end
1305
+
1306
+ #
1307
+ # The operation to update a virtual machine.
1308
+ #
1309
+ # @param resource_group_name [String] The name of the resource group.
1310
+ # @param vm_name [String] The name of the virtual machine.
1311
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1312
+ # Virtual Machine operation.
1313
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1314
+ # will be added to the HTTP request.
1315
+ #
1316
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1317
+ #
1318
+ def begin_update_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1319
+ begin_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1320
+ end
1321
+
1322
+ #
1323
+ # The operation to update a virtual machine.
1324
+ #
1325
+ # @param resource_group_name [String] The name of the resource group.
1326
+ # @param vm_name [String] The name of the virtual machine.
1327
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1328
+ # Virtual Machine operation.
1329
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1330
+ # to the HTTP request.
1331
+ #
1332
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1333
+ #
1334
+ def begin_update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1335
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1336
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1337
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1338
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1339
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1340
+
1341
+
1342
+ request_headers = {}
1343
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1344
+
1345
+ # Set Headers
1346
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1347
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1348
+
1349
+ # Serialize Request
1350
+ request_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachineUpdate.mapper()
1351
+ request_content = @client.serialize(request_mapper, parameters)
1352
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1353
+
1354
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1355
+
1356
+ request_url = @base_url || @client.base_url
1357
+
1358
+ options = {
1359
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1360
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1361
+ query_params: {'api-version' => @client.api_version},
1362
+ body: request_content,
1363
+ headers: request_headers.merge(custom_headers || {}),
1364
+ base_url: request_url
1365
+ }
1366
+ promise = @client.make_request_async(:patch, path_template, options)
1367
+
1368
+ promise = promise.then do |result|
1369
+ http_response = result.response
1370
+ status_code = http_response.status
1371
+ response_content = http_response.body
1372
+ unless status_code == 200 || status_code == 201
1373
+ error_model = JSON.load(response_content)
1374
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1375
+ end
1376
+
1377
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1378
+ # Deserialize Response
1379
+ if status_code == 200
1380
+ begin
1381
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1382
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachine.mapper()
1383
+ result.body = @client.deserialize(result_mapper, parsed_response)
1384
+ rescue Exception => e
1385
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1386
+ end
1387
+ end
1388
+ # Deserialize Response
1389
+ if status_code == 201
1390
+ begin
1391
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1392
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachine.mapper()
1393
+ result.body = @client.deserialize(result_mapper, parsed_response)
1394
+ rescue Exception => e
1395
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1396
+ end
1397
+ end
1398
+
1399
+ result
1400
+ end
1401
+
1402
+ promise.execute
1403
+ end
1404
+
1405
+ #
1406
+ # The operation to delete a virtual machine.
1407
+ #
1408
+ # @param resource_group_name [String] The name of the resource group.
1409
+ # @param vm_name [String] The name of the virtual machine.
1410
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1411
+ # will be added to the HTTP request.
1412
+ #
1413
+ #
1414
+ def begin_delete(resource_group_name, vm_name, custom_headers:nil)
1415
+ response = begin_delete_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1416
+ nil
1417
+ end
1418
+
1419
+ #
1420
+ # The operation to delete a virtual machine.
1421
+ #
1422
+ # @param resource_group_name [String] The name of the resource group.
1423
+ # @param vm_name [String] The name of the virtual machine.
1424
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1425
+ # will be added to the HTTP request.
1426
+ #
1427
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1428
+ #
1429
+ def begin_delete_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1430
+ begin_delete_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1431
+ end
1432
+
1433
+ #
1434
+ # The operation to delete a virtual machine.
1435
+ #
1436
+ # @param resource_group_name [String] The name of the resource group.
1437
+ # @param vm_name [String] The name of the virtual machine.
1438
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1439
+ # to the HTTP request.
1440
+ #
1441
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1442
+ #
1443
+ def begin_delete_async(resource_group_name, vm_name, custom_headers:nil)
1444
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1445
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1446
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1447
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1448
+
1449
+
1450
+ request_headers = {}
1451
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1452
+
1453
+ # Set Headers
1454
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1455
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1456
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1457
+
1458
+ request_url = @base_url || @client.base_url
1459
+
1460
+ options = {
1461
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1462
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1463
+ query_params: {'api-version' => @client.api_version},
1464
+ headers: request_headers.merge(custom_headers || {}),
1465
+ base_url: request_url
1466
+ }
1467
+ promise = @client.make_request_async(:delete, path_template, options)
1468
+
1469
+ promise = promise.then do |result|
1470
+ http_response = result.response
1471
+ status_code = http_response.status
1472
+ response_content = http_response.body
1473
+ unless status_code == 200 || status_code == 202 || status_code == 204
1474
+ error_model = JSON.load(response_content)
1475
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1476
+ end
1477
+
1478
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1479
+
1480
+ result
1481
+ end
1482
+
1483
+ promise.execute
1484
+ end
1485
+
1486
+ #
1487
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1488
+ # machine must be stop-deallocated before invoking this operation.
1489
+ #
1490
+ # @param resource_group_name [String] The name of the resource group.
1491
+ # @param vm_name [String] The name of the virtual machine.
1492
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1493
+ # will be added to the HTTP request.
1494
+ #
1495
+ #
1496
+ def begin_convert_to_managed_disks(resource_group_name, vm_name, custom_headers:nil)
1497
+ response = begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1498
+ nil
1499
+ end
1500
+
1501
+ #
1502
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1503
+ # machine must be stop-deallocated before invoking this operation.
1504
+ #
1505
+ # @param resource_group_name [String] The name of the resource group.
1506
+ # @param vm_name [String] The name of the virtual machine.
1507
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1508
+ # will be added to the HTTP request.
1509
+ #
1510
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1511
+ #
1512
+ def begin_convert_to_managed_disks_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1513
+ begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1514
+ end
1515
+
1516
+ #
1517
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1518
+ # machine must be stop-deallocated before invoking this operation.
1519
+ #
1520
+ # @param resource_group_name [String] The name of the resource group.
1521
+ # @param vm_name [String] The name of the virtual machine.
1522
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1523
+ # to the HTTP request.
1524
+ #
1525
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1526
+ #
1527
+ def begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:nil)
1528
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1529
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1530
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1531
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1532
+
1533
+
1534
+ request_headers = {}
1535
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1536
+
1537
+ # Set Headers
1538
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1539
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1540
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'
1541
+
1542
+ request_url = @base_url || @client.base_url
1543
+
1544
+ options = {
1545
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1546
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1547
+ query_params: {'api-version' => @client.api_version},
1548
+ headers: request_headers.merge(custom_headers || {}),
1549
+ base_url: request_url
1550
+ }
1551
+ promise = @client.make_request_async(:post, path_template, options)
1552
+
1553
+ promise = promise.then do |result|
1554
+ http_response = result.response
1555
+ status_code = http_response.status
1556
+ response_content = http_response.body
1557
+ unless status_code == 200 || status_code == 202
1558
+ error_model = JSON.load(response_content)
1559
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1560
+ end
1561
+
1562
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1563
+
1564
+ result
1565
+ end
1566
+
1567
+ promise.execute
1568
+ end
1569
+
1570
+ #
1571
+ # Shuts down the virtual machine and releases the compute resources. You are
1572
+ # not billed for the compute resources that this virtual machine uses.
1573
+ #
1574
+ # @param resource_group_name [String] The name of the resource group.
1575
+ # @param vm_name [String] The name of the virtual machine.
1576
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1577
+ # will be added to the HTTP request.
1578
+ #
1579
+ #
1580
+ def begin_deallocate(resource_group_name, vm_name, custom_headers:nil)
1581
+ response = begin_deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1582
+ nil
1583
+ end
1584
+
1585
+ #
1586
+ # Shuts down the virtual machine and releases the compute resources. You are
1587
+ # not billed for the compute resources that this virtual machine uses.
1588
+ #
1589
+ # @param resource_group_name [String] The name of the resource group.
1590
+ # @param vm_name [String] The name of the virtual machine.
1591
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1592
+ # will be added to the HTTP request.
1593
+ #
1594
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1595
+ #
1596
+ def begin_deallocate_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1597
+ begin_deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1598
+ end
1599
+
1600
+ #
1601
+ # Shuts down the virtual machine and releases the compute resources. You are
1602
+ # not billed for the compute resources that this virtual machine uses.
1603
+ #
1604
+ # @param resource_group_name [String] The name of the resource group.
1605
+ # @param vm_name [String] The name of the virtual machine.
1606
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1607
+ # to the HTTP request.
1608
+ #
1609
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1610
+ #
1611
+ def begin_deallocate_async(resource_group_name, vm_name, custom_headers:nil)
1612
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1613
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1614
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1615
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1616
+
1617
+
1618
+ request_headers = {}
1619
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1620
+
1621
+ # Set Headers
1622
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1623
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1624
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'
1625
+
1626
+ request_url = @base_url || @client.base_url
1627
+
1628
+ options = {
1629
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1630
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1631
+ query_params: {'api-version' => @client.api_version},
1632
+ headers: request_headers.merge(custom_headers || {}),
1633
+ base_url: request_url
1634
+ }
1635
+ promise = @client.make_request_async(:post, path_template, options)
1636
+
1637
+ promise = promise.then do |result|
1638
+ http_response = result.response
1639
+ status_code = http_response.status
1640
+ response_content = http_response.body
1641
+ unless status_code == 200 || status_code == 202
1642
+ error_model = JSON.load(response_content)
1643
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1644
+ end
1645
+
1646
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1647
+
1648
+ result
1649
+ end
1650
+
1651
+ promise.execute
1652
+ end
1653
+
1654
+ #
1655
+ # The operation to power off (stop) a virtual machine. The virtual machine can
1656
+ # be restarted with the same provisioned resources. You are still charged for
1657
+ # this virtual machine.
1658
+ #
1659
+ # @param resource_group_name [String] The name of the resource group.
1660
+ # @param vm_name [String] The name of the virtual machine.
1661
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1662
+ # will be added to the HTTP request.
1663
+ #
1664
+ #
1665
+ def begin_power_off(resource_group_name, vm_name, custom_headers:nil)
1666
+ response = begin_power_off_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1667
+ nil
1668
+ end
1669
+
1670
+ #
1671
+ # The operation to power off (stop) a virtual machine. The virtual machine can
1672
+ # be restarted with the same provisioned resources. You are still charged for
1673
+ # this virtual machine.
1674
+ #
1675
+ # @param resource_group_name [String] The name of the resource group.
1676
+ # @param vm_name [String] The name of the virtual machine.
1677
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1678
+ # will be added to the HTTP request.
1679
+ #
1680
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1681
+ #
1682
+ def begin_power_off_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1683
+ begin_power_off_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1684
+ end
1685
+
1686
+ #
1687
+ # The operation to power off (stop) a virtual machine. The virtual machine can
1688
+ # be restarted with the same provisioned resources. You are still charged for
1689
+ # this virtual machine.
1690
+ #
1691
+ # @param resource_group_name [String] The name of the resource group.
1692
+ # @param vm_name [String] The name of the virtual machine.
1693
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1694
+ # to the HTTP request.
1695
+ #
1696
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1697
+ #
1698
+ def begin_power_off_async(resource_group_name, vm_name, custom_headers:nil)
1699
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1700
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1701
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1702
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1703
+
1704
+
1705
+ request_headers = {}
1706
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1707
+
1708
+ # Set Headers
1709
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1710
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1711
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'
1712
+
1713
+ request_url = @base_url || @client.base_url
1714
+
1715
+ options = {
1716
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1717
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1718
+ query_params: {'api-version' => @client.api_version},
1719
+ headers: request_headers.merge(custom_headers || {}),
1720
+ base_url: request_url
1721
+ }
1722
+ promise = @client.make_request_async(:post, path_template, options)
1723
+
1724
+ promise = promise.then do |result|
1725
+ http_response = result.response
1726
+ status_code = http_response.status
1727
+ response_content = http_response.body
1728
+ unless status_code == 200 || status_code == 202
1729
+ error_model = JSON.load(response_content)
1730
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1731
+ end
1732
+
1733
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1734
+
1735
+ result
1736
+ end
1737
+
1738
+ promise.execute
1739
+ end
1740
+
1741
+ #
1742
+ # The operation to restart a virtual machine.
1743
+ #
1744
+ # @param resource_group_name [String] The name of the resource group.
1745
+ # @param vm_name [String] The name of the virtual machine.
1746
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1747
+ # will be added to the HTTP request.
1748
+ #
1749
+ #
1750
+ def begin_restart(resource_group_name, vm_name, custom_headers:nil)
1751
+ response = begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1752
+ nil
1753
+ end
1754
+
1755
+ #
1756
+ # The operation to restart a virtual machine.
1757
+ #
1758
+ # @param resource_group_name [String] The name of the resource group.
1759
+ # @param vm_name [String] The name of the virtual machine.
1760
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1761
+ # will be added to the HTTP request.
1762
+ #
1763
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1764
+ #
1765
+ def begin_restart_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1766
+ begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1767
+ end
1768
+
1769
+ #
1770
+ # The operation to restart a virtual machine.
1771
+ #
1772
+ # @param resource_group_name [String] The name of the resource group.
1773
+ # @param vm_name [String] The name of the virtual machine.
1774
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1775
+ # to the HTTP request.
1776
+ #
1777
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1778
+ #
1779
+ def begin_restart_async(resource_group_name, vm_name, custom_headers:nil)
1780
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1781
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1782
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1783
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1784
+
1785
+
1786
+ request_headers = {}
1787
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1788
+
1789
+ # Set Headers
1790
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1791
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1792
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'
1793
+
1794
+ request_url = @base_url || @client.base_url
1795
+
1796
+ options = {
1797
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1798
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1799
+ query_params: {'api-version' => @client.api_version},
1800
+ headers: request_headers.merge(custom_headers || {}),
1801
+ base_url: request_url
1802
+ }
1803
+ promise = @client.make_request_async(:post, path_template, options)
1804
+
1805
+ promise = promise.then do |result|
1806
+ http_response = result.response
1807
+ status_code = http_response.status
1808
+ response_content = http_response.body
1809
+ unless status_code == 200 || status_code == 202
1810
+ error_model = JSON.load(response_content)
1811
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1812
+ end
1813
+
1814
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1815
+
1816
+ result
1817
+ end
1818
+
1819
+ promise.execute
1820
+ end
1821
+
1822
+ #
1823
+ # The operation to start a virtual machine.
1824
+ #
1825
+ # @param resource_group_name [String] The name of the resource group.
1826
+ # @param vm_name [String] The name of the virtual machine.
1827
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1828
+ # will be added to the HTTP request.
1829
+ #
1830
+ #
1831
+ def begin_start(resource_group_name, vm_name, custom_headers:nil)
1832
+ response = begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1833
+ nil
1834
+ end
1835
+
1836
+ #
1837
+ # The operation to start a virtual machine.
1838
+ #
1839
+ # @param resource_group_name [String] The name of the resource group.
1840
+ # @param vm_name [String] The name of the virtual machine.
1841
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1842
+ # will be added to the HTTP request.
1843
+ #
1844
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1845
+ #
1846
+ def begin_start_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1847
+ begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1848
+ end
1849
+
1850
+ #
1851
+ # The operation to start a virtual machine.
1852
+ #
1853
+ # @param resource_group_name [String] The name of the resource group.
1854
+ # @param vm_name [String] The name of the virtual machine.
1855
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1856
+ # to the HTTP request.
1857
+ #
1858
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1859
+ #
1860
+ def begin_start_async(resource_group_name, vm_name, custom_headers:nil)
1861
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1862
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1863
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1864
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1865
+
1866
+
1867
+ request_headers = {}
1868
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1869
+
1870
+ # Set Headers
1871
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1872
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1873
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'
1874
+
1875
+ request_url = @base_url || @client.base_url
1876
+
1877
+ options = {
1878
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1879
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1880
+ query_params: {'api-version' => @client.api_version},
1881
+ headers: request_headers.merge(custom_headers || {}),
1882
+ base_url: request_url
1883
+ }
1884
+ promise = @client.make_request_async(:post, path_template, options)
1885
+
1886
+ promise = promise.then do |result|
1887
+ http_response = result.response
1888
+ status_code = http_response.status
1889
+ response_content = http_response.body
1890
+ unless status_code == 200 || status_code == 202
1891
+ error_model = JSON.load(response_content)
1892
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1893
+ end
1894
+
1895
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1896
+
1897
+ result
1898
+ end
1899
+
1900
+ promise.execute
1901
+ end
1902
+
1903
+ #
1904
+ # The operation to redeploy a virtual machine.
1905
+ #
1906
+ # @param resource_group_name [String] The name of the resource group.
1907
+ # @param vm_name [String] The name of the virtual machine.
1908
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1909
+ # will be added to the HTTP request.
1910
+ #
1911
+ #
1912
+ def begin_redeploy(resource_group_name, vm_name, custom_headers:nil)
1913
+ response = begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1914
+ nil
1915
+ end
1916
+
1917
+ #
1918
+ # The operation to redeploy a virtual machine.
1919
+ #
1920
+ # @param resource_group_name [String] The name of the resource group.
1921
+ # @param vm_name [String] The name of the virtual machine.
1922
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1923
+ # will be added to the HTTP request.
1924
+ #
1925
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1926
+ #
1927
+ def begin_redeploy_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1928
+ begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1929
+ end
1930
+
1931
+ #
1932
+ # The operation to redeploy a virtual machine.
1933
+ #
1934
+ # @param resource_group_name [String] The name of the resource group.
1935
+ # @param vm_name [String] The name of the virtual machine.
1936
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1937
+ # to the HTTP request.
1938
+ #
1939
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1940
+ #
1941
+ def begin_redeploy_async(resource_group_name, vm_name, custom_headers:nil)
1942
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1943
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1944
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1945
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1946
+
1947
+
1948
+ request_headers = {}
1949
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1950
+
1951
+ # Set Headers
1952
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1953
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1954
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'
1955
+
1956
+ request_url = @base_url || @client.base_url
1957
+
1958
+ options = {
1959
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1960
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1961
+ query_params: {'api-version' => @client.api_version},
1962
+ headers: request_headers.merge(custom_headers || {}),
1963
+ base_url: request_url
1964
+ }
1965
+ promise = @client.make_request_async(:post, path_template, options)
1966
+
1967
+ promise = promise.then do |result|
1968
+ http_response = result.response
1969
+ status_code = http_response.status
1970
+ response_content = http_response.body
1971
+ unless status_code == 200 || status_code == 202
1972
+ error_model = JSON.load(response_content)
1973
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1974
+ end
1975
+
1976
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1977
+
1978
+ result
1979
+ end
1980
+
1981
+ promise.execute
1982
+ end
1983
+
1984
+ #
1985
+ # The operation to perform maintenance on a virtual machine.
1986
+ #
1987
+ # @param resource_group_name [String] The name of the resource group.
1988
+ # @param vm_name [String] The name of the virtual machine.
1989
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1990
+ # will be added to the HTTP request.
1991
+ #
1992
+ #
1993
+ def begin_perform_maintenance(resource_group_name, vm_name, custom_headers:nil)
1994
+ response = begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1995
+ nil
1996
+ end
1997
+
1998
+ #
1999
+ # The operation to perform maintenance on a virtual machine.
2000
+ #
2001
+ # @param resource_group_name [String] The name of the resource group.
2002
+ # @param vm_name [String] The name of the virtual machine.
2003
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2004
+ # will be added to the HTTP request.
2005
+ #
2006
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2007
+ #
2008
+ def begin_perform_maintenance_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2009
+ begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2010
+ end
2011
+
2012
+ #
2013
+ # The operation to perform maintenance on a virtual machine.
2014
+ #
2015
+ # @param resource_group_name [String] The name of the resource group.
2016
+ # @param vm_name [String] The name of the virtual machine.
2017
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2018
+ # to the HTTP request.
2019
+ #
2020
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2021
+ #
2022
+ def begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:nil)
2023
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2024
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2025
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2026
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2027
+
2028
+
2029
+ request_headers = {}
2030
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2031
+
2032
+ # Set Headers
2033
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2034
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2035
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'
2036
+
2037
+ request_url = @base_url || @client.base_url
2038
+
2039
+ options = {
2040
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2041
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2042
+ query_params: {'api-version' => @client.api_version},
2043
+ headers: request_headers.merge(custom_headers || {}),
2044
+ base_url: request_url
2045
+ }
2046
+ promise = @client.make_request_async(:post, path_template, options)
2047
+
2048
+ promise = promise.then do |result|
2049
+ http_response = result.response
2050
+ status_code = http_response.status
2051
+ response_content = http_response.body
2052
+ unless status_code == 200 || status_code == 202
2053
+ error_model = JSON.load(response_content)
2054
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2055
+ end
2056
+
2057
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2058
+
2059
+ result
2060
+ end
2061
+
2062
+ promise.execute
2063
+ end
2064
+
2065
+ #
2066
+ # Run command on the VM.
2067
+ #
2068
+ # @param resource_group_name [String] The name of the resource group.
2069
+ # @param vm_name [String] The name of the virtual machine.
2070
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2071
+ # operation.
2072
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2073
+ # will be added to the HTTP request.
2074
+ #
2075
+ # @return [RunCommandResult] operation results.
2076
+ #
2077
+ def begin_run_command(resource_group_name, vm_name, parameters, custom_headers:nil)
2078
+ response = begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
2079
+ response.body unless response.nil?
2080
+ end
2081
+
2082
+ #
2083
+ # Run command on the VM.
2084
+ #
2085
+ # @param resource_group_name [String] The name of the resource group.
2086
+ # @param vm_name [String] The name of the virtual machine.
2087
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2088
+ # operation.
2089
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2090
+ # will be added to the HTTP request.
2091
+ #
2092
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2093
+ #
2094
+ def begin_run_command_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
2095
+ begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
2096
+ end
2097
+
2098
+ #
2099
+ # Run command on the VM.
2100
+ #
2101
+ # @param resource_group_name [String] The name of the resource group.
2102
+ # @param vm_name [String] The name of the virtual machine.
2103
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2104
+ # operation.
2105
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2106
+ # to the HTTP request.
2107
+ #
2108
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2109
+ #
2110
+ def begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:nil)
2111
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2112
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2113
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
2114
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2115
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2116
+
2117
+
2118
+ request_headers = {}
2119
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2120
+
2121
+ # Set Headers
2122
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2123
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2124
+
2125
+ # Serialize Request
2126
+ request_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::RunCommandInput.mapper()
2127
+ request_content = @client.serialize(request_mapper, parameters)
2128
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2129
+
2130
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'
2131
+
2132
+ request_url = @base_url || @client.base_url
2133
+
2134
+ options = {
2135
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2136
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2137
+ query_params: {'api-version' => @client.api_version},
2138
+ body: request_content,
2139
+ headers: request_headers.merge(custom_headers || {}),
2140
+ base_url: request_url
2141
+ }
2142
+ promise = @client.make_request_async(:post, path_template, options)
2143
+
2144
+ promise = promise.then do |result|
2145
+ http_response = result.response
2146
+ status_code = http_response.status
2147
+ response_content = http_response.body
2148
+ unless status_code == 200 || status_code == 202
2149
+ error_model = JSON.load(response_content)
2150
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2151
+ end
2152
+
2153
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2154
+ # Deserialize Response
2155
+ if status_code == 200
2156
+ begin
2157
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2158
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::RunCommandResult.mapper()
2159
+ result.body = @client.deserialize(result_mapper, parsed_response)
2160
+ rescue Exception => e
2161
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2162
+ end
2163
+ end
2164
+
2165
+ result
2166
+ end
2167
+
2168
+ promise.execute
2169
+ end
2170
+
2171
+ #
2172
+ # Lists all of the virtual machines in the specified resource group. Use the
2173
+ # nextLink property in the response to get the next page of virtual machines.
2174
+ #
2175
+ # @param next_page_link [String] The NextLink from the previous successful call
2176
+ # to List operation.
2177
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2178
+ # will be added to the HTTP request.
2179
+ #
2180
+ # @return [VirtualMachineListResult] operation results.
2181
+ #
2182
+ def list_next(next_page_link, custom_headers:nil)
2183
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
2184
+ response.body unless response.nil?
2185
+ end
2186
+
2187
+ #
2188
+ # Lists all of the virtual machines in the specified resource group. Use the
2189
+ # nextLink property in the response to get the next page of virtual machines.
2190
+ #
2191
+ # @param next_page_link [String] The NextLink from the previous successful call
2192
+ # to List operation.
2193
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2194
+ # will be added to the HTTP request.
2195
+ #
2196
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2197
+ #
2198
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
2199
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
2200
+ end
2201
+
2202
+ #
2203
+ # Lists all of the virtual machines in the specified resource group. Use the
2204
+ # nextLink property in the response to get the next page of virtual machines.
2205
+ #
2206
+ # @param next_page_link [String] The NextLink from the previous successful call
2207
+ # to List operation.
2208
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2209
+ # to the HTTP request.
2210
+ #
2211
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2212
+ #
2213
+ def list_next_async(next_page_link, custom_headers:nil)
2214
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2215
+
2216
+
2217
+ request_headers = {}
2218
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2219
+
2220
+ # Set Headers
2221
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2222
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2223
+ path_template = '{nextLink}'
2224
+
2225
+ request_url = @base_url || @client.base_url
2226
+
2227
+ options = {
2228
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2229
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2230
+ headers: request_headers.merge(custom_headers || {}),
2231
+ base_url: request_url
2232
+ }
2233
+ promise = @client.make_request_async(:get, path_template, options)
2234
+
2235
+ promise = promise.then do |result|
2236
+ http_response = result.response
2237
+ status_code = http_response.status
2238
+ response_content = http_response.body
2239
+ unless status_code == 200
2240
+ error_model = JSON.load(response_content)
2241
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2242
+ end
2243
+
2244
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2245
+ # Deserialize Response
2246
+ if status_code == 200
2247
+ begin
2248
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2249
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachineListResult.mapper()
2250
+ result.body = @client.deserialize(result_mapper, parsed_response)
2251
+ rescue Exception => e
2252
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2253
+ end
2254
+ end
2255
+
2256
+ result
2257
+ end
2258
+
2259
+ promise.execute
2260
+ end
2261
+
2262
+ #
2263
+ # Lists all of the virtual machines in the specified subscription. Use the
2264
+ # nextLink property in the response to get the next page of virtual machines.
2265
+ #
2266
+ # @param next_page_link [String] The NextLink from the previous successful call
2267
+ # to List operation.
2268
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2269
+ # will be added to the HTTP request.
2270
+ #
2271
+ # @return [VirtualMachineListResult] operation results.
2272
+ #
2273
+ def list_all_next(next_page_link, custom_headers:nil)
2274
+ response = list_all_next_async(next_page_link, custom_headers:custom_headers).value!
2275
+ response.body unless response.nil?
2276
+ end
2277
+
2278
+ #
2279
+ # Lists all of the virtual machines in the specified subscription. Use the
2280
+ # nextLink property in the response to get the next page of virtual machines.
2281
+ #
2282
+ # @param next_page_link [String] The NextLink from the previous successful call
2283
+ # to List operation.
2284
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2285
+ # will be added to the HTTP request.
2286
+ #
2287
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2288
+ #
2289
+ def list_all_next_with_http_info(next_page_link, custom_headers:nil)
2290
+ list_all_next_async(next_page_link, custom_headers:custom_headers).value!
2291
+ end
2292
+
2293
+ #
2294
+ # Lists all of the virtual machines in the specified subscription. Use the
2295
+ # nextLink property in the response to get the next page of virtual machines.
2296
+ #
2297
+ # @param next_page_link [String] The NextLink from the previous successful call
2298
+ # to List operation.
2299
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2300
+ # to the HTTP request.
2301
+ #
2302
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2303
+ #
2304
+ def list_all_next_async(next_page_link, custom_headers:nil)
2305
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2306
+
2307
+
2308
+ request_headers = {}
2309
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2310
+
2311
+ # Set Headers
2312
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2313
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2314
+ path_template = '{nextLink}'
2315
+
2316
+ request_url = @base_url || @client.base_url
2317
+
2318
+ options = {
2319
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2320
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2321
+ headers: request_headers.merge(custom_headers || {}),
2322
+ base_url: request_url
2323
+ }
2324
+ promise = @client.make_request_async(:get, path_template, options)
2325
+
2326
+ promise = promise.then do |result|
2327
+ http_response = result.response
2328
+ status_code = http_response.status
2329
+ response_content = http_response.body
2330
+ unless status_code == 200
2331
+ error_model = JSON.load(response_content)
2332
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2333
+ end
2334
+
2335
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2336
+ # Deserialize Response
2337
+ if status_code == 200
2338
+ begin
2339
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2340
+ result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachineListResult.mapper()
2341
+ result.body = @client.deserialize(result_mapper, parsed_response)
2342
+ rescue Exception => e
2343
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2344
+ end
2345
+ end
2346
+
2347
+ result
2348
+ end
2349
+
2350
+ promise.execute
2351
+ end
2352
+
2353
+ #
2354
+ # Lists all of the virtual machines in the specified resource group. Use the
2355
+ # nextLink property in the response to get the next page of virtual machines.
2356
+ #
2357
+ # @param resource_group_name [String] The name of the resource group.
2358
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2359
+ # will be added to the HTTP request.
2360
+ #
2361
+ # @return [VirtualMachineListResult] which provide lazy access to pages of the
2362
+ # response.
2363
+ #
2364
+ def list_as_lazy(resource_group_name, custom_headers:nil)
2365
+ response = list_async(resource_group_name, custom_headers:custom_headers).value!
2366
+ unless response.nil?
2367
+ page = response.body
2368
+ page.next_method = Proc.new do |next_page_link|
2369
+ list_next_async(next_page_link, custom_headers:custom_headers)
2370
+ end
2371
+ page
2372
+ end
2373
+ end
2374
+
2375
+ #
2376
+ # Lists all of the virtual machines in the specified subscription. Use the
2377
+ # nextLink property in the response to get the next page of virtual machines.
2378
+ #
2379
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2380
+ # will be added to the HTTP request.
2381
+ #
2382
+ # @return [VirtualMachineListResult] which provide lazy access to pages of the
2383
+ # response.
2384
+ #
2385
+ def list_all_as_lazy(custom_headers:nil)
2386
+ response = list_all_async(custom_headers:custom_headers).value!
2387
+ unless response.nil?
2388
+ page = response.body
2389
+ page.next_method = Proc.new do |next_page_link|
2390
+ list_all_next_async(next_page_link, custom_headers:custom_headers)
2391
+ end
2392
+ page
2393
+ end
2394
+ end
2395
+
2396
+ end
2397
+ end