azure_mgmt_compute 0.14.0 → 0.15.0

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