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,2182 @@
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::V2015_06_15
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::V2015_06_15::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::V2015_06_15::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::V2015_06_15::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::V2015_06_15::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::V2015_06_15::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::V2015_06_15::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::V2015_06_15::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::V2015_06_15::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::V2015_06_15::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::V2015_06_15::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::V2015_06_15::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::V2015_06_15::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::V2015_06_15::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::V2015_06_15::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
+ # Create or update a VM scale set.
891
+ #
892
+ # @param resource_group_name [String] The name of the resource group.
893
+ # @param name [String] The name of the VM scale set to create or update.
894
+ # @param parameters [VirtualMachineScaleSet] The scale set object.
895
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
896
+ # will be added to the HTTP request.
897
+ #
898
+ # @return [VirtualMachineScaleSet] operation results.
899
+ #
900
+ def begin_create_or_update(resource_group_name, name, parameters, custom_headers = nil)
901
+ response = begin_create_or_update_async(resource_group_name, name, parameters, custom_headers).value!
902
+ response.body unless response.nil?
903
+ end
904
+
905
+ #
906
+ # Create or update a VM scale set.
907
+ #
908
+ # @param resource_group_name [String] The name of the resource group.
909
+ # @param name [String] The name of the VM scale set to create or update.
910
+ # @param parameters [VirtualMachineScaleSet] The scale set object.
911
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
912
+ # will be added to the HTTP request.
913
+ #
914
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
915
+ #
916
+ def begin_create_or_update_with_http_info(resource_group_name, name, parameters, custom_headers = nil)
917
+ begin_create_or_update_async(resource_group_name, name, parameters, custom_headers).value!
918
+ end
919
+
920
+ #
921
+ # Create or update a VM scale set.
922
+ #
923
+ # @param resource_group_name [String] The name of the resource group.
924
+ # @param name [String] The name of the VM scale set to create or update.
925
+ # @param parameters [VirtualMachineScaleSet] The scale set object.
926
+ # @param [Hash{String => String}] A hash of custom headers that will be added
927
+ # to the HTTP request.
928
+ #
929
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
930
+ #
931
+ def begin_create_or_update_async(resource_group_name, name, parameters, custom_headers = nil)
932
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
933
+ fail ArgumentError, 'name is nil' if name.nil?
934
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
935
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
936
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
937
+
938
+
939
+ request_headers = {}
940
+
941
+ # Set Headers
942
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
943
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
944
+
945
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
946
+
947
+ # Serialize Request
948
+ request_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineScaleSet.mapper()
949
+ request_content = @client.serialize(request_mapper, parameters)
950
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
951
+
952
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{name}'
953
+
954
+ request_url = @base_url || @client.base_url
955
+
956
+ options = {
957
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
958
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
959
+ query_params: {'api-version' => @client.api_version},
960
+ body: request_content,
961
+ headers: request_headers.merge(custom_headers || {}),
962
+ base_url: request_url
963
+ }
964
+ promise = @client.make_request_async(:put, path_template, options)
965
+
966
+ promise = promise.then do |result|
967
+ http_response = result.response
968
+ status_code = http_response.status
969
+ response_content = http_response.body
970
+ unless status_code == 200 || status_code == 201
971
+ error_model = JSON.load(response_content)
972
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
973
+ end
974
+
975
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
976
+ # Deserialize Response
977
+ if status_code == 200
978
+ begin
979
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
980
+ result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineScaleSet.mapper()
981
+ result.body = @client.deserialize(result_mapper, parsed_response)
982
+ rescue Exception => e
983
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
984
+ end
985
+ end
986
+ # Deserialize Response
987
+ if status_code == 201
988
+ begin
989
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
990
+ result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineScaleSet.mapper()
991
+ result.body = @client.deserialize(result_mapper, parsed_response)
992
+ rescue Exception => e
993
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
994
+ end
995
+ end
996
+
997
+ result
998
+ end
999
+
1000
+ promise.execute
1001
+ end
1002
+
1003
+ #
1004
+ # Deallocates specific virtual machines in a VM scale set. Shuts down the
1005
+ # virtual machines and releases the compute resources. You are not billed for
1006
+ # the compute resources that this virtual machine scale set deallocates.
1007
+ #
1008
+ # @param resource_group_name [String] The name of the resource group.
1009
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1010
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1011
+ # virtual machine instance IDs from the VM scale set.
1012
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1013
+ # will be added to the HTTP request.
1014
+ #
1015
+ # @return [OperationStatusResponse] operation results.
1016
+ #
1017
+ def begin_deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1018
+ response = begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1019
+ response.body unless response.nil?
1020
+ end
1021
+
1022
+ #
1023
+ # Deallocates specific virtual machines in a VM scale set. Shuts down the
1024
+ # virtual machines and releases the compute resources. You are not billed for
1025
+ # the compute resources that this virtual machine scale set deallocates.
1026
+ #
1027
+ # @param resource_group_name [String] The name of the resource group.
1028
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1029
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1030
+ # virtual machine instance IDs from the VM scale set.
1031
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1032
+ # will be added to the HTTP request.
1033
+ #
1034
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1035
+ #
1036
+ def begin_deallocate_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1037
+ begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1038
+ end
1039
+
1040
+ #
1041
+ # Deallocates specific virtual machines in a VM scale set. Shuts down the
1042
+ # virtual machines and releases the compute resources. You are not billed for
1043
+ # the compute resources that this virtual machine scale set deallocates.
1044
+ #
1045
+ # @param resource_group_name [String] The name of the resource group.
1046
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1047
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1048
+ # virtual machine instance IDs from the VM scale set.
1049
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1050
+ # to the HTTP request.
1051
+ #
1052
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1053
+ #
1054
+ def begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1055
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1056
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1057
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1058
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1059
+
1060
+
1061
+ request_headers = {}
1062
+
1063
+ # Set Headers
1064
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1065
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1066
+
1067
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1068
+
1069
+ # Serialize Request
1070
+ request_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
1071
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
1072
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1073
+
1074
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'
1075
+
1076
+ request_url = @base_url || @client.base_url
1077
+
1078
+ options = {
1079
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1080
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1081
+ query_params: {'api-version' => @client.api_version},
1082
+ body: request_content,
1083
+ headers: request_headers.merge(custom_headers || {}),
1084
+ base_url: request_url
1085
+ }
1086
+ promise = @client.make_request_async(:post, path_template, options)
1087
+
1088
+ promise = promise.then do |result|
1089
+ http_response = result.response
1090
+ status_code = http_response.status
1091
+ response_content = http_response.body
1092
+ unless status_code == 200 || status_code == 202
1093
+ error_model = JSON.load(response_content)
1094
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1095
+ end
1096
+
1097
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1098
+ # Deserialize Response
1099
+ if status_code == 200
1100
+ begin
1101
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1102
+ result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
1103
+ result.body = @client.deserialize(result_mapper, parsed_response)
1104
+ rescue Exception => e
1105
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1106
+ end
1107
+ end
1108
+
1109
+ result
1110
+ end
1111
+
1112
+ promise.execute
1113
+ end
1114
+
1115
+ #
1116
+ # Deletes a VM scale set.
1117
+ #
1118
+ # @param resource_group_name [String] The name of the resource group.
1119
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1120
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1121
+ # will be added to the HTTP request.
1122
+ #
1123
+ # @return [OperationStatusResponse] operation results.
1124
+ #
1125
+ def begin_delete(resource_group_name, vm_scale_set_name, custom_headers = nil)
1126
+ response = begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers).value!
1127
+ response.body unless response.nil?
1128
+ end
1129
+
1130
+ #
1131
+ # Deletes a VM scale set.
1132
+ #
1133
+ # @param resource_group_name [String] The name of the resource group.
1134
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1135
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1136
+ # will be added to the HTTP request.
1137
+ #
1138
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1139
+ #
1140
+ def begin_delete_with_http_info(resource_group_name, vm_scale_set_name, custom_headers = nil)
1141
+ begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers).value!
1142
+ end
1143
+
1144
+ #
1145
+ # Deletes a VM scale set.
1146
+ #
1147
+ # @param resource_group_name [String] The name of the resource group.
1148
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1149
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1150
+ # to the HTTP request.
1151
+ #
1152
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1153
+ #
1154
+ def begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
1155
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1156
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1157
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1158
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1159
+
1160
+
1161
+ request_headers = {}
1162
+
1163
+ # Set Headers
1164
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1165
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1166
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'
1167
+
1168
+ request_url = @base_url || @client.base_url
1169
+
1170
+ options = {
1171
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1172
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1173
+ query_params: {'api-version' => @client.api_version},
1174
+ headers: request_headers.merge(custom_headers || {}),
1175
+ base_url: request_url
1176
+ }
1177
+ promise = @client.make_request_async(:delete, path_template, options)
1178
+
1179
+ promise = promise.then do |result|
1180
+ http_response = result.response
1181
+ status_code = http_response.status
1182
+ response_content = http_response.body
1183
+ unless status_code == 200 || status_code == 202 || status_code == 204
1184
+ error_model = JSON.load(response_content)
1185
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1186
+ end
1187
+
1188
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1189
+ # Deserialize Response
1190
+ if status_code == 200
1191
+ begin
1192
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1193
+ result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
1194
+ result.body = @client.deserialize(result_mapper, parsed_response)
1195
+ rescue Exception => e
1196
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1197
+ end
1198
+ end
1199
+
1200
+ result
1201
+ end
1202
+
1203
+ promise.execute
1204
+ end
1205
+
1206
+ #
1207
+ # Deletes virtual machines in a VM scale set.
1208
+ #
1209
+ # @param resource_group_name [String] The name of the resource group.
1210
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1211
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1212
+ # of virtual machine instance IDs from the VM scale set.
1213
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1214
+ # will be added to the HTTP request.
1215
+ #
1216
+ # @return [OperationStatusResponse] operation results.
1217
+ #
1218
+ def begin_delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
1219
+ response = begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1220
+ response.body unless response.nil?
1221
+ end
1222
+
1223
+ #
1224
+ # Deletes virtual machines in a VM scale set.
1225
+ #
1226
+ # @param resource_group_name [String] The name of the resource group.
1227
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1228
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1229
+ # of virtual machine instance IDs from the VM scale set.
1230
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1231
+ # will be added to the HTTP request.
1232
+ #
1233
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1234
+ #
1235
+ def begin_delete_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
1236
+ begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1237
+ end
1238
+
1239
+ #
1240
+ # Deletes virtual machines in a VM scale set.
1241
+ #
1242
+ # @param resource_group_name [String] The name of the resource group.
1243
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1244
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1245
+ # of virtual machine instance IDs from the VM scale set.
1246
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1247
+ # to the HTTP request.
1248
+ #
1249
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1250
+ #
1251
+ def begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
1252
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1253
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1254
+ fail ArgumentError, 'vm_instance_ids is nil' if vm_instance_ids.nil?
1255
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1256
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1257
+
1258
+
1259
+ request_headers = {}
1260
+
1261
+ # Set Headers
1262
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1263
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1264
+
1265
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1266
+
1267
+ # Serialize Request
1268
+ request_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineScaleSetVMInstanceRequiredIDs.mapper()
1269
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
1270
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1271
+
1272
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'
1273
+
1274
+ request_url = @base_url || @client.base_url
1275
+
1276
+ options = {
1277
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1278
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1279
+ query_params: {'api-version' => @client.api_version},
1280
+ body: request_content,
1281
+ headers: request_headers.merge(custom_headers || {}),
1282
+ base_url: request_url
1283
+ }
1284
+ promise = @client.make_request_async(:post, path_template, options)
1285
+
1286
+ promise = promise.then do |result|
1287
+ http_response = result.response
1288
+ status_code = http_response.status
1289
+ response_content = http_response.body
1290
+ unless status_code == 200 || status_code == 202
1291
+ error_model = JSON.load(response_content)
1292
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1293
+ end
1294
+
1295
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1296
+ # Deserialize Response
1297
+ if status_code == 200
1298
+ begin
1299
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1300
+ result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
1301
+ result.body = @client.deserialize(result_mapper, parsed_response)
1302
+ rescue Exception => e
1303
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1304
+ end
1305
+ end
1306
+
1307
+ result
1308
+ end
1309
+
1310
+ promise.execute
1311
+ end
1312
+
1313
+ #
1314
+ # Power off (stop) one or more virtual machines in a VM scale set. Note that
1315
+ # resources are still attached and you are getting charged for the resources.
1316
+ # Instead, use deallocate to release resources and avoid charges.
1317
+ #
1318
+ # @param resource_group_name [String] The name of the resource group.
1319
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1320
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1321
+ # virtual machine instance IDs from the VM scale set.
1322
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1323
+ # will be added to the HTTP request.
1324
+ #
1325
+ # @return [OperationStatusResponse] operation results.
1326
+ #
1327
+ def begin_power_off(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1328
+ response = begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1329
+ response.body unless response.nil?
1330
+ end
1331
+
1332
+ #
1333
+ # Power off (stop) one or more virtual machines in a VM scale set. Note that
1334
+ # resources are still attached and you are getting charged for the resources.
1335
+ # Instead, use deallocate to release resources and avoid charges.
1336
+ #
1337
+ # @param resource_group_name [String] The name of the resource group.
1338
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1339
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1340
+ # virtual machine instance IDs from the VM scale set.
1341
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1342
+ # will be added to the HTTP request.
1343
+ #
1344
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1345
+ #
1346
+ def begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1347
+ begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1348
+ end
1349
+
1350
+ #
1351
+ # Power off (stop) one or more virtual machines in a VM scale set. Note that
1352
+ # resources are still attached and you are getting charged for the resources.
1353
+ # Instead, use deallocate to release resources and avoid charges.
1354
+ #
1355
+ # @param resource_group_name [String] The name of the resource group.
1356
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1357
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1358
+ # virtual machine instance IDs from the VM scale set.
1359
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1360
+ # to the HTTP request.
1361
+ #
1362
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1363
+ #
1364
+ def begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1365
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1366
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1367
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1368
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1369
+
1370
+
1371
+ request_headers = {}
1372
+
1373
+ # Set Headers
1374
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1375
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1376
+
1377
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1378
+
1379
+ # Serialize Request
1380
+ request_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
1381
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
1382
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1383
+
1384
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'
1385
+
1386
+ request_url = @base_url || @client.base_url
1387
+
1388
+ options = {
1389
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1390
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1391
+ query_params: {'api-version' => @client.api_version},
1392
+ body: request_content,
1393
+ headers: request_headers.merge(custom_headers || {}),
1394
+ base_url: request_url
1395
+ }
1396
+ promise = @client.make_request_async(:post, path_template, options)
1397
+
1398
+ promise = promise.then do |result|
1399
+ http_response = result.response
1400
+ status_code = http_response.status
1401
+ response_content = http_response.body
1402
+ unless status_code == 200 || status_code == 202
1403
+ error_model = JSON.load(response_content)
1404
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1405
+ end
1406
+
1407
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1408
+ # Deserialize Response
1409
+ if status_code == 200
1410
+ begin
1411
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1412
+ result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
1413
+ result.body = @client.deserialize(result_mapper, parsed_response)
1414
+ rescue Exception => e
1415
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1416
+ end
1417
+ end
1418
+
1419
+ result
1420
+ end
1421
+
1422
+ promise.execute
1423
+ end
1424
+
1425
+ #
1426
+ # Restarts one or more virtual machines in a VM scale set.
1427
+ #
1428
+ # @param resource_group_name [String] The name of the resource group.
1429
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1430
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1431
+ # virtual machine instance IDs from the VM scale set.
1432
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1433
+ # will be added to the HTTP request.
1434
+ #
1435
+ # @return [OperationStatusResponse] operation results.
1436
+ #
1437
+ def begin_restart(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1438
+ response = begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1439
+ response.body unless response.nil?
1440
+ end
1441
+
1442
+ #
1443
+ # Restarts one or more virtual machines in a VM scale set.
1444
+ #
1445
+ # @param resource_group_name [String] The name of the resource group.
1446
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1447
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1448
+ # virtual machine instance IDs from the VM scale set.
1449
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1450
+ # will be added to the HTTP request.
1451
+ #
1452
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1453
+ #
1454
+ def begin_restart_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1455
+ begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1456
+ end
1457
+
1458
+ #
1459
+ # Restarts one or more virtual machines in a VM scale set.
1460
+ #
1461
+ # @param resource_group_name [String] The name of the resource group.
1462
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1463
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1464
+ # virtual machine instance IDs from the VM scale set.
1465
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1466
+ # to the HTTP request.
1467
+ #
1468
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1469
+ #
1470
+ def begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1471
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1472
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1473
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1474
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1475
+
1476
+
1477
+ request_headers = {}
1478
+
1479
+ # Set Headers
1480
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1481
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1482
+
1483
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1484
+
1485
+ # Serialize Request
1486
+ request_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
1487
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
1488
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1489
+
1490
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'
1491
+
1492
+ request_url = @base_url || @client.base_url
1493
+
1494
+ options = {
1495
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1496
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1497
+ query_params: {'api-version' => @client.api_version},
1498
+ body: request_content,
1499
+ headers: request_headers.merge(custom_headers || {}),
1500
+ base_url: request_url
1501
+ }
1502
+ promise = @client.make_request_async(:post, path_template, options)
1503
+
1504
+ promise = promise.then do |result|
1505
+ http_response = result.response
1506
+ status_code = http_response.status
1507
+ response_content = http_response.body
1508
+ unless status_code == 200 || status_code == 202
1509
+ error_model = JSON.load(response_content)
1510
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1511
+ end
1512
+
1513
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1514
+ # Deserialize Response
1515
+ if status_code == 200
1516
+ begin
1517
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1518
+ result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
1519
+ result.body = @client.deserialize(result_mapper, parsed_response)
1520
+ rescue Exception => e
1521
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1522
+ end
1523
+ end
1524
+
1525
+ result
1526
+ end
1527
+
1528
+ promise.execute
1529
+ end
1530
+
1531
+ #
1532
+ # Starts one or more virtual machines in a VM scale set.
1533
+ #
1534
+ # @param resource_group_name [String] The name of the resource group.
1535
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1536
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1537
+ # virtual machine instance IDs from the VM scale set.
1538
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1539
+ # will be added to the HTTP request.
1540
+ #
1541
+ # @return [OperationStatusResponse] operation results.
1542
+ #
1543
+ def begin_start(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1544
+ response = begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1545
+ response.body unless response.nil?
1546
+ end
1547
+
1548
+ #
1549
+ # Starts one or more virtual machines in a VM scale set.
1550
+ #
1551
+ # @param resource_group_name [String] The name of the resource group.
1552
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1553
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1554
+ # virtual machine instance IDs from the VM scale set.
1555
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1556
+ # will be added to the HTTP request.
1557
+ #
1558
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1559
+ #
1560
+ def begin_start_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1561
+ begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1562
+ end
1563
+
1564
+ #
1565
+ # Starts one or more virtual machines in a VM scale set.
1566
+ #
1567
+ # @param resource_group_name [String] The name of the resource group.
1568
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1569
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
1570
+ # virtual machine instance IDs from the VM scale set.
1571
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1572
+ # to the HTTP request.
1573
+ #
1574
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1575
+ #
1576
+ def begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1577
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1578
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1579
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1580
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1581
+
1582
+
1583
+ request_headers = {}
1584
+
1585
+ # Set Headers
1586
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1587
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1588
+
1589
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1590
+
1591
+ # Serialize Request
1592
+ request_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineScaleSetVMInstanceIDs.mapper()
1593
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
1594
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1595
+
1596
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'
1597
+
1598
+ request_url = @base_url || @client.base_url
1599
+
1600
+ options = {
1601
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1602
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1603
+ query_params: {'api-version' => @client.api_version},
1604
+ body: request_content,
1605
+ headers: request_headers.merge(custom_headers || {}),
1606
+ base_url: request_url
1607
+ }
1608
+ promise = @client.make_request_async(:post, path_template, options)
1609
+
1610
+ promise = promise.then do |result|
1611
+ http_response = result.response
1612
+ status_code = http_response.status
1613
+ response_content = http_response.body
1614
+ unless status_code == 200 || status_code == 202
1615
+ error_model = JSON.load(response_content)
1616
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1617
+ end
1618
+
1619
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1620
+ # Deserialize Response
1621
+ if status_code == 200
1622
+ begin
1623
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1624
+ result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
1625
+ result.body = @client.deserialize(result_mapper, parsed_response)
1626
+ rescue Exception => e
1627
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1628
+ end
1629
+ end
1630
+
1631
+ result
1632
+ end
1633
+
1634
+ promise.execute
1635
+ end
1636
+
1637
+ #
1638
+ # Upgrades one or more virtual machines to the latest SKU set in the VM scale
1639
+ # set model.
1640
+ #
1641
+ # @param resource_group_name [String] The name of the resource group.
1642
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1643
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1644
+ # of virtual machine instance IDs from the VM scale set.
1645
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1646
+ # will be added to the HTTP request.
1647
+ #
1648
+ # @return [OperationStatusResponse] operation results.
1649
+ #
1650
+ def begin_update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
1651
+ response = begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1652
+ response.body unless response.nil?
1653
+ end
1654
+
1655
+ #
1656
+ # Upgrades one or more virtual machines to the latest SKU set in the VM scale
1657
+ # set model.
1658
+ #
1659
+ # @param resource_group_name [String] The name of the resource group.
1660
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1661
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1662
+ # of virtual machine instance IDs from the VM scale set.
1663
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1664
+ # will be added to the HTTP request.
1665
+ #
1666
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1667
+ #
1668
+ def begin_update_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
1669
+ begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1670
+ end
1671
+
1672
+ #
1673
+ # Upgrades one or more virtual machines to the latest SKU set in the VM scale
1674
+ # set model.
1675
+ #
1676
+ # @param resource_group_name [String] The name of the resource group.
1677
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1678
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
1679
+ # of virtual machine instance IDs from the VM scale set.
1680
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1681
+ # to the HTTP request.
1682
+ #
1683
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1684
+ #
1685
+ def begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
1686
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1687
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1688
+ fail ArgumentError, 'vm_instance_ids is nil' if vm_instance_ids.nil?
1689
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1690
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1691
+
1692
+
1693
+ request_headers = {}
1694
+
1695
+ # Set Headers
1696
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1697
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1698
+
1699
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1700
+
1701
+ # Serialize Request
1702
+ request_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineScaleSetVMInstanceRequiredIDs.mapper()
1703
+ request_content = @client.serialize(request_mapper, vm_instance_ids)
1704
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1705
+
1706
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'
1707
+
1708
+ request_url = @base_url || @client.base_url
1709
+
1710
+ options = {
1711
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1712
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1713
+ query_params: {'api-version' => @client.api_version},
1714
+ body: request_content,
1715
+ headers: request_headers.merge(custom_headers || {}),
1716
+ base_url: request_url
1717
+ }
1718
+ promise = @client.make_request_async(:post, path_template, options)
1719
+
1720
+ promise = promise.then do |result|
1721
+ http_response = result.response
1722
+ status_code = http_response.status
1723
+ response_content = http_response.body
1724
+ unless status_code == 200 || status_code == 202
1725
+ error_model = JSON.load(response_content)
1726
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1727
+ end
1728
+
1729
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1730
+ # Deserialize Response
1731
+ if status_code == 200
1732
+ begin
1733
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1734
+ result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
1735
+ result.body = @client.deserialize(result_mapper, parsed_response)
1736
+ rescue Exception => e
1737
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1738
+ end
1739
+ end
1740
+
1741
+ result
1742
+ end
1743
+
1744
+ promise.execute
1745
+ end
1746
+
1747
+ #
1748
+ # Reimages (upgrade the operating system) one or more virtual machines in a VM
1749
+ # scale set.
1750
+ #
1751
+ # @param resource_group_name [String] The name of the resource group.
1752
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1753
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1754
+ # will be added to the HTTP request.
1755
+ #
1756
+ # @return [OperationStatusResponse] operation results.
1757
+ #
1758
+ def begin_reimage(resource_group_name, vm_scale_set_name, custom_headers = nil)
1759
+ response = begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers).value!
1760
+ response.body unless response.nil?
1761
+ end
1762
+
1763
+ #
1764
+ # Reimages (upgrade the operating system) one or more virtual machines in a VM
1765
+ # scale set.
1766
+ #
1767
+ # @param resource_group_name [String] The name of the resource group.
1768
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1769
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1770
+ # will be added to the HTTP request.
1771
+ #
1772
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1773
+ #
1774
+ def begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, custom_headers = nil)
1775
+ begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers).value!
1776
+ end
1777
+
1778
+ #
1779
+ # Reimages (upgrade the operating system) one or more virtual machines in a VM
1780
+ # scale set.
1781
+ #
1782
+ # @param resource_group_name [String] The name of the resource group.
1783
+ # @param vm_scale_set_name [String] The name of the VM scale set.
1784
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1785
+ # to the HTTP request.
1786
+ #
1787
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1788
+ #
1789
+ def begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
1790
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1791
+ fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1792
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1793
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1794
+
1795
+
1796
+ request_headers = {}
1797
+
1798
+ # Set Headers
1799
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1800
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1801
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage'
1802
+
1803
+ request_url = @base_url || @client.base_url
1804
+
1805
+ options = {
1806
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1807
+ path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
1808
+ query_params: {'api-version' => @client.api_version},
1809
+ headers: request_headers.merge(custom_headers || {}),
1810
+ base_url: request_url
1811
+ }
1812
+ promise = @client.make_request_async(:post, path_template, options)
1813
+
1814
+ promise = promise.then do |result|
1815
+ http_response = result.response
1816
+ status_code = http_response.status
1817
+ response_content = http_response.body
1818
+ unless status_code == 200 || status_code == 202
1819
+ error_model = JSON.load(response_content)
1820
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1821
+ end
1822
+
1823
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1824
+ # Deserialize Response
1825
+ if status_code == 200
1826
+ begin
1827
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1828
+ result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::OperationStatusResponse.mapper()
1829
+ result.body = @client.deserialize(result_mapper, parsed_response)
1830
+ rescue Exception => e
1831
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1832
+ end
1833
+ end
1834
+
1835
+ result
1836
+ end
1837
+
1838
+ promise.execute
1839
+ end
1840
+
1841
+ #
1842
+ # Gets a list of all VM scale sets under a resource group.
1843
+ #
1844
+ # @param next_page_link [String] The NextLink from the previous successful call
1845
+ # to List operation.
1846
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1847
+ # will be added to the HTTP request.
1848
+ #
1849
+ # @return [VirtualMachineScaleSetListResult] operation results.
1850
+ #
1851
+ def list_next(next_page_link, custom_headers = nil)
1852
+ response = list_next_async(next_page_link, custom_headers).value!
1853
+ response.body unless response.nil?
1854
+ end
1855
+
1856
+ #
1857
+ # Gets a list of all VM scale sets under a resource group.
1858
+ #
1859
+ # @param next_page_link [String] The NextLink from the previous successful call
1860
+ # to List operation.
1861
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1862
+ # will be added to the HTTP request.
1863
+ #
1864
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1865
+ #
1866
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
1867
+ list_next_async(next_page_link, custom_headers).value!
1868
+ end
1869
+
1870
+ #
1871
+ # Gets a list of all VM scale sets under a resource group.
1872
+ #
1873
+ # @param next_page_link [String] The NextLink from the previous successful call
1874
+ # to List operation.
1875
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1876
+ # to the HTTP request.
1877
+ #
1878
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1879
+ #
1880
+ def list_next_async(next_page_link, custom_headers = nil)
1881
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1882
+
1883
+
1884
+ request_headers = {}
1885
+
1886
+ # Set Headers
1887
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1888
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1889
+ path_template = '{nextLink}'
1890
+
1891
+ request_url = @base_url || @client.base_url
1892
+
1893
+ options = {
1894
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1895
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1896
+ headers: request_headers.merge(custom_headers || {}),
1897
+ base_url: request_url
1898
+ }
1899
+ promise = @client.make_request_async(:get, path_template, options)
1900
+
1901
+ promise = promise.then do |result|
1902
+ http_response = result.response
1903
+ status_code = http_response.status
1904
+ response_content = http_response.body
1905
+ unless status_code == 200
1906
+ error_model = JSON.load(response_content)
1907
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1908
+ end
1909
+
1910
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1911
+ # Deserialize Response
1912
+ if status_code == 200
1913
+ begin
1914
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1915
+ result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineScaleSetListResult.mapper()
1916
+ result.body = @client.deserialize(result_mapper, parsed_response)
1917
+ rescue Exception => e
1918
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1919
+ end
1920
+ end
1921
+
1922
+ result
1923
+ end
1924
+
1925
+ promise.execute
1926
+ end
1927
+
1928
+ #
1929
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
1930
+ # associated resource group. Use nextLink property in the response to get the
1931
+ # next page of VM Scale Sets. Do this till nextLink is not null to fetch all
1932
+ # the VM Scale Sets.
1933
+ #
1934
+ # @param next_page_link [String] The NextLink from the previous successful call
1935
+ # to List operation.
1936
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1937
+ # will be added to the HTTP request.
1938
+ #
1939
+ # @return [VirtualMachineScaleSetListWithLinkResult] operation results.
1940
+ #
1941
+ def list_all_next(next_page_link, custom_headers = nil)
1942
+ response = list_all_next_async(next_page_link, custom_headers).value!
1943
+ response.body unless response.nil?
1944
+ end
1945
+
1946
+ #
1947
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
1948
+ # associated resource group. Use nextLink property in the response to get the
1949
+ # next page of VM Scale Sets. Do this till nextLink is not null to fetch all
1950
+ # the VM Scale Sets.
1951
+ #
1952
+ # @param next_page_link [String] The NextLink from the previous successful call
1953
+ # to List operation.
1954
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1955
+ # will be added to the HTTP request.
1956
+ #
1957
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1958
+ #
1959
+ def list_all_next_with_http_info(next_page_link, custom_headers = nil)
1960
+ list_all_next_async(next_page_link, custom_headers).value!
1961
+ end
1962
+
1963
+ #
1964
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
1965
+ # associated resource group. Use nextLink property in the response to get the
1966
+ # next page of VM Scale Sets. Do this till nextLink is not null to fetch all
1967
+ # the VM Scale Sets.
1968
+ #
1969
+ # @param next_page_link [String] The NextLink from the previous successful call
1970
+ # to List operation.
1971
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1972
+ # to the HTTP request.
1973
+ #
1974
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1975
+ #
1976
+ def list_all_next_async(next_page_link, custom_headers = nil)
1977
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1978
+
1979
+
1980
+ request_headers = {}
1981
+
1982
+ # Set Headers
1983
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1984
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1985
+ path_template = '{nextLink}'
1986
+
1987
+ request_url = @base_url || @client.base_url
1988
+
1989
+ options = {
1990
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1991
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1992
+ headers: request_headers.merge(custom_headers || {}),
1993
+ base_url: request_url
1994
+ }
1995
+ promise = @client.make_request_async(:get, path_template, options)
1996
+
1997
+ promise = promise.then do |result|
1998
+ http_response = result.response
1999
+ status_code = http_response.status
2000
+ response_content = http_response.body
2001
+ unless status_code == 200
2002
+ error_model = JSON.load(response_content)
2003
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2004
+ end
2005
+
2006
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2007
+ # Deserialize Response
2008
+ if status_code == 200
2009
+ begin
2010
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2011
+ result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineScaleSetListWithLinkResult.mapper()
2012
+ result.body = @client.deserialize(result_mapper, parsed_response)
2013
+ rescue Exception => e
2014
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2015
+ end
2016
+ end
2017
+
2018
+ result
2019
+ end
2020
+
2021
+ promise.execute
2022
+ end
2023
+
2024
+ #
2025
+ # Gets a list of SKUs available for your VM scale set, including the minimum
2026
+ # and maximum VM instances allowed for each SKU.
2027
+ #
2028
+ # @param next_page_link [String] The NextLink from the previous successful call
2029
+ # to List operation.
2030
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2031
+ # will be added to the HTTP request.
2032
+ #
2033
+ # @return [VirtualMachineScaleSetListSkusResult] operation results.
2034
+ #
2035
+ def list_skus_next(next_page_link, custom_headers = nil)
2036
+ response = list_skus_next_async(next_page_link, custom_headers).value!
2037
+ response.body unless response.nil?
2038
+ end
2039
+
2040
+ #
2041
+ # Gets a list of SKUs available for your VM scale set, including the minimum
2042
+ # and maximum VM instances allowed for each SKU.
2043
+ #
2044
+ # @param next_page_link [String] The NextLink from the previous successful call
2045
+ # to List operation.
2046
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2047
+ # will be added to the HTTP request.
2048
+ #
2049
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2050
+ #
2051
+ def list_skus_next_with_http_info(next_page_link, custom_headers = nil)
2052
+ list_skus_next_async(next_page_link, custom_headers).value!
2053
+ end
2054
+
2055
+ #
2056
+ # Gets a list of SKUs available for your VM scale set, including the minimum
2057
+ # and maximum VM instances allowed for each SKU.
2058
+ #
2059
+ # @param next_page_link [String] The NextLink from the previous successful call
2060
+ # to List operation.
2061
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2062
+ # to the HTTP request.
2063
+ #
2064
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2065
+ #
2066
+ def list_skus_next_async(next_page_link, custom_headers = nil)
2067
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2068
+
2069
+
2070
+ request_headers = {}
2071
+
2072
+ # Set Headers
2073
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2074
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2075
+ path_template = '{nextLink}'
2076
+
2077
+ request_url = @base_url || @client.base_url
2078
+
2079
+ options = {
2080
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2081
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2082
+ headers: request_headers.merge(custom_headers || {}),
2083
+ base_url: request_url
2084
+ }
2085
+ promise = @client.make_request_async(:get, path_template, options)
2086
+
2087
+ promise = promise.then do |result|
2088
+ http_response = result.response
2089
+ status_code = http_response.status
2090
+ response_content = http_response.body
2091
+ unless status_code == 200
2092
+ error_model = JSON.load(response_content)
2093
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2094
+ end
2095
+
2096
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2097
+ # Deserialize Response
2098
+ if status_code == 200
2099
+ begin
2100
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2101
+ result_mapper = Azure::Compute::Mgmt::V2015_06_15::Models::VirtualMachineScaleSetListSkusResult.mapper()
2102
+ result.body = @client.deserialize(result_mapper, parsed_response)
2103
+ rescue Exception => e
2104
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2105
+ end
2106
+ end
2107
+
2108
+ result
2109
+ end
2110
+
2111
+ promise.execute
2112
+ end
2113
+
2114
+ #
2115
+ # Gets a list of all VM scale sets under a resource group.
2116
+ #
2117
+ # @param resource_group_name [String] The name of the resource group.
2118
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2119
+ # will be added to the HTTP request.
2120
+ #
2121
+ # @return [VirtualMachineScaleSetListResult] which provide lazy access to pages
2122
+ # of the response.
2123
+ #
2124
+ def list_as_lazy(resource_group_name, custom_headers = nil)
2125
+ response = list_async(resource_group_name, custom_headers).value!
2126
+ unless response.nil?
2127
+ page = response.body
2128
+ page.next_method = Proc.new do |next_page_link|
2129
+ list_next_async(next_page_link, custom_headers)
2130
+ end
2131
+ page
2132
+ end
2133
+ end
2134
+
2135
+ #
2136
+ # Gets a list of all VM Scale Sets in the subscription, regardless of the
2137
+ # associated resource group. Use nextLink property in the response to get the
2138
+ # next page of VM Scale Sets. Do this till nextLink is not null to fetch all
2139
+ # the VM Scale Sets.
2140
+ #
2141
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2142
+ # will be added to the HTTP request.
2143
+ #
2144
+ # @return [VirtualMachineScaleSetListWithLinkResult] which provide lazy access
2145
+ # to pages of the response.
2146
+ #
2147
+ def list_all_as_lazy(custom_headers = nil)
2148
+ response = list_all_async(custom_headers).value!
2149
+ unless response.nil?
2150
+ page = response.body
2151
+ page.next_method = Proc.new do |next_page_link|
2152
+ list_all_next_async(next_page_link, custom_headers)
2153
+ end
2154
+ page
2155
+ end
2156
+ end
2157
+
2158
+ #
2159
+ # Gets a list of SKUs available for your VM scale set, including the minimum
2160
+ # and maximum VM instances allowed for each SKU.
2161
+ #
2162
+ # @param resource_group_name [String] The name of the resource group.
2163
+ # @param vm_scale_set_name [String] The name of the VM scale set.
2164
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2165
+ # will be added to the HTTP request.
2166
+ #
2167
+ # @return [VirtualMachineScaleSetListSkusResult] which provide lazy access to
2168
+ # pages of the response.
2169
+ #
2170
+ def list_skus_as_lazy(resource_group_name, vm_scale_set_name, custom_headers = nil)
2171
+ response = list_skus_async(resource_group_name, vm_scale_set_name, custom_headers).value!
2172
+ unless response.nil?
2173
+ page = response.body
2174
+ page.next_method = Proc.new do |next_page_link|
2175
+ list_skus_next_async(next_page_link, custom_headers)
2176
+ end
2177
+ page
2178
+ end
2179
+ end
2180
+
2181
+ end
2182
+ end