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